Agentic-First Spec-Driven Development for Cursor IDE
AI agents that directly execute specifications - not vague descriptions, but explicit instructions
SDD v3.0 transforms templates from descriptions into direct agent instructions:
- Role Declarations: Every command starts with "You are a [role]. Your job is [purpose]."
- State Assertions: AI outputs its mode and boundaries before starting
- Self-Correction Protocol: Built-in mistake detection and recovery
- Mode Boundaries: Explicit "will do" and "will NOT do" rules
- Verification Checkpoints: Gates before file creation
| Command | Purpose |
|---|---|
/generate-prd | Create PRDs through Socratic questioning |
/audit | Spec-driven technical audit (compare code against specs) |
/refine | Iterate on specs through discussion |
Each command now maps to the optimal Cursor mode:
| SDD Commands | Cursor Mode |
|---|---|
/brief, /specify, /plan, /tasks | Plan |
/research | Ask (read-only) |
/implement, /execute-task | Agent |
/audit | Debug |
Stop coding blindly. Start building with purpose.
Spec-Driven Development creates detailed specifications before writing code:
- 🎯 Requirements are crystal clear before implementation
- 🏗️ Technical decisions are well-planned and documented
- 📋 Development tasks are structured and manageable
- 🤝 AI agents execute systematically with explicit instructions
Old way (vague):
"This command helps create specifications..."
New way (agentic):
"You are a specification agent. Your job is to create detailed requirements. You WILL ask clarifying questions and define acceptance criteria. You will NOT write implementation code or skip the plan presentation."
git clone https://github.com/madebyaris/spec-kit-command-cursor.git cd spec-kit-command-cursor# Quick 30-minute planning (80% of features) /brief user-auth JWT authentication with login/logout # Full project roadmap /sdd-full-plan blog-platform Full-featured blog with CMS # Create PRD through questions /generate-prd mobile-app # Audit code against specs /audit user-auth Login failures on mobileEvery command follows plan-approve-execute:
User Command → AI Analyzes → Shows Plan → You Approve → AI Executes → Verifies | Command | Purpose | Output |
|---|---|---|
/brief | 30-min planning → start coding | feature-brief.md |
/evolve | Update specs during development | Updated brief with changelog |
/refine | Iterate on specs through discussion | Refined documentation |
| Command | Purpose | Output |
|---|---|---|
/sdd-full-plan | Complete A-Z roadmap | Kanban board + tasks |
/execute-task | Run task from roadmap | Executes with appropriate SDD command |
/generate-prd | PRD via Socratic questions | full-prd.md + quick-prd.md |
🚀 NEW: --until-finish flag - Add to any command above for automated execution!
| Command | Purpose | Output |
|---|---|---|
/research | Investigate patterns (read-only) | research.md |
/specify | Detailed requirements | spec.md |
/plan | Technical architecture | plan.md |
/tasks | Task breakdown | tasks.md |
/implement | Execute implementation | Code + todo-list.md |
| Command | Purpose | Output |
|---|---|---|
/upgrade | Brief → Full SDD 2.0 | Complete planning suite |
/audit | Spec-driven technical audit | Audit report with fixes |
/generate-rules | Auto-generate coding rules | .cursor/rules/*.mdc |
Every command template follows this structure:
# /command Command [Brief description] --- ## IMPORTANT: This is [Mode] Mode **You are a [role].** Your job is to [purpose]. **Your role:** - [What you will do 1] - [What you will do 2] **Mode boundaries (What you will NOT do):** - [Forbidden action 1] - [Forbidden action 2] **Recommended Cursor Mode:** [Mode] --- ## State Assertion (REQUIRED) **Before starting, output:**SDD MODE: [Command] Mode: [planning|implementation|research|verification] Purpose: [Specific purpose] Implementation: [BLOCKED|AUTHORIZED]
--- ## Self-Correction Protocol **DETECT**: If you find yourself... **STOP**: Immediately halt **CORRECT**: "I apologize - I was [mistake]. Let me return to [correct mode]." **RESUME**: Continue correctly --- ## Instructions [Phase 1: Analysis → Phase 2: Planning → Phase 3: Execution → Phase 4: Verification] --- ## Output (REQUIRED) [Exact format for completion message] # 1. Create 30-minute brief /brief checkout-flow Quick checkout for guests # 2. Start coding! Update as you discover things /evolve checkout-flow Added guest cart persistence # 3. Refine if needed /refine checkout-flow# 1. Create complete roadmap /sdd-full-plan ecommerce-platform Multi-vendor marketplace # 2. Execute tasks from roadmap /execute-task epic-001 /execute-task task-001-1 # 3. Audit issues /audit task-001-1 Payment processing failing# 1. Research patterns /research payment-system Stripe integration patterns # 2. Define requirements /specify payment-system # 3. Design architecture /plan payment-system # 4. Break down tasks /tasks payment-system # 5. Implement /implement payment-system# Create PRD through guided questions /generate-prd saas-dashboard # AI asks 5 strategic questions, then creates: # - full-prd.md (comprehensive) # - quick-prd.md (AI-optimized)your-project/ ├── .cursor/ │ ├── commands/ # SDD slash commands │ │ ├── _shared/ # Shared agent protocols │ │ │ ├── agent-manual.md │ │ │ ├── self-correction.md │ │ │ └── cursor-modes.md │ │ ├── brief.md │ │ ├── research.md │ │ ├── specify.md │ │ ├── plan.md │ │ ├── tasks.md │ │ ├── implement.md │ │ ├── evolve.md │ │ ├── upgrade.md │ │ ├── refine.md │ │ ├── generate-prd.md │ │ ├── audit.md │ │ ├── generate-rules.md │ │ ├── sdd-full-plan.md │ │ └── execute-task.md │ └── rules/ │ └── sdd-system.mdc # Always-applied rules ├── .sdd/ │ ├── guidelines.md # Development methodology │ ├── IMPLEMENTATION_GUIDE.md │ └── ROADMAP_FORMAT_SPEC.md ├── specs/ │ ├── active/ # Features in development │ │ └── [task-id]/ │ │ ├── feature-brief.md │ │ ├── spec.md │ │ ├── plan.md │ │ └── tasks.md │ └── todo-roadmap/ # Project roadmaps │ └── [project-id]/ │ ├── roadmap.json │ ├── roadmap.md │ └── tasks/ └── src/ # Your code | SDD Command | Cursor Mode | Why |
|---|---|---|
/brief | Plan | Create specs without code changes |
/research | Ask | Read-only exploration |
/specify | Plan | Define requirements |
/plan | Plan | Architecture design |
/tasks | Plan | Task breakdown |
/implement | Agent | Full multi-file changes |
/audit | Debug | Spec-driven audit with runtime evidence |
Use Cmd+. (Mac) or Ctrl+. (Windows/Linux) to switch modes.
Cursor's built-in Debug Mode pairs perfectly with the /audit command:
- Switch to Debug Mode (
Cmd+.orCtrl+.) - Run
/audit [task-id]to compare code against specs - Leverage Debug Mode's features for runtime evidence:
- Hypothesis generation
- Log instrumentation
- Runtime analysis
Spec-driven technical audit that compares implementation against specifications:
/audit user-auth Login failures on mobileWhat it does:
- Reads specifications (spec.md, plan.md)
- Inspects actual implementation
- Compares code against requirements
- Generates Review Board with severity levels
- Proposes fixes only after investigation
Synergy with Debug Mode: When running in Cursor's Debug Mode, /audit can leverage log instrumentation to gather runtime evidence alongside spec comparison.
Output:
📋 Audit Report Ready Summary: - 🔴 Critical: 1 issue (SQL injection) - 🟠 Major: 2 issues (missing validation) - 🟡 Minor: 3 issues (naming, comments) To fix: "Fix #1" or "Fix all critical" Automated execution mode - run entire projects without stopping!
# Execute an entire epic automatically /execute-task epic-001 --until-finish # Create roadmap AND execute everything /sdd-full-plan my-project Complete app with auth --until-finish /pecut-all-in-one my-project Full SaaS dashboard --until-finishWhat it does:
- Executes all tasks in dependency order
- No user approval needed between tasks
- Stops on error - reports issue for you to fix
- Resume with same command after fixing
- Continues until complete
Flow:
Start → Task 1 ✅ → Task 2 ✅ → Task 3 ❌ Error → STOP → Fix → Resume → Task 3 ✅ → Done! 🎉 Scope:
/execute-task [epic-id] --until-finish- Executes that epic and all its subtasks/execute-task [task-id] --until-finish- Executes from that task to end of epic/sdd-full-plan --until-finish- Creates roadmap AND executes ALL tasks
This is "fire and forget" mode - start it and come back when your project is built!
Create PRDs through guided Socratic questioning:
/generate-prd mobile-bankingQuestions asked:
- What problem and goal?
- What are the must-have features?
- Any technical requirements?
- What's explicitly out of scope?
- Anything else I should know?
Output:
full-prd.md- Comprehensive PRDquick-prd.md- AI-optimized summary
We ❤️ contributions!
- 🐛 Report bugs - Open an issue
- 💡 Suggest features - Start a discussion
- 🔧 Submit PRs - Improvements welcome!
- ⭐ Star this repo - Show your support!
- ✅ v3.0: Agentic-first template rewrite
- ✅ New commands:
/generate-prd,/audit,/refine - ✅ NEW:
--until-finishflag - Automated execution mode - ✅ Cursor mode integration (including Debug Mode)
- ✅ Self-correction protocols
- ✅ Shared agent protocols (
_shared/)
Special thanks to ClavixDev for providing valuable ideas and suggestions on how to improve this project!
MIT License - see LICENSE file for details.
Made with ❤️ by Aris
/brief hello-world Create a simple hello world feature