Skip to main content
The run command executes the full workflow in strict sequence: spec freeze, build, evidence packing, fresh verification, and repeated fix-verify cycles until the verifier returns PASS. Use run when you want the complete loop in one invocation rather than driving each phase individually.
init must complete before run begins. Confirm .agent/tasks/<TASK_ID>/spec.md exists before invoking run.

Parent orchestration order

Copy this orchestration sequence verbatim when directing the parent agent to run the full loop. Replace <TASK_ID> with the actual task identifier.
Run this sequence strictly in order. Do not batch or parallelize steps.
1. init <TASK_ID>
2. wait for init to finish, then confirm .agent/tasks/<TASK_ID>/spec.md exists
3. freeze <TASK_ID> using one spec-freezer child
4. build <TASK_ID> using one builder child
5. evidence <TASK_ID> in the same builder child by default, otherwise in evidence-only mode
6. verify <TASK_ID> using one fresh verifier child
7. if verdict is PASS, stop
8. if verdict is FAIL or UNKNOWN, run fix <TASK_ID> using one fresh fixer child
9. run verify <TASK_ID> again using one fresh verifier child
10. repeat 7-9 until PASS or user stops the loop

Step-by-step breakdown

1

init

Run init if the task folder does not exist yet. Wait for it to complete, then confirm .agent/tasks/<TASK_ID>/spec.md is present on disk before proceeding.
python3 "$SKILL_PATH/scripts/task_loop.py" init --task-id <TASK_ID>
2

freeze

Spawn exactly one spec-freezer subagent. It writes spec.md with the original task statement, acceptance criteria (AC1, AC2, …), constraints, non-goals, and a verification plan. No production code is touched.
3

build

Spawn exactly one builder subagent. It implements the task against the frozen spec.md, making the smallest safe change set that satisfies the acceptance criteria.
4

evidence

Continue in the same builder session. Pack evidence.md, evidence.json, and raw artifacts (raw/build.txt, raw/test-unit.txt, raw/test-integration.txt, raw/lint.txt) without changing production code. Fall back to an evidence-only session only if the original builder session is unavailable.
5

verify

Spawn exactly one fresh verifier subagent. It independently inspects the current codebase, reruns checks, and writes verdict.json. If the overall verdict is not PASS, it also writes problems.md.
6

If PASS, stop

When the verifier returns overall_verdict: PASS, the task is complete. Validate the full artifact set before sign-off:
python3 "$SKILL_PATH/scripts/task_loop.py" validate --task-id <TASK_ID>
7

If not PASS, fix then verify again

If the verdict is FAIL or UNKNOWN, spawn a fresh fixer subagent. It reads only spec.md, verdict.json, and problems.md, reconfirms each listed problem, applies the smallest safe change set, and regenerates the evidence bundle.Then spawn another fresh verifier. Repeat the fix → verify cycle until PASS or the user stops the loop.

Strict ordering rules

Do not batch or parallelize any steps. Each phase must complete before the next begins. In particular:
  • init must finish before freeze, build, evidence, verify, fix, or any child-agent work
  • freeze must finish before build
  • build must finish before evidence
  • evidence must finish before verify
  • fix must finish before the next verify

freeze

Spec-freezer parent prompt and spec.md requirements

build

Builder parent prompt and same-session evidence packing

verify

Fresh-verifier parent prompt and verdict.json / problems.md format

fix

Fixer parent prompt and fix procedure

Build docs developers (and LLMs) love