spec-validate

spec-validate is a command for coding agents from dwarvesf/dwarves-kit. It costs 32 tokens per session (2,241 once invoked), scanned A, original, MIT.

Adversarial review of a spec before implementation. 6 specialist lenses attack the spec from different angles (5 advisory, 1 blocking on the design record).

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/spec-validate
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 spec-validate

README.md
[![agentmods](https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/spec-validate.svg)](https://agentmods.dev/commands/dwarvesf/dwarves-kit/spec-validate)
Your own site
<a href="https://agentmods.dev/commands/dwarvesf/dwarves-kit/spec-validate"><img src="https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/spec-validate.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,241 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.00032 $0.02241
Opus 5 $0.00016 $0.01120
Sonnet 5 $0.00006 $0.00448
Haiku 4.5 $0.00003 $0.00224

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

Security

Grade A, and why

spec-validate 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/spec-validate.md · 128 lines

How it starts

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

You are running an adversarial spec review. Read the spec from docs/specs/SPEC-NNN-<slug>.md (the most recent non-shipped spec if several exist). If no spec exists, tell the user to run /kit:spec first.

The 6 reviewers

Bracket both phases this lane owns for timing (SPEC-129), before running Reviewer 1: bash lib/gate/gate-ledger.sh outcome <rid> Validate start and bash lib/gate/gate-ledger.sh outcome <rid> design-record start.

Run each reviewer sequentially. For each one, present findings and ask the user if they want to address the issues before moving to the next reviewer. Reviewers 1-5 are advisory; Reviewer 6 (below) is the one exception that can block the VALIDATED flip.

Reviewer 1: Security Auditor

Look for:

  • Auth/authz gaps (who can access what? are there unprotected endpoints?)
  • Input validation missing (SQL injection, XSS, path traversal)
  • Secrets handling (hardcoded keys, unencrypted storage)
  • Data exposure (PII in logs, verbose error messages)
  • Dependency risks (known vulnerable packages)

Reviewer 2: Failure Mode Analyst

Look for:

  • What happens when external services are down?
  • What happens with concurrent access / race conditions?
  • What happens with malformed or unexpected input?
  • What happens at 10x expected load?
  • What's the recovery path for each failure?
  • Are there any single points of failure?
  • If the spec has a ## Failure modes table, check each class is real and has both a detection signal and a mitigation; flag missing or hand-waved entries.

Reviewer 3: Assumption Destroyer

Look for:

  • Unstated assumptions about user behavior
  • Assumptions about data quality or format
  • Assumptions about infrastructure availability
  • Assumptions about third-party API stability
  • "Happy path only" designs with no error handling
  • Implicit ordering dependencies between tasks

Reviewer 4: Scope Critic

Look for:

  • Aggressive atomicity check (critical): Each task must fit in ~50% of a fresh context window (~100k tokens). Heuristic: if a task touches more than 5 files, or its description needs more than 3 sentences, or its acceptance criteria has more than 5 bullet points, it's too large. Flag it and suggest splitting. Source: GSD's "each plan is maximum 3 tasks, each fits in 50% context" principle.
  • Tasks that bundle unrelated changes (e.g., "set up auth AND create user dashboard" is two tasks)
  • Features disguised as requirements (nice-to-have dressed up as must-have)
  • Gold-plating (things that sound important but aren't needed for v1)
  • Missing tasks (gaps between spec and acceptance criteria: does completing all tasks actually satisfy the global acceptance criteria?)
  • Unclear acceptance criteria (not testable: "should be fast" is not testable, "response under 200ms at p95" is)
  • Missing dependency declarations (Task B clearly depends on Task A's output but doesn't say so)
  • Autonomy gate (ID-036 / SPEC-084): if the spec's behavior runs inside an autonomous loop (/kit:execute pipeline, /goal), check it does not let the loop make a scope / architecture / risk decision without a human gate; flag any loop-reachable decision point with no stop.
  • Picture presence (mechanical, ID-454): on a full-lane spec, ## Picture must be present and non-empty: an ASCII/box-drawing diagram, or, for a UI-shaped spec, a pointer to a /kit:prototype run (prototype/<name> + the variant to look at). A missing or empty ## Picture on a full-lane spec is a finding. Below full lane, presence is encouraged only; do not flag its absence.
  • Picture agrees with the task list (lens question, ID-454): read the picture (or the prototype it points at) against ## Task Breakdown. Every piece the picture draws should get touched by some task, and every task that adds a new piece should show up in the picture. Flag drift either direction.

Read the full file on GitHub · 128 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 · 128 lines · 32 tokens per session scan A 6a7154008746

Subscribe to this mod's changes

spec-validate is a command published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed today), licensed MIT. It adds 32 tokens to every session and 2,241 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.