Troubleshooting
Validation Errors
Section titled “Validation Errors””Requirement must have at least one scenario”
Section titled “”Requirement must have at least one scenario””Every requirement needs a scenario block.
Fix:
### Requirement: User LoginThe system SHALL authenticate users.
#### Scenario: Valid credentials- **WHEN** correct email and password provided- **THEN** return authentication token“Invalid scenario format”
Section titled ““Invalid scenario format””Scenarios must use exactly #### Scenario: format.
Wrong:
### Scenario: Test ✗ (3 hashtags)- **Scenario: Test ✗ (bullet)**Scenario**: Test ✗ (bold colon)Right:
#### Scenario: Test ✓“Change must have at least one delta”
Section titled ““Change must have at least one delta””Your change’s specs/ directory needs spec files with operation headers.
Check:
ls openspec/changes/my-change/specs/Fix: Add spec files with ## ADDED Requirements or similar headers.
”Duplicate requirement header”
Section titled “”Duplicate requirement header””A MODIFIED or ADDED requirement conflicts with an existing one.
Debug:
openspec show my-change --json --deltas-onlyFix: Use MODIFIED to update existing requirements, not ADDED.
CLI Issues
Section titled “CLI Issues””No OpenSpec directory found”
Section titled “”No OpenSpec directory found””Run openspec init first:
openspec initSlash commands not appearing
Section titled “Slash commands not appearing”- Restart your AI assistant - Commands load at startup
- Check files exist:
Terminal window ls .claude/commands/openspec/ # For Claude Codels .cursor/commands/ # For Cursor - Refresh configurations:
Terminal window openspec update
“Command not found: openspec”
Section titled ““Command not found: openspec””Install OpenSpec:
bun install -g @clanker-guru/openspecOr use bunx:
bunx @clanker-guru/openspec --versionArchive target already exists
Section titled “Archive target already exists”An archive with the same date exists.
Options:
- Wait until tomorrow
- Rename existing archive
- Use a different change name
Spec Issues
Section titled “Spec Issues”Changes lost after archive
Section titled “Changes lost after archive”MODIFIED requirements replace the entire block. Include full content.
Wrong:
## MODIFIED Requirements### Requirement: LoginAdd OTP support. # Just the changeRight:
## MODIFIED Requirements### Requirement: LoginThe system SHALL authenticate users with email, password, and OTP.
#### Scenario: Complete login- **WHEN** all credentials valid- **THEN** issue session tokenScenarios not parsing
Section titled “Scenarios not parsing”Use exact format with bold keywords:
#### Scenario: Name- **WHEN** condition- **THEN** result- **AND** additional resultDebug:
openspec show my-change --json | jq '.deltas[].requirements[].scenarios'AI Assistant Issues
Section titled “AI Assistant Issues”AI not following OpenSpec workflow
Section titled “AI not following OpenSpec workflow”-
Check AGENTS.md exists:
Terminal window cat openspec/AGENTS.md | head -20 -
For slash command tools, use the command:
/openspec:proposal My feature -
For AGENTS.md tools, be explicit:
Following the OpenSpec workflow in AGENTS.md, create a proposal for...
AI creating wrong structure
Section titled “AI creating wrong structure”Provide explicit guidance:
Create an OpenSpec proposal following the exact structure:- proposal.md with Why/What Changes/Impact sections- tasks.md with numbered checkbox items- specs/ directory with delta files using ## ADDED RequirementsGetting Help
Section titled “Getting Help”Debug output
Section titled “Debug output”# Verbose validationopenspec validate my-change --strict --json
# Inspect deltasopenspec show my-change --json --deltas-only | jq '.'
# Check structurefind openspec/changes/my-change -type fReport issues
Section titled “Report issues”Include:
- OpenSpec version (
openspec --version) - Command that failed
- Error message
- Relevant file contents