Files
codecraft/web/src/jobTemplates.ts
T
Richard ZinkandClaude Opus 5.5 05c215f685 Automation editor with graphical schedule and assistant; movable chat list groups
Automations
- Job files hold only the instructions; name, schedule, mode, model, approval
  mode and time limit are settings in the database (jobs.settings). Existing
  files are adopted on start-up (frontmatter into the database and removed from
  the file); plain Markdown files registered later get default settings and stay
  switched off until scheduled.
- New automation: name, project and a starting point (blank example structure or
  a template) create .codecraft/jobs/<name>.md and open the editor: settings with
  a graphical cron builder (next runs in server time via /jobs/schedule), the
  instructions in the Markdown editor and an assistant chat
  (POST /jobs/{id}/assistant) whose model edits the file; the editor reloads it
  after each turn and warns about conflicts with unsaved edits.
- The schedule tool writes prompt-only files with settings.

Chat list
- Folders and projects keep a user-defined order and can be pinned (drag and
  drop, or the group's menu), stored per user via /account/sidebar. A new
  message moves the chat to the top of its group, no longer the project itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:05:15 +01:00

74 lines
3.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/** Ready-made automations (prompts in English: they are read by the agent). */
export interface JobTemplate {
id: string;
icon: string;
name: { en: string; de: string };
desc: { en: string; de: string };
schedule: string;
agent: "build" | "plan";
prompt: string;
}
export const JOB_TEMPLATES: JobTemplate[] = [
{
id: "deps",
icon: "refresh",
name: { en: "Dependency check", de: "Abhängigkeiten prüfen" },
desc: { en: "Weekly: outdated packages and security advisories", de: "Wöchentlich: veraltete Pakete und Sicherheitsmeldungen" },
schedule: "0 7 * * 1",
agent: "build",
prompt:
"Check this project's dependencies (all package manifests you find). List outdated packages with current and latest version, and any known security advisories (use the package manager's audit command if there is one). Do not change any files. End with a short, prioritised report: what should be updated first and why.",
},
{
id: "security",
icon: "shield",
name: { en: "Security review of recent changes", de: "Sicherheits-Review der letzten Änderungen" },
desc: { en: "Nightly: reviews the commits of the last 24 hours", de: "Nachts: prüft die Commits der letzten 24 Stunden" },
schedule: "0 3 * * *",
agent: "plan",
prompt:
"Review the git commits of the last 24 hours (git log --since=\"24 hours ago\" -p) for security problems: injection, missing authorisation checks, secrets in code, unsafe deserialisation, path traversal, weak crypto. If there were no commits, say so and stop. Report each finding with file, line, severity and a suggested fix.",
},
{
id: "tests",
icon: "check",
name: { en: "Test suite health", de: "Testsuite-Zustand" },
desc: { en: "Daily: runs the tests and analyses failures", de: "Täglich: führt die Tests aus und analysiert Fehler" },
schedule: "0 6 * * *",
agent: "build",
prompt:
"Run the project's test suite. If everything passes, report the number of tests and the duration. If tests fail, find the cause of each failure (read the code, check recent commits) but do not change any files. Report failing tests, the likely cause and a proposed fix. Mention flaky tests if a re-run behaves differently.",
},
{
id: "standup",
icon: "scroll",
name: { en: "Daily summary", de: "Tageszusammenfassung" },
desc: { en: "Weekday mornings: what changed yesterday", de: "Werktags morgens: was sich gestern geändert hat" },
schedule: "0 8 * * 1-5",
agent: "plan",
prompt:
"Summarise what happened in this project since the previous working day: commits (grouped by topic), changed areas of the code, open branches. Point out anything that looks unfinished or risky. Keep it short – a stand-up style summary.",
},
{
id: "todos",
icon: "file-text",
name: { en: "TODO/FIXME report", de: "TODO/FIXME-Bericht" },
desc: { en: "Fridays: collects open TODOs and FIXMEs", de: "Freitags: sammelt offene TODOs und FIXMEs" },
schedule: "0 16 * * 5",
agent: "plan",
prompt:
"Find all TODO, FIXME, HACK and XXX comments in the project (skip dependencies and generated files). Group them by area, mark the ones that look urgent and the ones that are probably already done. Do not change files.",
},
{
id: "docs",
icon: "file-doc",
name: { en: "Documentation freshness", de: "Doku-Aktualität" },
desc: { en: "Monthly: README and docs against the code", de: "Monatlich: README und Doku gegen den Code" },
schedule: "0 9 1 * *",
agent: "plan",
prompt:
"Compare the README and other documentation with the current code: commands, configuration options, APIs and examples that are outdated, missing or wrong. Do not change files. Report concrete corrections.",
},
];