Test-driven development discipline: the red-green-refactor cycle, the testing pyramid's proportion of unit/integration/e2e, Fowler's test-double taxonomy, and the FIRST properties of a test worth keeping. Use when building a feature or fixing a bug test-first, mentions "TDD" or "red-green-refactor", or when deciding what kind of test to write, whether to mock a dependency, or how a test suite should be shaped.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Test-Driven Development
TDD is a design discipline, not a testing habit. Kent Beck's rule is absolute: **no production code is written except to make a failing test pass, and no more of it than the test requires.** The test comes first because it forces the interface to be designed from the caller's side before an implementation exists to bias the design.
## Phase 1: The cycle
One cycle, repeated, never skipped:
1. **Red.** Write the smallest test that expresses one new piece of behaviour, for code that does not yet support it. Run it. Confirm it fails, and fails for the reason you expect; a test that fails on a typo or a missing import isn't red for the right reason.
2. **Green.** Write the minimum production code that makes the test pass. Resist the urge to generalize or handle a case the test didn't ask for; a case not yet demanded by a test is a case not yet designed, and designing it now is a guess.
…
The line at the top of this page pins the label git:20260809.a266045, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
A 17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
pass: Frontmatter block present
pass: Frontmatter declares a name
pass: Frontmatter declares a description
pass: Size between 200 bytes and 200 KB (7063 bytes)
pass: No zero-width or bidi control characters
pass: No instruction hidden inside an HTML comment
pass: No link to an exfiltration or paste host
pass: No credential-shaped string
pass: No instruction to send local credentials anywhere
pass: No text hidden with inline styles
pass: No prompt-injection phrasing
pass: No curl or wget piped into a shell
pass: No recursive delete of root, home or parent
pass: No instruction to read or print local credentials
pass: No base64 blob over 200 characters
pass: No link to a raw IP address
pass: No script tag
Source
GitHub
aethrox/doctrine · 19 stars · license MIT · pushed 2026-09-11 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_h5pir6rbaqdykxry
GET https://markdownregistry.com/api/v1/resolve?ref=aethrox/doctrine/tdd
GET https://markdownregistry.com/api/v1/blob/feccd1f27f7e64711db9c396510bdcc1c99d33c213abe9c2dc95b6b4eb0dceb9
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
aethrox/doctrine · skills/api-design-standards/SKILL.md · API design discipline grounded in the Microsoft/Google REST guidelines, resource and URL conventions, a chosen…
aethrox/doctrine · skills/architecture-diagram/SKILL.md · Produce a software architecture diagram at the right level of zoom, using diagram as code so it can be shown inline…
aethrox/doctrine · skills/capacity-estimation/SKILL.md · Turn a vague performance requirement into arithmetic before the architecture is chosen, size concurrency with Little's…
aethrox/doctrine · skills/code-review/SKILL.md · Code review discipline: the approval bar is "improves code health," not "perfect," Fowler's code-smell catalog gives…
aethrox/doctrine · skills/code-style-lint/SKILL.md · Discipline for code style and static analysis, adopt the ecosystem's established formatter as the non-negotiable source…
aethrox/doctrine · skills/codebase-design/SKILL.md · Module design discipline from John Ousterhout's A Philosophy of Software Design, depth as the metric (a lot of…
aethrox/doctrine · skills/dependency-upgrade-management/SKILL.md · Discipline for keeping dependencies current and deprecating capabilities safely, an inventory (SBOM) of what's actually…
aethrox/doctrine · skills/diagnosing-bugs/SKILL.md · Systematic debugging discipline based on David Agans' nine rules, understand the system, reproduce reliably, bisect the…
aethrox/doctrine · skills/domain-modeling/SKILL.md · Domain-Driven Design discipline, build a ubiquitous language shared by code and conversation, draw explicit bounded…
aethrox/doctrine · skills/explain-plainly/SKILL.md · Default to explaining technical work in plain language for a non-technical audience, using an existing project glossary…
aethrox/doctrine · skills/grilling/SKILL.md · Interview the user relentlessly, in rounds, to close the gap between what's known and what's needed before acting on a…
aethrox/doctrine · skills/handoff/SKILL.md · Hand off in-progress work, an on-call shift, or an open incident to another person or agent using a fixed four-part…
cursor/plugins · pstack/skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…
cursor/plugins · harness/pstack/claude-code/skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…
nightly-labs/openbot · marketplace/production-catalog/bundles/pstack/skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…
michael-denyer/pstack-claude · plugins/pstack/skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…
backnotprop/pstack · skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…