A methodology and Cursor-powered workflow for building software specification-first — ensuring every line of code traces back to a documented requirement.
- Clarity precedes code — Define goals, requirements, and architecture before implementation
- Traceability — Every feature and task maps to PRD requirements
- Context efficiency — Lightweight indexes keep AI sessions focused and token-efficient
- Plan-first implementation — Mandatory planning before coding catches issues early
# 1. Initialize your project (5–10 questions about goals, users, constraints)
/init-project
# 2. Generate specifications (PRD + architecture)
/create-spec
# 3. Plan features
/create-plan
# 4. Create feature folders
/create-features
# 5. Create tasks for a feature
/create-tasks F1.1
# 6. Implement (plan → approve → code)
/execute-task T1.1.1| Phase | Command | Output |
|---|---|---|
| Discovery | /init-project |
spec/discovery.md |
| Personas (optional) | /create-persona |
spec/personas.md |
| Specification | /create-spec |
spec/PRD.md, spec/architecture.md |
| Planning | /create-plan |
spec/plan.md |
| Features | /create-features |
spec/features/ |
| Tasks | /create-tasks |
spec/features/F[x.y]-[slug]/tasks.md |
| Implementation | /execute-task |
Code + updated tasks.md |
| Session end | /sync-state |
spec/progress.md |
Anytime:
/revise— Update any artifact with cascading changes/verify— Audit specification integrity
| Command | Purpose |
|---|---|
/init-project |
Define project goals and context |
/create-persona |
Define reusable user personas |
/create-spec |
Generate PRD and architecture |
/create-plan |
Plan features before building |
/create-features |
Create feature folders (all or selective) |
/create-tasks |
Create tasks for one feature |
/execute-task |
Plan and execute tasks (plan mode mandatory) |
/revise |
Update any artifact with change propagation |
/verify |
Check specification integrity |
/add-rule |
Create custom AI rules |
/add-skill |
Create reusable skills |
/sync-state |
Save session progress |
/init-project ──► discovery.md
│
└──► /create-spec ──► PRD.md + architecture.md
│
├──► /create-plan ──► plan.md
│
└──► /create-features ──► spec/features/
│
└──► /create-tasks ──► tasks.md
│
└──► /execute-task ──► Implementation
/execute-task enforces a plan-first approach — you cannot skip ahead to coding:
- Select target — Single task, feature, or "next"
- Load context —
_index.md→ target feature only (minimal context) - Plan mode — Execution plan, approach, acceptance criteria, risks
- Approval — Approve, revise, or cancel
- Act mode — Implement per approved plan
- Report — Update
tasks.md, suggest next task
The framework uses lightweight index files to minimize token usage:
- Always read
spec/features/_index.mdfirst - Identify the relevant feature from the registry
- Load only that feature's folder (feature.md + tasks.md)
- Never load all feature folders at once
| Question | Load |
|---|---|
| "What features exist?" | _index.md only |
| "Work on login" | _index.md → F1.2-user-login/ |
| "Task T1.2.3?" | _index.md → F1.2-[slug]/tasks.md |
spec/
├── discovery.md # From /init-project
├── personas.md # From /create-persona (optional)
├── PRD.md # From /create-spec
├── architecture.md # From /create-spec
├── plan.md # From /create-plan
├── progress.md # From /sync-state
├── references/ # Shared mockups, diagrams (optional)
└── features/
├── _index.md # Feature registry (read first!)
├── F1.1-user-registration/
│ ├── feature.md
│ ├── tasks.md
│ └── references/
└── ...
Copy these to start new projects:
Agent.mdworkflow.md.cursor/(commands, rules, skills)
Generated per-project:
spec/folder (all specification documents)
- Always start with specs — Run
/init-projectand/create-specbefore coding - Use
/execute-taskfor implementation — Enforces plan mode before act mode - Keep tasks updated — Mark complete immediately in
tasks.md - Verify periodically — Run
/verifyafter major changes - Sync regularly — Run
/sync-stateat natural breakpoints
See workflow.md for the complete step-by-step guide, including:
- Phase-by-phase walkthrough
- Auto-generated rules and skills
- Change propagation with
/revise - Integrity checks with
/verify - Troubleshooting
- Reference materials
Copy this entire project (or clone it) as a starting template for new work. The .cursor/ folder contains commands and rules that enforce the spec-driven workflow. Run /init-project in your new project to begin.