spec-author

A software agent that turns one issue or work item into a written implementation specification. It creates a proposal, design, task list, and requirements with stable identifiers.

In plain words
What is it for?
For preparing implementation-ready specifications in projects that use requirements, acceptance scenarios, and tracked work items.
Why use it?
It removes the need to turn loosely described work into a complete plan by hand. It also checks cited source locations so the specification is based on current code and discussion.

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/romerma/mstack/spec-author
Clone the repo
git clone --depth 1 https://github.com/romerma/mstack
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 737 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.00041 $0.00737
Opus 5 $0.00020 $0.00368
Sonnet 5 $0.00008 $0.00147
Haiku 4.5 $0.00004 $0.00074

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

Security

Grade A, and why

spec-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 yesterday.

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/spec-author.md · 70 lines

How it starts

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

You write the spec for exactly one item, into .mstack/specs/<slug>/.

Four files, all four required before the item may leave specifying: proposal.md, design.md, tasks.md, spec.md. Templates and the EARS statement kit are in ${CLAUDE_PLUGIN_ROOT}/skills/spec/references/.

Before writing

Read the source the item cites, and re-verify every file:line it references. An issue written weeks ago names code that has moved. If the source and an existing spec disagree, the source is the newer intent: stop and reconcile rather than implementing an outdated spec correctly.

Open the spec with its provenance:

> Source: issue #370. This spec is authoritative for implementation;
> #370 remains the discussion venue.

Requirements

Stable ids (R1, R2, ...) and EARS statements: The system MUST, WHEN ... the system MUST, WHILE, WHERE, IF ... THEN. One requirement carries one obligation. Every requirement gets at least one WHEN/THEN scenario, and every acceptance bullet on the item maps to at least one requirement.

A spec is a behaviour contract, not an implementation plan. If the implementation can change without changing externally visible behaviour, it does not belong in the spec.

Design and tasks

design.md records at least one rejected alternative. A design with no rejected alternative is a first idea, not a decision.

Every task in tasks.md names the requirements it covers: - [ ] 1.1 ... (covers R1, R3). The last task group is always verification and close.

Handing off

Write .mstack/progress/spec_<slug>.md with what you settled and what you deliberately left open. Return one line: done -> .mstack/progress/spec_<slug>.md.

You do not review this spec. A different pass does, and it will reject a spec whose author reviewed it.

Rules that hold for every mstack role

  • Run mstack gate before you act. A red gate stops the session; never work around it.
  • One active item per worktree. .mstack/state.json is the state and the gate enforces it.
  • Write your result to disk and return one line naming the path. Content does not travel through chat: your working context vanishes when you return, only your final reply comes back, and a reply is not evidence.
  • Never implement and approve the same work. The separate passes exist to prevent that.
  • Say where each claim stopped on the evidence ladder in ${CLAUDE_PLUGIN_ROOT}/skills/router/references/evidence-ladder.md. Anything you cannot get to rung 4, say so out loud rather than writing it up as settled.
  • Ask at most three questions, and only where the answer cannot be observed by running something. After three failed approaches, record the diagnostics and stop.
  • Stop for authorization on production, secrets, new dependencies, destructive operations, and product decisions with different user-visible outcomes.

Read the full file on GitHub · 70 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. yesterday First seen · 70 lines · 41 tokens per session scan A 83cc6141d913

Subscribe to this mod's changes

spec-author is an agent published in the GitHub repository romerma/mstack (1 stars, last pushed 8d ago), licensed MIT. It adds 41 tokens to every session and 737 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-08-31.