Cortex workflow templates
Status: Ready
Truth label: Current
Audience: Fleet operator
Reader outcome: Use cortex workflow templates in Cortex, with every control, its verification, and its limits stated.
Last verified: 2026-09-13
Open Manage Cortex > Manage workflow templates. See Cortex management for search and keyboard access.
Open New pipeline, then Manage workflow templates. Bundled delivery and quickfix definitions remain read-only. Clone one into a unique ID, or start a new template. Edit its purpose, ordered stages, instructions, persona, ordered skills, engine/provider/model, permissions, verification command and review points. The stage brief editor manages task kind, constraints, requested files and acceptance criteria.
Validate and preview the definition before saving. History restoration and imports populate the editor for review; saving creates a new revision. Export includes the saved definition and history. Retirement removes a template from new launches while preserving existing runs. A stale save keeps local edits and asks for a reload.
Return to the launch form, choose the project and optional worker, and enter the goal. Engine, verification command and QA budget overrides are optional. Preview workflow run shows each task's effective settings and their origins. Launch reviewed workflow requires that preview. A changed template must be previewed again. Retrying the same launch request returns the original session/tasks; it does not create a second chain.
Each launch retains the definition and request on its session, plus the exact stage definition on each task. Open a stage's Execution settings to inspect that frozen workflow. Later edits and retirement do not alter an existing chain. Pending stage briefs can still be revised explicitly through the task brief editor. Existing checkpoint, targeted rework and cancellation controls continue to operate on the created tasks.
The editor supports one ordered chain of at most 20 stages. Every stage declares checkpoint or autonomous review. At most one QA gate can target the immediately preceding stage. A stage selects a managed method or at least one legacy skill. Managed methods deliver pinned role/skill content and validate required files. Legacy worker-local skills still depend on the worker installation. The launch form currently exposes execution settings; Brain-created requests can also carry writing snapshots through the API. Stage inputs now retain full reports, reviewed notes, artifact versions and criterion evidence at each claim. Broader research workflows remain follow-through work.
Definitions/history/run snapshots are stored in forge.sqlite3 under workflow_templates, workflow_versions and workflow_runs. Session metadata uses task_sessions in the same database. Launches have a SQL savepoint, so sessions, stages and run snapshots roll back together even inside a recurrence transaction. Legacy session JSON imports once and stays unchanged. Old sessions without snapshots report that evidence as unavailable, rather than reconstructing it from current templates.
Verification uses temporary projects and a private Central fixture. It covers template validation, stale saves, preview without enqueueing, stage settings/briefs, retirement, duplicate launches, unchanged run snapshots, rollback on creation failure and existing QA behavior. Cortex checks include clone/edit, stage brief editing, preview/save, history, native import/export, retirement/restore, stale edits, run preview/launch and frozen-definition inspection.
Use recurring workflows to schedule a reviewed stage snapshot, manage overlap and retain operator-reviewed results between occurrences.