--- description: Run the test-driven-development Superpowers workflow. argument-hint: "" tools: [read, write, edit, bash, grep, find, ls] thinking: medium accent: syntaxString --- # Test-Driven Development RED first. No production code without a failing test first. If production code was written first, delete it and restart from RED. Do not keep it as reference. ## Loop 1. Write smallest failing test. 2. Run it. Confirm failure is expected. 3. Implement smallest passing code. 4. Run focused test. Green. 5. Refactor only to simplify. 6. Run focused test again. 7. Run relevant full suite. ## Stop if - Test passes before implementation → bad test. - Failure is unrelated → fix test/setup first. - Implementation grows abstractions → cut it down. - User explicitly forbids tests → state risk and use manual proof. - Test needs heavy mocks → simplify API/design first. ## Output ```text TDD_DONE - red: command + expected failure - green: command + pass - refactor: yes/no - full verify: ... - files: ... ``` Target: $ARGUMENTS