Syntax
Description
Thespec update command allows you to modify properties of an existing spec. You can update the title, priority, description, parent relationship, tags, and archive status.
When you update a spec:
- Changes are written to the SQLite database
- The markdown file is updated with new frontmatter
- Changes are exported to JSONL for version control
- The
updated_attimestamp is automatically set
Arguments
SPEC-001The spec must exist in your project.Options
--title "Updated Authentication System"Changes the display title of the spec.--priority 0Priority levels:- 0 - Critical (highest)
- 1 - High
- 2 - Medium
- 3 - Low
- 4 - Lowest
--description "Updated spec content"This replaces the markdown content of the spec.--parent SPEC-005Use empty string to remove parent: --parent ""--tags "auth,security,critical"Note: This replaces all existing tags. To add/remove individual tags, edit the markdown file directly.--archived true or --archived falseArchived specs are hidden from default listings but retained for reference.Examples
Update Priority
Elevate a spec to critical priority:Expected output
Expected output
Update Title
Rename a spec:Expected output
Expected output
Update Description
Replace spec content:Expected output
Expected output
Update Multiple Fields
Change priority and title together:Expected output
Expected output
Set Parent Spec
Add to hierarchy:Expected output
Expected output
Remove Parent Spec
Remove from hierarchy:Expected output
Expected output
Archive a Spec
Mark spec as archived (deprecated):Expected output
Expected output
spec list by default.
Unarchive a Spec
Restore an archived spec:Expected output
Expected output
Update Tags
Replace all tags:Expected output
Expected output
--tags option replaces ALL existing tags. To add or remove individual tags, edit the markdown file directly.JSON Output
Use the global--json flag for machine-readable output:
JSON output
JSON output
Common Workflows
Promoting Spec Priority
List specs by priority
Promote to high priority
Verify change
Reorganizing Spec Hierarchy
View current structure
Move child specs
Verify hierarchy
Deprecating Old Specs
Archive the spec
Lower priority
Update title to indicate deprecation
Bulk Updates with Scripting
Update multiple specs programmatically:Update Behavior
What Gets Updated
When you runspec update:
- Database - SQLite database is updated immediately
- Markdown file - Frontmatter is updated with new values
- JSONL - Changes are exported to
specs.jsonlfor version control - Timestamp -
updated_atis set to current time
What Doesn’t Change
- Spec ID - Immutable, cannot be changed
- Creation timestamp -
created_atnever changes - File path - Markdown filename stays the same
- Relationships - Use
linkcommand to manage relationships - Feedback - Use
feedbackcommands to manage feedback
Content Updates
The--description flag replaces the markdown content below the frontmatter:
Before:
sudocode spec update SPEC-001 --description "New content":
--description.Common Questions
Can I update multiple specs at once?
Can I update multiple specs at once?
spec update works on one spec at a time. For bulk updates, use shell scripting with loops:What happens to relationships when I update a spec?
What happens to relationships when I update a spec?
spec update. They persist regardless of changes to title, priority, or other properties.How do I add tags without replacing existing ones?
How do I add tags without replacing existing ones?
Can I change the spec ID?
Can I change the spec ID?
What's the difference between archiving and deleting?
What's the difference between archiving and deleting?
- Archiving (
--archived true) hides the spec from default listings but retains it for reference - Deleting (
spec delete) permanently removes the spec from the database
Will updating a spec notify anyone?
Will updating a spec notify anyone?
updated_at timestamp. Consider adding a git commit message describing significant updates.Troubleshooting
Error: Spec not found
Error: Spec not found
Error: Invalid priority value
Error: Invalid priority value
Error: Parent spec not found
Error: Parent spec not found
Update succeeded but markdown file unchanged
Update succeeded but markdown file unchanged
Related Commands
spec show
spec create
spec list
spec delete
link
sync
Next Steps
View spec details
Update properties
Verify changes
Commit to git

