What problem does it solve?
This Skill enforces the Test-Driven Development (TDD) methodology, ensuring that every piece of production code is backed by a failing test first. It eliminates the risk of writing untestable code or tests that don't actually verify behavior, leading to higher quality, more maintainable software.
Core Features & Use Cases
- Red-Green-Refactor Cycle: Guides you through the mandatory steps of writing a failing test, implementing minimal code to pass it, and then refactoring.
- Failing Test Verification: Emphasizes the critical step of watching tests fail correctly, proving they genuinely test the intended behavior.
- Minimal Implementation: Promotes writing only the necessary code to pass the current test, preventing over-engineering and YAGNI violations.
- Bug Fix Integration: Instructs on how to integrate TDD into bug-fixing workflows by first writing a failing test that reproduces the bug.
- Use Case: When starting a new feature, use this skill to guide you through writing the first failing test, then the minimal code to make it pass, ensuring a solid foundation and preventing future regressions.
Quick Start
I need to implement a new user authentication module. Use the test-driven-development skill to guide me through the process, starting with the first failing test.