| name | tdd |
| description | Tests-Driven Development (TDD) flow. Use this skill when behavioral analysis and test-first design are critical. Focuses on exhaustive behavioral enumeration before specification and implementation. |
Tests-Driven Development Flow
You are in TDD (Tests-Driven Development) mode. Read flows/tdd.md for the complete flow reference.
Commands & Actions
start [name] - Start new TDD flow
- Create directory
flows/tdd-[name]/.
- Copy templates from
flows/.templates/tdd/.
- Create
_status.md with phase = REQUIREMENTS.
- Begin requirements elicitation with user.
resume [name] - Resume existing flow
- Read
flows/tdd-[name]/_status.md to determine current phase.
- Read all existing artifacts in the document dir.
- Report current state to user.
- Continue from where left off.
fork [existing] [new] - Fork for context recovery
- Copy
flows/tdd-[existing]/ to flows/tdd-[new]/.
- Update
_status.md to note the fork origin.
- Ask user what adjustments to make.
- Continue from current phase with modifications.
status - Show all active TDD flows
- List all
flows/tdd-*/ directories.
- Read each
_status.md and summarize phase + blockers.
Phase Behaviors
REQUIREMENTS Phase
- Elicit what user wants to build and why.
- Ask clarifying questions.
- Document user stories with acceptance criteria.
- Identify constraints and non-goals.
- Update
01-requirements.md iteratively.
- Wait for explicit "requirements approved" before advancing.
TESTS Phase (TDD-specific) - Cases-First Thinking
Critical: This is NOT about writing test code. It's about exhaustive behavioral analysis.
Cases-First Approach:
- ENUMERATE ALL BEHAVIORS: Happy paths, edge cases, error cases, state transitions, race conditions.
- DEFINE SUCCESS CRITERIA: Precise expected outcomes, state changes, outputs.
- DERIVE DESIGN FROM CASES: Cases reveal necessary interfaces, data structures, and error handling needs.
- Update
02-tests.md iteratively.
- Wait for explicit "tests approved" before advancing.
SPECIFICATIONS Phase - Derived from Tests
Critical: Specs are DERIVED from test cases, not invented independently.
- Every spec element must trace to tests.
- Analyze codebase for affected systems.
- Design interfaces and data models (derived from tests).
- Update
03-specifications.md iteratively.
- Wait for explicit "specs approved" before advancing.
PLAN Phase
- Break specs into atomic tasks.
- Identify file changes and dependencies.
- Update
04-plan.md iteratively.
- Wait for explicit "plan approved" before advancing.
IMPLEMENTATION Phase
- Execute plan task by task.
- Log progress in
05-implementation-log.md.
- Ensure all defined tests pass.
DOCUMENTATION Phase
- Create client-facing README.md.
- Explain feature in simple, non-technical terms using analogies.
- Avoid technical jargon.
Mandates
- Update
_status.md after every significant change.
- Never skip phases or assume approval.
- Remember: Tests phase is CASES-FIRST - exhaustive behavioral analysis.
- Design EMERGES from cases, not the other way around.
- Every spec element must trace to test cases.