Implement task
Build exactly one Task from a Spec folder. The Task file defines the slice,
acceptance criteria, and Verification contract. Standalone execution owns the
full lifecycle; a Roundfix Daemon-assigned turn hands back
implementation-ready work for Daemon Verification and settlement.
Being assigned the Task — by the user, a loop, or a Daemon — is the
authorization to start. Begin immediately: no greeting, no plan-approval
question, no waiting for a "go". Contradictory requirements, or a stale
standalone in_progress status, are the only reasons to pause before
implementing.
Execution modes
Standalone execution and a Roundfix Daemon-assigned turn share the same Task
slice, Result, and evidence requirements, but they have different settlement
owners.
- In standalone execution, the Agent updates Task status, runs every command
in
## Verification, settles the Task from fresh evidence, and commits only
when the user has authorized a commit.
- In a Roundfix Daemon-assigned turn, the Daemon is the sole Task-status
writer. The Agent must not edit status, run the declared
## Verification
commands, claim a terminal verdict, or commit. It may run focused checks,
records implementation and focused-check evidence in ## Result, and hands
back implementation-ready work. The Daemon then runs the complete declared
Verification verbatim before settlement.
- A Daemon Verification command failure releases Verification Capacity before
one Verification Feedback repair turn in the same Agent Session. The Agent
repairs the implementation, updates
## Result, runs focused checks when
useful, and hands back again without running declared Verification or
settling status.
For a Daemon-assigned Task that arrives in_progress, start the Task fresh.
The work-target lock proves that no live Agent owns it. Do not ask how to
resume, and do not normalize or settle its status.
1. Load
Read the assigned task_NN.md, then run the Project Constraint preflight
before changing the Task status to in_progress in standalone execution:
- A completed or archived legacy Spec is exempt from forced constraint
backfill. Leave its artifacts byte-identical and stop rather than
re-executing or rewriting it.
- For an active Spec, require complete
Project Constraints sections in the
PRD and every present TechSpec. Each must account for identifier strategy,
authentication and HTTP, active ADR obligations, and tooling authority as
applicable or not applicable with a reason, with an operative
docs/agents/ source path for every row. Stop without changing Task status
when any row, reason, or source is missing.
- Determine whether the assigned Task creates, edits, renames, moves, or
deletes repository-tooling configuration, scripts, ignore files, plugin
declarations, or version pins. Tooling authorization is not implied by Task
assignment, setup approval, or a generic implementation request.
- Before a tooling Task can start, require express maintainer authorization
and an exact bounded repository-relative file list in the PRD and every
present TechSpec. The mutation allowlist is those exact paths plus the
assigned Task file itself. Missing or conflicting authorization leaves the
Task pending and stops execution.
- Run
git status --short and capture the pre-existing changed paths before
work begins. They remain user-owned and cannot be counted as this Task's
changes.
After the preflight, standalone execution checks status:
pending → set status: in_progress and proceed.
in_progress → a previous session may have died mid-task. Inspect the
worktree and git log for partial work, report what you find, and ask how to
proceed rather than double-building.
completed / failed → stop and report; re-running is an explicit human
decision.
In a Daemon-assigned turn, treat status as Daemon-owned and proceed without
editing it.
- Read the sections of
_prd.md and _techspec.md named in the task's References, plus CONTEXT.md (use its vocabulary in code names and test names) and any referenced ADRs.
- If requirements contradict each other — task vs spec, spec vs ADR — stop and report the conflict. Guessing buries a spec bug inside an implementation.
2. Plan
Build a checklist from Requirements + Acceptance Criteria.
Capture the pre-change signal that proves the task is not yet done — the failing test, the missing behavior, the 404. Without a red starting point you cannot show your change is what turned things green.
Characterization Tasks use the real boundary, within the bounds the Task
declares. When the assigned Task is a characterization Task, exercise the
named external surface and record what the real thing does. Do not substitute
a fake, mock, fixture, or inferred behavior; the record is the boundary
evidence that downstream Tasks may rely on.
Before reaching the boundary, confirm the Task states which target you are
reaching and that you are reaching that one. Read rather than write, or use
the isolated instance the Task creates. Use only the credentials the Task
scopes to that target, honour cancellation, and remove what you created even
when the Task fails. A write against the real boundary happens only where the
Task authorizes that write specifically — recording what a boundary does is
not authority to change it, and an unauthorized write is out of scope
whatever it would prove. If the Task names no target or no bound, stop and
report that rather than choosing one.
3. Implement
- Stay inside the slice. The PRD's Non-Goals and the task's scope are walls, not suggestions — work that belongs to another task goes in a follow-up note, not in this diff.
- Tests first at the seams the TechSpec names (they are pre-agreed; a new seam needs the user's sign-off). Typecheck and run the focused tests frequently; save the full suite for the gate.
- Root cause only — no lint/type suppressions, no swallowed errors, no timing hacks. A workaround closes the task and opens a bug.
- For an authorized tooling Task, compare the target path with the mutation
allowlist before every mutation. Never edit
_tasks.md or any other Task
file. If a required path is absent from the authorization, stop and request
a revised Spec instead of widening the list.
4. Standalone verify — the gate
In standalone execution, evidence comes before terminal status in this order:
- Run every command in the Task's
## Verification section verbatim.
- Run the repository's verify pipeline (
make verify, or the build/lint/typecheck/test equivalents this repo documents) when the current execution mode requires local completion evidence.
- Walk Acceptance Criteria one by one: each needs fresh evidence from this session — a command output, a test name that passes, an observed behavior. A green suite is not evidence for a criterion the suite doesn't cover.
For every authorized tooling Task, run a changed-file postflight after the last
edit. Compare the captured baseline with git status --short and
git diff --name-only, accounting for staged, unstaged, and untracked paths.
Every newly changed path must be either one exact authorized path or the
assigned Task file. If any other path appears, make no further mutation, set
status: failed, record the out-of-scope paths in ## Result, and leave the
worktree intact for recovery.
A narrow verification never supports a broad claim. If any standalone check
fails after honest root-cause attempts: set status: failed, record what was
tried in ## Result, and report — a loud failure the scheduler can retry
beats a quiet "mostly done".
5. Standalone record
Append a ## Result section to the task file: what changed (described by behavior, not file lists), commands run with outcomes, evidence per acceptance criterion, and any follow-ups discovered. Tick the Subtasks and Acceptance Criteria checkboxes that the evidence supports. Set status: completed.
Never touch _tasks.md — it owns graph topology, not progress.
6. Standalone commit
- Commit only when the user has explicitly authorized it.
- Stage only this task's files (
git status --short first; unrelated changes stay out).
- One commit per task, Conventional Commits format, task id in the body for traceability (
spec: <slug> / task_02).
- Never push and never open a PR from inside a task — publishing is a separate, explicit action.
7. Daemon-assigned handoff
- Read the assigned Task, PRD, TechSpec,
CONTEXT.md, active ADRs, and bounded
context paths before editing.
- Implement only the assigned slice. Never edit
_tasks.md, another Task
file, or a path outside an authorized tooling allowlist.
- Run focused implementation checks while working when useful. Do not run any
command from the Task's
## Verification section.
- Append or update
## Result with the implementation and focused-check
evidence for every acceptance criterion. Do not use Daemon Verification
evidence that has not run yet.
- Hand back implementation-ready work without editing Task status or claiming
completed, failed, passing Verification, commit readiness, or delivery.
- Never commit, push, or open a pull request. The Daemon runs declared
Verification, writes terminal Task status, and owns the Task commit.
Anti-patterns
- Marking
completed on "should work" — the status field is read by machines that won't double-check.
- Weakening, skipping, or deleting a failing test to get to green.
- Fixing "one more thing" spotted along the way — that's a follow-up, not scope.
- Re-verifying with stale output from earlier in the session; evidence must postdate the last edit.
- Editing other tasks' files or statuses.
- In a Daemon-assigned turn, running declared Verification, editing Task
status, claiming a terminal verdict, or committing.
1---2name: implement-task3description: Execute one task file from docs/specs/<slug>/ end-to-end — ground in the PRD/TechSpec, implement only the slice, and hand back evidence under the execution mode's settlement contract. Starts immediately when assigned, with no confirmation prompt. Use when the user says "run task_03", "execute the next task", "pick up a task", or when an implementation loop or daemon assigns a task file from a spec folder.4---56# Implement task78Build exactly one Task from a Spec folder. The Task file defines the slice,9acceptance criteria, and Verification contract. Standalone execution owns the10full lifecycle; a Roundfix Daemon-assigned turn hands back11implementation-ready work for Daemon Verification and settlement.1213**Being assigned the Task — by the user, a loop, or a Daemon — is the14authorization to start.** Begin immediately: no greeting, no plan-approval15question, no waiting for a "go". Contradictory requirements, or a stale16standalone `in_progress` status, are the only reasons to pause before17implementing.1819## Execution modes2021Standalone execution and a Roundfix Daemon-assigned turn share the same Task22slice, Result, and evidence requirements, but they have different settlement23owners.2425- In standalone execution, the Agent updates Task status, runs every command26 in `## Verification`, settles the Task from fresh evidence, and commits only27 when the user has authorized a commit.28- In a Roundfix Daemon-assigned turn, the Daemon is the sole Task-status29 writer. The Agent must not edit status, run the declared `## Verification`30 commands, claim a terminal verdict, or commit. It may run focused checks,31 records implementation and focused-check evidence in `## Result`, and hands32 back implementation-ready work. The Daemon then runs the complete declared33 Verification verbatim before settlement.34- A Daemon Verification command failure releases Verification Capacity before35 one Verification Feedback repair turn in the same Agent Session. The Agent36 repairs the implementation, updates `## Result`, runs focused checks when37 useful, and hands back again without running declared Verification or38 settling status.3940For a Daemon-assigned Task that arrives `in_progress`, start the Task fresh.41The work-target lock proves that no live Agent owns it. Do not ask how to42resume, and do not normalize or settle its status.4344## 1. Load4546Read the assigned `task_NN.md`, then run the Project Constraint preflight47before changing the Task status to `in_progress` in standalone execution:48491. A completed or archived legacy Spec is exempt from forced constraint50 backfill. Leave its artifacts byte-identical and stop rather than51 re-executing or rewriting it.522. For an active Spec, require complete `Project Constraints` sections in the53 PRD and every present TechSpec. Each must account for identifier strategy,54 authentication and HTTP, active ADR obligations, and tooling authority as55 applicable or not applicable with a reason, with an operative56 `docs/agents/` source path for every row. Stop without changing Task status57 when any row, reason, or source is missing.583. Determine whether the assigned Task creates, edits, renames, moves, or59 deletes repository-tooling configuration, scripts, ignore files, plugin60 declarations, or version pins. Tooling authorization is not implied by Task61 assignment, setup approval, or a generic implementation request.624. Before a tooling Task can start, require express maintainer authorization63 and an exact bounded repository-relative file list in the PRD and every64 present TechSpec. The mutation allowlist is those exact paths plus the65 assigned Task file itself. Missing or conflicting authorization leaves the66 Task pending and stops execution.675. Run `git status --short` and capture the pre-existing changed paths before68 work begins. They remain user-owned and cannot be counted as this Task's69 changes.7071After the preflight, standalone execution checks `status`:7273- `pending` → set `status: in_progress` and proceed.74- `in_progress` → a previous session may have died mid-task. Inspect the75 worktree and git log for partial work, report what you find, and ask how to76 proceed rather than double-building.77- `completed` / `failed` → stop and report; re-running is an explicit human78 decision.7980In a Daemon-assigned turn, treat status as Daemon-owned and proceed without81editing it.8283- Read the sections of `_prd.md` and `_techspec.md` named in the task's References, plus `CONTEXT.md` (use its vocabulary in code names and test names) and any referenced ADRs.84- **If requirements contradict each other** — task vs spec, spec vs ADR — stop and report the conflict. Guessing buries a spec bug inside an implementation.8586## 2. Plan8788- Build a checklist from Requirements + Acceptance Criteria.89- Capture the pre-change signal that proves the task is _not yet_ done — the failing test, the missing behavior, the 404. Without a red starting point you cannot show your change is what turned things green.90- **Characterization Tasks use the real boundary, within the bounds the Task91 declares.** When the assigned Task is a characterization Task, exercise the92 named external surface and record what the real thing does. Do not substitute93 a fake, mock, fixture, or inferred behavior; the record is the boundary94 evidence that downstream Tasks may rely on.9596 Before reaching the boundary, confirm the Task states which target you are97 reaching and that you are reaching that one. Read rather than write, or use98 the isolated instance the Task creates. Use only the credentials the Task99 scopes to that target, honour cancellation, and remove what you created even100 when the Task fails. A write against the real boundary happens only where the101 Task authorizes that write specifically — recording what a boundary does is102 not authority to change it, and an unauthorized write is out of scope103 whatever it would prove. If the Task names no target or no bound, stop and104 report that rather than choosing one.105106## 3. Implement107108- Stay inside the slice. The PRD's Non-Goals and the task's scope are walls, not suggestions — work that belongs to another task goes in a follow-up note, not in this diff.109- Tests first at the seams the TechSpec names (they are pre-agreed; a new seam needs the user's sign-off). Typecheck and run the focused tests frequently; save the full suite for the gate.110- Root cause only — no lint/type suppressions, no swallowed errors, no timing hacks. A workaround closes the task and opens a bug.111- For an authorized tooling Task, compare the target path with the mutation112 allowlist before every mutation. Never edit `_tasks.md` or any other Task113 file. If a required path is absent from the authorization, stop and request114 a revised Spec instead of widening the list.115116## 4. Standalone verify — the gate117118In standalone execution, evidence comes before terminal status in this order:1191201. Run every command in the Task's `## Verification` section verbatim.1212. Run the repository's verify pipeline (`make verify`, or the build/lint/typecheck/test equivalents this repo documents) when the current execution mode requires local completion evidence.1223. Walk Acceptance Criteria one by one: each needs fresh evidence from this session — a command output, a test name that passes, an observed behavior. A green suite is not evidence for a criterion the suite doesn't cover.123124For every authorized tooling Task, run a changed-file postflight after the last125edit. Compare the captured baseline with `git status --short` and126`git diff --name-only`, accounting for staged, unstaged, and untracked paths.127Every newly changed path must be either one exact authorized path or the128assigned Task file. If any other path appears, make no further mutation, set129`status: failed`, record the out-of-scope paths in `## Result`, and leave the130worktree intact for recovery.131132A narrow verification never supports a broad claim. If any standalone check133fails after honest root-cause attempts: set `status: failed`, record what was134tried in `## Result`, and report — a loud failure the scheduler can retry135beats a quiet "mostly done".136137## 5. Standalone record138139Append a `## Result` section to the task file: what changed (described by behavior, not file lists), commands run with outcomes, evidence per acceptance criterion, and any follow-ups discovered. Tick the Subtasks and Acceptance Criteria checkboxes that the evidence supports. Set `status: completed`.140141Never touch `_tasks.md` — it owns graph topology, not progress.142143## 6. Standalone commit144145- Commit only when the user has explicitly authorized it.146- Stage only this task's files (`git status --short` first; unrelated changes stay out).147- One commit per task, Conventional Commits format, task id in the body for traceability (`spec: <slug> / task_02`).148- Never push and never open a PR from inside a task — publishing is a separate, explicit action.149150## 7. Daemon-assigned handoff1511521. Read the assigned Task, PRD, TechSpec, `CONTEXT.md`, active ADRs, and bounded153 context paths before editing.1542. Implement only the assigned slice. Never edit `_tasks.md`, another Task155 file, or a path outside an authorized tooling allowlist.1563. Run focused implementation checks while working when useful. Do not run any157 command from the Task's `## Verification` section.1584. Append or update `## Result` with the implementation and focused-check159 evidence for every acceptance criterion. Do not use Daemon Verification160 evidence that has not run yet.1615. Hand back implementation-ready work without editing Task status or claiming162 `completed`, `failed`, passing Verification, commit readiness, or delivery.1636. Never commit, push, or open a pull request. The Daemon runs declared164 Verification, writes terminal Task status, and owns the Task commit.165166## Anti-patterns167168- Marking `completed` on "should work" — the status field is read by machines that won't double-check.169- Weakening, skipping, or deleting a failing test to get to green.170- Fixing "one more thing" spotted along the way — that's a follow-up, not scope.171- Re-verifying with stale output from earlier in the session; evidence must postdate the last edit.172- Editing other tasks' files or statuses.173- In a Daemon-assigned turn, running declared Verification, editing Task174 status, claiming a terminal verdict, or committing.