go-tdd-baby-steps
Installation
SKILL.md
Go TDD Baby Steps
Test-Driven Development using the smallest possible increments, with Go idioms.
Three Laws of TDD
- Don't write production code until you have a failing test
- Don't write more test code than is sufficient to fail (compilation failures count)
- Don't write more production code than is sufficient to pass the currently failing test
These laws create a tight feedback loop: write a tiny test, watch it fail, write just enough code to pass.
Red-Green-Refactor
- Red - Write a small test that fails
- Green - Write the minimal code to make it pass
- Refactor - Clean up while keeping tests green
Each cycle should take ~2 minutes. If longer, the step is too big.
Related skills