What problem does it solve?
TDD prevents implementation drift and untested changes by forcing you to prove each behavior with a failing test before writing production code.
Core Features & Use Cases
- Red-Green-Refactor loop: Write one failing pytest test, implement the minimum to pass, then refactor toward deeper modules without changing the public interface.
- Acceptance-criterion traceability: Ensure every test maps to a Lean PRD testing decision or user story so scope stays aligned with the work being built.
- Safe mocking boundaries: Mock only system boundaries (external APIs, databases, time, filesystem) and avoid mocking internal collaborators.
Use case: You’re fixing a bug reported in a GitHub Issue—write a single reproducing test first, make the smallest change that passes, then refactor to keep the codebase deep and maintainable.
Quick Start
Use the tdd skill to produce one failing pytest test against the public interface, implement the minimal fix to make it pass, and then refactor the implementation while keeping the interface stable.