Full autonomous execution from idea to working code
Autopilot 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.
<Use_When>
User wants end-to-end autonomous execution from an idea to working code
User says "autopilot", "auto pilot", "autonomous", "build me", "create me", "make me", "full auto", "handle it all", or "I want a/an..."
Task requires multiple phases: planning, coding, testing, and validation
User wants hands-off execution and is willing to let the system run to completion
</Use_When>
<Do_Not_Use_When>
User wants to explore options or brainstorm -- use plan skill instead
User says "just explain", "draft only", or "what would you suggest" -- respond conversationally
User wants a single focused code change -- use ralph or delegate to an executor agent
User wants to review or critique an existing plan -- use plan --review
Task is a quick fix or small bug -- use direct executor delegation
</Do_Not_Use_When>
<Why_This_Exists>
Most 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.
</Why_This_Exists>
<Execution_Policy>
Each phase must complete before the next begins
Parallel execution is used within phases where possible (Phase 2 and Phase 4)
QA cycles repeat up to 5 times; if the same error persists 3 times, stop and report the fundamental issue
Validation requires approval from all reviewers; rejected items get fixed and re-validated
0. **Pre-context Intake (required before Phase 0 starts)**:
- Derive a task slug from the request.
- Load the latest relevant snapshot from `.omx/context/{slug}-*.md` when available.
- If no snapshot exists, create `.omx/context/{slug}-{timestamp}.md` (UTC `YYYYMMDDTHHMMSSZ`) with:
- Task statement
- Desired outcome
- Known facts/evidence
- Constraints
- Unknowns/open questions
- Likely codebase touchpoints
- If ambiguity remains high, run `explore` first for brownfield facts, then run `$deep-interview --quick ` before proceeding.
- Carry the snapshot path into autopilot artifacts/state so all phases share grounded context.
User: "autopilot A REST API for a bookstore inventory with CRUD operations using TypeScript"
Why good: Specific domain (bookstore), clear features (CRUD), technology constraint (TypeScript). Autopilot has enough context to expand into a full spec.
User: "build me a CLI tool that tracks daily habits with streak counting"
Why good: Clear product concept with a specific feature. The "build me" trigger activates autopilot.
User: "fix the bug in the login page"
Why bad: This is a single focused fix, not a multi-phase project. Use direct executor delegation or ralph instead.
User: "what are some good approaches for adding caching?"
Why bad: This is an exploration/brainstorming request. Respond conversationally or use the plan skill.
## Configuration
Cancel with /cancel at any time; progress is preserved for resume
If a deep-interview spec exists, use it as high-clarity phase input instead of re-expanding from scratch
If input is too vague for reliable expansion, offer/trigger $deep-interview first
Do not enter expansion/planning/execution-heavy phases until pre-context grounding exists; if fast execution is forced, proceed only with explicit risk notes
Apply the shared workflow guidance pattern: concise, evidence-dense progress and completion reporting, local overrides for the active workflow branch, persistent inspection/verification while the workflow depends on it, and automatic continuation for safe reversible steps. Ask only for material, destructive, or preference-dependent branches.
</Execution_Policy>
Phase 0 - Expansion: Turn the user's idea into a detailed spec
If .omx/specs/deep-interview-*.md exists for this task: reuse it and skip redundant expansion work
If prompt is highly vague: route to $deep-interview for Socratic ambiguity-gated clarification
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"))
Scenario Examples
Good: The user says continue after the workflow already has a clear next step. Continue the current branch of work instead of restarting or re-asking the same question.
Good: The user changes only the output shape or downstream delivery step (for example make a PR). Preserve earlier non-conflicting workflow constraints and apply the update locally.
Bad: The user says continue, and the workflow restarts discovery or stops before the missing verification/evidence is gathered.
<Escalation_And_Stop_Conditions>
Stop and report when the same QA error persists across 3 cycles (fundamental issue requiring human input)
Stop and report when validation keeps failing after 3 re-validation rounds
Stop when the user says "stop", "cancel", or "abort"
If requirements were too vague and expansion produces an unclear spec, pause and redirect to $deep-interview before proceeding
</Escalation_And_Stop_Conditions>
<Final_Checklist>
All 5 phases completed (Expansion, Planning, Execution, QA, Validation)
All validators approved in Phase 4
Tests pass (verified with fresh test run output)
Build succeeds (verified with fresh build output)
State files cleaned up
User informed of completion with summary of what was built
</Final_Checklist>
[omx.autopilot.pipeline]maxRalphIterations = 10# Ralph verification iteration ceilingworkerCount = 2# Number of Codex CLI team workersagentType = "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.