OpenSpec Interview
Phased Socratic interview that produces OpenSpec artifacts incrementally. Each phase maps to one artifact; user may exit after any phase.
Steps
- If
$ARGUMENTSis empty, useAskUserQuestionto ask what to build. Derive kebab-case name. - Run
openspec new change "<name>"andopenspec status --change "<name>" --json. - Read
resources/INTERVIEW_PRINCIPLES.mdandresources/OPENSPEC_INTERVIEW_DIMENSIONS.md. - Execute 4 interview phases. Each phase: ask via
AskUserQuestion(2-4 convergent options), then write artifact. If user says "skip", advance with gathered info.- Phase 1 → proposal.md: Business goals, MVP scope, risk preview, capability identification.
- Phase 2 → specs/<cap>/spec.md: Requirements per capability in WHEN/THEN scenarios (ADDED/MODIFIED/REMOVED).
- Phase 3 → design.md: Technical decisions, architecture tradeoffs (Context/Goals/Non-Goals/Decisions).
- Phase 4 → tasks.md: Implementation breakdown as hierarchical checkbox list.
- Use
openspec instructions <artifact> --change "<name>" --jsonbefore writing each artifact. Fallback:resources/ARTIFACT_TEMPLATES.md. - If high-risk operations detected, read
resources/RISK_PROTECTION.mdand get explicit authorization. - On completion, run
openspec status --change "<name>". Guide user to/opsx:applyor/opsx:verify. Seeresources/EXAMPLES.mdfor a full walkthrough.
Constraints
- Double-quote paths, use
/separator. Preferrgovergrep. - Never auto-execute Git write operations (
commit,push). - All questions via
AskUserQuestionwith clickableoptions— no plain-text A/B/C.