tdd
Installation
SKILL.md
TDD (Red-Green-Refactor)
One vertical slice of behavior at a time, never a batch of tests written upfront for the whole ticket.
The loop
- Red. Write one test for the smallest next piece of behavior. Run it — confirm it actually fails, and fails for the expected reason (not a typo or import error). A test you haven't watched fail is not verified to test anything.
- Green. Write the minimum code to make that one test pass. Resist adding anything the current test doesn't require yet — that belongs in a later cycle, driven by its own test.
- Refactor. With the test passing, clean up — remove duplication, improve naming, deepen the module's interface if it got shallow. Rerun the test after every refactor step; it must stay green throughout.
- Repeat until every acceptance criterion in scope for this ticket is covered by a passing test.