Pattern: Test-driven development (red-green-refactor)

Write a failing test first (red), make it pass with the simplest code (green), then refactor — repeat. Gives the agent ground-truth feedback before it commits to an implementation, a direct answer to “the code doesn’t work.”

Matt Pocock — Skills for Real Engineers:

  • mp-tdd — dedicated red-green-refactor skill.

GSD:

Addy Osmani — Agent Skills:

Spec Kit:

  • speckit-implement — TDD is “NON-NEGOTIABLE”: tests are written and must fail (Red) before implementation code.

BMAD:

  • bmad-dev-story — implements each story test-first; its persona bmad-dev (Amelia) is “disciplined in Kent Beck’s TDD.”

gstack:

  • gstack-qa — auto-generates a regression test for every fix; /ship bootstraps a test framework and audits coverage (100% goal).

Superpowers:

  • sp-test-driven-development — the dedicated RED-GREEN-REFACTOR skill; Iron Law “no production code without a failing test first,” enforced by delete-and-restart.
  • sp-writing-plans — bakes the test-first micro-loop directly into every plan task’s steps.
  • sp-writing-skills — applies red-green-refactor to skill authoring itself (baseline subagent failure → write skill → watch it comply).

Now a strong multi-framework cluster. Spec Kit is the strictest by mechanism — test-first is mandated by the project constitution (Article III) — while Superpowers matches its non-negotiability by rhetoric: any production code written before its test must be deleted and rewritten from the test.

See Also