# Test Driven Development

Strict RED-GREEN-REFACTOR cycle enforcement.

- Repository: https://github.com/a5c-ai/babysitter (1887 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add a5c-ai/babysitter --skill test-driven-development -g -a claude-code -y`
Codex: `npx skills add a5c-ai/babysitter --skill test-driven-development -g -a codex -y`
Cursor: `npx skills add a5c-ai/babysitter --skill test-driven-development -g -a cursor -y`
Gemini CLI: `npx skills add a5c-ai/babysitter --skill test-driven-development -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add a5c-ai/babysitter`

## Description

Strict RED-GREEN-REFACTOR cycle enforcement. Tests are never skipped or deferred. Run mode only, never watch mode. Exit code evidence mandatory.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## Non-Negotiable Rules

- Always use run mode (`CI=true npm test` or `--run` flag)
- NEVER use watch mode (prevents hanging processes)
- Use timeout guards (`timeout 60s`) as backup
- Record exit codes as evidence at each phase
- If tests fail 3 consecutive times in GREEN, report failure status
- Never skip RED phase (failing test must exist before implementation)
- Never defer tests to "later" -- TDD means tests first

## Scope Discipline

- If implementation requires >3 file changes, flag for scope review
- Architectural choices require user approval unless pre-approved in plan
- New dependencies require user approval

## When to Use

- Every feature implementation in BUILD workflow
- Every bug fix in DEBUG workflow (regression test)

## Agents Used

- `component-builder` (primary consumer)
- `bug-investigator` (regression tests)

