test-driven-development · git:20260412.c1ced66 · 2026-04-12 · sha256 762ab7b7099c5b5d

test-driven-development git:20260412.c1ced66A

Immutable. This exact content never changes and is served at /api/v1/blob/762ab7b7099c5b5d.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_elwxutznd44mwvkb/762ab7b7099c5b5d4a0307a9ed450b54c647c70a1494fd36a810c92c928418f8.json

Then /plugin install test-driven-development@markdownregistry-elwxutznd44mwvkb in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: test-driven-development
description: Drive changes with Red→Green→Refactor; ensure behavior is verifiable and regression-safe.
---

# Test-Driven Development

## Overview

TDD uses the **Red → Green → Refactor** micro-cycle. First, define expected behavior. Next, use a minimal implementation to pass the test. Finally, organize the code structure.

## When to Use

- Adding or modifying core logic.
- Fixing bugs and needing regression protection.
- Requirements can be written as explicit input/output acceptance tests.

## Workflow

1. **Red**: Write a failing test describing the expected behavior.
2. **Green**: Write the minimal code to make the test pass.
3. **Refactor**: Clean up naming, structure, and duplication.
4. Repeat the cycle until acceptance criteria are met.

## Ironclad Rules

- Do NOT write massive amounts of features before writing tests.
- Focus on one small goal per cycle.
- All tests MUST pass after refactoring.