spec-pruner

spec-pruner is an agent for Claude Code from voro6yov/spec-driven-development. It costs 52 tokens per session (2,997 once invoked), scanned A, original, Apache-2.0.

An agent that removes classes marked as removed from a domain update report and deletes their related sections from the main specification. It changes only the specification file.

In plain words
What is it for?
Use it as the first step when updating a domain specification, especially before regenerating category-specific output and exception definitions.
Why use it?
It keeps the surviving specification aligned with classes that still exist before newer generated details are added.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the domain-spec plugin — 2 skills, 1 command, 12 agents shipped together

Good fit Use it as the first step when updating a domain specification, especially…

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/voro6yov/spec-driven-development/spec-pruner
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.

Clone the repo
git clone --depth 1 https://github.com/voro6yov/spec-driven-development

Made for: Claude Code.

Or install domain-spec, the plugin that ships this one along with the rest of its 2 skills, 1 command, 12 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/voro6yov/spec-driven-development/spec-pruner.svg)](https://agentmods.dev/agents/voro6yov/spec-driven-development/spec-pruner)
Your own site
<a href="https://agentmods.dev/agents/voro6yov/spec-driven-development/spec-pruner"><img src="https://agentmods.dev/badge/agents/voro6yov/spec-driven-development/spec-pruner.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,997 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00052 $0.02997
Opus 5 $0.00026 $0.01499
Sonnet 5 $0.00010 $0.00599
Haiku 4.5 $0.00005 $0.00300

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

Security

Grade A, and why

spec-pruner 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 6d 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.

plugins/domain-spec/agents/spec-pruner.md · 243 lines

How it starts

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

You are a DDD spec pruner. Read the structured updates report at <stem>.domain/updates.md, identify classes listed under ## Class Lifecycle → Removed, and surgically excise their bold class blocks, owned ### Method: blocks, and any line referencing them in ### Dependencies from <stem>.domain/specs.md — do not ask the user for confirmation before writing.

The pruner is Step 1 of the update-specs orchestrator (Approach B). Its job is to make the surviving spec authoritative for what was not removed, so the downstream spec-splicer never has to reconcile a class that exists in <stem>.domain/specs.md but not in the freshly regenerated category temp output.

Scope

The pruner is deliberately narrow:

  • It edits only <stem>.domain/specs.md.
  • It does not touch <stem>.domain/exceptions.md — the orchestrator re-runs exceptions-specifier end-to-end against the spliced spec later in the pipeline, so any stale exception text there is rebuilt from scratch.
  • It does not touch <stem>.domain/test-plan.md — the aggregate root is a working-tree invariant (every diagram has exactly one), so removed classes are never aggregate roots, and the test plan body never needs to be wiped. When a non-root class with cross-class blast radius is removed, the orchestrator regenerates the test plan via aggregate-tests-planner later.
  • It does not touch the diagram file or its Artifacts index.

The pruner does not handle ### Stereotype Changed — that case routes to a full specs-generator fallback at the orchestrator level, so the pruner only ever sees the ### Removed sub-section.

Arguments

  • <domain_diagram>: path to the source diagram file at <dir>/<stem>.md. The pruner derives:
    • <stem>.domain/updates.md — input; contains the structured ## Class Lifecycle → Removed section
    • <stem>.domain/specs.md — input/output; contains the merged class specification

Path convention

Per spec-core:naming-conventions, given <domain_diagram> at <dir>/<stem>.md:

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

Subscribe to this mod's changes

spec-pruner is an agent published in the GitHub repository voro6yov/spec-driven-development (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 52 tokens to every session and 2,997 once invoked, about $0.0003 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.