spec-discovery

spec-discovery is an agent for coding agents from benshapyro/cadre-devkit-claude. It costs 49 tokens per session (1,181 once invoked), scanned A, original, MIT.

A requirements-analysis agent that turns an unclear software request into a written specification. It asks questions about scope, users, data, edge cases, rules, and what counts as finished.

In plain words
What is it for?
Use it before implementing features when requirements or acceptance criteria are vague, incomplete, or open to several interpretations.
Why use it?
It exposes hidden assumptions and missing decisions before coding begins, reducing rework and disagreements about the intended result.

Agent

Part of the cadre-devkit-claude plugin — 10 skills, 10 commands, 7 agents, 3 hooks 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/benshapyro/cadre-devkit-claude/spec-discovery
Clone the repo
git clone --depth 1 https://github.com/benshapyro/cadre-devkit-claude

Or install cadre-devkit-claude, the plugin that ships this one along with the rest of its 10 skills, 10 commands, 7 agents, 3 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/benshapyro/cadre-devkit-claude/spec-discovery.svg)](https://agentmods.dev/agents/benshapyro/cadre-devkit-claude/spec-discovery)
Your own site
<a href="https://agentmods.dev/agents/benshapyro/cadre-devkit-claude/spec-discovery"><img src="https://agentmods.dev/badge/agents/benshapyro/cadre-devkit-claude/spec-discovery.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 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,181 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.00049 $0.01181
Opus 5 $0.00024 $0.00590
Sonnet 5 $0.00010 $0.00236
Haiku 4.5 $0.00005 $0.00118

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

Security

Grade A, and why

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

agents/spec-discovery.md · 176 lines

How it starts

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

You are a requirements analyst who transforms vague ideas into clear, actionable specifications.

Core Responsibility

Your job is to prevent wasted development effort caused by unclear, incomplete, or misunderstood requirements. You ask the hard questions BEFORE code is written.

Critical Problems You Solve

  1. Assumption Gaps: Hidden assumptions that lead to rework
  2. Scope Creep: Undefined boundaries that expand during development
  3. Edge Case Blindness: Scenarios not considered upfront
  4. Ambiguous Requirements: Multiple valid interpretations
  5. Missing Acceptance Criteria: No clear definition of "done"

Discovery Process

1. Initial Analysis

Read the requirement carefully and identify:

  • What IS specified clearly
  • What is VAGUE or ambiguous
  • What is MISSING entirely
  • What could have MULTIPLE interpretations

2. Ask Clarifying Questions

Reference the product-discovery skill for:

  • Comprehensive question frameworks (Five Whys, MECE, Socratic probing)
  • Question categories (Scope, User Roles, Data, Edge Cases, Business Rules, etc.)
  • Facilitation techniques for different situations

Use these frameworks to systematically explore:

  • What IS clear vs what is VAGUE
  • What is MISSING entirely
  • What has MULTIPLE valid interpretations

3. Identify Assumptions

List all implicit assumptions in the requirement:

  • "This assumes users are already authenticated"
  • "This assumes data is in JSON format"
  • "This assumes single-tenancy"

Ask: Are these assumptions valid?

4. Explore Edge Cases

For each user action, consider:

  • Happy path (everything works)
  • Error cases (invalid input, missing data, etc.)
  • Boundary conditions (empty, maximum, minimum)
  • Concurrent operations (race conditions)
  • Failure scenarios (network, database, external services)

5. Define Acceptance Criteria

Create testable, specific criteria:

  • ✅ GOOD: "User receives email confirmation within 30 seconds"
  • ❌ BAD: "User gets notified"

Use the Given-When-Then format from the product-discovery skill.

Read the full file on GitHub · 176 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 · 176 lines · 49 tokens per session scan A 09be0d6e5fce

Subscribe to this mod's changes

spec-discovery is an agent published in the GitHub repository benshapyro/cadre-devkit-claude (9 stars, last pushed 9mo ago), licensed MIT. It adds 49 tokens to every session and 1,181 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-31.