Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/studioKjm/ai-harness-templatenpx agentmods add commands/studiokjm/ai-harness-template/tddWrote 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/studiokjm/ai-harness-template/tdd)<a href="https://agentmods.dev/commands/studiokjm/ai-harness-template/tdd"><img src="https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/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/studiokjm/ai-harness-template/tdd"><img src="https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/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.00000 | $0.00842 |
| Opus 5.5 | $0.00000 | $0.00337 |
| Sonnet 5.5 | $0.00000 | $0.00168 |
| Haiku 4.5 | $0.00000 | $0.00084 |
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.
How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/tdd — TDD Cycle Manager
Methodology: tdd-strict
Purpose: Manage Red→Green→Refactor cycles. Gate enforces test-first order in git history.
Usage
/tdd new <description> [--test <path>] [--source <path>] [--hypothesis <text>] [--story <id>]
/tdd pass <cycle-id> [--criteria <text>]
/tdd refactor <cycle-id> [--notes <text>]
/tdd done <cycle-id>
/tdd abandon <cycle-id> [--reason <text>]
/tdd status <cycle-id>
/tdd list [--state red|green|refactor|done|abandoned]
/tdd link <cycle-id> [--story <id>] [--spike <id>] [--test-file <path>] [--source-file <path>]
State Machine
new
↓
🔴 red ──pass──→ 🟢 green ──refactor──→ 🔵 refactor ──done──→ ✅ done
│ │ │
└──abandon──→ ❌ abandoned ←─────────────────┘
Invariant enforced by gate: check-test-first.sh blocks commits where a source file
was introduced into git before its corresponding test file.
Workflow
1. Start a cycle
python3 methodologies/tdd-strict/scripts/tdd.py new "user can reset password" \
--test src/auth/reset.test.ts \
--source src/auth/reset.ts \
--hypothesis "POST /auth/reset sends email and returns 202"
2. Write the failing test → commit → the gate verifies test exists
# Write test file first
git add src/auth/reset.test.ts
git commit -m "test: reset password sends email (RED)"
# Gate passes: test file committed before source
3. Implement to pass the test
# Now write source
git add src/auth/reset.ts
git commit -m "feat: implement password reset"
# Gate passes: test was committed first
python3 methodologies/tdd-strict/scripts/tdd.py pass tdd-20260430-001
4. Refactor (optional cleanup)
git add .
git commit -m "[refactor] extract sendResetEmail helper"
# [refactor] prefix exempts this commit from gate
python3 methodologies/tdd-strict/scripts/tdd.py refactor tdd-20260430-001 \
--notes "extracted sendResetEmail, removed duplication"
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 · 110 lines · 0 tokens per session scan A bf87f2a6efb2
tdd is a command published in the GitHub repository studioKjm/ai-harness-template (45 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 842 tokens. 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 commands, from other repositories
bug-fix-tdd
Fix a bug using TDD: reproduce with a failing test first, then implement the fix, then verify. Prevents regressions.
test-author
Write tests first (RED→GREEN→REFACTOR) with Vitest, Testing Library, and Playwright for a Next.js + Supabase app. Use when adding a feature, fixing a bug, or...
bugfix
Bug fix workflow: root cause analysis → user review → regression test + fix via TDD.
eval
Evaluate and improve one healthcare agent's system prompt. Run up to 5 iterations of: prepare fixed questions -> answer -> judge -> improve -> re-score -> commit if better.
usage-add
PitWay: Accumulate measured planning or qa token usage onto a milestone.
speckit.tdd.plan
Derive the feature's test list by delegating to zfa tdd plan (deterministic engine); falls back to LLM-guided derivation only when zfa is unavailable.