test-driven-development
Installation
SKILL.md
Test-Driven Development
Write a failing test before writing the code that makes it pass. For bug fixes, reproduce the bug with a test before attempting the fix. Tests are proof — "seems right" is not done.
Contract
Use this skill for new behavior implementation, behavior changes, and bug fix validation.
Do not use for documentation-only, trivial config changes, or static content. For bug tracking and root cause analysis, use bugger first; for fix implementation with the Prove-It Pattern, use bugfix.
The TDD Cycle
RED → GREEN → REFACTOR → (repeat)
- RED — Write a test that fails. A test that passes immediately proves nothing.
- GREEN — Write the minimum code to make it pass. No over-engineering.
- REFACTOR — Clean up the implementation. Tests must stay green after every change.