What problem does it solve?
Prevents shipping unverified or buggy implementations by forcing you to prove behavior with tests that fail first, then pass.
Core Features & Use Cases
- Write failing tests first (RED): Start by capturing the intended behavior in a minimal test that fails for the right reason.
- Implement the smallest change (GREEN): Add production code only to make the failing test pass while keeping other tests green.
- Refactor safely (REFACTOR): Clean up implementation details without changing behavior, ensuring tests remain passing.
Use cases include non-trivial feature development, bug fixes, refactoring, and behavior changes where correctness and regression protection matter.
Quick Start
Ask an AI agent to implement a non-trivial feature using Test-Driven Development: create one minimal failing test first, run the tests until RED/ GREEN are correct, then implement the smallest production code change to pass and finally refactor while keeping the test suite green.