Syntax
Description
Thespec create command creates a new specification document in your sudocode project. Specs are the first tier in sudocode’s abstraction structure, capturing what you want to build (user intent) rather than how to implement it.
When you create a spec, sudocode:
- Generates a unique spec ID (e.g.,
SPEC-001,SPEC-002) - Creates a markdown file in
.sudocode/specs/directory - Adds the spec to the SQLite database
- Exports to JSONL for version control
- Applies any tags you specify
Arguments
"Authentication System Design"The title should be clear and descriptive. It will be used to generate the markdown filename if --file-path is not specified.Options
--priority 1Priority levels:- 0 - Critical (highest priority)
- 1 - High
- 2 - Medium (default)
- 3 - Low
- 4 - Lowest
--description "This spec defines our OAuth 2.0 implementation"This becomes the markdown content below the frontmatter. You can edit the markdown file later to add more detail.--file-path "auth-oauth2.md"If not provided, sudocode generates a filename based on the title. The path is relative to .sudocode/specs/.--parent SPEC-001Use this to create child specs under a parent spec, enabling hierarchical organization of related specifications.--tags "auth,security,backend"Tags help with filtering and organizing specs. Use commas to separate multiple tags (no spaces).Examples
Basic Spec Creation
Create a simple spec with default priority:Expected output
Expected output
- Spec ID:
SPEC-001 - File:
.sudocode/specs/authentication-system.md - Priority: 2 (default)
- Empty content
Spec with Description and Priority
Create a high-priority spec with initial content:Expected output
Expected output
Hierarchical Spec (Child Spec)
Create a child spec under a parent:Expected output
Expected output
Spec with Tags
Create a spec with multiple tags for organization:Expected output
Expected output
Custom File Path
Specify a custom filename:Expected output
Expected output
After Creating a Spec
After creating your spec, you can:Edit the Spec
View Spec Details
Create Implementation Issues
Add to Parent Spec
Spec File Structure
Created specs have this structure:Common Workflows
Creating a Feature Spec
Create the spec
Edit with details
.sudocode/specs/user-dashboard.md to add:- Requirements
- Design decisions
- Open questions
Create implementation issues
Creating an Architecture Spec
Create parent spec
Create child specs
View hierarchy
JSON Output
Use the global--json flag for machine-readable output:
JSON output
JSON output
Common Questions
Can I change the spec ID after creation?
Can I change the spec ID after creation?
What's the difference between description and editing the file?
What's the difference between description and editing the file?
--description flag sets initial content when creating the spec. After creation, you typically edit the markdown file directly for more detailed content.Should I create a spec or an issue?
Should I create a spec or an issue?
- It requires multiple independent tasks
- It’s strategic/architectural
- It captures WHAT to build
- It’s a single actionable task
- It captures HOW to implement
- An agent can complete it in one session
Can I have specs without issues?
Can I have specs without issues?
How do I link specs to other specs?
How do I link specs to other specs?
Troubleshooting
Error: sudocode not initialized
Error: sudocode not initialized
.sudocode/ directory foundSolution:Error: Invalid priority value
Error: Invalid priority value
Spec created but file not found
Spec created but file not found
.sudocode/specs/, not the current directorySolution:Related Commands
spec list
spec show
spec update
issue create
link
init
Next Steps
Create your first spec
Edit the spec content
Create implementation issues
Track implementation

