implement
TDD implementation of issue files from ./issues/<feature>/NN-slug.md → working code. Pipeline: plan → implement → test → review.
Phase: Build. User is technical.
Starting
Accept an issue path directly, or list ./issues/*/ directories and ask via AskUserQuestion which feature, then list issue files and ask which issue.
Before coding:
- Read the issue file completely. Extract: blocked-by, files to modify/create, patterns to follow, key types, wiring notes, acceptance criteria, verification commands.
- Check blocked-by. For each blocker, verify it's done: check if acceptance criteria are checked off in the issue file, or look for the expected code/tests in the codebase. If blockers are incomplete → stop: "Issue
NN-slug.mdisn't done yet. Implement that first or run/implementon it." - Orient. Read every file listed in "Patterns to follow" (with line numbers). Read "Key types" signatures in source. Read all "Files to modify" to understand current state. Read
CLAUDE.mdandAGENTS.mdfor conventions. - Identify test runner, test file naming conventions, assertion patterns, and fixture patterns from existing tests near the files being modified.
Present orientation: "Issue NN: [title]. [N] files to modify, [N] to create. [N] acceptance criteria. Test pattern: [runner] in [convention]. Starting TDD cycle."
TDD Cycle
For each acceptance criterion in order:
Red
Write a failing test that encodes the criterion. Place it in the appropriate test file following discovered conventions. Run the test suite — confirm the new test fails. If it passes already, the criterion is already satisfied — note and move to next.
Green
Write the minimal code to make the failing test pass. Follow patterns from the issue's "Patterns to follow" and "Key types" sections. Modify only files listed in the issue. Run the test suite — confirm all tests pass (new and existing).
Refactor
With all tests green: clean up duplication, improve naming, extract obvious patterns — but only within the scope of this issue's files. Run tests again to confirm nothing broke.
Repeat for each acceptance criterion.
Verify
After all criteria are implemented:
- Run every command in the issue's
## Verificationsection. - Run full lint, build, and test commands from
CLAUDE.mdor the issue's acceptance criteria. - Walk through
### Manual verificationsteps — execute curl commands, check DB state, verify UI behavior as described. - Re-read each acceptance criterion checkbox — confirm every one is satisfied.
If verification fails: diagnose, fix within issue scope, re-run. If the fix requires changes outside issue scope → stop and report.
Finish
- Check off acceptance criteria in the issue file (replace
- [ ]with- [x]). - Update
pipeline.md: add row to## Statustable (| Implement | /implement | NN-slug.md done | <date> |), append to## Decisions Logif any implementation decisions were made. - Suggest next steps: "Run
/implementon the next unblocked issue,/testto augment coverage, or/reviewto review against specs."
HITL Issues
For issues typed HITL: pause after completing each acceptance criterion. Use AskUserQuestion:
- "Criterion done — continue (Recommended)"
- "Adjust — let me give feedback"
- "Stop — I'll take over from here"
Show what was built (files changed, test results) before asking.
Scope Guards
- One issue per invocation. Multiple issues? Implement the first, then: "Run
/implementagain for the next issue." - Stay in scope. Don't refactor beyond issue boundaries. Don't add features not in acceptance criteria. Don't fix unrelated bugs found during implementation.
- Don't design. If the issue has ambiguous acceptance criteria or missing file paths, stop: "This issue is underspecified. Run
/planto revise it." - Don't skip tests. Every acceptance criterion gets a test in the Red phase. No exceptions.
Rollback
- Untestable criteria (no clear assertion, depends on external system with no mock pattern) → append
## Rollback Notestopipeline.md, direct to/planto revise the issue. - Architecture mismatch (issue's approach contradicts actual codebase structure) → append
## Rollback Notestopipeline.md, direct to/engineering. - Blocked-by incomplete → stop, direct to implement the blocking issue first.
More from michaelmerrill/skills
design
Design specification interview → standalone spec.md (flows, screens, states, components, responsive, a11y). Triggers: 'design this,' 'what screens,' 'how should users interact,' post-product. Not for: technical design (engineering), requirements (product). Skip for API-only, CLI, backend, or infra features.
8plan
Decompose technical design into agent-sized implementation issues → numbered markdown files + standalone plan.md. Triggers: 'plan this,' 'break into issues,' 'create tasks,' 'ready to implement,' post-engineering. Not for: designs without file paths/phases (run engineering first).
7design-ux
MUST USE when a user wants to design user flows, interaction patterns, or screen-level UX for a feature that has defined requirements. This is the UX design step in the planning pipeline (write-a-prd → review-prd → glossary → design-ux → design-feature → review-plan). Typical signals — "design the UX," "how should users interact with this," "what should the UI look like," "design the flows," "design-ux," "what screens do we need," or following up after a review-prd or glossary session. Also applies when the user has a PRD and wants to figure out the user experience before technical design. Conducts a structured interview to produce a UX specification — user flows, screen inventory, component mapping, interaction specs, and accessibility requirements. Do NOT use for technical design (use design-feature), writing requirements (use write-a-prd), reviewing plans (use review-plan), scoping/feasibility (use plan-feature), or when the feature has no user-facing UI (API-only, backend, CLI tools).
6plan-feature
Scoping interview for new features -> scope doc with go/no-go. Triggers: user wants to add/build/implement any new capability. First pipeline step. Not for: bugs, PRDs (write-a-prd), design (design-feature), executing existing specs.
6define
Product requirements → living doc Requirements section + quality gate + domain glossary. Stateful: detects existing sections and resumes where needed. Triggers: 'define this,' 'write a PRD,' 'define requirements,' 'spec this out,' post-explore. Not for: scoping (explore), UX (design), technical design (architect).
5explore
Scope and assess new feature ideas → living doc with go/no-go. Elaborates vague ideas into clear concepts. First pipeline step. Triggers: user wants to add/build/implement any new capability. Not for: bugs (triage-issue), requirements (define), design (design/architect).
5