Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/marcoemrich/mad-tdd-mob-ai-drivenWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/marcoemrich/mad-tdd-mob-ai-driven/tdd)<a href="https://agentmods.dev/rules/marcoemrich/mad-tdd-mob-ai-driven/tdd"><img src="https://agentmods.dev/badge/rules/marcoemrich/mad-tdd-mob-ai-driven/tdd/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/marcoemrich/mad-tdd-mob-ai-driven/tdd"><img src="https://agentmods.dev/badge/rules/marcoemrich/mad-tdd-mob-ai-driven/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01718 | $0.01718 |
| Opus 5.5 | $0.00687 | $0.00687 |
| Sonnet 5.5 | $0.00344 | $0.00344 |
| Haiku 4.5 | $0.00172 | $0.00172 |
Grade A, and why
tdd scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test-Driven Development (TDD) Rules
TDD Mindset and Common Challenges
Expected Psychological Resistance
TDD practices will feel counterintuitive and uncomfortable:
- Hardcoded returns feel "too simple" - Returning
0or1seems wasteful, but it's the correct minimal step - The urge to implement ahead is strong - You'll want to solve multiple test cases at once; resist this
- Minimal steps feel inefficient - Taking tiny steps seems slow but actually accelerates development
- Predictions feel unnecessary - Stating what will fail seems obvious, but builds crucial understanding
- Push through this discomfort - These feelings indicate you're following the discipline correctly
Why This Discipline Works
Understanding the deeper purposes helps maintain discipline:
- Baby steps reveal simpler solutions - Implementing only what tests demand often uncovers approaches simpler than over-engineered first attempts
- One-test-at-a-time prevents complexity - Not thinking ahead eliminates unnecessary features and abstractions
- Predictions build confidence - Explicit expectations create deeper understanding of what you're testing and why
- Refactoring becomes natural - Mandatory improvement attempts prevent technical debt accumulation
- The process fights harmful instincts - Programming instincts often lead to premature optimization and over-engineering
Common TDD Failure Modes
Watch for these violations of discipline:
- Planning beyond base functionality - Including advanced features in initial test list instead of focusing on core functionality
- Multiple active tests - Converting more than one
it.todo()to executable test code at once - Implementing beyond tests - Adding features or logic not demanded by current failing test
- Skipping predictions - Running tests without explicitly stating expected failures
- Avoiding refactoring - Moving to next test without attempting at least one improvement
- Premature abstraction - Creating complex solutions when simple ones pass tests
- Ignoring the uncomfortable - Abandoning discipline when it feels "too simple" or "too slow"
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 210 lines · 1,718 tokens per session scan A 2a682be203b3
tdd is a cursor rule published in the GitHub repository marcoemrich/mad-tdd-mob-ai-driven (33 stars, last pushed 12mo ago), licensed MIT. It adds 1,718 tokens to every session, about $0.0069 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
mcpnuke-tests
Test conventions for mcpnuke — enforces TDD workflow.
debug-issue
When the user reports a bug, an error, or unexpected behavior. Enforces four structured phases — reproduction, failing test, root cause isolation, fix and verify — to stop guess-and-check loops.
common-testing
Testing requirements: 80% coverage, TDD workflow.
testing_rules
A testing guide covering TDD, where tests are written before code, and BDD, where expected behavior is described in Given-When-Then form.
tdd
Test-driven development — red-green-refactor cycle.
testing-standards
testing guidelines and expectations.