Skip to content
Back to templates

tdd-red-green-refactor

@randalolson/tdd-red-green-refactor

Drive a new feature or bug fix through a strict test-first cycle: a failing test committed first, a minimal implementation that makes it pass, then an optional refactor, each as its own commit on the current branch. Use this for new, test-first work; use unit-test-generator when you need tests for code that already exists.

Outcome

A new behavior ships with documented, reproducible test coverage that makes future regressions immediately visible and attributable.

Use this template

Your agent fetches this runbook and runs it, revising the output until the verifiers pass.

First time with Goodeye?

Connect your agent over MCP, then ask it to fetch this template by its identifier. Or install the CLI and run the command below.

Connect your agent (Claude Code)
claude mcp add --transport http goodeye https://mcp.goodeye.dev/mcp
Or install the CLI
uv tool install goodeye

Connecting over MCP prompts a quick sign-in. The CLI can fetch and run a public template with no account.

Set up another clientFull quickstart

Fetch or fork

Fetch with CLI
goodeye templates get @randalolson/tdd-red-green-refactor
Fork with CLI
goodeye templates fork @randalolson/tdd-red-green-refactor

Also available from

MCP
get_template(identifier="@randalolson/tdd-red-green-refactor")
REST
curl https://api.goodeye.dev/v1/templates/@randalolson/tdd-red-green-refactor