/sdd-discover¶
Reverse-engineer canonical specs from an existing codebase.
Usage¶
/sdd-discover # Analyze entire project
/sdd-discover {domain} # Analyze specific domain only
Run once after /sdd-init on projects with existing code.
Prerequisites¶
/sdd-initexecuted (openspec/exists withconfig.yaml)
What it does¶
- Detects domains by scanning
src/,app/,lib/,packages/ - Shows interactive summary — list of detected domains with file counts, asks confirmation
- Analyzes domains in parallel — one subagent per domain
- Generates canonical specs —
openspec/specs/{domain}/spec.mdwithStatus: inferred - Updates
openspec/INDEX.md— domain index with descriptions
Skips domains that already have specs.
Artifacts produced¶
openspec/specs/{domain}/spec.mdfor each detected domainopenspec/INDEX.md(created or updated)
Inferred specs include: metadata, context, current behavior, EARS requirements, decisions, and open questions.
Next step¶
- Review each spec directly in
openspec/specs/{domain}/spec.mdand edit to correct inaccuracies /sdd-new "description"— start a change (creates delta specs via/sdd-spec)