test-driven-development is agent-read markdown (skill) from thoughtbot/rails-consultant: Strict red-green-refactor TDD workflow for implementing features, fixing bugs, or changing behavior in Rails applications. Enforces the discipline of writing a failing test before any production code. Use whenever you want to implement with TDD — whether a new feature, a bugfix, a refactor, or any behavior change..
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# Test-Driven Development (TDD)
## Overview
Write the test first. Watch it fail. Write minimal code to pass.
**Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.
**Violating the letter of the rules is violating the spirit of the rules.**
## The Iron Law
```
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
```
Write code before the test? Delete it. Start over.
**No exceptions:**
- Don't keep it as "reference"
- Don't "adapt" it while writing tests
- Don't look at it
- Delete means delete
Implement fresh from tests. Period.
## Outside-In Development
Start every feature with a high-level test that describes behavior from the user's perspective. Run it, read the failure, and let that failure dictate your next move. As failures push you down the stack, write a new failing test at each layer you drop into — never write code for a layer without a failing test at that layer demanding it.
Read `examples/outside-in-testing.md` for a walkthrough of the philosophy and `examples/testing-pyramid.md` for how test types combine into an optimal suite.
### One Change, One Run
…
Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
GET https://markdownregistry.com/api/v1/artifacts/art_j7lkikzu3rkug2q2
GET https://markdownregistry.com/api/v1/resolve?ref=thoughtbot/rails-consultant/test-driven-development
GET https://markdownregistry.com/api/v1/blob/03dcf33a19b910d73c7e4e21c6ae70958dfe7f847404cc0340d595af5ce20507
Your agent 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.
thoughtbot/rails-consultant · skills/challenge/SKILL.md · Pressure-test an assumption, decision, or inherited constraint — Socratic cross-examination that forces you to defend…
thoughtbot/rails-consultant · skills/explain/SKILL.md · Explain what a piece of code does — a specific file, class, or method in close detail, or a user-facing flow as a…
thoughtbot/rails-consultant · skills/feature-dev/SKILL.md · Take one new feature slice from idea to reviewed, committed code in a single guided pass — scope it into the smallest…
thoughtbot/rails-consultant · skills/git-commit/SKILL.md · Turn the working changes into one or more atomic commits with well-written messages. Use whenever the user runs…
thoughtbot/rails-consultant · skills/hard-news/SKILL.md · Prepare to deliver difficult technical news to a client — a conversational prep session before the hard conversation…
thoughtbot/rails-consultant · skills/offboard/SKILL.md · Walk through the Designer/Developer wrap-up checklist for offboarding a client engagement — conversationally, one item…
thoughtbot/rails-consultant · skills/prior-art/SKILL.md · Discover how a codebase already handles a specific concern — search broadly, find every instance, and assess…
thoughtbot/rails-consultant · skills/rubber-duck/SKILL.md · Think out loud about a problem, decision, or approach — Socratic friction to help you find clarity, not sympathy
thoughtbot/rails-consultant · skills/slice/SKILL.md · Turn a feature into well-defined, independently shippable slices — whether it's an epic that needs breaking apart or a…
thoughtbot/rails-consultant · skills/socratic-review/SKILL.md · Socratic code review and refactoring session — whether it's your own code, a teammate's PR, or something you inherited…
thoughtbot/rails-consultant · skills/standup/SKILL.md · Write a client update — identify what was done, what's next, and surface risks before they become surprises. End of…
addyosmani/agent-skills · skills/test-driven-development/SKILL.md · Drives development with tests using the red-green-refactor loop. Use when implementing any logic, fixing any bug, or…
a5c-ai/babysitter · library/methodologies/superpowers/skills/test-driven-development/SKILL.md · Use when implementing any feature or bugfix, before writing implementation code. Enforces RED-GREEN-REFACTOR cycle.
a5c-ai/babysitter · library/methodologies/rpikit/skills/test-driven-development/SKILL.md · Test-first development practice where test specifications are written before production code, integrated into plan…
a5c-ai/babysitter · library/methodologies/cc10x/skills/test-driven-development/SKILL.md · Strict RED-GREEN-REFACTOR cycle enforcement. Tests are never skipped or deferred. Run mode only, never watch mode. Exit…
ganyuanran/aegis · skills/test-driven-development/SKILL.md · Use when the user explicitly requests strict or test-first TDD, or when the current conversation already contains an…