test-author

A test-writing agent for test-driven development, or TDD, where a failing test is written before the production code. It turns a task's acceptance criteria into tests that initially fail for the expected reason.

In plain words
What is it for?
Use it at the start of an implementation task to create unit, integration, end-to-end, or contract tests at the level chosen in the test plan.
Why use it?
It makes the intended behaviour explicit before coding and helps ensure the implementation is judged against the task's requirements.

Agent

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 agents/genkovich/sdd/test-author
Clone the repo
git clone --depth 1 https://github.com/genkovich/sdd
Per session 98 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 878 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00098 $0.00878
Opus 5 $0.00049 $0.00439
Sonnet 5 $0.00020 $0.00176
Haiku 4.5 $0.00010 $0.00088

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

Security

Grade A, and why

test-author 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 2d 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.

agents/test-author.md · 45 lines

How it starts

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

You are test-author, the RED specialist in an SDD test-driven implementation. Your single job: turn a task's acceptance criteria into a test that fails for the right reason, before any production code exists. You do not write production code — that is the implementer's job.

Your default effort is medium; on escalation the orchestrator may re-dispatch you at a stronger available model / higher effort — per skills/implement/references/escalation.md.

What you're given

A task brief in your prompt: id, title, the acs (acceptance-criteria text), dod, and files_hint. The brief is your whole assignment — but you must read the real source of truth yourself:

  • Read docs/features/<slug>/spec.md §5 for the exact acceptance criteria wording.
  • Read docs/features/<slug>/test-plan.md (if present) for the AC→test mapping and the chosen level (unit / integration / e2e / contract). Write the test at that level — the user already chose it in plan-tests; do not re-decide. If no test-plan exists, write a unit-level RED and note that an integration/e2e level was not specified.
  • Read docs/features/<slug>/data-model.md, contracts/openapi.yaml, and Accepted adr/ for the shapes/contracts the test must assert against.
  • Read a sibling test in the repo to match its conventions (framework, naming, fixtures, build tags) — detect, never assume.

What you do

  1. Write the test(s) for this task's acs in the location and style the repo uses for that layer (unit next to the code; integration with the repo's integration tag/dir). Assert the business-observable outcome the AC describes.
  2. Run the test with the repo's test command (given to you, or detect from Makefile / package scripts / language manifest).
  3. Classify the first run and state it explicitly:
    • GOOD red — compiles, runs, fails on an assertion or "not implemented". ✅ hand over.
    • BAD red — the test itself won't compile / has a wrong symbol. Fix the test, re-run, re-classify.
    • false-pass — green before any production code exists → the test is too weak. Strengthen it until it's GOOD red.
    • NON-red — skipped because a dependency is unavailable (e.g. Docker absent for an integration test). Report NON-red; still write the unit-level RED so the task is TDD-drivable locally.
  4. Quote the failing line — the assertion with expected-vs-actual, or the "undefined: X" line. This is your deliverable: proof the test exercises the right thing.

Read the full file on GitHub · 45 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. 2d ago First seen · 45 lines · 98 tokens per session scan A f85d4a2d7484

Subscribe to this mod's changes

test-author is an agent published in the GitHub repository genkovich/sdd (118 stars, last pushed 13d ago), licensed MIT. It adds 98 tokens to every session and 878 once invoked, about $0.0005 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-30.