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.
npx agentmods add commands/formin/spec-kit-harness/referencegit clone --depth 1 https://github.com/formin/spec-kit-harnessWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01342 |
| Opus 5 | $0.00000 | $0.00671 |
| Sonnet 5 | $0.00000 | $0.00268 |
| Haiku 4.5 | $0.00000 | $0.00134 |
Grade A, and why
reference 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.
How it starts
The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Command reference
All five commands are prompt files in commands/, registered in extension.yml. Each resolves HARNESS_DIR the same way: config file → SPECKIT_HARNESS_* env vars → arguments; feature directory from the current git branch (e.g. branch 003-user-auth → specs/003-user-auth/), else the most recently modified directory under specs/, else the configured fallback (default .specify/harness/global/).
/speckit.harness.init
- Purpose: create the externalized working memory — the six state files — for the active feature.
- Arguments: optional free text = the research mission; optional
key=valuebudget overrides (e.g.searches=50 inspections=60). Both may appear together. - Reads:
.specify/extensions/harness/harness-config.yml(if present). Deliberately does not readspec.md/plan.md. - Writes: creates
HARNESS_DIR/withbudget.md,candidates.md,curated.md,evidence.md,verification.md,observations.md, each written exactly once with resolved config values. - Invariants: idempotent — if
budget.mdalready exists it overwrites nothing, reports the harness as initialized, and behaves like/speckit.harness.status; a new mission in the arguments is appended as an additional numbered mission inbudget.md. Never deletes or truncates an existing harness; never copies spec/plan content into state files (links only).
/speckit.harness.explore
- Purpose: budget-aware exploration loop with strict policy/bookkeeping separation: each iteration is one policy decision (
SEARCH/INSPECT/CURATE/STOP) followed by mandatory bookkeeping. - Arguments: the research question for the session; if empty, uses the mission from
budget.md; if both empty, asks the user and stops. - Reads: slices only — budget table + last 5 action-log rows, top
curated_sliceentries, up tocandidates_sliceopen candidates, lastobservations_sliceobservations. - Writes: all six state files — appends observations, adds/updates candidate rows, promotes findings into
curated.md+ pointer entries inevidence.md, and accounts every budgeted action inbudget.md(SEARCH→ searches,INSPECT→ inspections;CURATEcosts no budget). - Invariants: one action per iteration (no batching to dodge the ledger); evidence excerpts ≤ 25 words; stops on budget exhaustion, marginal gain (default 3 no-yield actions), mission answered, or user interrupt; never edits
spec.md/plan.md/tasks.md; if state files are missing or corrupt, stops and directs the user toinitrather than recreating state mid-loop.
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.
- 2d ago First seen · 44 lines · 0 tokens per session scan A bae5d2be91a0
reference is a command published in the GitHub repository formin/spec-kit-harness (5 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,342 tokens. 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.
Other commands, from other repositories
archive
Archive a feature specification into main project memory after merge, resolving gaps and conflicts.
inject-guidelines.command
Generate or refresh repository guideline documents using the project-guidelines-writer skill. Analyze the repo, generate all six standard guideline files by default, prefer managed-section updates for existing files, and ask only for exceptional overwrite or skip decisions.
spec-driven.command
Start an approved Spec-Driven workflow using the brief or full lane.
audit
Audit a file, directory, or whole repo for insecure default configuration: fallback secrets, default credentials, fail-open switches, weak crypto, permissive access, debug leakage. Parallel sweeps collect candidates, then a refuting verifier traces each one to the security decision it reaches before it is reported.
compact
Compact one or more Spec-Driven Development artifacts in place to reduce token cost on subsequent /speckit. commands. Lossless on requirements, decisions, contracts, IDs; strips template scaffolding, examples, and prose padding. The original is preserved as .full.md the first time an artifact is compacted.
concise
Toggle a project-local concise-output directive that suppresses agent prose padding during SDD steps. State lives in the project's agent memory file (AGENTS.md preferred when present, else CLAUDE.md / GEMINI.md / .cursor/rules / .windsurf/rules / etc.) inside a clearly marked block, so it is reversible and reviewable.