[OMX] Strict autonomous loop: $deep-interview -> $ralplan -> $ultragoal (+ $team if needed) -> $code-review -> $ultraqa
62
72%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./plugins/oh-my-codex/skills/autopilot/SKILL.md$deep-interview -> $ralplan -> $ultragoal (+ $team if needed) -> $code-review -> $ultraqaIf $code-review or $ultraqa is not clean, Autopilot returns to $ralplan with the findings as the next planning input, then continues again through $ultragoal, $code-review, and $ultraqa until the gates are clean or a hard blocker is reported. Ralph is a legacy/explicit alternate execution loop only; do not advertise Ralph as the default Autopilot path.
<Use_When>
$autopilot, "autopilot", "auto pilot", "autonomous", "build me", "create me", "make me", "full auto", "handle it all", or "I want a/an..."<Do_Not_Use_When>
$plan / $ralplan$ultragoal, $ralph only when explicitly requested, or direct executor work$code-review
</Do_Not_Use_When><Strict_Loop_Contract> Autopilot must not run a separate broad expansion/planning/execution/QA/validation lifecycle as its primary behavior. It delegates those concerns to the canonical workflow phases below:
Phase deep-interview — Socratic requirements clarification gate
$deep-interview to clarify intent, scope, non-goals, constraints, and decision boundaries.max_rounds is a cap, not a target.omx question, re-score ambiguity against the active profile threshold. Ask another question only when a readiness gate is still unresolved and the answer would materially change execution; otherwise crystallize the spec and hand off.$ralplan, including an explicit interview-complete rationale when leaving deep-interview.Phase ralplan — consensus planning gate
planning_routing in state before heavy planning. When the Autopilot/main model resolves to a cheap/mini lane (for example o4-mini, *-mini, *spark*, or an explicitly cheap/economy/lite model name), the initial planning/decomposition owner is dedicated [planner]; otherwise [main] may keep ownership for backward compatibility. A configured agentModels.planner is an explicit opt-in that forces dedicated [planner] ownership even when [main] is not cheap/mini.$ralplan to produce/update PRD and test-spec artifacts. If planning_routing.owner is planner, use the dedicated [planner] role for the initial Planner draft/decomposition before the Architect→Critic consensus gates.Architect approval first and a subsequent Critic approval second.return_to_ralplan_reason and the findings as first-class planning input.ralplan or report an explicit blocker/max-iteration outcome; do not progress to $ultragoal, $team, $ralph, or implementation.ralplan_consensus_gate evidence suitable for $ultragoal.Phase ultragoal — durable implementation + verification loop
$ultragoal from the approved ralplan artifacts..omx/ultragoal ledger checkpoints, implementation, tests, build/lint/typecheck evidence, cleanup, and final review gate discipline.$team only inside an active Ultragoal story when the story clearly benefits from coordinated parallel execution (for example independent file/module lanes, broad test matrix work, or multi-domain implementation). Team remains explicit and leader-owned; Ultragoal keeps the goal/ledger state.$code-review.Phase code-review — merge-readiness gate
$code-review on the diff/artifacts produced by $ultragoal.APPROVE with architectural status CLEAR.COMMENT, REQUEST CHANGES, any architectural WATCH/BLOCK, or any unresolved finding is not clean.review_verdict, set current_phase:"rework", and carry the findings as the sanctioned execution-fix input. Return to Phase ralplan only when the review shows the plan/requirements are wrong or incomplete.Phase ultraqa — adversarial QA gate
$ultraqa after a clean code review when user-facing behavior, workflows, CLI/runtime behavior, integration surfaces, or regression risk warrant adversarial QA.ultraqa as skipped with an explicit condition and evidence.return_to_ralplan_reason, and transition back to Phase ralplan.The only normal terminal state is complete after clean code review and a passed or explicitly skipped UltraQA gate. Cancellation, blocked credentials, unrecoverable repeated failures, or explicit user stop may terminate earlier with preserved state.
</Strict_Loop_Contract>
<Execution_Policy>
deep-interview, then ralplan, then ultragoal, then code-review, then ultraqa.$team is conditional and explicit: use it only within an Ultragoal story when parallel execution materially improves throughput, quality, or safety.$deep-interview and $ralplan.$code-review that requires implementation repair enters Phase rework; a non-clean review that changes the plan/requirements, or failed $ultraqa, returns to $ralplan..omx/state, $deep-interview, $ralplan, $ultragoal, optional $team, $code-review, $ultraqa, and pipeline primitives; do not invent a separate execution framework.$ralph as an intentional alternate execution phase, but do not present it as Autopilot's default recommended loop.<State_Management>
Use the CLI-first state surface (omx state ... --json) for Autopilot lifecycle state. State must be session-aware when a session id exists. If the explicit MCP compatibility surface is already available, equivalent omx_state tool calls remain acceptable but are not required.
Inside active Autopilot, named child phases such as $ralplan are supervised phases, not peer workflow activations: keep mode:"autopilot" active and update current_phase:"ralplan" rather than starting standalone mode:"ralplan" over Autopilot.
Required fields:
{
"mode": "autopilot",
"active": true,
"current_phase": "deep-interview",
"iteration": 1,
"review_cycle": 0,
"max_iterations": 10,
"phase_cycle": ["deep-interview", "ralplan", "ultragoal", "code-review", "ultraqa"],
"handoff_artifacts": {
"context_snapshot_path": ".omx/context/<slug>-<timestamp>.md",
"deep_interview": null,
"ralplan": null,
"ralplan_consensus_gate": {
"required": true,
"sequence": ["architect-review", "critic-review"],
"planning_artifacts_are_not_consensus": true,
"required_review_roles": ["architect", "critic"],
"ralplan_architect_review": null,
"ralplan_critic_review": null,
"complete": false
},
"ultragoal": null,
"code_review": null,
"ultraqa": null
},
"review_verdict": null,
"qa_verdict": null,
"return_to_ralplan_reason": null
}omx state write --input '{"mode":"autopilot","active":true,"current_phase":"deep-interview","iteration":1,"review_cycle":0,"state":{"phase_cycle":["deep-interview","ralplan","ultragoal","code-review","ultraqa"],"handoff_artifacts":{"context_snapshot_path":"<snapshot-path>","deep_interview":null,"ralplan":null,"ralplan_consensus_gate":{"required":true,"sequence":["architect-review","critic-review"],"planning_artifacts_are_not_consensus":true,"required_review_roles":["architect","critic"],"ralplan_architect_review":null,"ralplan_critic_review":null,"complete":false},"ultragoal":null,"code_review":null,"ultraqa":null},"review_verdict":null,"qa_verdict":null,"return_to_ralplan_reason":null}}' --jsondeep_interview_gate:{"status":"complete","rationale":"<why requirements are complete>","handoff_summary":"<summary>"} (or equivalent non-empty rationale/summary) plus the clarified spec/requirements under handoff_artifacts.deep_interview; if a final omx question was involved, keep its same-session answered record linked by question_id/satisfied_at. For skip, persist deep_interview_gate:{"status":"skipped","skip_authorized_by_user":true,"skip_reason":"<user-authorized reason>","skipped_at":"<timestamp>","source":"user","session_id":"<session>"}. Do not leave deep-interview merely because the first omx question was answered or cleared.
execution_contract_required:true, persist a complete structured execution_contract under handoff_artifacts.deep_interview before leaving deep-interview. The canonical schema is version:1, execution_stride:"task"|"deliverable"|"milestone", source:"deep-interview", selected_by:"user"|"default", allow_task_shrink:<boolean>, non-empty completion_unit, non-empty stop_condition, acceptance_coverage_scope:"task"|"deliverable"|"milestone", and shrink_policy:"allowed"|"ask_before_shrink"|"deny_unless_blocked".execution_contract_required:true: task means allow_task_shrink:true, acceptance_coverage_scope:"task", shrink_policy:"allowed"; deliverable means allow_task_shrink:false, acceptance_coverage_scope:"deliverable", shrink_policy:"ask_before_shrink"; milestone means allow_task_shrink:false, acceptance_coverage_scope:"milestone", shrink_policy:"deny_unless_blocked".execution_contract_required is absent or false. Do not infer stride from prose, broadness, phase names, snapshots, or task size; this foundation only validates an explicit structured contract and deliberately uses milestone rather than phase. New artifacts must write canonical snake_case keys under handoff_artifacts.deep_interview; the runtime may read legacy camelCase field/marker aliases and direct/nested execution_contract locations only as compatibility input.ralplan_consensus_gate.complete:true, with tracker-backed native-subagent ralplan_architect_review.agent_role:"architect" and ralplan_architect_review.verdict:"approve" recorded before tracker-backed native-subagent ralplan_critic_review.agent_role:"critic" and ralplan_critic_review.verdict:"approve"; codex_exec or artifact-only approvals are trace evidence but not native lane proof. Set current_phase:"ultragoal" and persist the plan/test-spec paths under handoff_artifacts.ralplan.current_phase:"ralplan", persist ralplan_consensus_gate.complete:false with blocked_reason, and report an explicit blocker or max-iteration outcome instead of handing off to execution.current_phase:"code-review", persist implementation/test/ledger evidence under handoff_artifacts.ultragoal.current_phase:"ultraqa" only after a real $code-review stage/subagent has produced durable evidence; persist the clean review under handoff_artifacts.code_review with its source thread/tool/stage reference. Do not author review_verdict:{clean:true} from the leader's own summary.review_cycle, set current_phase:"rework", persist review_verdict, persist the phase handoff under handoff_artifacts.code_review, and keep the fix scoped to the review findings before returning to code-review.active:false, current_phase:"complete", persist review_verdict:{recommendation:"APPROVE", architectural_status:"CLEAR", clean:true}, qa_verdict:{clean:true, skipped:<boolean>, reason:<string|null>}, and completed_at only when both gates have durable source evidence. Required evidence is either (a) actual $code-review/$ultraqa stage or native-subagent/thread/tool records, or (b) for QA only, an explicit persisted skip reason for a documented docs-only/trivially non-runtime condition. If that evidence is missing, keep the active phase at code-review or ultraqa and record a blocker instead of self-attesting a clean gate.iteration and review_cycle, set current_phase:"ralplan", persist review_verdict or qa_verdict, persist the phase handoff, and set return_to_ralplan_reason to a concise findings-driven reason.ralph; preserve and resume them rather than rewriting history to Ultragoal.$cancel; preserve progress for resume rather than deleting handoff artifacts.
</State_Management><Continuation_And_Resume>
When the user says continue, resume, or keep going while Autopilot is active, read autopilot-state.json and continue from current_phase:
deep-interview: clarify requirements and record the handoff artifact.ralplan: run/update consensus planning from current handoffs and any return_to_ralplan_reason.ultragoal: execute the approved plan durably and record verification/ledger evidence.rework: perform only the implementation fixes required by the current code-review findings, record fresh implementation/verification evidence, and return to code-review.team: continue explicit team work only when it is nested under the active Ultragoal story and report evidence back to the leader.code-review: review the current diff and decide clean vs return-to-ralplan.ultraqa: run or explicitly skip adversarial QA based on the documented condition, then finish if clean or transition to ralplan with findings if not clean.ralph: resume only for explicit legacy Ralph-path Autopilot state.complete: report completion evidence; do not restart.Do not restart discovery or discard handoff artifacts on continuation. </Continuation_And_Resume>
<Pipeline_Orchestrator>
Autopilot may be represented by the configurable pipeline orchestrator (src/pipeline/) when useful. The default Autopilot pipeline contract is:
deep-interview -> ralplan -> ultragoal -> code-review -> ultraqaPipeline state should use current_phase values that match the same phase names (deep-interview, ralplan, ultragoal, rework, code-review, ultraqa, complete, failed) and should carry iteration, review_cycle, handoff_artifacts, review_verdict, qa_verdict, and return_to_ralplan_reason alongside stage results. $team is not a default pipeline stage; it is an explicit conditional execution engine inside an Ultragoal story.
</Pipeline_Orchestrator>
<Escalation_And_Stop_Conditions>
$cancel.$code-review is clean and $ultraqa has passed or been explicitly skipped with evidence.
</Escalation_And_Stop_Conditions><Final_Checklist>
deep-interview produced/updated clarified requirements or a concise specralplan produced/updated approved planning artifacts and durable sequential evidence from a subsequent Architect approval followed by a subsequent Critic approvalultragoal implemented and verified the plan with fresh evidence and durable ledger/checkpoint referencesrework was used for implementation-only review fixes when applicable, with findings scoped to a fresh code-review cycle$team was used only if the active Ultragoal story needed coordinated parallel work, or explicitly recorded as not neededcode-review returned a clean verdict (APPROVE + CLEAR)ultraqa passed, or was explicitly skipped because the change was docs-only/trivially non-runtime with evidencereview_verdict cites durable source evidence from a real $code-review stage/subagent/thread/tool record; qa_verdict cites durable $ultraqa evidence or an explicit persisted low-risk skip reason; leader-authored summaries alone are not gate evidencereview_verdict.clean is true, qa_verdict.clean is true, and return_to_ralplan_reason is nullcomplete or cancellation state is preserved coherently435d4a9
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.