skills/test-driven-development/SKILL.md
Use when writing new code or fixing bugs during Stage 3 execution. Enforces RED-GREEN-REFACTOR cycle.
npx skillsauth add seokan-jeong/team-shinchan team-shinchan:test-driven-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
No production code without a failing test first.
Every line of production code must be justified by a test that failed without it. No exceptions unless explicitly approved by a human.
Write a test for the behavior you need. Run it. It MUST fail. If it passes, your test is wrong or the behavior already exists.
verify-RED: Run test → confirm FAIL
If test passes → STOP. Investigate why.
Write the minimum production code to make the test pass. Nothing more.
verify-GREEN: Run test → confirm PASS
If test fails → fix production code (not the test)
Improve code structure while keeping tests green. Run tests after every change.
Do NOT skip TDD. Every excuse has a counter:
| Excuse | Counter | |--------|---------| | "It's too simple to test" | Simple code has simple tests. Write it in 30 seconds. | | "I'll add tests after" | You won't. And if you do, they'll test your implementation, not your intent. | | "This is just a config change" | Config changes break things. Write a test that loads the config. | | "Tests will slow me down" | Debugging without tests is slower. TDD prevents 80% of debugging. | | "I need to prototype first" | Prototypes become production. Start with a test or get explicit human approval to skip. | | "The existing code has no tests" | Add a test for the behavior you're changing. Don't perpetuate the gap. | | "It's a one-line fix" | One-line fixes cause production outages. A one-line test prevents them. |
TDD may be skipped ONLY with explicit human approval for:
If in doubt, write the test. It takes less time than debating whether to skip it.
development
Deterministic adversarial code review for high-stakes scope — independent per-dimension review, a non-skippable per-finding refutation, a completeness critic, and a schema-validated rubric judge. Opt-in main-loop Workflow tier.
data-ai
Deterministic loop-until-done for high-stakes long-running tasks — a worker/verifier loop the script bounds by iteration cap, token budget, and stagnation, closed by an Action-Kamen gate. Opt-in main-loop Workflow tier.
testing
Deterministic adversarial debate for high-stakes or irreversible decisions — mandatory refutation plus a scored judge panel. Opt-in main-loop Workflow tier.
development
Deterministic competitive code tournament — N builders independently solve one task and return patches, an Action-Kamen judge scores them head-to-head, the winner is picked by score and applied. Opt-in main-loop Workflow tier.