diff-spec

A command that compares two versions of a software specification. A specification is a structured description of the system, including entities, acceptance criteria, actions, constraints, and architecture.

In plain words
What is it for?
Use it after creating a new seed version, before migrating tasks, or when reviewing changes to a Living Spec project.
Why use it?
It shows meaningful changes between versions before work is migrated to tasks. This makes it easier to see what was added, removed, or changed.

Command

Part of the harness plugin — 44 commands, 11 agents shipped together

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/studiokjm/ai-harness-template/diff-spec
Clone the repo
git clone --depth 1 https://github.com/studioKjm/ai-harness-template

Or install harness, the plugin that ships this one along with the rest of its 44 commands, 11 agents.

Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 724 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.00043 $0.00724
Opus 5 $0.00022 $0.00362
Sonnet 5 $0.00009 $0.00145
Haiku 4.5 $0.00004 $0.00072

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

Security

Grade A, and why

diff-spec 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.

methodologies/living-spec/commands/diff-spec.md · 77 lines

How it starts

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

/diff-spec — Seed Version Diff

seed-vN ↔ seed-v(N+1) 의 의미 단위 diff

When to use

  • After /seed creates a new version on top of an existing one
  • Before running /migrate-tasks (this report informs that classification)
  • When reviewing a colleague's seed-evolve PR

Prerequisites

  • Living Spec methodology must be active (/methodology use living-spec or /methodology compose ouroboros living-spec)
  • At least two seed versions must exist in .harness/ouroboros/seeds/

Usage

/diff-spec                       # auto: latest two seeds
/diff-spec 1 2                   # explicit version numbers
/diff-spec <pathA> <pathB>       # explicit file paths

Instructions

You are running the diff-spec tool. Delegate to the Python script — do not attempt to compute the diff yourself; the script's structural comparison is far more reliable than LLM judgment for this.

Step 1 — Locate the script

Try in order:

  1. .harness/methodologies/living-spec/scripts/diff-spec.py
  2. methodologies/living-spec/scripts/diff-spec.py (if running from harness source)

If neither exists, instruct the user to activate the Living Spec methodology first.

Step 2 — Resolve arguments

If the user gave no args, find the two latest seeds in .harness/ouroboros/seeds/seed-v*.yaml and pass their version numbers:

ls .harness/ouroboros/seeds/seed-v*.yaml | sort -V | tail -2

Step 3 — Run

python3 .harness/methodologies/living-spec/scripts/diff-spec.py <from> <to>

The script:

  • Compares: acceptance_criteria (by id), ontology.entities (by name), ontology.actions (by name), constraints.must / must_not (by string), architecture.pattern, goal.summary
  • Saves report to .harness/ouroboros/seeds/.diffs/diff-v{a}-to-v{b}.md
  • Prints the markdown report to stdout
  • Heuristic flags breaking-change indicators (removed AC/entities/actions, new must_not, architecture shift)

Step 4 — Report

Relay the script's stdout. If the report contains a 🔴 breaking-change section, add a one-line suggestion:

Read the full file on GitHub · 77 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 · 77 lines · 43 tokens per session scan A dad9c173f8d8

Subscribe to this mod's changes

diff-spec is a command published in the GitHub repository studioKjm/ai-harness-template (43 stars, last pushed 3mo ago), licensed MIT. It adds 43 tokens to every session and 724 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-08-30.