with one click
green
TDD Green Phase - Implement minimal code to make the failing test pass
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
TDD Green Phase - Implement minimal code to make the failing test pass
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | green |
| description | TDD Green Phase - Implement minimal code to make the failing test pass |
You are now in the Green Phase of TDD. Follow these instructions to make the failing test pass with MINIMAL code.
The Green Phase deliberately writes the smallest implementation that turns the active test green -- even hardcoded returns, even obviously-incomplete logic. This is not laziness or naivete:
Understand what the test expects:
Implement only what's needed to make the current test pass:
// For first test "should return 0 for empty input":
export const calculate = (input: string): number => {
return 0; // Minimal - just make the test pass
};
// For second test "should return number for single input":
export const calculate = (input: string): number => {
if (input === "") return 0;
return parseInt(input); // Still simple
};
// For third test "should add two numbers":
export const calculate = (input: string): number => {
if (input === "") return 0;
const numbers = input.split(",");
if (numbers.length === 1) return parseInt(numbers[0]);
return parseInt(numbers[0]) + parseInt(numbers[1]); // Only now add logic
};
Run pnpm test and verify:
Check yourself:
Green Phase Complete:
**Implementation**: [brief description of what was added]
**Result**: All tests now pass ([X] passing)
**Approach**: [explain why this is minimal]
Proceeding to Refactor phase.
// Test: "should return 0 for empty input"
return 0; // Perfect - minimal
// Test: "should return number for single input"
if (input === "") return 0;
return parseInt(input); // Still simple
// Test: "should add multiple numbers" - NOW generalize
return input.split(",").reduce((sum, n) => sum + parseInt(n), 0);
You will feel resistance:
Trust the process. Simple steps compound into elegant solutions.
After completing Green phase, proceed to Refactor phase:
Green Phase Complete. Proceeding to Refactor phase.
Generates an experiment-overview snapshot of all research questions under research/_archive/. Invoke when a new point-in-time report across all RQs should be produced.
Use this skill to drive a research question (RQ) end-to-end: validate the RQ README, generate a fill batch-plan, start the Docker batch in the background, monitor progress, run aggregation, and propose findings updates. Trigger when the user says "RQ-N voranbringen", "run-rq", "fill RQ-N", "run RQ-N", "Forschungsfrage N starten", or names a specific RQ-N directory in research/.
Re-run the analysis pipeline on all runs matching an RQ, reaggregate metrics, and propose findings updates against the fresh data. Trigger when the user says "reanalyze RQ-N", "reanalyse RQ-N", "Runs neu analysieren", or wants to refresh metrics/findings after a pipeline change (analyze-run.sh fix, adapter added, ESLint config).
TDD Red Phase - Activate ONE test from the test list and make it fail with explicit predictions
TDD Test List Phase - Create a comprehensive test list covering every example and rule from the specification
Generates an experiment-overview snapshot of all research questions under research/_archive/. Invoke when a new point-in-time report across all RQs should be produced.