← ClaudeAtlas

red-synthesize-greenlisted

Use when implementing any feature or fix using TDD, before writing any implementation code
SebastienDegodez/skraft-plugin · ★ 4 · AI & Automation · score 60
Install: claude install-skill SebastienDegodez/skraft-plugin
# RED → SYNTHESIZE GREEN (AI TDD Cycle) ## Overview 2-step cycle replacing traditional 3-step TDD. Optimized for AI synthesis. - **Traditional (3 steps):** RED → green (dirty) → Refactor - **AI-Optimized (2 steps):** RED (behavior failure) → SYNTHESIZE GREEN (clean synthesis) Architectural guidance is **mandatory** between steps. **Hard rule:** No implementation code before RED is a clean behavior failure. ## Step 1: RED (Behavior Failure Only) Write the failing test. Run it. - Compilation errors = **wishful thinking phase** → implement stubs/empty returns to compile, rerun - Assertion/behavior failure = **RED** ✓ → proceed to Step 2 - Never treat compilation errors as RED **Programming by Wishful Thinking:** When your test won't compile, you're discovering the API you need. Stub just enough to compile, then confirm the test fails on behavior. **Placeholder assertions ARE NOT wishful thinking.** `assert.fail()`, `Assert.Fail()`, `Assert.True(false)`, `fail()`, `assert False` — any assertion designed to fail unconditionally — makes the test compile and fail, but asserts nothing about the API under test. A proper wishful thinking test calls the function you WISH existed and lets the build/runtime surface the failure naturally: 1. Reference the missing type/function → compile error or missing-symbol/module error 2. Stub just enough to compile (empty return / minimal implementation) → test fails on the real business assertion NEVER insert a placeholder assertion. It pr