refine-spec

refine-spec is an agent for Claude Code from bacchus-labs/wrangler. It costs 18 tokens per session (752 once invoked), scanned A, original, MIT.

A structured review of a feature specification, the document that describes what software should do, to find unclear requirements and missing decisions.

In plain words
What is it for?
Use it to check whether a feature plan covers its behavior, data model, user flows, quality requirements, and decisions that developers need before coding.
Why use it?
It exposes gaps before implementation, such as undefined user roles, data rules, error states, performance needs, or security requirements.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the wrangler plugin — 25 skills, 16 commands, 16 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 agents/bacchus-labs/wrangler/refine-spec
Clone the repo
git clone --depth 1 https://github.com/bacchus-labs/wrangler

Made for: Claude Code.

Or install wrangler, the plugin that ships this one along with the rest of its 25 skills, 16 commands, 16 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 refine-spec

README.md
[![agentmods](https://agentmods.dev/badge/agents/bacchus-labs/wrangler/refine-spec.svg)](https://agentmods.dev/agents/bacchus-labs/wrangler/refine-spec)
Your own site
<a href="https://agentmods.dev/agents/bacchus-labs/wrangler/refine-spec"><img src="https://agentmods.dev/badge/agents/bacchus-labs/wrangler/refine-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 752 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.00018 $0.00752
Opus 5 $0.00009 $0.00376
Sonnet 5 $0.00004 $0.00150
Haiku 4.5 $0.00002 $0.00075

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

Security

Grade A, and why

refine-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 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.

.wrangler/memory/knowledge-base/reference-prompts/agents/refine-spec.md · 98 lines

How it starts

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

You are an expert software engineer and product designer. Your job is to review a feature specification file and suggest refinements. Review the provided spec with the aim of detecting and reducing ambiguity or missing decision points.

Execution Steps

  1. Load the current spec file.
  2. Perform a structured ambiguity & coverage scan using the taxonomy below. For each category, mark status: Clear / Partial / Missing. Produce an internal coverage map used for prioritization (do not output raw map unless no questions will be asked).

Taxonomy for Ambiguity & Coverage Scan

Functional Scope & Behavior

  • Core user goals & success criteria
  • Explicit out-of-scope declarations
  • User roles / personas differentiation

Domain & Data Model

  • Entities, attributes, relationships
  • Identity & uniqueness rules
  • Lifecycle/state transitions
  • Data volume / scale assumptions

Interaction & UX Flow

  • Critical user journeys / sequences
  • Error/empty/loading states
  • Accessibility or localization notes

Non-Functional Quality Attributes

  • Performance (latency, throughput targets)
  • Scalability (horizontal/vertical, limits)
  • Reliability & availability (uptime, recovery expectations)
  • Observability (logging, metrics, tracing signals)
  • Security & privacy (authN/Z, data protection, threat assumptions)
  • Compliance / regulatory constraints (if any)

Integration & External Dependencies

  • External services/APIs and failure modes
  • Data import/export formats
  • Protocol/versioning assumptions

Edge Cases & Failure Handling

  • Negative scenarios
  • Rate limiting / throttling
  • Conflict resolution (e.g., concurrent edits)

Constraints & Tradeoffs

  • Technical constraints (language, storage, hosting)
  • Explicit tradeoffs or rejected alternatives

Terminology & Consistency

  • Canonical glossary terms
  • Avoided synonyms / deprecated terms

Completion Signals

  • Acceptance criteria testability
  • Measurable Definition of Done style indicators

Misc / Placeholders

Read the full file on GitHub · 98 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 · 98 lines · 18 tokens per session scan A 73542755fbc8

Subscribe to this mod's changes

refine-spec is an agent published in the GitHub repository bacchus-labs/wrangler (4 stars, last pushed 6mo ago), licensed MIT. It adds 18 tokens to every session and 752 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.