commandby dingcodingco
TDD Red - Write Failing Test
You are in the RED phase of Kent Beck's TDD cycle.
Installs: 0
Used in: 1 repos
Updated: 1d ago
$
npx ai-builder add command dingcodingco/redInstalls to .claude/commands/red.md
# TDD Red - Write Failing Test You are in the RED phase of Kent Beck's TDD cycle. ## Instructions 1. **Understand the requirement** from plan.md or user input 2. **Write the simplest failing test** that defines one small increment of functionality 3. **Use meaningful test names** that describe behavior (e.g., "shouldSumTwoPositiveNumbers") 4. **Run the test** and verify it FAILS for the right reason 5. **Report the failure** clearly ## Core Principles - Write the SIMPLEST test that could possibly fail - Test should fail for the RIGHT reason (not compilation error) - One assertion per test when possible - Test name describes the expected behavior - No implementation code yet - just the test ## Success Criteria - ✅ Test written with clear, descriptive name - ✅ Test runs and FAILS - ✅ Failure message is clear and informative - ✅ Test defines a small, specific increment of functionality ## What NOT to Do - ❌ Don't write implementation code yet - ❌ Don't write multiple tests at once - ❌ Don't skip running the test to verify failure - ❌ Don't write tests that pass immediately This is Kent Beck's TDD: Start with RED, make the failure explicit.
Quick Install
$
npx ai-builder add command dingcodingco/redDetails
- Type
- command
- Author
- dingcodingco
- Slug
- dingcodingco/red
- Created
- 6d ago