Catalogue / flow-execution
flow-execution
Apache-2.0SignedUse when implementing an approved Flow chapter's task worksheets or reporting live spec and branch status. Don't use for drafting or revising specs (use flow-planning), initializing bundles (use flow-setup), or final review and closeout (use flow-completion).--- name: flow-execution description: "Use when implementing an approved Flow chapter's task worksheets or reporting live spec and branch status. Don't use for drafting or revising specs (use flow-planning), initializing bundles (use flow-setup), or final review and closeout (use flow-completion)." disable-model-invocation: true ---
Flow Execution
<!-- lifecycle-ownership: owner=flow-execution; operations=implement,status -->
Trigger
Use for implement (`../flow/references/implement.md`) and status (`../flow/references/status.md`).
Workflow
- Worktree Resolution, Active Chapter, & Preflight:
- Resolve the effective
.agents/bundle root across linked Git worktrees (sharedworktree.agents/vs.local-onlyprimary checkout.agents/). Reuse symlinked.venv/node_moduleswithuv run --no-syncrather than re-running dependency installers. - Read root
.agents/bundles/specs/<flow_id>/spec.md,chapters/index.md(whenhas_chapters: true), and only the activecurrent_chapter'sspec.mdandtasks/*.md(`../flow/references/state.md`). Surface a warning ifplanning_quality == "degraded". - Verify
depends_on_chaptersarecompletedwith non-nulllast_reviewed_commitandplanning_status == "complete". Ifplanning_status == "empirical_dependent", stop without editing production files and route to/flow:revise <flow_id> <chapter_id>. - Run preflight (
dependencies_closed,worksheet_completeforfullorcompactworksheets,verification_strategy_declared,plan_identity_matches,target_symbols_exist). On mismatch, mark the taskstate: blocked([!]) without editing production files and route to/flow:revise.
- Model Routing & Parallel Steps (`1..N` Tasks):
- Execute one active chapter per
/flow:implementrun by default, or consecutive ready non-empirical_dependentchapters when--allis passed. See `../flow/references/orchestration.md` forstrong/standard/fast/lightmodel routing. - Task Plans & Briefs (`flow tasks plan --flow <flow_id> --briefs --json`): Group ready tasks on separate files into steps (
workersup to4,<= 250LOC and<= 3files per task with compact briefs): - Google Antigravity (`small_swarm`): When
>= 2ready tasks touch separate files and worker quota allows, spawn1..3writer workers (workspace: "share", tagged[Flow Swarm Worker], no.agents/bundles/edits) and1independent verifier (workspace: "inherit"). Cherry-pick commits in task order, runflow syncbetween steps, verifychapter_base_commit..HEAD, and kill workers. - Claude Code, Codex CLI, Cursor, & OpenCode V2 (`parallel_tasks`): Dispatch up to
4isolated parallel@executorsubagents over separate files (isolated worktrees or separate paths) and merge before closing. - Workflow Fallback (`flow-chapter-pipeline`): Run
run_workflow(ScriptPath="<plugin_root>/workflows/flow-chapter-pipeline/workflow.py", Args={...})for parallel or sequential execution withflow syncbetween steps. - Each writer stays inside its brief and
read_set, writes tests against the real module under test, and uses bug diagnosis on non-obvious failures. It runs< 60slint and targeted tests, then creates signed code+test commits (<CODE_SHA>, orcommit_deferred_to_coordinator: true).
- Chapter Closeout Sequence:
- Commit Code First & Sync Markdown/OKF: Record
<CODE_SHA>in each completedtasks/<id>-<slug>.mdandchapters/<ch_id>/spec.md, update.agents/bundles/knowledge/**anddocs/**in present tense, rewritechapters/index.mdand rootspecs/<flow_id>/spec.md, run/flow:validate, and commit the synced docs. - Independent Closeout Review: Dispatch isolated reviewers planned by
flow review plan --json(singlefor small changes,dualorcommitteewith another vendor for higher-risk diffs). Fix adopted findings and re-verify once. - Completion Check, Review Stamp, & Pointer Advance: Verify zero tasks remain
pending/open/in_progress/blocked, anydeferreditem carriesdeferred_by: "user"+deferred_reason, and completed task commits modified a declared path infiles:ortests:. Stamplast_reviewed_commitandstate: completedinchapters/<ch_id>/spec.md, advance rootspec.mdpointers, commit closeout metadata, and stop at the chapter boundary unless--allhas another ready chapter.
Guardrails
- Execute one active chapter per run by default (or consecutive ready chapters with
--all). Never skip remaining chapters or child specs so partial work cannot pose as done. - Keep each worker inside its brief and
read_set, test the real module without mocking it, and stop if preflight fails so changes stay isolated and reviewable. - Never mark a task or chapter
deferredorskippedwithout explicit user confirmation (deferred_by: "user"and non-emptydeferred_reason). - Never use
git commit --amendto back-fill a taskcommit:SHA because amending changes the hash referenced by worksheets. Commit code and tests first (<CODE_SHA>), then record<CODE_SHA>in the sync commit. - Run the
< 60schapter check once per chapter so iteration stays quick. Reserve slow (> 60s) full repository suites for/flow:finishor CI. - Sync present-tense Markdown and pass chapter review before stopping so the Stop hook verifies a clean state. Never push or mutate Git tags without explicit instruction.
Example
flow tasks plan --flow <flow_id> --briefs --json flow sync --flow <flow_id>
Output
Return the completed chapter/task summary, check exit codes, task and sync commit SHAs, review summary, last_reviewed_commit, remaining chapters from the full plan, and /compact + next /flow:implement <flow_id> (or /flow:finish <flow_id>) handoff.
Validation
Confirm all chapter checks exited 0, every tasks/<id>-<slug>.md state/commit matches its spec.md checklist, root spec.md + chapters/index.md + knowledge/** + docs/** are synced in present tense, and last_reviewed_commit covers every completed task commit in the chapter.
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 6.3 kB | 6f975a74340c |
| SKILVAULT_SOURCE.json | 1.1 kB | 40aca6d990ca |
| THIRD_PARTY_NOTICES.md | 11.4 kB | fc69eca59406 |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 0.1.0 Current | ccd8a21437e8 | 29 Nov 2026 |
Locking a skill to one version needs Pro.