spec-build

spec-build is a command for Claude Code from Washingtonwei/project-pulse. It costs 18 tokens per session (9,786 once invoked), scanned A, original, Apache-2.0.

A command that checks and repairs links, anchors, terminology, and consistency across the project’s five requirements documents.

In plain words
What is it for?
Verifying the glossary, vision and scope, use cases, business rules, and software requirements specification, then resynchronizing their cross-references.
Why use it?
It catches broken references and mismatched wording after requirements are added, removed, or rearranged, keeping the documents usable as a shared source of truth.

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/washingtonwei/project-pulse/spec-build
Clone the repo
git clone --depth 1 https://github.com/Washingtonwei/project-pulse

Made for: Claude Code.

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-build

README.md
[![agentmods](https://agentmods.dev/badge/commands/washingtonwei/project-pulse/spec-build.svg)](https://agentmods.dev/commands/washingtonwei/project-pulse/spec-build)
Your own site
<a href="https://agentmods.dev/commands/washingtonwei/project-pulse/spec-build"><img src="https://agentmods.dev/badge/commands/washingtonwei/project-pulse/spec-build.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 9,786 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.00018 $0.09786
Opus 5 $0.00009 $0.04893
Sonnet 5 $0.00004 $0.01957
Haiku 4.5 $0.00002 $0.00979

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

Security

Grade A, and why

spec-build 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 3d 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.

.claude/commands/spec-build.md · 169 lines

How it starts

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

/spec-build — Requirements docs build & verify

The five core Markdown files in this repo (docs/requirements/project-glossary.md, docs/requirements/vision-and-scope.md, docs/requirements/use-cases.md, docs/requirements/business-rules.md, docs/requirements/software-requirements-specification.md) are the single source of truth for the project's requirements. This command treats them as artifacts that need to "compile": headings unnumbered, anchors resolving, cross-references resolving, terminology coherent.

The source carries no section numbers and no table of contents. Headings are plain text (# **Title**); a heading's identity is its name-based slug, not a position — so inserting, removing, or reordering a section renumbers nothing and rots no anchor. Numbered headings and a TOC are a delivery concern, generated at export time (pandoc), not maintained in source. See docs/CLAUDE.md for the authoring conventions this command enforces.

Doc shapes. All five docs use unnumbered headings; two have catalog structure worth naming:

  • docs/requirements/project-glossary.md — under # **Definitions**, a flat catalog of unnumbered term headings (## **Template**, ## **Validation (ReqLint)**); slugs are name-based. Terms are a hand-ordered thematic catalog — never reorder them.
  • docs/requirements/use-cases.md — a catalog grouped by area: the top-level heading (Use Case List) is an unnumbered H1; use cases are grouped under unnumbered H2 area sub-headings (## **Glossary**, ## **AI Assistants**, …); and each use case is an H3 carrying an area-prefixed ID assigned by hand as a name-based slug, unique within its area — ### **UC-GLO-view-glossary: …** (format UC-<AREA>-<slug>). Never rewrite the UC IDs — identity is deliberately decoupled from document position.

A sixth, derived artifact — docs/traceability.md. This is the spec→code matrix: one row per use case (UC-<AREA>-<slug>), in the same area order as docs/requirements/use-cases.md. It is NOT one of the five core docs and gets no mechanical treatment (and /spec-build never edits its human-maintained Build / Verify / Design / Frontend / Backend / Tests columns, nor the BO-measurement / risk-coverage matrices). /spec-build only verifies those in Phase 2a (the traceability coverage and traceability completeness checks): every use case has exactly one row and every FR ID it cites resolves. When a row is missing or stale, report it — don't silently add or rewrite it. The one exception is the Business-rule enforcement index — that section is a generated projection of the forward BR citations, so the Business-rule coverage check regenerates it in place (see that check); it is the sole part of traceability.md /spec-build may rewrite.

Process all five docs in order. Phase 1 auto-fixes; Phase 2 reports only — split into 2a (deterministic, always run in full) and 2b (judgment, scoped to what changed); Phase 3 summarizes.

Read the full file on GitHub · 169 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. 3d ago First seen · 169 lines · 18 tokens per session scan A ac1df8458453

Subscribe to this mod's changes

spec-build is a command published in the GitHub repository Washingtonwei/project-pulse (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 9,786 once invoked, about $0.0001 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.