/spdd-sync

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

A command that updates a structured SPDD prompt file from changes made to the code. SPDD means Structured Prompt-Driven Development, and the file uses the REASONS-Canvas sections as a design record.

In plain words
What is it for?
Use it to synchronize entities, components, dependencies, implementation choices, and other design details back into a specified prompt file.
Why use it?
It keeps the written system design aligned with the implementation after refactoring or other code changes.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/gszhangwei/open-spdd/spdd-sync.svg)](https://agentmods.dev/commands/gszhangwei/open-spdd/spdd-sync)
Your own site
<a href="https://agentmods.dev/commands/gszhangwei/open-spdd/spdd-sync"><img src="https://agentmods.dev/badge/commands/gszhangwei/open-spdd/spdd-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 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,424 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.00022 $0.02424
Opus 5 $0.00011 $0.01212
Sonnet 5 $0.00004 $0.00485
Haiku 4.5 $0.00002 $0.00242

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

Security

Grade A, and why

/spdd-sync 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-sync.md · 288 lines

How it starts

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

Synchronize implementation details from refactored or updated code back to the structured SPDD (Structured Prompt-Driven Development) prompt file, ensuring the prompt remains the accurate source of truth for the system design.

Input: The argument after /spdd-sync 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 you want to sync (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 identify the REASONS Canvas sections:

    Section Purpose Sync Priority
    R - Requirements Overall goal and DoD Low (rarely changes from code)
    E - Entities Domain model and relationships High (class diagrams may change)
    A - Approach Implementation strategy Medium (architectural decisions)
    S - Structure Components and dependencies High (inheritance/dependencies change)
    O - Operations Concrete implementation tasks Highest (implementation details)
    N - Norms Engineering standards Medium (patterns may evolve)
    S - Safeguards Non-negotiable constraints Low (constraints rarely relax)

    IMPORTANT: Operations section typically requires the most updates as it contains implementation specifics.

  3. Identify affected components from user context

    Ask the user (if not already specified):

    "Which components were refactored? Please specify:

    • Specific files/classes that changed
    • Type of change (renamed, restructured, logic changed, new components added)
    • Brief description of what changed"

    Alternatively, analyze recent git changes or user-specified files to identify modifications.

  4. Analyze current implementation

    For each affected component:

    a. Read the current implementation:

    • Locate the source file in the codebase
    • Extract class structure, methods, annotations
    • Identify relationships and dependencies

    b. Compare with prompt specification:

    • Find corresponding Operation/Entity/Structure section
    • Note discrepancies in:
      • Class names, package paths
      • Method signatures and return types
      • Attributes and their types
      • Annotations used
      • Business logic steps
      • Validation rules
      • Error messages

    c. Categorize changes:

    • Structural: Class hierarchy, dependencies, component relationships
    • Behavioral: Method logic, validation rules, error handling
    • Naming: Class/method/field renames
    • Additions: New methods, fields, or components
    • Deletions: Removed methods, fields, or components
  5. Generate prompt update plan

    Create a detailed update plan showing:

    ## Prompt Sync Plan
    
    ### Entities Section Updates
    - [ ] Update: ClassName - added/removed/changed fields
    - [ ] Update: Relationship diagram - new dependency
    
    ### Structure Section Updates
    - [ ] Update: Inheritance relationships - ComponentX now extends BaseY
    - [ ] Update: Dependencies - ServiceA now depends on ValidatorB
    
    ### Operations Section Updates
    - [ ] Update: "Create ClassName" operation - new method signature
    - [ ] Update: "Create ClassName" operation - logic steps changed
    - [ ] Add: New operation for NewComponent
    - [ ] Remove: Obsolete operation description
    
    ### Norms Section Updates
    - [ ] Update: New pattern adopted (e.g., Chain of Responsibility)
    

    Present this plan to the user for review before proceeding.

Read the full file on GitHub · 288 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 · 288 lines · 22 tokens per session scan A 808ccc6554b7

Subscribe to this mod's changes

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