reference

A reference for five Spec Kit harness commands and their shared rules for finding the active feature and harness directory. Spec Kit is a structured workflow for turning requirements into implementation plans.

In plain words
What is it for?
Use it to look up /speckit.harness.init and the other harness commands, their arguments, prerequisites, files, and configuration behavior.
Why use it?
It explains where the commands read and write files, how they choose a feature directory, and how configuration and environment settings affect them.

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/formin/spec-kit-harness/reference
Clone the repo
git clone --depth 1 https://github.com/formin/spec-kit-harness
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,342 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.00000 $0.01342
Opus 5 $0.00000 $0.00671
Sonnet 5 $0.00000 $0.00268
Haiku 4.5 $0.00000 $0.00134

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

Security

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.

openwiki/commands/reference.md · 44 lines

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-authspecs/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=value budget overrides (e.g. searches=50 inspections=60). Both may appear together.
  • Reads: .specify/extensions/harness/harness-config.yml (if present). Deliberately does not read spec.md/plan.md.
  • Writes: creates HARNESS_DIR/ with budget.md, candidates.md, curated.md, evidence.md, verification.md, observations.md, each written exactly once with resolved config values.
  • Invariants: idempotent — if budget.md already 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 in budget.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_slice entries, up to candidates_slice open candidates, last observations_slice observations.
  • Writes: all six state files — appends observations, adds/updates candidate rows, promotes findings into curated.md + pointer entries in evidence.md, and accounts every budgeted action in budget.md (SEARCH → searches, INSPECT → inspections; CURATE costs 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 to init rather than recreating state mid-loop.

Read the full file on GitHub · 44 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. 2d ago First seen · 44 lines · 0 tokens per session scan A bae5d2be91a0

Subscribe to this mod's changes

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.

Related

Other commands, from other repositories

archive

Archive a feature specification into main project memory after merge, resolving gaps and conflicts.

stn1slv/spec-kit-archive · 15 tokens

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.

lindoelio/spec-driven-steroids · 46 tokens

spec-driven.command

Start an approved Spec-Driven workflow using the brief or full lane.

lindoelio/spec-driven-steroids · 13 tokens

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.

stefaniuk/loadout · 59 tokens

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.

tinesoft/spec-kit-token-budget · 65 tokens

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.

tinesoft/spec-kit-token-budget · 71 tokens