Focused Test-Driven Development
Apply a test-first loop only to the behavior seam named by the request or task contract:
- Write the smallest test that would fail for the missing behavior.
- Run that focused test and confirm the expected failure.
- Implement the minimum change that makes it pass.
- Re-run the focused test, then refactor only if the passing behavior is preserved.
Do not require TDD for routine implementation merely because code changes are involved. Configuration, documentation, generated files, exploratory work, and already-characterized mechanical changes remain outside this skill unless the user explicitly opts in.
Do not add unrelated fixtures, coverage thresholds, CI jobs, full-suite runs, review gates, or one-test-per-file rules. Use the repository's existing risk-based closeout gate once at the repository-defined closeout point.