Skip to main content
Use this guide when an initialized task already exists and you want the agent to do the real work: freezing the spec, building, packing evidence, verifying, and fixing until the verdict is PASS.

Continue Existing Task prompt

Copy this prompt into your agent session, then replace ... with either Task file: <path/to/task-file.md> or the task text pasted on the following lines.
Use $repo-task-proof-loop to continue the task described below in this repository. Reuse the matching repo-local task if it already exists; if not, stop after explaining that init should be run first.
...

How the agent infers the next step

If you do not supply an explicit command, the agent infers the next step from the current repo state:
Repo stateNext step
Task folder does not existinit only — do not proceed further until init succeeds
spec.md is missing or placeholder-onlyfreeze
Implementation is not yet completebuild
Evidence is stale or missingevidence
No fresh verdict existsverify
Verdict is not PASSfix

Full run sequence

1

init

Create the repo-local task folder, artifacts, and subagents if they do not exist yet.
scripts/task_loop.py init --task-id <TASK_ID>
Wait for init to finish, then confirm .agent/tasks/<TASK_ID>/spec.md exists before continuing.
2

freeze

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

build

Spawn exactly one builder subagent. It implements the task against the frozen spec, makes the smallest safe change set that satisfies the acceptance criteria, and returns the files changed, checks run, and open risks.
4

evidence

Continue in the same builder session. The builder packs 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. Each acceptance criterion receives a PASS, FAIL, or UNKNOWN judgment with concrete proof.Use the fallback evidence-only prompt only if the original builder session is unavailable.
5

verify

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

fix (if needed)

If the verdict is FAIL or UNKNOWN, spawn exactly one fresh fixer subagent. The fixer reads only spec.md, verdict.json, and problems.md, reconfirms each listed problem, makes the smallest safe change set, and regenerates the evidence bundle.
7

verify again

Spawn one more fresh verifier subagent. Repeat the fix → verify cycle until the verifier returns PASS or you stop the loop.
The shortest valid path to starting and building in one go is to run the Start New Task prompt first, then immediately run the Continue Existing Task prompt with the same task text. This skill is proof-first, so init must complete before build begins.

Using --force to overwrite existing artifacts

Pass --force to init when you need to recreate task artifact templates that already exist on disk:
python3 "$SKILL_PATH/scripts/task_loop.py" init \
  --task-id feature-auth-hardening \
  --force
Without --force, the initializer skips files that already exist.

Claude Code: new session after init refreshes agents

If init created or refreshed .claude/agents/* during a running Claude Code session, start a new Claude Code session before relying on those updated agents. Use /agents to confirm the updated agent list is available in the new session.

Build docs developers (and LLMs) love