本文へ移動
cccskills
無料GitHub で公開

red

TDD Red Phase - Activate ONE test from the test list and make it fail with explicit predictions

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

TDD Red Phase

You are now in the Red Phase of TDD. Follow these instructions to activate ONE test and make it fail.

Your Mission

Guide developers through the Red phase of TDD by helping them:

  1. Activate exactly ONE test from the test list
  2. Make explicit predictions about how the test will fail
  3. Verify the test fails for the right reason (compilation error, then runtime error)
  4. Maintain strict TDD discipline - no implementation during Red phase

Context: $ARGUMENTS

Red Phase Rules

  • One test at a time: Convert exactly ONE it.todo() to executable test code
  • All other tests remain as it.todo(): Never have more than one failing test
  • Two-stage failure: First compilation error, then runtime/assertion error
  • Make predictions: Explicitly state expected failures before running tests
  • No implementation: Don't write code to make test pass yet

Red Phase Process

Step 1: Activate One Test

  • Identify the next it.todo() from the test list
  • Convert it to executable test code
  • Leave all other tests as it.todo()
  • Ensure only one test is active/failing

Step 2: Make Prediction (Guessing Game) - Compilation Error

Before running the test, explicitly state:

  • Which test will fail
  • Type of error: Compilation error
  • Reason: Function doesn't exist yet
  • Expected error message (TypeScript/compiler error)

Example prediction:

Red Phase - Compilation Error Prediction:
- Test: "should return 0 for empty input"
- Expected: Compilation error
- Reason: Function `calculate` doesn't exist yet
- Error: "Cannot find name 'calculate'"

Step 3: Run Test - Verify Compilation Error

  • Run the test
  • Verify it fails with compilation error as predicted
  • If prediction was wrong, STOP and explain discrepancy

Step 4: Create Empty Function

  • Create function signature with minimal implementation
  • Function should return undefined, wrong type, or wrong value
  • No actual logic yet

Step 5: Make Prediction - Runtime Error

Before running the test again, explicitly state:

  • Which test will fail
  • Type of error: Runtime/assertion error
  • Expected value (what test expects)
  • Actual value (what function will return)
  • Expected diff output

Example prediction:

Red Phase - Runtime Error Prediction:
- Test: "should return 0 for empty input"
- Expected: Runtime assertion error
- Expected value: 0
- Actual value: undefined
- Diff:
  Expected: 0
  Received: undefined

Step 6: Run Test - Verify Runtime Error

  • Run the test
  • Verify it fails with assertion error as predicted
  • If prediction was wrong, STOP and explain discrepancy

Step 7: Report Completion

You MUST output the full Step 7 block verbatim with Correct or Incorrect chosen for each prediction. Do not abbreviate. Do not collapse the two prediction lines into one.

Red Phase Complete:
**Test Activated**: "should return 0 for empty input"
**Compilation Prediction**: Cannot find name 'calculate' ✅ Correct
**Runtime Prediction**: Expected 0, received undefined ✅ Correct
**Result**: Test fails as expected with assertion error

Proceeding to Green phase.

Important Guidelines

What to DO

  • Activate exactly ONE test at a time
  • Make explicit predictions before running tests
  • Verify test fails for the right reason
  • Explain if predictions fail
  • Keep all other tests as it.todo()

What NOT to do

  • Never activate multiple tests simultaneously
  • Never skip making predictions
  • Never write implementation to make test pass
  • Never continue if prediction fails without explanation
  • Never implement beyond creating empty function

Psychological Resistance

Developers will experience resistance:

  • Feels uncomfortable - This is normal and correct
  • Seems wasteful - Two-stage failure seems redundant but builds understanding
  • Urge to implement - Strong desire to fix the test immediately
  • Push through discomfort - These feelings indicate correct discipline

Red Flags

Watch for these violations:

  • Multiple active tests (not it.todo())
  • Skipping predictions
  • Writing implementation before test fails
  • Not verifying test actually fails
  • Ignoring failed predictions

Output Format

When Activating Test

// Convert from:
it.todo("should return 0 for empty input");

// To:
it("should return 0 for empty input", () => {
  expect(calculate([])).toBe(0);
});

Prediction Template - Compilation Error

Red Phase - Compilation Error Prediction:
- Test: [test name]
- Expected: Compilation error
- Reason: [why it will fail]
- Error: [expected error message]

Prediction Template - Runtime Error

Red Phase - Runtime Error Prediction:
- Test: [test name]
- Expected: Runtime assertion error
- Expected value: [expected]
- Actual value: [actual]
- Diff: [expected diff output]

Completion Template

Red Phase Complete:
**Test Activated**: [test name]
**Compilation Prediction**: [error message] ✅ Correct / ❌ Incorrect
**Runtime Prediction**: [error message] ✅ Correct / ❌ Incorrect
**Result**: [actual result]

Proceeding to Green phase.

Remember

  • One test at a time - Never more than one active test
  • Predictions are mandatory - Build understanding through explicit expectations
  • Two-stage failure - Compilation error, then runtime error
  • No implementation - Only create empty function signature
  • Trust the process - Discomfort indicates correct discipline

Your goal is to maintain strict TDD discipline, ensure predictions are made and verified, and proceed autonomously through the TDD cycle.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Generates an experiment-overview snapshot of all research questions under research/reports/. Invoke when a new point-in-time report across all RQs should be produced.

日本語の概要は準備中です。原文の説明を表示しています。

marcoemrich/agentic_coding_lab122026年10月6日 更新

Mint a new YYYY-MM-DD-exact-coding-baseline snapshot under research/workflow-dev/export/. Detects the current best correctness- oriented workflow from research/workflow-dev/workflow-construction.md (or takes an explicit source-workflow argument) and transforms it from a lab workflow into a consumer-ready one on three axes: strips lab-only measurement content, re-enables human-in-the-loop checkpoints, and converts auto-loading config into an explicitly-invoked skill. Supports both promoted EXACT Coding lines: Opus/Hybrid and SOL/Predictive TDD. Exports Claude Code, pi, OpenCode, cursor-agent and, for SOL, Copilot. Trigger when the user says "exact-coding baseline export", "neue exact-coding baseline", "exact-coding-baseline-export", or asks to refresh the baseline snapshot.

日本語の概要は準備中です。原文の説明を表示しています。

marcoemrich/agentic_coding_lab122026年10月6日 更新

green

無料

TDD Green Phase - Implement minimal code to make the failing test pass

日本語の概要は準備中です。原文の説明を表示しています。

marcoemrich/agentic_coding_lab122026年10月6日 更新

reanalyze

無料

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).

日本語の概要は準備中です。原文の説明を表示しています。

marcoemrich/agentic_coding_lab122026年10月6日 更新

refactor

無料

TDD Refactor Phase - Improve code while keeping tests green using Simple Design Rules and APP mass

日本語の概要は準備中です。原文の説明を表示しています。

marcoemrich/agentic_coding_lab122026年10月6日 更新

run-rq

無料

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/.

日本語の概要は準備中です。原文の説明を表示しています。

marcoemrich/agentic_coding_lab122026年10月6日 更新

marcoemrich のスキルをすべて見る

このスキルの問題を報告する