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/ShaheerKhawaja/ProductionOSWrote 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/commands/shaheerkhawaja/productionos/tdd)<a href="https://agentmods.dev/commands/shaheerkhawaja/productionos/tdd"><img src="https://agentmods.dev/badge/commands/shaheerkhawaja/productionos/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/commands/shaheerkhawaja/productionos/tdd"><img src="https://agentmods.dev/badge/commands/shaheerkhawaja/productionos/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.00029 | $0.00497 |
| Opus 5.5 | $0.00012 | $0.00199 |
| Sonnet 5.5 | $0.00006 | $0.00099 |
| Haiku 4.5 | $0.00003 | $0.00050 |
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 1mo 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.
What it actually says
/tdd — Test-Driven Development
Write tests first. Implement second. Refactor third. Never skip a step.
Step 0: Preamble
Run templates/PREAMBLE.md. Detect test framework (jest, vitest, pytest, bun test).
Step 1: Write the First Failing Test
Choose the smallest requirement slice, write the failing test first, and prove it fails before implementation starts.
The Cycle
Red: Write Failing Tests
- Understand the requirement
- Write the test that verifies the requirement
- Run the test — it MUST fail (if it passes, the test is wrong or the feature already exists)
# Run and expect failure
bun test --filter "{test_name}" 2>&1 || true
Green: Implement Minimum Code
- Write the MINIMUM code to make the test pass
- No extra features, no optimization, no cleanup
- Run the test — it MUST pass
# Run and expect success
bun test --filter "{test_name}" 2>&1
Refactor: Clean Up
- Improve the code without changing behavior
- Run ALL tests after refactoring — nothing should break
- Remove duplication, improve naming, simplify
Coverage Check
# Check coverage meets target
bun test --coverage 2>&1 | tail -10
If coverage < $ARGUMENTS.coverage: write more tests for uncovered paths.
Agent References
- Dispatch
test-architectfor test design - Dispatch
self-healerif tests fail after refactor
Self-Eval
Run templates/SELF-EVAL-PROTOCOL.md:
- Did I write tests BEFORE code? (not after)
- Do tests cover edge cases? (empty, null, boundary)
- Is the implementation minimal? (no gold-plating)
- Does coverage meet target?
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.
- 1mo ago First seen · 69 lines · 29 tokens per session scan A 18eabb3dac12
tdd is a command published in the GitHub repository ShaheerKhawaja/ProductionOS (8 stars, last pushed 6mo ago), licensed MIT. It adds 29 tokens to every session and 497 once invoked, about $0.0001 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-31.
Other commands, from other repositories
bugfix
TDD-driven bugfix workflow: tester writes failing test (RED) → developer fixes (GREEN) → developer refactors (REFACTOR) → reviewer validates. Accepts issue number, description, or both. Asks before pushing and creating a PR; --no-pr commits locally without asking.
atdd
Start the ATDD workflow for a new feature. Optionally provide a feature description as an argument.
debug
Systematic root-cause investigation, then fix with TDD — never proposes a fix before finding the cause; resumable diagnosis + regression test in .orc/ state. Workspace-aware. For a quick one-off look without session state, prefer the bundled /debug.
develop
Implement skill development issues with TDD-governed workflow.
ccc-feature-start
Kick off a feature: research context, create an isolated branch, confirm a green baseline, write a task breakdown, and the first failing test. Use when starting new feature work in a git repository.
execute
Execute the next available tracked task with TDD, pre-commit validation, PR creation, AI code review, and issue tracker bridge sync.