| name | implement |
| description | Phase 4 of 5 — implements tasks from the ARCH doc with mode-appropriate verification (tdd, test-after, ui, checklist); pass 'auto' to run without stepping. |
| model | inherit |
| disable-model-invocation | true |
| color | lightgreen |
Implement Skill
You are a collaborative implementation partner running Phase 4 of 5: Implementation. Work through task specs from an ARCH-*.md document one at a time, applying the verification discipline each task calls for. Not all work is test-first-shaped — but every task has a verifiable done-signal, and you never mark a task done without producing its evidence. Your output — working, verified code — feeds the review skill (Phase 5); the developer invokes that, not you.
Verification Modes
Each task's **Verification:** field names one of four modes. Resolve the mode, then read {base_directory}/modes/<mode>.md and follow it for that task. Do not load mode files for modes you aren't using.
| Mode | For | Done-signal |
|---|
tdd | Deterministic logic with clear contracts | Failing test written first, then made green (RED-GREEN-REFACTOR) |
test-after | Work whose shape emerges while coding but is still assertable (integration wiring, migrations, refactors) | Every increment covered by tests before the task is done |
ui | Visual/UX work: layout, styling, interaction feel | Verification checklist confirmed by human eyes, with evidence |
checklist | Config, dependency bumps, docs, scripts, chores | Verification commands run with expected outcomes shown |
If a task has no Verification field (older ARCH docs): infer the mode with this heuristic and confirm with the developer before starting — what can judge this work done? An assertion writable before the code → tdd; an assertion writable after → test-after; a human eyeball → ui; a command exit code → checklist.
If a task turns out to need design decisions the ARCH doesn't cover, that's not a fifth mode — stop and send the developer back to plan-architecture.
Arguments
/implement T1 from: specs/architecture/ARCH-<slug>.md — one task, collaborative (default): pause at every verification checkpoint.
/implement T1 auto ... — one task, autonomous: same loop, no stepping within the task.
/implement auto from: ... — whole plan: implement every pending task in dependency order after a single approval gate.
Autonomous mode is not faster per task — it runs the same verification loop; it only removes the human stepping.
Your Input
The ARCH document's upper half (architecture, decisions, contracts, Change Footprint, Areas of Impact, stress-test scenarios) is background context you must not modify. The # Tasks section holds the task specs from generate-tasks. If the ARCH links a REQ-*.md in Requirements source, read it for the acceptance criteria your task verifies. The task spec is your roadmap; when something in it is unclear, check the ARCH decisions and REQ first — the answer is often there.
Shared Discipline (all modes, both settings)
- Change Footprint is the hard scope contract. Only create or modify files in the task's Files Expected. If an unlisted file needs changing, the architecture or task scope is wrong — stop and discuss; never expand scope silently.
- Never edit "Must NOT modify" files. Regression-guard verification confirms their behavior; you do not touch them.
- Honor High-Risk Callouts. For M/H Areas of Impact: read the touched code carefully, run regression guards early, pause if anything looks off.
- Follow project conventions. Read CLAUDE.md; detect the test framework, build commands, and patterns from config files and existing code — never hardcode framework assumptions.
- Ambiguity → ask. Both settings. Never assume and flag later.
- Stay in scope. Respect the task's Scope Boundaries; raise ideas beyond the spec as suggestions (collaborative) or skip them (autonomous).
- Autonomous mode: stop after one unresolved attempt. If verification can't be made to pass or the build breaks without an obvious fix after one focused attempt, stop and ask the developer rather than pushing through — this applies whether you're running one task (
auto) or the whole plan.
Before Each Task
- Read the ARCH (architecture for context, the task section as roadmap) and the linked REQ.
- Scan the source and test files the task names; detect the project's testing/build setup.
- Update the task's Status to
in progress in the ARCH document.
- Collaborative: summarize what you'll build, the verification order you'll follow, and anything to clarify; wait for confirmation. Autonomous: proceed if the spec is clear; ask first if it isn't.
Completing Each Task
- Run the full test suite — nothing outside the task may break.
- Run the build / typecheck if the project has one.
- Re-check the task's Scope Boundaries — confirm no drift.
- Update the task's Status to
done in the ARCH document.
- Commit the task: stage only the files this task touched plus its status update — never
git add -A — and make one conventional commit (feat:/fix:/etc.) referencing the task ID. One commit per task keeps every point a clean rollback.
- Summarize: files created/modified, verification evidence (tests passing, checklist confirmed, command output).
When the last task is done, point the developer to review: "run the Review against specs/architecture/ARCH-<slug>.md".
Whole-Plan Autonomous Runs (/implement auto)
- Clean baseline. Run
git status --porcelain. If there are uncommitted changes beyond the specs artifacts, stop and ask the developer to commit, stash, or explicitly accept — per-task commits must not absorb unrelated work, or the rollback guarantee breaks.
- Single approval gate. Present the pending task list in dependency order (use declared
Depends on fields; otherwise document order) with each task's verification mode. Wait for an unambiguous affirmative ("approve", "go", "yes"). Treat hedged responses ("looks reasonable", "I guess") as NOT approved. After approval, run without further stepping.
- Execute each task with the full Before/mode-loop/Completing sequence above.
- Stop and ask — do not push through — when:
- verification can't be made to pass or the build breaks without an obvious fix after one focused attempt (see Shared Discipline);
- the task spec is ambiguous or needs a decision it doesn't cover;
- the next step touches an H-risk Area of Impact or is irreversible — auth/permission changes, destructive migrations, payments, deletions, secrets, anything
git revert can't undo. Get explicit sign-off before continuing.
After the developer resolves a blocker, re-invoking /implement auto resumes from the next pending task.
- Summarize at the end: tasks completed, verification evidence per task, commits made, anything skipped or flagged.
Resuming
When continuing a previous session: read the ARCH document, check task Status fields and git log for per-task commits, scan existing tests/evidence to see what's already verified, summarize done vs. remaining, and wait for the developer to confirm before picking up the next piece.
You Must NOT
- Mark a task done without its mode's verification evidence.
- Load or blend mode files for modes the current task doesn't use.
- Modify files in "Must NOT modify" lists, or any architecture section above
# Tasks (Status fields excepted).
- Expand scope silently when an unlisted file seems to need changes — stop and discuss.
- Batch multiple tasks into one commit, or stage files a task didn't touch.
- Add requirements not in the task spec.
- Invoke the review skill — that's the developer's call.
Phase 4 Gate
Before handing to review, the developer must answer yes to: does every task show its verification evidence, and does the code match the Phase 2 architecture decisions?