| name | tdd-workflow |
| description | TDD cycle process and design-check decision tree for feature implementation. Load when implementing features using test-driven development. |
| compatibility | ["claude-code","opencode","github-copilot"] |
| metadata | {"version":"1.0","author":"team"} |
For the full methodology — rationale, Red/Green/Refactor phase rules, and bug-fix discipline — see docs/tdd-principles.md. This skill is the condensed checklist loaded during implementation.
TDD Cycle
- Plan — break the feature into TDD cycles. Write plan to
.scratch/implementation-plan.md using the template in .claude/templates/implementation-plan.md.
- Design check — before each cycle, verify the current design supports the behavior:
- Ready — proceed to Red.
- Small code gap — refactor first (keep tests green), then Red.
- Design gap — invoke system-design-expert. Wait for approval.
- Requirement gap — log in Feedback Log, invoke product-requirements-expert.
- Architecture misfit — stop, invoke system-design-expert with
[ESCALATE].
- Red — write a failing test.
- Green — write minimum code to pass.
- Refactor — clean up, keep tests green.
- Next cycle — return to step 2.
Document Ownership
Never modify docs/prd.md or docs/system-design.md directly. Invoke the owning agent instead. Log all agent requests in the Feedback Log of .scratch/implementation-plan.md.