implement-phase
Skill: Implement Phase
What This Skill Does
Bridges the gap between planning and code. Takes a plan phase with its implementation plan and executes it systematically — step by step, with test verification after each step, and automatic plan status updates.
Without this skill, agents implement "freestyle" after reading a plan, often skipping steps, forgetting test runs, or not updating plan status. This skill enforces the discipline that makes plans actually useful.
When to Use
- After
resume-planhas briefed you on the current phase - After
analyze-impacthas confirmed it's safe to proceed - When the user says "implement this phase" or "start coding"
Do NOT use this for exploratory coding or quick fixes — it's designed for planned, multi-step work.
Execution Model
- Always: the primary agent runs this skill directly.
- Rationale: implementation requires full tool access (file edits, terminal, tests) and conversation context for user feedback. Cannot be delegated.
- Integration: reads from
plans/<name>/, writes code, runs tests, updates plan viaupdate-planpatterns.
Workflow
Step 1: Load Phase Context
Read the phase artifacts in order:
plans/<name>/plan.md— overall objective and scopeplans/<name>/phases/phase-N.md— this phase's objective, scope, prerequisites, deliverablesplans/<name>/implementation/phase-N-impl.md— concrete implementation stepsplans/<name>/implementation/phase-N-impact.md— impact analysis (if exists)plans/<name>/todo.md— current task status
Verify all prerequisites from the phase document are met before proceeding.
Step 2: Create Implementation Checklist
Extract the implementation steps from phase-N-impl.md and create a structured checklist using todowrite:
- Each implementation step becomes a todo item
- Add a "run tests" item after each code change step
- Add a "verify" item at the end for acceptance criteria
Step 3: Execute Steps Sequentially
For each implementation step:
- Read required context referenced in the step (specific files, modules, docs)
- Implement the change — write code, following project conventions from
AGENTS.md - Run relevant tests immediately after the change
- Handle test failures — fix before moving to the next step. Do NOT proceed with failing tests.
- Update todo — mark step as completed via
todowrite
Step 4: Verify Acceptance Criteria
After all steps are completed:
- Read the acceptance criteria from
phases/phase-N.md - Verify each criterion is met
- Run the full test suite (not just individual tests)
- Check for any regressions
Step 5: Update Plan Status
Do NOT update the plan files with ad-hoc manual edits. In the same primary-agent session, invoke exactly the update-plan skill to apply these patterns:
- Update
todo.md— mark all items completed - Update
phases/phase-N.md— set status to completed - Update
plan.mdchangelog — record completion - If this was the last phase, mark the plan as completed
Step 6: Report to User
Present a summary:
- Steps completed
- Tests passed/failed
- Files changed
- Any deviations from the plan (and why)
Use the question tool to ask if the user wants to proceed to the next phase or review changes first.
Rules
- Never skip steps: execute implementation steps in order. If a step seems unnecessary, ask the user — don't skip silently.
- Tests after every change: run relevant tests after each code modification. This catches regressions early.
- Fix before proceeding: if tests fail, fix the issue before moving to the next step. Do not accumulate broken state.
- Update plan artifacts: keep
todo.mdand phase status in sync throughout implementation. Do not batch updates. - Respect AGENTS.md: follow all project conventions documented in AGENTS.md (naming, patterns, style).
- Minimal diffs: implement the minimal change that satisfies the step. Avoid scope creep.
- No built-in explore agent: do NOT use the built-in
exploresubagent type.