speckit.harness.init

speckit.harness.init is a command for Claude Code from formin/spec-kit-harness. It costs 23 tokens per session (1,491 once invoked), scanned A, original, MIT.

A command that creates external files for tracking a long research task, including candidates, selected evidence, checks, observations, and budget.

In plain words
What is it for?
Starting a research harness for a feature, setting search or inspection budgets, and organizing evidence for later verification.
Why use it?
It keeps research state outside the conversation so work can survive context limits, restarts, and handoffs.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

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/speckit.harness.init
Clone the repo
git clone --depth 1 https://github.com/formin/spec-kit-harness

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 speckit.harness.init

README.md
[![agentmods](https://agentmods.dev/badge/commands/formin/spec-kit-harness/speckit.harness.init.svg)](https://agentmods.dev/commands/formin/spec-kit-harness/speckit.harness.init)
Your own site
<a href="https://agentmods.dev/commands/formin/spec-kit-harness/speckit.harness.init"><img src="https://agentmods.dev/badge/commands/formin/spec-kit-harness/speckit.harness.init.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 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,491 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.1 $0.00023 $0.01491
Opus 5 $0.00012 $0.00745
Sonnet 5 $0.00005 $0.00298
Haiku 4.5 $0.00002 $0.00149

Measured 5d ago against content hash b7ab22a82e1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

speckit.harness.init 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 5d 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.

commands/speckit.harness.init.md · 172 lines

How it starts

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

Initialize Research Harness

Set up the externalized working memory for long-horizon research on the active feature. After this command, exploration state lives in files — not in the conversation context — so research survives context compaction, session restarts, and agent handoffs.

This implements the environment-side working memory of Harness-1 (arXiv:2606.02373): a candidate pool, an importance-tagged curated set, compact evidence links, verification records, and compressed deduplicated observations, governed by an explicit budget ledger.

User Input

$ARGUMENTS

If provided, treat $ARGUMENTS as the research mission (the question this harness exists to answer) and/or budget overrides in the form key=value (e.g. searches=50 inspections=60). Both may appear together; the free text is the mission, key=value tokens are overrides.

Steps

1. Resolve the harness directory

  1. Load configuration: read .specify/extensions/harness/harness-config.yml if it exists; otherwise use the extension defaults (budgets: 30 searches, 40 inspections, 20 verifications, 4000 context tokens; curated cap 25). Apply any SPECKIT_HARNESS_* environment variable overrides, then any key=value overrides from $ARGUMENTS (highest precedence).
  2. Determine FEATURE_DIR:
    • If the current git branch matches a feature directory under specs/ (e.g. branch 003-user-authspecs/003-user-auth/), use it.
    • Otherwise, use the most recently modified directory under specs/.
    • If no feature directory exists, fall back to the configured state.fallback_directory (default .specify/harness/global/).
  3. HARNESS_DIR = FEATURE_DIR/<state.directory> (default specs/<feature>/harness/).

2. Idempotency check

If HARNESS_DIR/budget.md already exists, do not overwrite anything. Report that the harness is already initialized, then behave exactly like /speckit.harness.status (render the current state slice) and stop. If the user supplied a new mission in $ARGUMENTS, append it to the ## Mission section of budget.md as an additional numbered mission instead.

Read the full file on GitHub · 172 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. 5d ago First seen · 172 lines · 23 tokens per session scan A b7ab22a82e1f

Subscribe to this mod's changes

speckit.harness.init is a command published in the GitHub repository formin/spec-kit-harness (5 stars, last pushed 2mo ago), licensed MIT. It adds 23 tokens to every session and 1,491 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.