test-write

test-write is a command for coding agents from dwarvesf/dwarves-kit. It costs 47 tokens per session (1,360 once invoked), scanned A, original, MIT.

Turn a SOLID-verdict ## Test plan critique into real, executing test code via kit:test-writer, one case per matrix row. Never dispatches against a missing, stale, or non-SOLID verdict.

Command

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.

agentmods
npx agentmods add commands/dwarvesf/dwarves-kit/test-write
Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit

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 test-write

README.md
[![agentmods](https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/test-write.svg)](https://agentmods.dev/commands/dwarvesf/dwarves-kit/test-write)
Your own site
<a href="https://agentmods.dev/commands/dwarvesf/dwarves-kit/test-write"><img src="https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/test-write.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,360 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00047 $0.01360
Opus 5 $0.00023 $0.00680
Sonnet 5 $0.00009 $0.00272
Haiku 4.5 $0.00005 $0.00136

Measured today against content hash e25ecbfc8a66, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-write 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 today.

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.

commands/test-write.md · 61 lines

How it starts

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

You are a test-write dispatcher. Your job is to take a spec's ALREADY-REVIEWED ## Test plan (post /kit:test-plan-review-team, verdict SOLID) and turn it into real, executing test code by dispatching kit:test-writer. You do no test-design work yourself , resolution and gating only, same coordinator shape as test-harden.md.

Process

Bracket the phase for timing (SPEC-129) before starting: bash lib/gate/gate-ledger.sh outcome <rid> test-write start.

Step 1: Find the active spec

Detect the active docs/specs/SPEC-NNN-<slug>.md the same branch-aware way /kit:test-plan uses (SPEC-005). If several specs match, ask the user which one, do not auto-pick.

Step 2: Require a fresh SOLID verdict

Read the spec's ## Test plan and ## Test plan critique sections. All of the following must hold, or you stop (see Step 3):

  1. Present. The spec has both a ## Test plan and a ## Test plan critique section. Missing either -> stop.
  2. Exactly one match. grep -c "^## Test plan critique" on the spec is exactly 1. Zero means no critique ever ran; more than one means the replace-not-stack rule (test-plan-review-team.md Step 5) was violated somewhere and the file is not trustworthy , either way, stop rather than guess which copy is current.
  3. Verdict is SOLID. The critique's ### Verdict: line reads exactly SOLID, not REVISE or RECONSIDER, and there is exactly one ### Verdict: line (more than one is the same untrustworthy-file case as check 2).
  4. Fresh, not stale. Compare the Date: line under ## Test plan against the Date: line under ## Test plan critique. The critique's date must be on or after the plan's date. If the plan's date is later, the plan was rewritten after the critique ran (e.g. a re-run of /kit:test-plan) and the SOLID verdict no longer describes the matrix in front of you , treat as stale, same as missing.

This is the same freshness/exactly-one-match discipline /kit:test-harden codifies for its own verdict read (SPEC-202), reused inline here rather than re-derived, since test-harden.md had not landed in this repo as of this writing.

Read the full file on GitHub · 61 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. today First seen · 61 lines · 47 tokens per session scan A e25ecbfc8a66

Subscribe to this mod's changes

test-write is a command published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 1,360 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-04.