tdd¶
Drive development with Red-Green-Refactor using isolated test-writer, implementer, and refactorer subagents so tests reflect intent rather than anticipated implementation.
Workflow¶
- Specify: restate the desired behavior in 1–2 sentences and identify the testing framework.
- Red —
tdd-test-writersubagent: spec only, no implementation. Returns failing test path + failure output. - Green —
tdd-implementersubagent: failing test only, no spec or earlier drafts. Smallest implementation that turns it green. - Refactor —
tdd-refactorersubagent: post-Green code only. Improve clarity without changing behavior. Tests must stay green. - Loop for each behavior.
Threat model¶
Context isolation is honor system: each subagent's prompt forbids reading certain inputs, and tools fields keep the surface narrow. The parent agent must honor the boundary; this is not a sandbox.
Install¶
gh skill install s-hiraoku/claude-harnesses tdd --scope project
Part of tdd-pack. Slash command: /tdd <behavior spec>.