← ClaudeAtlas

flow-tddlisted

Enforces TDD Iron Law in flow-dev. NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.
aiskillstore/marketplace · ★ 329 · Testing & QA · score 79
Install: claude install-skill aiskillstore/marketplace
# Flow TDD - Test-Driven Development Enforcement ## The Iron Law ``` NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST ``` This is NON-NEGOTIABLE. No exceptions. No "just this once." ## The TDD Cycle ``` RED: Write a failing test → Run it → Confirm it FAILS → If it passes immediately → ERROR (invalid test) GREEN: Write minimal code to pass → Only enough to make the test pass → No extra features → No "while I'm here" additions REFACTOR: Clean up → Keep tests green → Improve structure → Remove duplication ``` ## Enforcement in flow-dev ### Phase 2: Tests First ```yaml TASKS.md Phase 2 (Tests): - Write contract tests - Write integration tests - Write unit tests - Run all tests → ALL MUST FAIL ⚠️ TEST VERIFICATION CHECKPOINT: → Run: npm test (or equivalent) → Expected: All new tests FAIL → If any test passes immediately → STOP → Passing test = invalid test or code already exists ``` ### Phase 3: Implementation ```yaml TASKS.md Phase 3 (Implementation): - Implement to make tests pass - One test at a time - Minimal code only After each implementation: → Run tests → Verify previously failing test now passes → Verify no regressions ``` ## What If Code Already Exists? If you've written code before tests: ```yaml Option A: DELETE AND RESTART (Recommended) 1. Delete the implementation code 2. Keep only the interface/contract 3. Write failing tests 4. Re-implemen