spec

A command that turns agreed user stories in STORIES.md into executable BDD specifications. BDD, or behavior-driven development, describes software behavior as examples that can be tested.

In plain words
What is it for?
Use it to generate pending specification files from finalized stories, help author stories when none exist, or report on existing specifications.
Why use it?
It creates the testable specification needed before implementation and refuses to proceed when the project or requirements documents are missing.

Command for Claude Code

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/robconery/cassini-workshop/spec
Clone the repo
git clone --depth 1 https://github.com/robconery/cassini-workshop

Made for: Claude Code.

Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 970 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00027 $0.00970
Opus 5 $0.00014 $0.00485
Sonnet 5 $0.00005 $0.00194
Haiku 4.5 $0.00003 $0.00097

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

Security

Grade C, and why

spec scanned grade C with 1 finding 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.

Tells the agent never to refusehighAnti-refusal

Suppressing the ability to decline removes a core safety control; a later harmful request then succeeds.

3. **Stories check.** If `docs/STORIES.md` is missing or empty, do NOT refuse —
Origin

Copies of this mod

2 near-identical copies found in the catalogue:

  • spec — 100% identical, 0 lines differ
  • spec — 100% identical, 0 lines differ
.claude/commands/spec.md · 80 lines

How it starts

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

spec

Turn docs/STORIES.md into executable spec files using the bdd-specs skill. This command is the bridge between agreed stories and red specs that /build-loop will turn green.

Scope

  • IN: generating spec files from finalized stories; helping author stories when none exist yet; reporting on existing specs.
  • OUT: writing implementation code (/build-loop); changing requirements (/explore, /design); ordering tasks (/plan).

Preflight (refuse early)

  1. Require project info. If docs/PROJECT.md is missing or still a stub (mostly TODOs), refuse and tell the user: No PROJECT.md — run /explore first to define what we're building.
  2. Require a spec. If docs/SPEC.md is missing or a stub, refuse: No SPEC.md — run /design first so there's something to spec against.
  3. Stories check. If docs/STORIES.md is missing or empty, do NOT refuse — instead, help create them: invoke the user-stories skill to author docs/STORIES.md from SPEC.md before continuing.

Behavior

  1. Read docs/PROJECT.md, docs/SPEC.md, docs/STORIES.md, docs/ARCHITECTURE.md (for context), and any existing spec files (e.g. tests/**/*.spec.ts, specs/**/*.ts, **/__tests__/**).
  2. If specs already exist for a story, LEAVE THEM ALONE. Do not overwrite, edit, rename, or reorganize. Report what was found and tell the user you can overwrite on explicit request.
  3. For stories with no corresponding spec file, delegate to the bdd-specs skill to generate them. Pass the story id(s) so output aligns 1:1 with docs/STORIES.md (Story → Feature, AC → Scenario, each Then → one Specification).
  4. Every newly generated spec is pending by default — use the runner's skip / todo / pending marker (it.todo, it.skip, test.todo, etc., depending on whether the project uses bun:test or Jest). They must not accidentally pass; they must be visibly pending until /build-loop implements them.
  5. Specs must align to stories, but names should read naturally:
    • File name: a readable kebab-case slug from the story title — no story-NNN prefix. e.g. atomic-create-user-order-entitlements.spec.ts.
    • Outer describe: the human-readable feature, no id. e.g. describe("Feature: atomic create of user, order, entitlements", …).
    • Traceability: put a single comment at the top of the file with the story id, e.g. // STORY-007 — Atomic create of user, order, entitlements. That comment is the only place the id appears.
  6. Never invent acceptance criteria. If a story is underspecified, stop and send the user back to refine it via the user-stories skill.

Read the full file on GitHub · 80 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 · 80 lines · 27 tokens per session scan C 6a79bf47e589

Subscribe to this mod's changes

spec is a command published in the GitHub repository robconery/cassini-workshop (1 stars, last pushed 2mo ago), licensed MIT. It adds 27 tokens to every session and 970 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (tells the agent never to refuse). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.