Test-driven development following a strict red-green-refactor loop across vertical slices. Use when writing code test-first, implementing new features with unit/integration tests, or fixing bugs test-first.
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 the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Every section applies on every cycle: consult them before and during the loop, not after.
When exploring the codebase, read `GLOSSARY.md` (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.
## What a good test is
Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification: "user can checkout with valid cart" tells you exactly what capability exists, and it survives refactors because it doesn't care about internal structure.
See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.
## Seams: where tests go
A **seam** is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.
…
The line at the top of this page pins the label git:20261016.0f9b29d, 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.
GET https://markdownregistry.com/api/v1/artifacts/art_2kou5fbq3whyeaaf
GET https://markdownregistry.com/api/v1/resolve?ref=saifallah-star/aegis/tdd
GET https://markdownregistry.com/api/v1/blob/c472c2a2b63bebadbbfeeae9efb37b50d90740be1c67e04dd543f61b9c31dbde
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.
saifallah-star/aegis · .agents/skills/ask-matt/SKILL.md · Router to help choose the right skill or engineering workflow for your situation. Use when the user asks for guidance…
saifallah-star/aegis · .agents/skills/codebase-design/SKILL.md · Shared vocabulary and principles for designing deep modules with narrow interfaces. Use when designing module…
saifallah-star/aegis · .agents/skills/diagnosing-bugs/SKILL.md · Disciplined diagnosis loop for hard bugs and performance regressions: reproducible test -> isolate -> hypothesis ->…
saifallah-star/aegis · .agents/skills/domain-modeling/SKILL.md · Actively build and sharpen a project's ubiquitous domain language, glossary, and Architectural Decision Records (ADRs)…
saifallah-star/aegis · .agents/skills/grill-me/SKILL.md · Interview the user relentlessly about a plan, idea, or decision until all branches of the design tree are settled. Use…
saifallah-star/aegis · .agents/skills/grill-with-docs/SKILL.md · Relentless interview session to stress-test and clarify a design or plan while creating GLOSSARY.md and ADRs inline…
saifallah-star/aegis · .agents/skills/grilling/SKILL.md · Core interviewing primitive that maps decisions into a branching design tree, working the frontier one round of…
saifallah-star/aegis · .agents/skills/handoff/SKILL.md · Serialize the active conversation context into a structured handoff document for another agent or future session to…
saifallah-star/aegis · .agents/skills/implement-spec/SKILL.md · Execute an entire spec on an integration branch by coordinating implementer subagents across a ticket task graph…
saifallah-star/aegis · .agents/skills/implement/SKILL.md · Build out work based on a spec or tickets by driving TDD at pre-agreed seams and closing with code review. Use when the…
saifallah-star/aegis · .agents/skills/improve-codebase-architecture/SKILL.md · Scan a codebase for module deepening and refactoring opportunities, generate an interactive HTML report, and grill…
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…