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.svg" alt="Measured on agentmods" 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 | $0.00015 | $0.00249 |
| Sonnet 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 8d 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.
- 8d 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 4mo ago), licensed MIT. It adds 29 tokens to every session and 497 once invoked, about $0.0001 per session on Opus 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
prompt-evolve
Closed prompt-evolution loop: turn a lesson into a candidate agent prompt, gate it on held-out evals, promote only if it beats the baseline. SIA Meta→Target→Feedback ported to greatcto.
bugfix
TDD-driven bugfix workflow: tester writes failing test (RED) → developer fixes (GREEN) → developer refactors (REFACTOR) → reviewer validates. Accepts issue number, description, or both. Auto-creates PR unless --no-pr flag is passed.
atdd
Start the ATDD workflow for a new feature. Optionally provide a feature description as an argument.
develop
Implement skill development issues with TDD-governed workflow.
execute
Execute the next available tracked task with TDD, pre-commit validation, PR creation, AI code review, and issue tracker bridge sync.
loop
Autonomous execution loop. Runs the TDD cycle repeatedly until all tasks in an epic are complete, with circuit breaker protection and PR workflow.