SuperAPI AI Directory

tdd-workflow

Testing & quality

View repository

Updated 10-15 21:11

About this skill

TDD Workflow

Write tests first, code second.


1. The TDD Cycle

🔴 RED → Write failing test
    ↓
🟢 GREEN → Write minimal code to pass
    ↓
🔵 REFACTOR → Improve code quality
    ↓
   Repeat...

2. The Three Laws of TDD

  1. Write production code only to make a failing test pass
  2. Write only enough test to demonstrate failure
  3. Write only enough code to make the test pass

3. RED Phase Principles

🧠 Knowledge Modules (Fractal Skills)

1. What to Write

2. RED Phase Rules

3. Minimum Code

4. GREEN Phase Rules

5. What to Improve

6. REFACTOR Rules

7. Multi-Agent Pattern