What problem does it solve?
This Skill prevents premature or unproven changes by enforcing a strict Test-Driven Development workflow, ensuring that production code is never written until a failing test demonstrates the required behavior.
Core Features & Use Cases
- RED-GREEN-REFACTOR enforcement: Forces the sequence of writing a failing test first, adding the minimal implementation to make it pass, and refactoring only after tests are green.
- Gate logic for implementation requests: Detects whether failing tests exist for new features or bug fixes and enforces behavior with levels such as strict, warning, or off.
- Bug-fix specific TDD loop: Adapts the cycle to reproduce the bug via a failing test before applying the minimal root-cause fix.
- Safety around failure reasons: Flags cases where tests fail due to infrastructure issues (e.g., import/syntax problems) rather than missing behavior.
- Local search for test templates: Uses FAISS to suggest similar existing tests to speed up writing correct failing scenarios.
Use Case: When implementing a feature or fixing a bug, use this Skill to require a failing test that captures the intended behavior, then implement the smallest code change that satisfies the test, keeping the suite green.
Quick Start
Use the tdd-protocol Skill when you are asked to implement a new feature or fix a bug, and instruct the AI to “write a minimal failing test first for the required behavior, confirm it fails for the right reason, then implement only enough production code to make it pass, and finally refactor only after tests are green.”