| name | tdd |
| description | Quality phase. Enforces a strict Red-Green-Refactor loop. Trigger: "/tdd", "build this using TDD", "write tests first".
|
TDD Skill
Follow the Red-Green-Refactor methodology for every feature or bug fix.
The Loop
- RED: Write a failing test that defines the expected behavior.
- GREEN: Write the minimum code necessary to make the test pass.
- REFACTOR: Clean up the code while keeping the test green.
Rules
- Never write implementation code without a failing test first.
- One Test at a Time: Focus on the smallest unit of behavior.
- Verification: Run the test suite after every step.
Benefits
- 100% test coverage for new logic.
- Documented behavior through tests.
- Prevents regressions from the start.