/spdd-generate

/spdd-generate is a command for Cursor from gszhangwei/open-spdd. It costs 21 tokens per session (2,094 once invoked), scanned A, original, MIT.

A command that generates implementation code from a structured SPDD prompt file. SPDD is a way to describe software work in organized sections, including requirements, design, components, and ordered tasks.

In plain words
What is it for?
Use it when you have a valid SPDD prompt file and want code generated from its REASONS Canvas sections and operations.
Why use it?
It turns a detailed development plan into code while following the plan’s defined sequence and coding rules. This reduces the need to repeat the same instructions manually.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/gszhangwei/open-spdd/spdd-generate.svg)](https://agentmods.dev/commands/gszhangwei/open-spdd/spdd-generate)
Your own site
<a href="https://agentmods.dev/commands/gszhangwei/open-spdd/spdd-generate"><img src="https://agentmods.dev/badge/commands/gszhangwei/open-spdd/spdd-generate.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 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,094 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.00021 $0.02094
Opus 5 $0.00010 $0.01047
Sonnet 5 $0.00004 $0.00419
Haiku 4.5 $0.00002 $0.00209

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

Security

Grade A, and why

/spdd-generate 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.

.cursor/commands/spdd-generate.md · 238 lines

How it starts

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

Generate implementation code from a structured SPDD (Structured Prompt-Driven Development) prompt file, strictly following the Operations sequence and coding norms defined in the prompt.

Input: The argument after /spdd-generate is the path to the structured prompt file (e.g., @spdd/prompt/GGQPA-XXX-202602271430-[Feat]-api-create-agent-endpoint.md).

Steps

  1. If no input provided, ask for the prompt file

    Use the AskUserQuestion tool to ask:

    "Please provide the path to the structured prompt file (e.g., @spdd/prompt/xxx.md)."

    IMPORTANT: Do NOT proceed without a valid prompt file path.

  2. Read and parse the structured prompt file

    Read the prompt file and extract the REASONS Canvas sections:

    Section Purpose Usage
    R - Requirements Overall goal and DoD Understand the business context
    E - Entities Domain model and relationships Reference for class design
    A - Approach Implementation strategy Guide architectural decisions
    S - Structure Components and dependencies Verify layering and relationships
    O - Operations Concrete implementation tasks Execute in defined order
    N - Norms Engineering standards Apply to all generated code
    S - Safeguards Non-negotiable constraints Enforce strictly

    IMPORTANT: Read the ENTIRE file carefully. Each section provides critical guidance.

  3. Analyze project context

    Before generating code:

    • Identify the project's technology stack (e.g., Spring Boot, Java version)
    • Locate existing similar patterns in the codebase for reference
    • Identify the correct package structure and directory layout
    • Check for existing base classes, utilities, or configurations to reuse

    IMPORTANT: Generated code MUST align with existing project conventions.

  4. Validate the Operations sequence

    Review the Operations section to verify:

    a. Dependency order is correct:

    • Classes with no dependencies come first (enums, constants)
    • Classes depend only on previously defined classes
    • No circular dependencies exist

    b. Task decomposition is complete:

    • Each operation is atomic and testable
    • No logical gaps between operations
    • All components mentioned in Structure are covered

    c. Consistency with Structure section:

    • Inheritance relationships match
    • Dependencies match
    • Layered architecture is respected

    If issues are found: Report to user and suggest prompt modifications before proceeding.

    IMPORTANT: Do NOT re-plan the sequence. The Operations order is the designed execution order from the Abstraction phase.

  5. Generate code following Operations sequence

    For each operation in the Operations section (in order):

    a. Read the operation specification:

    • Responsibility: What the component does
    • Attributes/Methods: Exact fields and signatures
    • Annotations: Required annotations
    • Validation rules: Bean validation or custom logic
    • Business logic: Step-by-step implementation details

    b. Apply Norms:

    • Annotation standards (e.g., @RestController, @Service)
    • Dependency injection style (constructor injection)
    • Exception handling patterns
    • Logging conventions
    • Response format standards

    c. Enforce Safeguards:

    • Field validation constraints
    • HTTP status code requirements
    • Exact error messages (do not modify)
    • Security constraints
    • Data integrity rules

    d. Generate the code:

    • Use correct package path based on project structure
    • Include all required imports
    • Implement exact method signatures as specified
    • Follow the exact validation messages from Safeguards

Read the full file on GitHub · 238 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 · 238 lines · 21 tokens per session scan A a67bd2ade2cc

Subscribe to this mod's changes

/spdd-generate is a command published in the GitHub repository gszhangwei/open-spdd (737 stars, last pushed 15d ago), licensed MIT. It adds 21 tokens to every session and 2,094 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-30.