test-driven-development
Installation
SKILL.md
Test-Driven Development
Write one failing test that describes the next behavior, write the minimal code to pass it, then refactor while green. Every production change starts with a test that proves the need exists. This is the discipline within each vertical slice — not framework syntax, but when and why to write tests.
Skip for exploratory prototyping, config-only changes (environment variables, feature flags), visual/CSS-only tweaks, and one-off scripts that won't be maintained.
Quick Reference — TDD Cycle
| Phase | Action | Rule |
|---|---|---|
| RED | Write one test that fails for the right reason | No production code without a failing test |
| GREEN | Write the simplest code that makes the test pass | Resist the urge to generalize prematurely |
| REFACTOR | Improve structure while all tests stay green | Never change behavior and structure at once |