| name | deep-interview |
| description | Socratic deep interview with mathematical ambiguity gating before autonomous execution |
| argument-hint | [--quick|--standard|--deep] [--autoresearch] <idea or vague description> |
| trigger | /oma:deep-interview |
| level | 3 |
Deep Interview implements Ouroboros-inspired Socratic questioning with mathematical ambiguity scoring. It replaces vague ideas with crystal-clear specifications by asking targeted questions that expose hidden assumptions, measuring clarity across weighted dimensions, and refusing to proceed until ambiguity drops below a configurable threshold (default: 20%). The output feeds into a 3-stage pipeline: **deep-interview → ralplan (consensus refinement) → ralph/team (execution)**, ensuring maximum clarity at every stage.
<Use_When>
- User has a vague idea and wants thorough requirements gathering before execution
- User says "deep interview", "interview me", "ask me everything", "don't assume", "make sure you understand"
- User says "ouroboros", "socratic", "I have a vague idea", "not sure exactly what I want"
- User wants to avoid "that's not what I meant" outcomes from autonomous execution
- Task is complex enough that jumping to code would waste cycles on scope discovery
- User wants mathematically-validated clarity before committing to execution
</Use_When>
<Do_Not_Use_When>
- User has a detailed, specific request with file paths, function names, or acceptance criteria -- execute directly
- User wants to explore options or brainstorm -- use
plan skill instead
- User wants a quick fix or single change -- delegate to executor or ralph
- User says "just do it" or "skip the questions" -- respect their intent
- User already has a PRD or plan file -- use ralph or team with that plan
</Do_Not_Use_When>
<Why_This_Exists>
AI can build anything. The hard part is knowing what to build. OMA's autopilot Phase 0 expands ideas into specs via analyst + architect, but this single-pass approach struggles with genuinely vague inputs. It asks "what do you want?" instead of "what are you assuming?" Deep Interview applies Socratic methodology to iteratively expose assumptions and mathematically gate readiness, ensuring the AI has genuine clarity before spending execution cycles.
</Why_This_Exists>
<Execution_Policy>
- Ask ONE question at a time -- never batch multiple questions
- Target the WEAKEST clarity dimension with each question
- Make weakest-dimension targeting explicit every round: name the weakest dimension, state its score/gap, and explain why the next question is aimed there
- Gather codebase facts via
Explore agent BEFORE asking the user about them
- Score ambiguity after every answer -- display the score transparently
- Do not proceed to execution until ambiguity ≤ threshold (default 0.2)
- Allow early exit with a clear warning if ambiguity is still high
- Persist interview state for resume across session interruptions
- Challenge agents activate at specific round thresholds to shift perspective
</Execution_Policy>
Phase 1: Initialize
- Parse the user's idea from
{{ARGUMENTS}}
- Detect brownfield vs greenfield:
- Run
Explore agent (haiku): check if cwd has existing source code, package files, or git history
- If source files exist AND the user's idea references modifying/extending something: brownfield
- Otherwise: greenfield
- For brownfield: Run
Explore agent to map relevant codebase areas, store as codebase_context
- Initialize state via
state_write(mode="deep-interview"):
{
"active": true,
"current_phase": "deep-interview",
"state": {
"interview_id": "<uuid>",
"type": "greenfield|brownfield",
"initial_idea": "<user input>",
"rounds": [],
"current_ambiguity": 1.0,
"threshold": 0.2,
"codebase_context": null,
"challenge_modes_used": [],
"ontology_snapshots": []
}
}
- Announce the interview to the user
Phase 2: Interview Loop
Repeat until ambiguity ≤ threshold OR user exits early:
Step 2a: Generate Next Question
Build the question generation prompt with:
- The user's original idea
- All prior Q&A rounds (conversation history)
- Current clarity scores per dimension (which is weakest?)
- Challenge agent mode (if activated -- see Phase 3)
- Brownfield codebase context (if applicable)
Question targeting strategy:
- Identify the dimension with the LOWEST clarity score
- Generate a question that specifically improves that dimension
- State, in one sentence before the question, why this dimension is now the bottleneck to reducing ambiguity
- Questions should expose ASSUMPTIONS, not gather feature lists
- If the scope is still conceptually fuzzy (entities keep shifting, the user is naming symptoms, or the core noun is unstable), switch to an ontology-style question
Question styles by dimension:
| Dimension | Question Style | Example |
|---|
| Goal Clarity | "What exactly happens when...?" | "When you say 'manage tasks', what specific action does a user take first?" |
| Constraint Clarity | "What are the boundaries?" | "Should this work offline, or is internet connectivity assumed?" |
| Success Criteria | "How do we know it works?" | "If I showed you the finished product, what would make you say 'yes, that's it'?" |
| Context Clarity (brownfield) | "How does this fit?" | "I found JWT auth middleware in src/auth/ — should this feature extend that path or diverge?" |
Step 2b: Ask the Question
Use AskUserQuestion with the generated question.
Step 2c: Score Ambiguity
After receiving the user's answer, score clarity across all dimensions using opus model (temperature 0.1).
Calculate ambiguity:
Greenfield: ambiguity = 1 - (goal × 0.40 + constraints × 0.30 + criteria × 0.30)
Brownfield: ambiguity = 1 - (goal × 0.35 + constraints × 0.25 + criteria × 0.25 + context × 0.15)
Step 2d: Report Progress
Show the user their progress after each round:
Round {n} complete.
| Dimension | Score | Weight | Weighted | Gap |
|-----------|-------|--------|----------|-----|
| Goal | {s} | {w} | {s*w} | {gap or "Clear"} |
| Constraints | {s} | {w} | {s*w} | {gap or "Clear"} |
| Success Criteria | {s} | {w} | {s*w} | {gap or "Clear"} |
| Context (brownfield) | {s} | {w} | {s*w} | {gap or "Clear"} |
| **Ambiguity** | | | **{score}%** | |
Step 2f: Check Soft Limits
- Round 3+: Allow early exit if user says "enough", "let's go", "build it"
- Round 10: Show soft warning
- Round 20: Hard cap
Phase 3: Challenge Agents
At specific round thresholds, shift the questioning perspective:
Round 4+: CONTRARIAN Mode
Ask "What if the opposite were true?" or "What if this constraint doesn't actually exist?"
Round 6+: SIMPLIFIER Mode
Ask "What's the simplest version that would still be valuable?" or "Which constraints are actually necessary vs. assumed?"
Round 8+: ONTOLOGIST Mode (if ambiguity > 0.3)
Ask "What IS this, really?" to find the essence
Challenge modes are used ONCE each, then return to normal Socratic questioning.
Phase 4: Crystallize Spec
When ambiguity ≤ threshold (or hard cap / early exit):
- Generate the specification using opus model with the full interview transcript
- Write to file:
.oma/specs/deep-interview-{slug}.md
Phase 5: Execution Bridge
After the spec is written, present execution options via AskUserQuestion:
Question: "Your spec is ready (ambiguity: {score}%). How would you like to proceed?"
Options:
- Ralplan → Team (Recommended) — consensus-refine then execute with N coordinated agents
- Ralplan → Ralph — consensus-refine then execute with persistence loop
- Team directly — N coordinated parallel agents with the spec as shared plan
- Ralph directly — persistence loop until all acceptance criteria pass
- Refine further — continue interviewing
IMPORTANT: Invoke the chosen execution mode via Skill(). Do NOT implement directly.
<Tool_Usage>
- Use
AskUserQuestion for each interview question
- Use
Explore agent (haiku) for brownfield codebase exploration
- Use opus model (temperature 0.1) for ambiguity scoring
- Use
state_write / state_read for interview state persistence
- Use
Write tool to save the final spec to .oma/specs/
- Use
Skill() to bridge to execution modes
</Tool_Usage>
<Escalation_And_Stop_Conditions>
- Hard cap at 20 rounds: proceed with whatever clarity exists
- Soft warning at 10 rounds: offer to continue or proceed
- Early exit (round 3+): allow with warning if ambiguity > threshold
- User says "stop": stop immediately, save state for resume
- Ambiguity stalls: activate Ontologist mode to reframe
</Escalation_And_Stop_Conditions>
Good Usage
Greenfield idea with no existing codebase:
User: "I want a tool that helps me track my learning goals"
OMA: [Deep Interview activates]
OMA: "What does 'track' mean to you in this context — a spreadsheet, an app, a CLI?"
User: "A CLI tool, something I run daily"
OMA: [Round 2: Focus on constraint clarity — online/offline, cross-platform?]
OMA: [Ambiguity: 45% → 22% after 6 rounds]
OMA: [Spec written to .oma/specs/learning-goal-tracker.md]
OMA: "Spec ready (ambiguity: 22%). How would you like to proceed?"
Brownfield extension requiring context questions:
User: "I want to add a recommendation engine to our existing MCP server"
OMA: [Deep Interview — brownfield detected]
OMA: [Explores existing MCP server codebase via explorer]
OMA: "I found your server structure in plugins/mcp/. Should the recommendation engine be a new plugin or integrated into the existing handler pipeline?"
User: "New plugin — I want it to be optional"
OMA: [Context clarity improves — ambiguity drops]
Bad Usage
Detailed spec provided — skip to execution:
User: "Use the PRD in .oma/specs/auth-overhaul.md to implement the auth refactor"
OMA: [Deep Interview activates unnecessarily]
OMA: "What does 'auth refactor' mean to you?"
User: "Just use the PRD — I already wrote it out"
→ Use /oma:ralph or /oma:team with the existing spec directly.
User wants a quick brainstorm:
User: "Give me some ideas for a new CLI tool"
OMA: [Deep Interview starts scoring dimensions and asking Socratic questions]
OMA: "Round 1: Goal clarity is 30% — let's start there. What is the core problem..."
User: "Whoa, I just wanted ideas, not a full spec"
→ Use planner for exploration/brainstorming, not deep-interview.
<Final_Checklist>