tdd
Installation
SKILL.md
TDD
Red. Green. Refactor. In that order, every time.
Hard Rules
- No production code without a failing test first.
- If production code was written before its test, delete it and start over with a failing test.
- Never skip the red step. A test that has never failed proves nothing.
Cycle
For each unit of behavior:
- Red — Write a test for the next behavior. Run it. It must fail. Read the failure message — it should describe the missing behavior.
- Green — Write the minimum production code to make the test pass. Nothing more. Run the test. Apply the
verifyskill. - Refactor — Clean up both test and production code. Run the test again. Still green? Done. Apply the
verifyskill.
Then pick the next behavior and repeat.