implement - Implementation Stage
Invariants
- Require an approved task document before changing implementation files.
- Treat the task document as the primary scope contract.
- Do not broaden scope without user approval.
- Do not rely on provider-specific model switch commands.
implement autois the only automation entry point.
Runtime adapters may expose this stage as a slash command, menu action, or natural-language skill invocation. The portable stage name is implement.
Argument Handling
{ID}or{task-name}identifies the task document.autoenables the implementation-to-ship automation chain after implementation.--tier fast|balanced|deepmay override the task document recommendation only if the active runtime supports tier routing.
If a user asks for provider-specific model names, treat them as adapter-level preferences rather than core workflow semantics.
Workflow
- Read
AGENTS.md. - Read
LEARNINGS.mdif it exists. - Resolve the task ID from
TASKS.mdor direct task filename. - Read
docs/task/{ID}-{task-name}.md. - Verify the task has been reviewed and approved for implementation. If approval is unclear, stop and ask.
- Read only files listed in the task document unless a missing dependency blocks implementation.
- Move the task to
In ProgressinTASKS.md. - Apply the implementation steps.
- Run relevant verification commands from the task document when safe.
- Append
Implementation Notesto the task document. - Move the task to
TestinginTASKS.md. - In manual mode, stop and hand off to
simplify. - In auto mode, continue through the portable automation chain.
Reading Rules
Read these by default:
AGENTS.mdLEARNINGS.mdif present- the task document
- files listed in
File Changes
Avoid broad codebase exploration. If the task document lacks necessary context, use targeted search for the specific symbol, file, route, or command and record the reason in Implementation Notes.
Implementation Notes
Append this section to the task document:
## Implementation Notes
### What Changed
- {Summary}
### Files Changed
- `{path}` - {reason}
### Deviations From Plan
- {None, or describe with rationale}
### Verification Run
- `{command}` - PASS | FAIL | SKIPPED ({reason})
Auto Chain
When invoked as implement auto {ID}, continue after implementation:
simplify {ID}test {ID}document {ID}ship {ID}
If the runtime supports background workers or subagents, the adapter may run stages in isolated workers. If it does not, run stages sequentially in the current session. Each stage must write durable details to the task document or its report file.
Stop after three fix-and-retry cycles for the same failing test or quality issue and report the blocker to the user.
Handoff
Manual mode output:
Implementation complete for task {ID}
Task status: Testing
Next stage: simplify {ID}
Auto mode output should summarize the final stage reached and any blocker.