If no flag is provided, use Standard.
Phase 0: Preflight Context Intake
- Parse
{{ARGUMENTS}} and derive a short task slug.
- Attempt to load the latest relevant context snapshot from
.omx/context/{slug}-*.md.
- If no snapshot exists, create a minimum context snapshot with:
- Task statement
- Desired outcome
- Stated solution (what the user asked for)
- Probable intent hypothesis (why they likely want it)
- Known facts/evidence
- Constraints
- Unknowns/open questions
- Decision-boundary unknowns
- Likely codebase touchpoints
- Save snapshot to
.omx/context/{slug}-{timestamp}.md (UTC YYYYMMDDTHHMMSSZ) and reference it in mode state.
Phase 1: Initialize
- Parse
{{ARGUMENTS}} and depth profile (--quick|--standard|--deep).
- Detect project context:
- Run
explore to classify brownfield (existing codebase target) vs greenfield.
- For brownfield, collect relevant codebase context before questioning.
- Initialize state via
state_write(mode="deep-interview"):
{
"active": true,
"current_phase": "deep-interview",
"state": {
"interview_id": "<uuid>",
"profile": "quick|standard|deep",
"type": "greenfield|brownfield",
"initial_idea": "<user input>",
"rounds": [],
"current_ambiguity": 1.0,
"threshold": 0.3,
"max_rounds": 5,
"challenge_modes_used": [],
"codebase_context": null,
"current_stage": "intent-first",
"current_focus": "intent",
"context_snapshot_path": ".omx/context/<slug>-<timestamp>.md"
}
}
- Announce kickoff with profile, threshold, and current ambiguity.
Phase 2: Socratic Interview Loop
Repeat until ambiguity <= threshold, the pressure pass is complete, the readiness gates are explicit, the user exits with warning, or max rounds are reached.
2a) Generate next question
Use:
- Original idea
- Prior Q&A rounds
- Current dimension scores
- Brownfield context (if any)
- Activated challenge mode injection (Phase 3)
Target the lowest-scoring dimension, but respect stage priority:
- Stage 1 — Intent-first: Intent, Outcome, Scope, Non-goals, Decision Boundaries
- Stage 2 — Feasibility: Constraints, Success Criteria
- Stage 3 — Brownfield grounding: Context Clarity (brownfield only)
Follow-up pressure ladder after each answer:
- Ask for a concrete example, counterexample, or evidence signal behind the latest claim
- Probe the hidden assumption, dependency, or belief that makes the claim true
- Force a boundary or tradeoff: what would you explicitly not do, defer, or reject?
- If the answer still describes symptoms, reframe toward essence / root cause before moving on
Prefer staying on the same thread for multiple rounds when it has the highest leverage. Breadth without pressure is not progress.
Detailed dimensions:
- Intent Clarity — why the user wants this
- Outcome Clarity — what end state they want
- Scope Clarity — how far the change should go
- Constraint Clarity — technical or business limits that must hold
- Success Criteria Clarity — how completion will be judged
- Context Clarity — existing codebase understanding (brownfield only)
Non-goals and Decision Boundaries are mandatory readiness gates. Ask about them early and keep revisiting them until they are explicit.
2b) Ask the question
Use OMX-owned structured questioning via omx question for every interview round (this is the required AskUserQuestion equivalent for deep-interview) and present:
Round {n} | Target: {weakest_dimension} | Ambiguity: {score}%
{question}
omx question payload guidance for interview rounds:
- Use canonical
type values instead of authoring raw multi_select flags by hand. type: "single-answerable" is the default for one-path decisions; type: "multi-answerable" is the canonical shape for bounded multi-select rounds. The runtime will keep multi_select aligned with type.
- Use
single-answerable when exactly one answer should drive the next branch, the options are mutually exclusive, or selecting more than one answer would blur the decision boundary. Typical cases: handoff lane selection, choosing the primary failure mode, or confirming which of several competing interpretations is correct.
- Use
multi-answerable when multiple options may all be true at once and you need to capture a bounded set of coexisting constraints, non-goals, risks, or acceptance checks in one round. Typical cases: selecting all out-of-scope items, all success metrics that must hold, or all deployment constraints that apply together.
- If one selected option would immediately require a follow-up question to disambiguate the others, prefer a
single-answerable round now and ask the follow-up next. Do not hide a branching interview tree inside one overloaded multi-select prompt.
- Keep interview options bounded and concrete. If the valid answers are already known, set
allow_other: false; only leave allow_other: true when the interview genuinely needs one user-supplied option that cannot be enumerated in advance.
- Read answers structurally. For
single-answerable, expect one decisive selection in answer.value plus answer.selected_values. For multi-answerable, treat answer.selected_values as the source of truth for all chosen constraints/non-goals and preserve the full set in the transcript/spec.
Canonical bounded single-choice payload:
{
"question": "Which execution lane should own this once the interview is complete?",
"type": "single-answerable",
"options": [
{
"label": "Plan first",
"value": "ralplan",
"description": "Need architecture and test-shape review before execution"
},
{
"label": "Execute directly",
"value": "autopilot",
"description": "Requirements are already explicit enough for planning plus execution"
},
{
"label": "Refine further",
"value": "refine",
"description": "Clarification is still needed before any handoff"
}
],
"allow_other": false,
"other_label": "Other",
"source": "deep-interview"
}
Canonical bounded multi-select payload:
{
"question": "Which non-goals must stay out of scope for the first pass?",
"type": "multi-answerable",
"options": [
{
"label": "No UI redesign",
"value": "no-ui-redesign",
"description": "Keep layout and styling unchanged"
},
{
"label": "No new dependencies",
"value": "no-new-dependencies",
"description": "Work within the existing toolchain"
},
{
"label": "No API contract changes",
"value": "no-api-contract-changes",
"description": "Preserve external request and response shapes"
}
],
"allow_other": false,
"other_label": "Other",
"source": "deep-interview"
}
Canonical answer-shape reminders:
{
"answer": {
"kind": "option",
"value": "ralplan",
"selected_labels": ["Plan first"],
"selected_values": ["ralplan"]
}
}
{
"answer": {
"kind": "multi",
"value": ["no-new-dependencies", "no-api-contract-changes"],
"selected_labels": ["No new dependencies", "No API contract changes"],
"selected_values": ["no-new-dependencies", "no-api-contract-changes"]
}
}
2c) Score ambiguity
Score each weighted dimension in [0.0, 1.0] with justification + gap.
Greenfield: ambiguity = 1 - (intent × 0.30 + outcome × 0.25 + scope × 0.20 + constraints × 0.15 + success × 0.10)
Brownfield: ambiguity = 1 - (intent × 0.25 + outcome × 0.20 + scope × 0.20 + constraints × 0.15 + success × 0.10 + context × 0.10)
Readiness gate:
Non-goals must be explicit
Decision Boundaries must be explicit
- A pressure pass must be complete: at least one earlier answer has been revisited with an evidence, assumption, or tradeoff follow-up
- If either gate is unresolved, or the pressure pass is incomplete, continue interviewing even when weighted ambiguity is below threshold
2d) Report progress
Show weighted breakdown table, readiness-gate status (Non-goals, Decision Boundaries), and the next focus dimension.
2e) Persist state
Append round result and updated scores via state_write.
2f) Round controls
- Do not offer early exit before the first explicit assumption probe and one persistent follow-up have happened
- Round 4+: allow explicit early exit with risk warning
- Soft warning at profile midpoint (e.g., round 3/6/10 depending on profile)
- Hard cap at profile
max_rounds
Phase 3: Challenge Modes (assumption stress tests)
Use each mode once when applicable. These are normal escalation tools, not rare rescue moves:
- Contrarian (round 2+ or immediately when an answer rests on an untested assumption): challenge core assumptions
- Simplifier (round 4+ or when scope expands faster than outcome clarity): probe minimal viable scope
- Ontologist (round 5+ and ambiguity > 0.25, or when the user keeps describing symptoms): ask for essence-level reframing
Track used modes in state to prevent repetition.
Phase 4: Crystallize Artifacts
When threshold is met (or user exits with warning / hard cap):
- Write interview transcript summary to:
.omx/interviews/{slug}-{timestamp}.md
(kept for ralph PRD compatibility)
- Write execution-ready spec to:
.omx/specs/deep-interview-{slug}.md
Spec should include:
- Metadata (profile, rounds, final ambiguity, threshold, context type)
- Context snapshot reference/path (for ralplan/team reuse)
- Clarity breakdown table
- Intent (why the user wants this)
- Desired Outcome
- In-Scope
- Out-of-Scope / Non-goals
- Decision Boundaries (what OMX may decide without confirmation)
- Constraints
- Testable acceptance criteria
- Assumptions exposed + resolutions
- Pressure-pass findings (which answer was revisited, and what changed)
- Brownfield evidence vs inference notes for any repository-grounded confirmation questions
- Technical context findings
- Full or condensed transcript
Autoresearch specialization
When the clarified task is specifically about $autoresearch, or the skill is invoked with --autoresearch, keep the interview domain-specific and emit skill-consumable artifacts without skipping clarification.
- Accepted seed inputs:
topic, evaluator, keep-policy, slug, existing mission draft text, and prior evaluator examples/templates
- Required interview focus: mission clarity, evaluator readiness, keep policy, slug/session naming, and whether the draft is ready to launch now or should refine further
- Canonical artifact path:
.omx/specs/deep-interview-autoresearch-{slug}.md
- Launch artifact bundle:
.omx/specs/autoresearch-{slug}/mission.md, .omx/specs/autoresearch-{slug}/sandbox.md, and .omx/specs/autoresearch-{slug}/result.json
- Launch artifact directory:
.omx/specs/autoresearch-{slug}/
- Required artifact sections:
Mission Draft
Evaluator Draft
Launch Readiness
Seed Inputs
Confirmation Bridge
- Required launch artifacts under
.omx/specs/autoresearch-{slug}/:
mission.md
sandbox.md
result.json
- Launch-readiness rule: mark the draft as not launch-ready while the evaluator command still contains placeholder markers such as
<...>, TODO, TBD, REPLACE_ME, CHANGEME, or your-command-here
- Structured result contract:
result.json should point to the draft + mission/sandbox artifacts and carry the finalized topic, evaluatorCommand, keepPolicy, slug, launchReady, and blockedReasons fields so $autoresearch can consume it directly
- Confirmation bridge: after artifact generation, offer at least
refine further and launch; do not run direct CLI launch or detached/split tmux launch, and only hand off to $autoresearch after explicit confirmation
- Handoff rule: downstream execution must preserve the clarified mission intent, evaluator expectations, decision boundaries, and launch-readiness status from this artifact rather than bypassing the draft review step
Phase 5: Execution Bridge
Present execution options after artifact generation using explicit handoff contracts. Treat the deep-interview spec as the current requirements source of truth and preserve intent, non-goals, decision boundaries, acceptance criteria, and any residual-risk warnings across the handoff.
1. $ralplan (Recommended)
- Input Artifact:
.omx/specs/deep-interview-{slug}.md (optionally accompanied by the transcript/context snapshot for traceability)
- Invocation:
$plan --consensus --direct <spec-path>
- Consumer Behavior: Treat the deep-interview spec as the requirements source of truth. Do not repeat the interview by default; refine architecture/feasibility around the clarified intent and boundaries instead.
- Skipped / Already-Satisfied Stages: Requirements discovery, ambiguity clarification, and early intent-boundary elicitation
- Expected Output: Canonical planning artifacts under
.omx/plans/, especially prd-*.md and test-spec-*.md
- Best When: Requirements are clear enough to stop interviewing, but architectural validation / consensus planning is still desirable
- Next Recommended Step: Use the approved planning artifacts with
$autopilot, $ralph, or $team depending on the desired execution style
2. $autopilot
- Input Artifact:
.omx/specs/deep-interview-{slug}.md
- Invocation:
$autopilot <spec-path>
- Consumer Behavior: Use the deep-interview spec as the clarified execution brief. Preserve intent, non-goals, decision boundaries, and acceptance criteria as binding context for planning/execution.
- Skipped / Already-Satisfied Stages: Initial requirement discovery and ambiguity reduction
- Expected Output: Planning/execution progress, QA evidence, and validation artifacts produced by autopilot
- Best When: The clarified spec is already strong enough for direct planning + execution without an additional consensus gate
- Next Recommended Step: Continue through autopilot's execution/QA/validation flow; if coordination-heavy execution emerges, prefer a follow-up
$team or $ralph lane as appropriate
3. $ralph
- Input Artifact:
.omx/specs/deep-interview-{slug}.md
- Invocation:
$ralph <spec-path>
- Consumer Behavior: Use the spec's acceptance criteria and boundary constraints as the persistence target. Do not reopen requirements discovery unless the user explicitly asks to refine further.
- Skipped / Already-Satisfied Stages: Requirement interview, ambiguity clarification, and initial scope-definition work
- Expected Output: Iterative execution progress and verification evidence tracked against the clarified criteria
- Best When: The task benefits from persistent sequential completion pressure and the user wants execution to keep moving until the criteria are satisfied or a real blocker exists
- Next Recommended Step: Continue Ralph's persistence loop; if work expands into coordination-heavy lanes, hand off to
$team and keep Ralph for verification continuity
4. $team
- Input Artifact:
.omx/specs/deep-interview-{slug}.md
- Invocation:
$team <spec-path>
- Consumer Behavior: Treat the spec as shared execution context for coordinated parallel work. Preserve the clarified intent, non-goals, decision boundaries, and acceptance criteria as common lane constraints.
- Skipped / Already-Satisfied Stages: Requirement clarification and early ambiguity reduction
- Expected Output: Coordinated multi-agent execution against the shared spec, with evidence that can later feed a Ralph verification pass when appropriate
- Best When: The task is large, multi-lane, or blocker-sensitive enough to justify coordinated parallel execution instead of a single persistent loop
- Next Recommended Step: Follow the team verification path when the coordinated execution phase finishes; escalate to a separate Ralph loop only when a later persistent verification/fix owner is still needed
5. Refine further
- Input Artifact: Existing transcript, context snapshot, and current spec draft
- Invocation: Continue the interview loop
- Consumer Behavior: Re-enter questioning to resolve the highest-leverage remaining uncertainty
- Skipped / Already-Satisfied Stages: None beyond already-captured context
- Expected Output: A lower-ambiguity spec with tighter boundaries and fewer unresolved assumptions
- Best When: Residual ambiguity is still too high, the user wants stronger clarity, or the above-threshold / early-exit warning indicates too much risk to proceed cleanly
- Next Recommended Step: Return to one of the execution handoff contracts above once the spec is sufficiently clarified
Residual-Risk Rule: If the interview ended via early exit, hard-cap completion, or above-threshold proceed-with-warning, explicitly preserve that residual-risk state in the handoff so the downstream skill knows it inherited a partially clarified brief.
IMPORTANT: Deep-interview is a requirements mode. On handoff, invoke the selected skill using the contract above. Do NOT implement directly inside deep-interview.
[omx.deepInterview]
defaultProfile = "standard"
quickThreshold = 0.30
standardThreshold = 0.20
deepThreshold = 0.15
quickMaxRounds = 5
standardMaxRounds = 12
deepMaxRounds = 20
enableChallengeModes = true
Resume
If interrupted, rerun $deep-interview. Resume from persisted mode state via state_read(mode="deep-interview").
Recommended 3-Stage Pipeline
deep-interview -> ralplan -> autopilot
- Stage 1 (deep-interview): clarity gate
- Stage 2 (ralplan): feasibility + architecture gate
- Stage 3 (autopilot): execution + QA + validation gate
Task: {{ARGUMENTS}}
1---2name: deep-interview-23description: [OMX] Socratic deep interview with mathematical ambiguity gating before execution4---56<Purpose>7Deep Interview is an intent-first Socratic clarification loop before planning or implementation. It turns vague ideas into execution-ready specifications by asking targeted questions about why the user wants a change, how far it should go, what should stay out of scope, and what OMX may decide without confirmation.8</Purpose>910<Use_When>11- The request is broad, ambiguous, or missing concrete acceptance criteria12- The user says "deep interview", "interview me", "ask me everything", "don't assume", or "ouroboros"13- The user wants to avoid misaligned implementation from underspecified requirements14- You need a requirements artifact before handing off to `ralplan`, `autopilot`, `ralph`, or `team`15</Use_When>1617<Do_Not_Use_When>18- The request already has concrete file/symbol targets and clear acceptance criteria19- The user explicitly asks to skip planning/interview and execute immediately20- The user asks for lightweight brainstorming only (use `plan` instead)21- A complete PRD/plan already exists and execution should start22</Do_Not_Use_When>2324<Why_This_Exists>25Execution quality is usually bottlenecked by intent clarity, not just missing implementation detail. A single expansion pass often misses why the user wants a change, where the scope should stop, which tradeoffs are unacceptable, and which decisions still require user approval. This workflow applies Socratic pressure + quantitative ambiguity scoring so orchestration modes begin with an explicit, testable, intent-aligned spec.26</Why_This_Exists>2728<Depth_Profiles>29- **Quick (`--quick`)**: fast pre-PRD pass; target threshold `<= 0.30`; max rounds 530- **Standard (`--standard`, default)**: full requirement interview; target threshold `<= 0.20`; max rounds 1231- **Deep (`--deep`)**: high-rigor exploration; target threshold `<= 0.15`; max rounds 2032- **Autoresearch (`--autoresearch`)**: same interview rigor as Standard, but specialized for `$autoresearch` mission readiness and `.omx/specs/` artifact handoff3334If no flag is provided, use **Standard**.3536<Mode_Flags>37- **`--autoresearch`**: switch the interview into autoresearch-intake mode for `$autoresearch` handoff. In this mode, the interview should converge on a validator-ready research mission, write canonical artifacts under `.omx/specs/`, and preserve the explicit `refine further` vs `launch` boundary for downstream skill intake.38</Mode_Flags>39</Depth_Profiles>4041<Execution_Policy>42- Ask ONE question per round (never batch)43- Ask about intent and boundaries before implementation detail44- Target the weakest clarity dimension each round after applying the stage-priority rules below45- Treat every answer as a claim to pressure-test before moving on: the next question should usually demand evidence or examples, expose a hidden assumption, force a tradeoff or boundary, or reframe root cause vs symptom46- Do not rotate to a new clarity dimension just for coverage when the current answer is still vague; stay on the same thread until one layer deeper, one assumption clearer, or one boundary tighter47- Before crystallizing, complete at least one explicit pressure pass that revisits an earlier answer with a deeper, assumption-focused, or tradeoff-focused follow-up48- Gather codebase facts via `explore` before asking user about internals49- When session guidance enables `USE_OMX_EXPLORE_CMD`, prefer `omx explore` for simple read-only brownfield fact gathering; keep prompts narrow and concrete, and keep ambiguous or non-shell-only investigation on the richer normal path and fall back normally if `omx explore` is unavailable.50- Always run a preflight context intake before the first interview question51- Reduce user effort: ask only the highest-leverage unresolved question, and never ask the user for codebase facts that can be discovered directly52- For brownfield work, prefer evidence-backed confirmation questions such as "I found X in Y. Should this change follow that pattern?"53- In Codex CLI, deep-interview uses `omx question` as the required OMX-owned structured questioning path for every interview round54- If you launch `omx question` in a background terminal, immediately wait for that background terminal to finish and read its JSON answer before scoring ambiguity, asking another round, or handing off55- If `omx question` is unavailable in the current runtime, treat that as a blocker/error for deep-interview rather than falling back to `request_user_input` or plain-text questioning56- Re-score ambiguity after each answer and show progress transparently57- Do not hand off to execution while ambiguity remains above threshold unless user explicitly opts to proceed with warning58- Do not crystallize or hand off while `Non-goals` or `Decision Boundaries` remain unresolved, even if the weighted ambiguity threshold is met59- Treat early exit as a safety valve, not the default success path60- Persist mode state for resume safety (`state_write` / `state_read`)61</Execution_Policy>6263<Steps>6465## Phase 0: Preflight Context Intake66671. Parse `{{ARGUMENTS}}` and derive a short task slug.682. Attempt to load the latest relevant context snapshot from `.omx/context/{slug}-*.md`.693. If no snapshot exists, create a minimum context snapshot with:70 - Task statement71 - Desired outcome72 - Stated solution (what the user asked for)73 - Probable intent hypothesis (why they likely want it)74 - Known facts/evidence75 - Constraints76 - Unknowns/open questions77 - Decision-boundary unknowns78 - Likely codebase touchpoints794. Save snapshot to `.omx/context/{slug}-{timestamp}.md` (UTC `YYYYMMDDTHHMMSSZ`) and reference it in mode state.8081## Phase 1: Initialize82831. Parse `{{ARGUMENTS}}` and depth profile (`--quick|--standard|--deep`).842. Detect project context:85 - Run `explore` to classify **brownfield** (existing codebase target) vs **greenfield**.86 - For brownfield, collect relevant codebase context before questioning.873. Initialize state via `state_write(mode="deep-interview")`:8889```json90{91 "active": true,92 "current_phase": "deep-interview",93 "state": {94 "interview_id": "<uuid>",95 "profile": "quick|standard|deep",96 "type": "greenfield|brownfield",97 "initial_idea": "<user input>",98 "rounds": [],99 "current_ambiguity": 1.0,100 "threshold": 0.3,101 "max_rounds": 5,102 "challenge_modes_used": [],103 "codebase_context": null,104 "current_stage": "intent-first",105 "current_focus": "intent",106 "context_snapshot_path": ".omx/context/<slug>-<timestamp>.md"107 }108}109```1101114. Announce kickoff with profile, threshold, and current ambiguity.112113## Phase 2: Socratic Interview Loop114115Repeat until ambiguity `<= threshold`, the pressure pass is complete, the readiness gates are explicit, the user exits with warning, or max rounds are reached.116117### 2a) Generate next question118Use:119- Original idea120- Prior Q&A rounds121- Current dimension scores122- Brownfield context (if any)123- Activated challenge mode injection (Phase 3)124125Target the lowest-scoring dimension, but respect stage priority:126- **Stage 1 — Intent-first:** Intent, Outcome, Scope, Non-goals, Decision Boundaries127- **Stage 2 — Feasibility:** Constraints, Success Criteria128- **Stage 3 — Brownfield grounding:** Context Clarity (brownfield only)129130Follow-up pressure ladder after each answer:1311. Ask for a concrete example, counterexample, or evidence signal behind the latest claim1322. Probe the hidden assumption, dependency, or belief that makes the claim true1333. Force a boundary or tradeoff: what would you explicitly not do, defer, or reject?1344. If the answer still describes symptoms, reframe toward essence / root cause before moving on135136Prefer staying on the same thread for multiple rounds when it has the highest leverage. Breadth without pressure is not progress.137138Detailed dimensions:139- Intent Clarity — why the user wants this140- Outcome Clarity — what end state they want141- Scope Clarity — how far the change should go142- Constraint Clarity — technical or business limits that must hold143- Success Criteria Clarity — how completion will be judged144- Context Clarity — existing codebase understanding (brownfield only)145146`Non-goals` and `Decision Boundaries` are mandatory readiness gates. Ask about them early and keep revisiting them until they are explicit.147148### 2b) Ask the question149Use OMX-owned structured questioning via `omx question` for every interview round (this is the required `AskUserQuestion` equivalent for deep-interview) and present:150151```152Round {n} | Target: {weakest_dimension} | Ambiguity: {score}%153154{question}155```156157`omx question` payload guidance for interview rounds:158- Use canonical `type` values instead of authoring raw `multi_select` flags by hand. `type: "single-answerable"` is the default for one-path decisions; `type: "multi-answerable"` is the canonical shape for bounded multi-select rounds. The runtime will keep `multi_select` aligned with `type`.159- Use `single-answerable` when exactly one answer should drive the next branch, the options are mutually exclusive, or selecting more than one answer would blur the decision boundary. Typical cases: handoff lane selection, choosing the primary failure mode, or confirming which of several competing interpretations is correct.160- Use `multi-answerable` when multiple options may all be true at once and you need to capture a bounded set of coexisting constraints, non-goals, risks, or acceptance checks in one round. Typical cases: selecting all out-of-scope items, all success metrics that must hold, or all deployment constraints that apply together.161- If one selected option would immediately require a follow-up question to disambiguate the others, prefer a `single-answerable` round now and ask the follow-up next. Do not hide a branching interview tree inside one overloaded multi-select prompt.162- Keep interview options bounded and concrete. If the valid answers are already known, set `allow_other: false`; only leave `allow_other: true` when the interview genuinely needs one user-supplied option that cannot be enumerated in advance.163- Read answers structurally. For `single-answerable`, expect one decisive selection in `answer.value` plus `answer.selected_values`. For `multi-answerable`, treat `answer.selected_values` as the source of truth for all chosen constraints/non-goals and preserve the full set in the transcript/spec.164165Canonical bounded single-choice payload:166167```json168{169 "question": "Which execution lane should own this once the interview is complete?",170 "type": "single-answerable",171 "options": [172 {173 "label": "Plan first",174 "value": "ralplan",175 "description": "Need architecture and test-shape review before execution"176 },177 {178 "label": "Execute directly",179 "value": "autopilot",180 "description": "Requirements are already explicit enough for planning plus execution"181 },182 {183 "label": "Refine further",184 "value": "refine",185 "description": "Clarification is still needed before any handoff"186 }187 ],188 "allow_other": false,189 "other_label": "Other",190 "source": "deep-interview"191}192```193194Canonical bounded multi-select payload:195196```json197{198 "question": "Which non-goals must stay out of scope for the first pass?",199 "type": "multi-answerable",200 "options": [201 {202 "label": "No UI redesign",203 "value": "no-ui-redesign",204 "description": "Keep layout and styling unchanged"205 },206 {207 "label": "No new dependencies",208 "value": "no-new-dependencies",209 "description": "Work within the existing toolchain"210 },211 {212 "label": "No API contract changes",213 "value": "no-api-contract-changes",214 "description": "Preserve external request and response shapes"215 }216 ],217 "allow_other": false,218 "other_label": "Other",219 "source": "deep-interview"220}221```222223Canonical answer-shape reminders:224225```json226{227 "answer": {228 "kind": "option",229 "value": "ralplan",230 "selected_labels": ["Plan first"],231 "selected_values": ["ralplan"]232 }233}234```235236```json237{238 "answer": {239 "kind": "multi",240 "value": ["no-new-dependencies", "no-api-contract-changes"],241 "selected_labels": ["No new dependencies", "No API contract changes"],242 "selected_values": ["no-new-dependencies", "no-api-contract-changes"]243 }244}245```246247### 2c) Score ambiguity248Score each weighted dimension in `[0.0, 1.0]` with justification + gap.249250Greenfield: `ambiguity = 1 - (intent × 0.30 + outcome × 0.25 + scope × 0.20 + constraints × 0.15 + success × 0.10)`251252Brownfield: `ambiguity = 1 - (intent × 0.25 + outcome × 0.20 + scope × 0.20 + constraints × 0.15 + success × 0.10 + context × 0.10)`253254Readiness gate:255- `Non-goals` must be explicit256- `Decision Boundaries` must be explicit257- A pressure pass must be complete: at least one earlier answer has been revisited with an evidence, assumption, or tradeoff follow-up258- If either gate is unresolved, or the pressure pass is incomplete, continue interviewing even when weighted ambiguity is below threshold259260### 2d) Report progress261Show weighted breakdown table, readiness-gate status (`Non-goals`, `Decision Boundaries`), and the next focus dimension.262263### 2e) Persist state264Append round result and updated scores via `state_write`.265266### 2f) Round controls267- Do not offer early exit before the first explicit assumption probe and one persistent follow-up have happened268- Round 4+: allow explicit early exit with risk warning269- Soft warning at profile midpoint (e.g., round 3/6/10 depending on profile)270- Hard cap at profile `max_rounds`271272## Phase 3: Challenge Modes (assumption stress tests)273274Use each mode once when applicable. These are normal escalation tools, not rare rescue moves:275276- **Contrarian** (round 2+ or immediately when an answer rests on an untested assumption): challenge core assumptions277- **Simplifier** (round 4+ or when scope expands faster than outcome clarity): probe minimal viable scope278- **Ontologist** (round 5+ and ambiguity > 0.25, or when the user keeps describing symptoms): ask for essence-level reframing279280Track used modes in state to prevent repetition.281282## Phase 4: Crystallize Artifacts283284When threshold is met (or user exits with warning / hard cap):2852861. Write interview transcript summary to:287 - `.omx/interviews/{slug}-{timestamp}.md` 288 (kept for ralph PRD compatibility)2892. Write execution-ready spec to:290 - `.omx/specs/deep-interview-{slug}.md`291292Spec should include:293- Metadata (profile, rounds, final ambiguity, threshold, context type)294- Context snapshot reference/path (for ralplan/team reuse)295- Clarity breakdown table296- Intent (why the user wants this)297- Desired Outcome298- In-Scope299- Out-of-Scope / Non-goals300- Decision Boundaries (what OMX may decide without confirmation)301- Constraints302- Testable acceptance criteria303- Assumptions exposed + resolutions304- Pressure-pass findings (which answer was revisited, and what changed)305- Brownfield evidence vs inference notes for any repository-grounded confirmation questions306- Technical context findings307- Full or condensed transcript308309### Autoresearch specialization310311When the clarified task is specifically about `$autoresearch`, or the skill is invoked with `--autoresearch`, keep the interview domain-specific and emit skill-consumable artifacts without skipping clarification.312313- **Accepted seed inputs:** `topic`, `evaluator`, `keep-policy`, `slug`, existing mission draft text, and prior evaluator examples/templates314- **Required interview focus:** mission clarity, evaluator readiness, keep policy, slug/session naming, and whether the draft is ready to launch now or should refine further315- **Canonical artifact path:** `.omx/specs/deep-interview-autoresearch-{slug}.md`316- **Launch artifact bundle:** `.omx/specs/autoresearch-{slug}/mission.md`, `.omx/specs/autoresearch-{slug}/sandbox.md`, and `.omx/specs/autoresearch-{slug}/result.json`317- **Launch artifact directory:** `.omx/specs/autoresearch-{slug}/`318- **Required artifact sections:**319 - `Mission Draft`320 - `Evaluator Draft`321 - `Launch Readiness`322 - `Seed Inputs`323 - `Confirmation Bridge`324- **Required launch artifacts under `.omx/specs/autoresearch-{slug}/`:**325 - `mission.md`326 - `sandbox.md`327 - `result.json`328- **Launch-readiness rule:** mark the draft as **not launch-ready** while the evaluator command still contains placeholder markers such as `<...>`, `TODO`, `TBD`, `REPLACE_ME`, `CHANGEME`, or `your-command-here`329- **Structured result contract:** `result.json` should point to the draft + mission/sandbox artifacts and carry the finalized `topic`, `evaluatorCommand`, `keepPolicy`, `slug`, `launchReady`, and `blockedReasons` fields so `$autoresearch` can consume it directly330- **Confirmation bridge:** after artifact generation, offer at least `refine further` and `launch`; do not run direct CLI launch or detached/split tmux launch, and only hand off to `$autoresearch` after explicit confirmation331- **Handoff rule:** downstream execution must preserve the clarified mission intent, evaluator expectations, decision boundaries, and launch-readiness status from this artifact rather than bypassing the draft review step332333## Phase 5: Execution Bridge334335Present execution options after artifact generation using explicit handoff contracts. Treat the deep-interview spec as the current requirements source of truth and preserve intent, non-goals, decision boundaries, acceptance criteria, and any residual-risk warnings across the handoff.336337### 1. **`$ralplan` (Recommended)**338- **Input Artifact:** `.omx/specs/deep-interview-{slug}.md` (optionally accompanied by the transcript/context snapshot for traceability)339- **Invocation:** `$plan --consensus --direct <spec-path>`340- **Consumer Behavior:** Treat the deep-interview spec as the requirements source of truth. Do not repeat the interview by default; refine architecture/feasibility around the clarified intent and boundaries instead.341- **Skipped / Already-Satisfied Stages:** Requirements discovery, ambiguity clarification, and early intent-boundary elicitation342- **Expected Output:** Canonical planning artifacts under `.omx/plans/`, especially `prd-*.md` and `test-spec-*.md`343- **Best When:** Requirements are clear enough to stop interviewing, but architectural validation / consensus planning is still desirable344- **Next Recommended Step:** Use the approved planning artifacts with `$autopilot`, `$ralph`, or `$team` depending on the desired execution style345346### 2. **`$autopilot`**347- **Input Artifact:** `.omx/specs/deep-interview-{slug}.md`348- **Invocation:** `$autopilot <spec-path>`349- **Consumer Behavior:** Use the deep-interview spec as the clarified execution brief. Preserve intent, non-goals, decision boundaries, and acceptance criteria as binding context for planning/execution.350- **Skipped / Already-Satisfied Stages:** Initial requirement discovery and ambiguity reduction351- **Expected Output:** Planning/execution progress, QA evidence, and validation artifacts produced by autopilot352- **Best When:** The clarified spec is already strong enough for direct planning + execution without an additional consensus gate353- **Next Recommended Step:** Continue through autopilot's execution/QA/validation flow; if coordination-heavy execution emerges, prefer a follow-up `$team` or `$ralph` lane as appropriate354355### 3. **`$ralph`**356- **Input Artifact:** `.omx/specs/deep-interview-{slug}.md`357- **Invocation:** `$ralph <spec-path>`358- **Consumer Behavior:** Use the spec's acceptance criteria and boundary constraints as the persistence target. Do not reopen requirements discovery unless the user explicitly asks to refine further.359- **Skipped / Already-Satisfied Stages:** Requirement interview, ambiguity clarification, and initial scope-definition work360- **Expected Output:** Iterative execution progress and verification evidence tracked against the clarified criteria361- **Best When:** The task benefits from persistent sequential completion pressure and the user wants execution to keep moving until the criteria are satisfied or a real blocker exists362- **Next Recommended Step:** Continue Ralph's persistence loop; if work expands into coordination-heavy lanes, hand off to `$team` and keep Ralph for verification continuity363364### 4. **`$team`**365- **Input Artifact:** `.omx/specs/deep-interview-{slug}.md`366- **Invocation:** `$team <spec-path>`367- **Consumer Behavior:** Treat the spec as shared execution context for coordinated parallel work. Preserve the clarified intent, non-goals, decision boundaries, and acceptance criteria as common lane constraints.368- **Skipped / Already-Satisfied Stages:** Requirement clarification and early ambiguity reduction369- **Expected Output:** Coordinated multi-agent execution against the shared spec, with evidence that can later feed a Ralph verification pass when appropriate370- **Best When:** The task is large, multi-lane, or blocker-sensitive enough to justify coordinated parallel execution instead of a single persistent loop371- **Next Recommended Step:** Follow the team verification path when the coordinated execution phase finishes; escalate to a separate Ralph loop only when a later persistent verification/fix owner is still needed372373### 5. **Refine further**374- **Input Artifact:** Existing transcript, context snapshot, and current spec draft375- **Invocation:** Continue the interview loop376- **Consumer Behavior:** Re-enter questioning to resolve the highest-leverage remaining uncertainty377- **Skipped / Already-Satisfied Stages:** None beyond already-captured context378- **Expected Output:** A lower-ambiguity spec with tighter boundaries and fewer unresolved assumptions379- **Best When:** Residual ambiguity is still too high, the user wants stronger clarity, or the above-threshold / early-exit warning indicates too much risk to proceed cleanly380- **Next Recommended Step:** Return to one of the execution handoff contracts above once the spec is sufficiently clarified381382**Residual-Risk Rule:** If the interview ended via early exit, hard-cap completion, or above-threshold proceed-with-warning, explicitly preserve that residual-risk state in the handoff so the downstream skill knows it inherited a partially clarified brief.383384**IMPORTANT:** Deep-interview is a requirements mode. On handoff, invoke the selected skill using the contract above. **Do NOT implement directly** inside deep-interview.385386</Steps>387388<Tool_Usage>389- Use `explore` for codebase fact gathering390- Use `omx question` as the OMX-native structured user-input tool for each interview round391- If `omx question` is unavailable in the current runtime, stop and surface that deep-interview requires the OMX question tool rather than falling back to another questioning path392- Use `state_write` / `state_read` for resumable mode state393- Read/write context snapshots under `.omx/context/`394- Save transcript/spec artifacts under `.omx/interviews/` and `.omx/specs/`395</Tool_Usage>396397<Escalation_And_Stop_Conditions>398- User says stop/cancel/abort -> persist state and stop399- Ambiguity stalls for 3 rounds (+/- 0.05) -> force Ontologist mode once400- Max rounds reached -> proceed with explicit residual-risk warning401- All dimensions >= 0.9 -> allow early crystallization even before max rounds402</Escalation_And_Stop_Conditions>403404<Final_Checklist>405- [ ] Preflight context snapshot exists under `.omx/context/{slug}-{timestamp}.md`406- [ ] Ambiguity score shown each round407- [ ] Intent-first stage priority used before implementation detail408- [ ] Weakest-dimension targeting used within the active stage409- [ ] At least one explicit assumption probe happened before crystallization410- [ ] At least one persistent follow-up / pressure pass deepened a prior answer411- [ ] Challenge modes triggered at thresholds (when applicable)412- [ ] Transcript written to `.omx/interviews/{slug}-{timestamp}.md`413- [ ] Spec written to `.omx/specs/deep-interview-{slug}.md`414- [ ] Brownfield questions use evidence-backed confirmation when applicable415- [ ] Handoff options provided (`$ralplan`, `$autopilot`, `$ralph`, `$team`)416- [ ] No direct implementation performed in this mode417</Final_Checklist>418419<Advanced>420## Suggested Config (optional)421422```toml423[omx.deepInterview]424defaultProfile = "standard"425quickThreshold = 0.30426standardThreshold = 0.20427deepThreshold = 0.15428quickMaxRounds = 5429standardMaxRounds = 12430deepMaxRounds = 20431enableChallengeModes = true432```433434## Resume435436If interrupted, rerun `$deep-interview`. Resume from persisted mode state via `state_read(mode="deep-interview")`.437438## Recommended 3-Stage Pipeline439440```441deep-interview -> ralplan -> autopilot442```443444- Stage 1 (deep-interview): clarity gate445- Stage 2 (ralplan): feasibility + architecture gate446- Stage 3 (autopilot): execution + QA + validation gate447</Advanced>448449Task: {{ARGUMENTS}}