Create a New Spec
Create a new specification document based on the user's prompt: $ARGUMENTS
Pre-parsed Data
Existing Specs
!${CLAUDE_PLUGIN_ROOT}/scripts/specs-parse.sh spec-list
Instructions
- •
Determine the version number: Using the spec-list data above, find the highest version number and increment by 1. If no specs exist, start at v1.
- •
Find the template: Read
specs/TEMPLATE.mdif it exists. If not, use the canonical template at${CLAUDE_PLUGIN_ROOT}/templates/TEMPLATE.md. - •
Create a short name: Based on the user's prompt (
$ARGUMENTS), create a kebab-case name (e.g., "user-authentication", "dark-mode"). The filename should be:spec-v{N}-{short-name}.md - •
Draft the spec:
- •Parse
$ARGUMENTSto identify the WHY (problem/goal), WHAT (requirements), and HOW (approach) - •Fill in the template with reasonable defaults
- •Mark all checklist items as unchecked
- [ ] - •Set status to "Draft"
- •Set the date to today
- •Parse
- •
Write the file: Save to
specs/spec-v{N}-{short-name}.md - •
Update README: Add the new spec to
specs/README.md:- •Add a Quick Status table row
- •Add a new
## v{N}: {Name}section with the Phase/Task checklists
- •
Report back: Tell the user the spec was created and show the filename.
Example
If the user runs /sdd:spec add ability to export classifications to CSV, create:
- •File:
specs/spec-v5-csv-export.md - •Why: "As a user, I want to export classifications to CSV so that I can analyze data in spreadsheets"
- •What: Requirements for CSV export feature
- •How: Phased implementation plan