Phase 1 - Planning: Create an implementation plan from the spec
- Architect (Opus): Create plan (direct mode, no interview)
- Critic (Opus): Validate plan
- Output:
.omx/plans/autopilot-impl.md
Phase 2 - Execution: Implement the plan using Ralph + Ultrawork
- Executor-low (Haiku): Simple tasks
- Executor (Sonnet): Standard tasks
- Executor-high (Opus): Complex tasks
- Run independent tasks in parallel
Phase 3 - QA: Cycle until all tests pass (UltraQA mode)
- Build, lint, test, fix failures
- Repeat up to 5 cycles
- Stop early if the same error repeats 3 times (indicates a fundamental issue)
Phase 4 - Validation: Multi-perspective review in parallel
- Architect: Functional completeness
- Security-reviewer: Vulnerability check
- Code-reviewer: Quality review
- All must approve; fix and re-validate on rejection
Phase 5 - Cleanup: Clear all mode state via OMX MCP tools on successful completion
state_clear({mode: "autopilot"})
state_clear({mode: "ralph"})
state_clear({mode: "ultrawork"})
state_clear({mode: "ultraqa"})
- Or run
/cancel for clean exit
State Management
Use omx_state MCP tools for autopilot lifecycle state.
- On start:
state_write({mode: "autopilot", active: true, current_phase: "expansion", started_at: "<now>"})
- On phase transitions:
state_write({mode: "autopilot", current_phase: "planning"})
state_write({mode: "autopilot", current_phase: "execution"})
state_write({mode: "autopilot", current_phase: "qa"})
state_write({mode: "autopilot", current_phase: "validation"})
- On completion:
state_write({mode: "autopilot", active: false, current_phase: "complete", completed_at: "<now>"})
- On cancellation/cleanup:
run
$cancel (which should call state_clear(mode="autopilot"))
Optional settings in ~/.codex/config.toml:
[omx.autopilot]
maxIterations = 10
maxQaCycles = 5
maxValidationRounds = 3
pauseAfterExpansion = false
pauseAfterPlanning = false
skipQa = false
skipValidation = false
Resume
If autopilot was cancelled or failed, run /autopilot again to resume from where it stopped.
Best Practices for Input
- Be specific about the domain -- "bookstore" not "store"
- Mention key features -- "with CRUD", "with authentication"
- Specify constraints -- "using TypeScript", "with PostgreSQL"
- Let it run -- avoid interrupting unless truly needed
Pipeline Orchestrator (v0.8+)
Autopilot can be driven by the configurable pipeline orchestrator (src/pipeline/), which
sequences stages through a uniform PipelineStage interface:
RALPLAN (consensus planning) -> team-exec (Codex CLI workers) -> ralph-verify (architect verification)
Pipeline configuration options:
[omx.autopilot.pipeline]
maxRalphIterations = 10 # Ralph verification iteration ceiling
workerCount = 2 # Number of Codex CLI team workers
agentType = "executor" # Agent type for team workers
The pipeline persists state via pipeline-state.json and supports resume from the last
incomplete stage. See src/pipeline/orchestrator.ts for the full API.
Troubleshooting
Stuck in a phase? Check TODO list for blocked tasks, run state_read({mode: "autopilot"}), or cancel and resume.
QA cycles exhausted? The same error 3 times indicates a fundamental issue. Review the error pattern; manual intervention may be needed.
Validation keeps failing? Review the specific issues. Requirements may have been too vague -- cancel and provide more detail.
1---2name: autopilot-23description: Full autonomous execution from idea to working code4---56<Purpose>7Autopilot takes a brief product idea and autonomously handles the full lifecycle: requirements analysis, technical design, planning, parallel implementation, QA cycling, and multi-perspective validation. It produces working, verified code from a 2-3 line description.8</Purpose>910<Use_When>11- User wants end-to-end autonomous execution from an idea to working code12- User says "autopilot", "auto pilot", "autonomous", "build me", "create me", "make me", "full auto", "handle it all", or "I want a/an..."13- Task requires multiple phases: planning, coding, testing, and validation14- User wants hands-off execution and is willing to let the system run to completion15</Use_When>1617<Do_Not_Use_When>18- User wants to explore options or brainstorm -- use `plan` skill instead19- User says "just explain", "draft only", or "what would you suggest" -- respond conversationally20- User wants a single focused code change -- use `ralph` or delegate to an executor agent21- User wants to review or critique an existing plan -- use `plan --review`22- Task is a quick fix or small bug -- use direct executor delegation23</Do_Not_Use_When>2425<Why_This_Exists>26Most non-trivial software tasks require coordinated phases: understanding requirements, designing a solution, implementing in parallel, testing, and validating quality. Autopilot orchestrates all of these phases automatically so the user can describe what they want and receive working code without managing each step.27</Why_This_Exists>2829<Execution_Policy>30- Each phase must complete before the next begins31- Parallel execution is used within phases where possible (Phase 2 and Phase 4)32- QA cycles repeat up to 5 times; if the same error persists 3 times, stop and report the fundamental issue33- Validation requires approval from all reviewers; rejected items get fixed and re-validated34- Cancel with `/cancel` at any time; progress is preserved for resume35</Execution_Policy>3637<Steps>381. **Phase 0 - Expansion**: Turn the user's idea into a detailed spec39 - Analyst (Opus): Extract requirements40 - Architect (Opus): Create technical specification41 - Output: `.omx/plans/autopilot-spec.md`42432. **Phase 1 - Planning**: Create an implementation plan from the spec44 - Architect (Opus): Create plan (direct mode, no interview)45 - Critic (Opus): Validate plan46 - Output: `.omx/plans/autopilot-impl.md`47483. **Phase 2 - Execution**: Implement the plan using Ralph + Ultrawork49 - Executor-low (Haiku): Simple tasks50 - Executor (Sonnet): Standard tasks51 - Executor-high (Opus): Complex tasks52 - Run independent tasks in parallel53544. **Phase 3 - QA**: Cycle until all tests pass (UltraQA mode)55 - Build, lint, test, fix failures56 - Repeat up to 5 cycles57 - Stop early if the same error repeats 3 times (indicates a fundamental issue)58595. **Phase 4 - Validation**: Multi-perspective review in parallel60 - Architect: Functional completeness61 - Security-reviewer: Vulnerability check62 - Code-reviewer: Quality review63 - All must approve; fix and re-validate on rejection64656. **Phase 5 - Cleanup**: Clear all mode state via OMX MCP tools on successful completion66 - `state_clear({mode: "autopilot"})`67 - `state_clear({mode: "ralph"})`68 - `state_clear({mode: "ultrawork"})`69 - `state_clear({mode: "ultraqa"})`70 - Or run `/cancel` for clean exit71</Steps>7273<Tool_Usage>74- Before first MCP tool use, call `ToolSearch("mcp")` to discover deferred MCP tools75- Use `ask_codex` with `agent_role: "architect"` for Phase 4 architecture validation76- Use `ask_codex` with `agent_role: "security-reviewer"` for Phase 4 security review77- Use `ask_codex` with `agent_role: "code-reviewer"` for Phase 4 quality review78- Agents form their own analysis first, then consult Codex for cross-validation79- If ToolSearch finds no MCP tools or Codex is unavailable, proceed without it -- never block on external tools80</Tool_Usage>8182## State Management8384Use `omx_state` MCP tools for autopilot lifecycle state.8586- **On start**:87 `state_write({mode: "autopilot", active: true, current_phase: "expansion", started_at: "<now>"})`88- **On phase transitions**:89 `state_write({mode: "autopilot", current_phase: "planning"})`90 `state_write({mode: "autopilot", current_phase: "execution"})`91 `state_write({mode: "autopilot", current_phase: "qa"})`92 `state_write({mode: "autopilot", current_phase: "validation"})`93- **On completion**:94 `state_write({mode: "autopilot", active: false, current_phase: "complete", completed_at: "<now>"})`95- **On cancellation/cleanup**:96 run `$cancel` (which should call `state_clear(mode="autopilot")`)9798<Examples>99<Good>100User: "autopilot A REST API for a bookstore inventory with CRUD operations using TypeScript"101Why good: Specific domain (bookstore), clear features (CRUD), technology constraint (TypeScript). Autopilot has enough context to expand into a full spec.102</Good>103104<Good>105User: "build me a CLI tool that tracks daily habits with streak counting"106Why good: Clear product concept with a specific feature. The "build me" trigger activates autopilot.107</Good>108109<Bad>110User: "fix the bug in the login page"111Why bad: This is a single focused fix, not a multi-phase project. Use direct executor delegation or ralph instead.112</Bad>113114<Bad>115User: "what are some good approaches for adding caching?"116Why bad: This is an exploration/brainstorming request. Respond conversationally or use the plan skill.117</Bad>118</Examples>119120<Escalation_And_Stop_Conditions>121- Stop and report when the same QA error persists across 3 cycles (fundamental issue requiring human input)122- Stop and report when validation keeps failing after 3 re-validation rounds123- Stop when the user says "stop", "cancel", or "abort"124- If requirements were too vague and expansion produces an unclear spec, pause and ask the user for clarification before proceeding125</Escalation_And_Stop_Conditions>126127<Final_Checklist>128- [ ] All 5 phases completed (Expansion, Planning, Execution, QA, Validation)129- [ ] All validators approved in Phase 4130- [ ] Tests pass (verified with fresh test run output)131- [ ] Build succeeds (verified with fresh build output)132- [ ] State files cleaned up133- [ ] User informed of completion with summary of what was built134</Final_Checklist>135136<Advanced>137## Configuration138139Optional settings in `~/.codex/config.toml`:140141```toml142[omx.autopilot]143maxIterations = 10144maxQaCycles = 5145maxValidationRounds = 3146pauseAfterExpansion = false147pauseAfterPlanning = false148skipQa = false149skipValidation = false150```151152## Resume153154If autopilot was cancelled or failed, run `/autopilot` again to resume from where it stopped.155156## Best Practices for Input1571581. Be specific about the domain -- "bookstore" not "store"1592. Mention key features -- "with CRUD", "with authentication"1603. Specify constraints -- "using TypeScript", "with PostgreSQL"1614. Let it run -- avoid interrupting unless truly needed162163## Pipeline Orchestrator (v0.8+)164165Autopilot can be driven by the configurable pipeline orchestrator (`src/pipeline/`), which166sequences stages through a uniform `PipelineStage` interface:167168```169RALPLAN (consensus planning) -> team-exec (Codex CLI workers) -> ralph-verify (architect verification)170```171172Pipeline configuration options:173174```toml175[omx.autopilot.pipeline]176maxRalphIterations = 10 # Ralph verification iteration ceiling177workerCount = 2 # Number of Codex CLI team workers178agentType = "executor" # Agent type for team workers179```180181The pipeline persists state via `pipeline-state.json` and supports resume from the last182incomplete stage. See `src/pipeline/orchestrator.ts` for the full API.183184## Troubleshooting185186**Stuck in a phase?** Check TODO list for blocked tasks, run `state_read({mode: "autopilot"})`, or cancel and resume.187188**QA cycles exhausted?** The same error 3 times indicates a fundamental issue. Review the error pattern; manual intervention may be needed.189190**Validation keeps failing?** Review the specific issues. Requirements may have been too vague -- cancel and provide more detail.191</Advanced>