tdd

Installation
SKILL.md

Test-Driven Development

Builds a feature or a fix one behavior at a time — a failing test, the least code that passes it, a commit, then the next — against the brief's acceptance criteria when there is a brief, and against an agreed plan when there is not.

Requires: python3 (the checkers in scripts/ — brief.py, redgreen.py, ledger.py — run in 5. Definition of Done) and git (reading the tree's history in step 0, recording Base, the one-commit-per-green-slice save points, and the --base diff redgreen.py runs against). If either is missing, skip the check that needs it and say so in your closing lines.

Reference files

  • pipeline.md — open it when you need what each stage reads and leaves, the full rule on where questions go, which commands you may run, or how to check your own output.
  • loop-and-tracks.md — open it before step 0 when you were sent remediation slices from the ledger, or your brief says you are one of its Parallel tracks.
  • ledger-format.md — open it when you close remediation slices in .workflow/ledger.md or read a code ledger.py check reports.
  • good-tests.md — open it when you plan, before writing any test, and judge every test you write against it.
  • delegation.md — open it when you are about to dispatch any subagent.
  • deep-modules.md — open it when a slice adds a module or class, or you want to test internals.
  • interface-design.md — open it when you add or change a public interface, or a test needs heavy setup or patching to reach the behavior.
  • mocking.md — open it when you are about to substitute anything in a test (a fake, stub or mock).
  • domain-primitives.md — open it when the brief names domain primitives, or the change handles a security-relevant value (an ID, an amount, a path, anything an attacker controls).

Where this fits

Installs
5
First Seen
Oct 24, 2026