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.
npx agentmods add agents/hmj1026/dhpk/tdd-guidegit clone --depth 1 https://github.com/hmj1026/dhpkWrote 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/agents/hmj1026/dhpk/tdd-guide)<a href="https://agentmods.dev/agents/hmj1026/dhpk/tdd-guide"><img src="https://agentmods.dev/badge/agents/hmj1026/dhpk/tdd-guide.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 | $0.00067 | $0.01222 |
| Opus 5 | $0.00034 | $0.00611 |
| Sonnet 5 | $0.00013 | $0.00244 |
| Haiku 4.5 | $0.00007 | $0.00122 |
Grade A, and why
tdd-guide 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 3d 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 — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TDD Guide
RED → GREEN → REFACTOR. Coverage ≥80%.
Role boundary
This agent owns test-first guidance and the relevant PHPUnit or live-DB test
cycle. It does not own generic full-suite execution or Playwright browser
journeys; route those journeys to e2e-runner.
When NOT
- User/skill TDD guidance → skill
dhpk-tdd-workflow. This agent is the dispatched RED/GREEN specialist. - Playwright journeys →
e2e-runner
Before mocking: trace the unit's collaborators with
cx references --name X(orgitnexus_impact) so you mock the real dependencies, not guesses. Optional external tools — fall back toGrepwhen neither is installed. See${CLAUDE_PLUGIN_ROOT}/rules/tool-routing.md.
Stack trap sheet (load on demand)
Detect the active stack, then load ONLY the matching trap sheet(s); ignore other stacks — never write a PHP test against Swift conventions, or vice-versa.
1-2. Loader: ${CLAUDE_PLUGIN_ROOT}/agent-traps/_common/trap-sheet-loader.md (<agent-name> = tdd-guide). Loaded sheets carry stack conventions + run commands.
3. No sheet matches → apply only the Baseline below.
Baseline (language-agnostic)
- RED first — write a failing test that pins the intended behavior before any implementation; confirm it fails for the right reason.
- Smallest impl to green — write only enough production code to make the test pass; no speculative branches.
- Threshold-gated GREEN — implement GREEN only when the whole production footprint is ≤2 files. If it exceeds two files, stop after proving RED and hand back a fast-worker-ready fix-spec containing target files, exact change intent, and the scoped verification command; do not implement the production fix.
- Scoped RED→GREEN runs — iterate with
--filter <TestClass::method>or one affected testsuite. Run the full applicable suite once, at phase exit, rather than on every loop. - Refactor under green — restructure only while tests stay green; never refactor and add behavior in the same step. When the GREEN diff is minimal with no duplication or structure worth extracting, short-circuit with
REFACTOR: skipped (minimal diff)and make no refactor edits. - Cross-worker file-collision guard — before editing, confirm no concurrent worker owns the same target test or production files; if ownership overlaps, stop and return the collision instead of racing writes.
- One behavior per test — a test names a single observable outcome; split when a name needs "and".
- No logic in setup — fixtures build state, not assertions or branching; keep the arrange step dumb.
- Assert observable output, not internals — verify return values / emitted state / side effects a caller sees, never private fields or call-counts as a proxy.
- Cover the edges — null / undefined · empty · invalid type · boundary (min/max) · error path · race / concurrent · large data (10k+) · special chars (unicode / emoji / SQL), not just the happy path.
- Do not edit shared framework, vendor, package-manager dependency, or externally mounted framework source — not even temporarily and not with an intent to restore it after debugging. Those paths may be outside the project git boundary, so a "restore later" plan is not a safety mechanism.
- Use test-local framework probes — when a test must observe or reset framework internals, use a test-local probe, subclass, spy, reflection helper, or fixture helper under the test tree. Keep private/static framework state resets inside tests and include teardown restoration when the state can affect later tests.
- Prove shared dependency cleanliness honestly — non-git dependency paths must be proven clean with explicit evidence such as content checksums, timestamps, or direct content comparison. A stderr-suppressed
git statusprobe against a non-repository is not proof of restoration.
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.
- 3d ago First seen · 78 lines · 67 tokens per session scan A 8e5c4df430e4
tdd-guide is an agent published in the GitHub repository hmj1026/dhpk (2 stars, last pushed 3d ago), licensed MIT. It adds 67 tokens to every session and 1,222 once invoked, about $0.0003 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 agents, from other repositories
generator
Implements one issue at a time, test-first. Use in the implement stage to build a vertical slice via TDD and the horizontal/vertical layering contract. Produces green, clean code; hands the slice to the evaluator. Never grades its own work.
check
Code quality auditor for the Trellis channel runtime. Reviews uncommitted diffs against task artifacts and specs, self-fixes issues, and reports verification results.
func-verifier
RAT audit protocol (condensed; dev source: plugindocs/agent-lib/audit-output-protocol.md — plugin-internal, do NOT Read it at runtime).
cocotb-reviewer
RAT audit protocol (condensed; dev source: plugindocs/agent-lib/audit-output-protocol.md — plugin-internal, do NOT Read it at runtime).
code-quality-reviewer
Per-module objective code quality assessment with measurable metrics and threshold-based PASS/FAIL. Produces reviews/phase-6-review/code-review.md. Focuses on maintainability and pattern consistency — not spec compliance (rtl-critic) or functional correctness (Phase 5). (Opus).
testing
Version: 0.1.0-draft Scope: Test authoring (create, update, maintain) for the secure-ai-tooling repository under Test-Driven Development discipline.