with one click
deep-interview
// Socratic deep interview with mathematical ambiguity gating before execution
// Socratic deep interview with mathematical ambiguity gating before execution
Alias for $plan --consensus
[OMX] Strict autonomous loop: $deep-interview -> $ralplan -> $ultragoal (+ $team if needed) -> $code-review -> $ultraqa
N coordinated agents on shared task list using tmux-based orchestration
Team worker protocol (ACK, mailbox, task lifecycle) for tmux-based OMX teams
Run a comprehensive code review
Create and execute durable repo-native multi-goal plans over Codex goal mode artifacts.
| name | deep-interview |
| description | Socratic deep interview with mathematical ambiguity gating before execution |
| argument-hint | [--quick|--standard|--deep] [--autoresearch] <idea or vague description> |
<Use_When>
ralplan, autopilot, ralph, or team
</Use_When><Do_Not_Use_When>
plan instead)<Why_This_Exists> Execution 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. </Why_This_Exists>
<Depth_Profiles>
--quick): fast pre-PRD pass; target threshold <= 0.30; max rounds 5--standard, default): full requirement interview; target threshold <= 0.20; max rounds 12--deep): high-rigor exploration; target threshold <= 0.15; max rounds 20--autoresearch): same interview rigor as Standard, but specialized for $autoresearch mission readiness and .omx/specs/ artifact handoffProfile max rounds is a hard cap, not a target. Do not continue only to reach a numbered round count. Extra Socratic rigor does not override the active threshold unless the profile/config changes.
If no flag is provided, use Standard.
<Mode_Flags>
--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.
</Mode_Flags>
</Depth_Profiles><Execution_Policy>
questions[] form)explore before asking user about internalsomx explore is deprecated. Use normal repository inspection tools/subagents for simple read-only brownfield fact gathering; use omx sparkshell only for explicit shell-native read-only evidence, and keep ambiguous or non-shell-only investigation on the richer normal path.$best-practice-research as the bounded evidence wrapper before crystallizing requirements or handing off to planning/execution.omx question source values, and never replace the runtime source: "deep-interview" contract for user-facing deep-interview questions:
[from-code][auto-confirmed] — exact, high-confidence codebase facts from manifests/configs or direct source evidence, with no prescription attached.[from-code] — codebase findings that are useful but inferred, pattern-based, or low/medium confidence and therefore need a confirmation-style user-facing round before being treated as settled.[from-research] — externally sourced facts such as API limits, compatibility, or public documentation; facts only, not decisions.[from-user] — goals, preferences, business logic, scope, non-goals, acceptance criteria, tradeoffs, and any decision-bearing interpretation.[from-code][auto-confirmed] and other non-user fact discoveries as context/transcript updates, not interview rounds: do not call omx question, do not create a pending deep-interview question obligation, and do not increment the user-facing round number for facts the agent can safely establish.[from-user] even when code or research facts are available.omx question as the required OMX-owned structured questioning path for every interview roundomx question through attached-tmux Bash/tool paths, preserve the leader-pane return target by prefixing the command with OMX_QUESTION_RETURN_PANE=$TMUX_PANE (or a concrete %pane value)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 offanswers[] as the primary omx question success contract. For a single interview round, read answers[0].answer; use legacy top-level answer only as a compatibility fallback when needed.omx question, use the native structured question tool when available; otherwise ask exactly one concise plain-text question and wait for the answermax_rounds as a stop cap, not evidence that more rounds are needed.Non-goals or Decision Boundaries remain unresolved, even if the weighted ambiguity threshold is metomx state write/read --input '<json>' --json); use state_write / state_read only when explicit MCP compatibility is enabled
</Execution_Policy>{{ARGUMENTS}} and derive a short task slug..omx/context/{slug}-*.md.not_needed, needed, or recorded).omx/context/{slug}-{timestamp}.md (UTC YYYYMMDDTHHMMSSZ) and reference it in mode state.{{ARGUMENTS}} and depth profile (--quick|--standard|--deep).explore to classify brownfield (existing codebase target) vs greenfield.omx state write --input '{"mode":"deep-interview","active":true}' --json:{
"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"
}
}
Repeat until ambiguity <= threshold, the pressure pass is complete, the readiness gates are explicit, the user exits with warning, or max rounds are reached. This is a stop condition: below threshold, do not open a new ordinary interview branch.
If the initial context is oversized and no prompt-safe summary has been recorded yet, the next question must be only a summary request. Do not score ambiguity, do not run readiness gates, and do not hand off to $ralplan, $autopilot, $ralph, or $team until that summary answer is captured.
Use:
Target the lowest-scoring dimension, but respect stage priority:
Follow-up pressure ladder after each answer:
Prefer staying on the same thread for multiple rounds when it has the highest leverage. Breadth without pressure is not progress.
Maintain a Breadth Ledger across independent ambiguity tracks: scope, constraints, outputs, verification, brownfield integration, and any user-mentioned deliverable tracks. The ledger is a guard, not a mandatory rotation rule: stay deep on the current thread until it has been pressure-tested, then zoom out only when another material track remains unresolved and would change execution.
Detailed dimensions:
Non-goals and Decision Boundaries are mandatory readiness gates. Ask about them early and keep revisiting them until they are explicit.
Use the surface-appropriate structured questioning path for every interview round. In attached-tmux sessions, use OMX-owned structured questioning via omx question (this is the required structured-question equivalent and required AskUserQuestion equivalent for deep-interview). Outside tmux, use native structured input when available; otherwise ask exactly one concise plain-text question and wait for the answer. Present:
Round {n} | Target: {weakest_dimension} | Ambiguity: {score}%
{question}
omx question payload guidance for interview rounds:
questions[] to combine multiple interview rounds, even though omx question supports batch forms for other workflows.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.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.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.single-answerable round now and ask the follow-up next. Do not hide a branching interview tree inside one overloaded multi-select prompt.allow_other: false; only leave allow_other: true when the interview genuinely needs one user-supplied option that cannot be enumerated in advance.answers[] array. For a normal single-round interview response, use answers[0].answer as the source of truth; the top-level answer field is a legacy single-question projection/fallback only.single-answerable, expect one decisive selection in the value field of answers[0].answer plus its selected-values metadata. For multi-answerable, treat the selected-values field inside answers[0].answer as the source of truth for all chosen constraints/non-goals and preserve the full set in the transcript/spec. In legacy single-question projections, this is equivalent to: For multi-answerable, treat answer.selected_values as the source of truth.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"]
}
}
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 explicitDecision Boundaries must be explicit<= 0.10, another user-facing question is allowed only as that final closure question; otherwise crystallize immediately.Show weighted breakdown table, readiness-gate status (Non-goals, Decision Boundaries), and the next focus dimension.
Append round result and updated scores via omx state write --input '<json>' --json; use state_write only when explicit MCP compatibility is enabled.
[from-code][auto-confirmed], [from-code], or [from-research]). After 3 consecutive non-user or confirmation answers, the next material user-facing round must solicit direct human judgment ([from-user]) unless the closure audit says the interview is ready to crystallize.max_rounds; never treat this cap as a desired interview length or quotaUse each mode once when applicable. These are normal escalation tools, not rare rescue moves:
Track used modes in state to prevent repetition.
When threshold is met (or user exits with warning / hard cap):
.omx/interviews/{slug}-{timestamp}.md.omx/specs/deep-interview-{slug}.mdSpec should include:
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.
topic, evaluator, keep-policy, slug, existing mission draft text, and prior evaluator examples/templates.omx/specs/deep-interview-autoresearch-{slug}.md.omx/specs/autoresearch-{slug}/mission.md, .omx/specs/autoresearch-{slug}/sandbox.md, and .omx/specs/autoresearch-{slug}/result.json.omx/specs/autoresearch-{slug}/Mission DraftEvaluator DraftLaunch ReadinessSeed InputsConfirmation Bridge.omx/specs/autoresearch-{slug}/:
mission.mdsandbox.mdresult.json<...>, TODO, TBD, REPLACE_ME, CHANGEME, or your-command-hereresult.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 directlyrefine further and launch; do not run direct CLI launch or detached/split tmux launch, and only hand off to $autoresearch after explicit confirmationPresent 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.
Include these product-facing suggestions when they fit the clarified spec, without removing the existing $ralplan, $autopilot, $ralph, and $team handoff options:
$ultragoal — default goal-mode follow-up for implementation or general goal-oriented follow-up specs that should be converted into durable Codex/OMX goals with sequential completion tracking.$autoresearch-goal — use when the clarified context is a research project: a research question, reference/literature gathering, evaluator-backed analysis, or professor/critic-style deliverable.$performance-goal — use when the clarified context is an optimization or performance project with measurable speed, latency, throughput, memory, benchmark, or evaluator criteria.Recommend $ultragoal as the default durable goal-mode follow-up because it supersedes Ralph for goal tracking. Preserve $team for coordinated parallel implementation and keep $ralph only as an explicit fallback for persistent single-owner execution/verification when the user specifically selects it.
$ralplan (Recommended).omx/specs/deep-interview-{slug}.md (optionally accompanied by the transcript/context snapshot for traceability)$plan --consensus --direct <spec-path>.omx/plans/, especially prd-*.md and test-spec-*.md$ultragoal as the default durable goal-mode follow-up (optionally with $team for parallel lanes); choose $autoresearch-goal for research validation or $performance-goal for measurable optimization, and use $ralph only as an explicit fallback when a narrow single-owner persistence loop is requested$autopilot.omx/specs/deep-interview-{slug}.md$autopilot <spec-path>$team under a leader-owned $ultragoal ledger, using $ralph only as an explicit fallback when a narrow single-owner persistence loop is requested$ralph (Explicit fallback only).omx/specs/deep-interview-{slug}.md$ralph <spec-path>$ultragoal for durable goal tracking and completion checkpoints$team under $ultragoal checkpointing rather than promoting Ralph as the next default$team.omx/specs/deep-interview-{slug}.md$team <spec-path>$ultragoal by default, escalating to a separate Ralph loop only when the user explicitly asks for that persistent verification/fix ownerResidual-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.
<Tool_Usage>
explore for codebase fact gatheringomx question as the OMX-native structured user-input tool for each interview round when an attached tmux renderer is availableOMX_QUESTION_RETURN_PANE=$TMUX_PANE omx question ... unless an explicit %pane return target is already knownomx question, use native structured input when available; otherwise ask exactly one concise plain-text question and wait for the answeromx question returns JSON, prefer answers[0].answer / answers[]; use legacy answer only as a fallback for older recordsomx state write/read --input '<json>' --json for resumable mode state; state_write / state_read are explicit MCP compatibility fallbacks onlyomx question round, persist the blocker as terminal state with active: false and current_phase: "blocked"; do not write a terminal blocked phase with active: true.omx/context/.omx/interviews/ and .omx/specs/
</Tool_Usage><Escalation_And_Stop_Conditions>
<Final_Checklist>
.omx/context/{slug}-{timestamp}.md.omx/interviews/{slug}-{timestamp}.md.omx/specs/deep-interview-{slug}.md$ralplan, $autopilot, $ralph, $team) plus context-sensitive goal-mode suggestions ($ultragoal, $autoresearch-goal, $performance-goal) when applicableDeep-interview reads runtime defaults from the first existing config source in this order:
.omx/config.tomlomx.toml~/.omx/config.tomlThis section is currently a deep-interview-specific runtime override surface, not a general replacement for Codex config.toml or .omx-config.json model/env routing.
Malformed config files are ignored fail-soft so $deep-interview activation can continue with built-in defaults.
Explicit --quick, --standard, or --deep invocation flags override defaultProfile.
[omx.deepInterview]
defaultProfile = "standard"
quickThreshold = 0.30
standardThreshold = 0.20
deepThreshold = 0.15
quickMaxRounds = 5
standardMaxRounds = 12
deepMaxRounds = 20
enableChallengeModes = true
If interrupted, rerun $deep-interview. Resume from persisted mode state via omx state read --input '{"mode":"deep-interview"}' --json.
deep-interview -> ralplan -> autopilot