/spdd-analysis

/spdd-analysis is a command for Cursor from gszhangwei/open-spdd. It costs 36 tokens per session (4,216 once invoked), scanned A, original, MIT.

A command that reviews a business requirement alongside the current codebase and produces structured background about the business, key concepts, possible direction, and risks.

In plain words
What is it for?
Use it to examine a requirement written as text or referenced files, identify relevant domain ideas, consider high-level choices, and prepare input for a REASONS Canvas.
Why use it?
It helps turn a broad requirement into shared context before deciding how to build it. This separates the business goals and reasons from later implementation details.

Command for Cursor

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/gszhangwei/open-spdd/spdd-analysis
Clone the repo
git clone --depth 1 https://github.com/gszhangwei/open-spdd

Made for: Cursor.

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 /spdd-analysis

README.md
[![agentmods](https://agentmods.dev/badge/commands/gszhangwei/open-spdd/spdd-analysis.svg)](https://agentmods.dev/commands/gszhangwei/open-spdd/spdd-analysis)
Your own site
<a href="https://agentmods.dev/commands/gszhangwei/open-spdd/spdd-analysis"><img src="https://agentmods.dev/badge/commands/gszhangwei/open-spdd/spdd-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,216 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.00036 $0.04216
Opus 5 $0.00018 $0.02108
Sonnet 5 $0.00007 $0.00843
Haiku 4.5 $0.00004 $0.00422

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

Security

Grade A, and why

/spdd-analysis 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 4d 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.

.cursor/commands/spdd-analysis.md · 370 lines

How it starts

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

Analyze a business requirement document against the current codebase, producing a strategic-level enriched context that combines business information, domain concept identification, high-level approach decisions, and risk analysis — serving as high-quality input for /spdd-reasons-canvas. This phase focuses on the "What" and "Why", leaving the "How" to the REASONS Canvas phase.

Input: The argument after /spdd-analysis is a business requirement description or file reference.

Input can be provided in two ways:

  1. Text description: Direct text describing the requirement
  2. File/folder reference: Using @ to reference files or folders containing requirements

Examples:

# File reference
/spdd-analysis @requirements/token-usage-billing-story.md

# Text description
/spdd-analysis Implement monthly billing summary report for customers with usage breakdown

# Combined
/spdd-analysis @requirements/billing-report.md additionally needs CSV export support

Steps

  1. Validate and consolidate business input

    a. If no input provided, use the AskUserQuestion tool (open-ended, no preset options) to ask:

    "Please provide the business requirement document or description (you can use text, @file references, or both)."

    IMPORTANT: Do NOT proceed without business input.

    b. If input contains @ file/folder references:

    • Read ALL referenced files completely using the Read tool
    • For folder references, read all relevant files within the folder
    • Consolidate all file contents into a unified business context

    c. Combine all context sources:

    • Merge text descriptions with file contents
    • Preserve the complete information from all sources — do NOT summarize or truncate

    d. Context Integrity Check:

    • Verify all @ references were successfully read
    • If any file cannot be read, report the error and ask user to provide alternative
    • Confirm the consolidated context contains sufficient information to proceed
  2. Concept-driven codebase exploration

    Do NOT exhaustively read the entire codebase — this does not scale. Instead, use a concept-driven approach: first build a lightweight project fingerprint, then extract search concepts from the business requirement, and finally explore only the relevant parts of the codebase in depth.

    a. Project fingerprint (lightweight bootstrap — always do first):

    • Read the primary build/dependency file (ONE file: e.g., build.gradle, pom.xml, package.json, requirements.txt, go.mod) to detect the tech stack, framework, and key dependencies
    • List the top-level directory structure (directory names only, not file contents) to understand the project layout and layering conventions
    • Read the main configuration file (e.g., application.yml, .env, next.config.js) to understand infrastructure choices (DB, caching, messaging, etc.)
    • This step should be fast and touch only 2–3 files

    b. Extract search concepts from business input: Before touching any domain code, analyze the business requirement from Step 1 to extract:

    • Domain nouns: entity/concept names that likely map to code (e.g., "customer", "bill", "pricing plan", "subscription", "quota")
    • Action verbs: operations that likely map to endpoints or services (e.g., "submit usage", "calculate bill")
    • API surfaces: explicit paths, event names, or queue names mentioned (e.g., POST /api/usage)
    • Technical hints: mentioned technologies, patterns, or domain-specific terms (e.g., "monthly reset", "overage rate", "token")

    These extracted concepts become the search scope for all subsequent exploration.

    c. Targeted schema exploration (scoped by concepts):

    • Search migration/schema files for tables whose names match the extracted domain nouns — do NOT read all migrations
    • Read ONLY the matched migrations or schema definitions
    • Follow foreign key relationships one hop outward from matched tables to capture boundary context (e.g., if bills references customers, read the customers table definition too)
    • If using an ORM, search for entity/model classes matching the same concept names

Read the full file on GitHub · 370 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. 4d ago First seen · 370 lines · 36 tokens per session scan A d9868742d885

Subscribe to this mod's changes

/spdd-analysis is a command published in the GitHub repository gszhangwei/open-spdd (736 stars, last pushed 13d ago), licensed MIT. It adds 36 tokens to every session and 4,216 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.