test
Augment test coverage after implementation → integration, e2e, and edge-case tests. Pipeline: implement → test → review.
Phase: Build. User is technical.
Starting
Accept feature name or issue reference. If ambiguous, list ./plans/*/ and ask via AskUserQuestion.
Before writing tests:
- Read
tdd.md— extract## Testing Strategytables (unit/integration/e2e with components, what to test, approach). Extract## Edge Cases & Failure Modestable. - Read
plan.mdto understand issue boundaries and which issues are implemented. - Read
spec.mdfor user flows (happy + error paths) if UI is involved. - Read
prd.mdfor NFRs that imply performance or load test stubs.
Discover Existing Tests
Find all test files written during /implement for this feature. Catalog what's covered:
- Which acceptance criteria have unit tests
- Which modules/files have test coverage
- Test runner, assertion library, fixture patterns, mock patterns in use
Gap Analysis
Compare tdd.md testing strategy against actual tests. Identify gaps in order of priority:
- Integration boundaries — Tests that cross issue boundaries: API → service → DB round-trips, multi-module interactions, event chains. These are the highest-value gaps because
/implementworks one issue at a time. - E2e user flows — Full flows from spec.md: happy path end-to-end, critical error paths, multi-step user journeys.
- Edge cases — From tdd.md
## Edge Cases & Failure Modes: each row with severity critical/warning that lacks a test. - Error paths — Failure modes from tdd.md behavior specs: network errors, validation failures, permission denials, concurrent access.
- NFR stubs — Performance baselines, rate limit verification, data volume tests from prd.md NFRs. Write as skipped/pending tests with clear TODOs if infrastructure isn't available.
Present gap analysis: "Found [N] existing test files covering [N] acceptance criteria. Gaps: [N] integration, [N] e2e, [N] edge cases. Writing [N] test files."
Write Tests
For each gap, in priority order:
- Follow existing test patterns exactly — same runner, assertion style, file naming, directory structure, fixture approach.
- Write the test file. Run it immediately — confirm it passes. Tests here validate already-implemented behavior, so they should pass. A failing test means either a bug or a wrong test.
- If a test reveals a bug: report it, don't fix it. Note the failing test and suggest
/triage-issueor a new/implementinvocation.
Group tests by type:
- Integration tests near the modules they bridge
- E2e tests in the project's e2e test directory (discover from existing patterns)
- Edge case tests alongside existing unit test files for the same module
Finish
- Run the full test suite — confirm all tests pass (new and existing).
- Present coverage summary: tests added per category, remaining gaps (if any need manual/external testing infrastructure).
- Update
pipeline.md: add row to## Statustable (| Test | /test | <N> tests added | <date> |). - Suggest: "Run
/reviewto review the implementation against specs."
Scope Guards
- Don't modify implementation code. Tests only. If a test can't be written without code changes, report the gap.
- Don't duplicate. Skip tests that already exist from
/implement's TDD cycle. Augment, don't repeat. - One feature per invocation. Can cover all issues in a feature, but only one feature.
- Bug discovery → report, don't fix. Note the test, the failure, and the likely cause. Suggest
/triage-issue.
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