What it does
Guides AI agents through test-driven development using vertical slices (one test, one implementation cycle) rather than writing all tests upfront. Emphasizes behavior-focused integration tests over implementation details, with concrete planning, tracer bullet, and refactor phases.
Generated from the current SKILL.md.
Frequently asked
What's the difference between testing behavior vs. implementation details?
Behavior tests exercise real code paths through public APIs and describe what the system does (e.g., 'user can checkout with valid cart'). Implementation tests couple to internal structure, mock collaborators, or test private methods. The warning sign: tests break when you refactor code but behavior hasn't changed.
Should I write all tests first, then all implementation?
No. Writing all tests in bulk before any implementation (horizontal slicing) produces tests that verify imagined behavior and data structure shapes rather than actual user-facing behavior. Instead, use vertical slices: one test → one implementation → repeat, so each test responds to what you learned from the previous cycle.
What does a tracer bullet mean in TDD?
A tracer bullet is the first test-implementation cycle: write one test for one specific behavior, watch it fail (RED), then write minimal code to pass it (GREEN). This proves the path works end-to-end before incrementally adding more tests and code.
When should I refactor?
Only after all your tests pass (GREEN). Look for duplication, opportunities to deepen modules, or SOLID principle applications. Never refactor while RED. Run tests after each refactor step to confirm behavior is preserved.
How do I know which behaviors to test?
Confirm with the user upfront which behaviors matter most. You can't test everything. Focus testing effort on critical paths and complex logic, not every edge case. Get user approval on the plan before starting.
Generated from the current SKILL.md. These answers refresh after source changes.