Babysitter test-driven-development
Strict RED-GREEN-REFACTOR cycle enforcement. Tests are never skipped or deferred. Run mode only, never watch mode. Exit code evidence mandatory.
install
source · Clone the upstream repo
git clone https://github.com/a5c-ai/babysitter
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/a5c-ai/babysitter "$T" && mkdir -p ~/.claude/skills && cp -r "$T/library/methodologies/cc10x/skills/test-driven-development" ~/.claude/skills/a5c-ai-babysitter-test-driven-development && rm -rf "$T"
manifest:
library/methodologies/cc10x/skills/test-driven-development/SKILL.mdsource content
Test-Driven Development
Overview
Enforces the TDD discipline in all CC10X BUILD workflows. The RED-GREEN-REFACTOR cycle is mandatory and cannot be skipped or deferred.
TDD Cycle
- RED: Write failing test first. Run with
orCI=true npm test
flag. Exit code MUST be 1.--run - GREEN: Write minimal code to make test pass. Exit code MUST be 0.
- REFACTOR: Clean up implementation while keeping tests green. Exit code MUST remain 0.
Non-Negotiable Rules
- Always use run mode (
orCI=true npm test
flag)--run - NEVER use watch mode (prevents hanging processes)
- Use timeout guards (
) as backuptimeout 60s - 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
(primary consumer)component-builder
(regression tests)bug-investigator