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
Specs are version-controlled artifacts that live alongside your code. They evolve based on feedback from implementation.
Arguments
The title of your specExample:
"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 level (0-4, where 0 is highest)Example:
--priority 1Priority levels:- 0 - Critical (highest priority)
- 1 - High
- 2 - Medium (default)
- 3 - Low
- 4 - Lowest
Initial description/content for the specExample:
--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.Custom file path for the markdown fileExample:
--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 ID for hierarchical organizationExample:
--parent SPEC-001Use this to create child specs under a parent spec, enabling hierarchical organization of related specifications.Comma-separated tags for organizationExample:
--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:Spec File Structure
Created specs have this structure:Common Workflows
Creating a Feature Spec
1
Create the spec
2
Edit with details
Edit
.sudocode/specs/user-dashboard.md to add:- Requirements
- Design decisions
- Open questions
3
Create implementation issues
Creating an Architecture Spec
1
Create parent spec
2
Create child specs
3
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?
No, spec IDs are immutable and generated sequentially. They ensure stable references across the system.
What's the difference between description and editing the file?
What's the difference between description and editing the file?
The
--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?
Create a spec if:
- 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?
Yes! Specs can exist independently. You create issues from specs as you plan implementation.
How do I link specs to other specs?
How do I link specs to other specs?
Use Obsidian-style syntax in the markdown content:Or create explicit relationships:
Troubleshooting
Error: sudocode not initialized
Error: sudocode not initialized
Cause: No
.sudocode/ directory foundSolution:Error: Invalid priority value
Error: Invalid priority value
Cause: Priority must be 0-4Solution:
Spec created but file not found
Spec created but file not found
Cause: The markdown file is created in
.sudocode/specs/, not the current directorySolution:Related Commands
spec list
List all specs with filtering
spec show
View spec details
spec update
Update existing spec
issue create
Create implementation issues
link
Link specs to issues
init
Initialize sudocode project
Next Steps
1
Create your first spec
2
Edit the spec content
Add requirements, design decisions, and questions
3
Create implementation issues
4
Track implementation
Specs Concept Guide
Learn more about specs and their role in sudocode’s abstraction structure

