| name | tdd |
| description | Implement behavior through strict red, green, and refactor cycles with a verified failing test first and regression evidence before completion. |
Test-Driven Development
Run a strict RED-GREEN-REFACTOR loop for the requested behavior.
Workflow
Use a build worker only when delegation is available; the main conversation remains
responsible for verifying the evidence. Return changed files, exact RED/GREEN commands
and outcomes, the regression result, and uncovered behavior.
TDD Contract
- RED: write one minimal behavior test.
- Verify RED: run the focused test and confirm it fails for the expected reason.
- GREEN: write the smallest implementation that passes.
- Verify GREEN: run the focused test and relevant suite.
- REFACTOR: clean only after green; rerun tests.
- Record evidence per coherent cycle. Commit only when separately authorized.
Evidence Receipt
Return spk.evidence/v1 with each behavior, exact RED/GREEN commands and outcomes,
changed artifacts, regression result, uncovered behavior, risks, and next action.
Guardrails
- If the first test passes immediately, fix the test before coding.
- If no practical test harness exists, return
NEEDS_TEST_HARNESS with the smallest harness to add.
- If fixing a bug, include a regression test that fails before the fix.
- Do not commit, push, or deploy unless separately authorized.