speckit.tdd.run

speckit.tdd.run is a command for Claude Code from arrrrny/zuraffa. It costs 43 tokens per session (851 once invoked), scanned A, original, MIT.

A command that runs a feature’s tests through the red-green-refactor cycle, using the zfa engine when the project supports it. Red means a test fails, green means it passes, and refactor means improving code without changing its behavior.

In plain words
What is it for?
Use it to drive all behaviors in a feature’s test list, or resume a specific behavior or interrupted run.
Why use it?
It keeps the test-driven development loop consistent and leaves the agent to handle only genuine failures or exceptions.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to drive all behaviors in a feature’s test list, or resume a specific behavior or interrupted run.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/arrrrny/zuraffa/speckit.tdd.run
Install

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.

Clone the repo
git clone --depth 1 https://github.com/arrrrny/zuraffa

Made for: Claude Code.

Wrote 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.

agentmods badge for speckit.tdd.run

README.md
[![agentmods](https://agentmods.dev/badge/commands/arrrrny/zuraffa/speckit.tdd.run/github.svg)](https://agentmods.dev/commands/arrrrny/zuraffa/speckit.tdd.run)
Your own site
<a href="https://agentmods.dev/commands/arrrrny/zuraffa/speckit.tdd.run"><img src="https://agentmods.dev/badge/commands/arrrrny/zuraffa/speckit.tdd.run/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.

agentmods 80×15 button for speckit.tdd.run

Your own site · 80×15
<a href="https://agentmods.dev/commands/arrrrny/zuraffa/speckit.tdd.run"><img src="https://agentmods.dev/badge/commands/arrrrny/zuraffa/speckit.tdd.run.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 851 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.00851
Opus 5 $0.00022 $0.00426
Sonnet 5 $0.00009 $0.00170
Haiku 4.5 $0.00004 $0.00085

Measured 5d ago against content hash 650771fe0325, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

speckit.tdd.run 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 5d 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.

.specify/extensions/tdd/commands/speckit.tdd.run.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TDD Run (zfa-delegating)

Drive every behavior in the feature's test list through red → green → refactor. When this project is zuraffa-wired, the loop is deterministic — dispatch to zfa tdd run. The LLM's role narrows to: fixing the code when zfa stops at an honest RED, and handling escape hatches.

User Input

$ARGUMENTS

Accept: all (default), a behavior id, or resume.

Step 0 — Engine detection

zfa --version 2>/dev/null && test -f .zfa.json && echo "ZFA_OK" || echo "ZFA_MISSING"
  • ZFA_OK → Step 1
  • ZFA_MISSING → fall back to the original LLM-guided loop (see "Fallback Path")

Step 1 — Resolve the feature

Standard resolution: input → .specify/feature.json → prerequisites script. Set FEATURE_SLUG.

Step 2 — Dispatch to zfa

zfa tdd run "$FEATURE_SLUG" --timeout 25 2>&1

(Adjust --timeout for the hardware; 25 minutes per step on an Intel Mac is the measured safe ceiling.)

Step 3 — Handle the verdict

The command runs until complete or an honest stop. Interpret:

result=complete pending=0 red=0 green=0 done=N

All behaviors done. Report: behaviors driven, suite state, evidence path (tdd/cycle-log.md). Tick the corresponding tasks.md tasks.

result=stopped stopped_at=<behavior>:<step>

zfa stopped honestly. The stops the LLM must handle:

verify-red with classification=compile-error: The generated test doesn't compile. This is a generator bug (or a spec grammar edge) — report the error, fix the compile error (escaping, imports) WITHOUT changing the test's assertions, then resume.

make with outcome=generation-error or not-certified-red: The make path failed. Inspect the cycle-log for the reason. If the behavior's subject needs a real implementation the generator can't express, implement the minimal change that makes the certified-red test pass (this is the TDD "smallest change" step — the LLM writes it, the suite proves it).

refactor with outcome=not-green or runner-error: The suite went red during refactor. Inspect, fix, resume.

Read the full file on GitHub · 94 lines

Changes

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.

  1. 5d ago First seen · 94 lines · 43 tokens per session scan A 650771fe0325

Subscribe to this mod's changes

speckit.tdd.run is a command published in the GitHub repository arrrrny/zuraffa (5 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 851 once invoked, about $0.0002 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-09-03.