Full autonomous execution from idea to working code
<Use_When>
<Do_Not_Use_When>
plan skill insteadralph or delegate to an executor agentplan --review<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>
<Steps> 1. **Phase 0 - Expansion**: Turn the user's idea into a detailed spec - **If ralplan consensus plan exists** (`.dog/plans/ralplan-*.md` or `.dog/plans/consensus-*.md` from the 3-stage pipeline): Skip BOTH Phase 0 and Phase 1 — jump directly to Phase 2 (Execution). The plan has already been Planner/Architect/Critic validated. - **If deep-interview spec exists** (`.dog/specs/deep-interview-*.md`): Skip analyst+architect expansion, use the pre-validated spec directly as Phase 0 output. Continue to Phase 1 (Planning). - **If input is vague** (no file paths, function names, or concrete anchors): Offer redirect to `/deep-interview` for Socratic clarification before expanding - **Otherwise**: Analyst (Opus) extracts requirements, Architect (Opus) creates technical specification - Output: `.dog/autopilot/spec.md` <Examples> <Good> 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. </Good> <Good> 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. </Good> <Bad> 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. </Bad> <Bad> User: "what are some good approaches for adding caching?" Why bad: This is an exploration/brainstorming request. Respond conversationally or use the plan skill. </Bad> </Examples> <Advanced> ## Configuration<Execution_Policy>
Phase 1 - Planning: Create an implementation plan from the spec
.dog/plans/autopilot-impl.mdPhase 2 - Execution: Implement the plan using Ralph + Ultrawork
Phase 3 - QA: Cycle until all tests pass (UltraQA mode)
Phase 4 - Validation: Multi-perspective review in parallel
Phase 5 - Cleanup: Delete all state files on successful completion
.dog/state/autopilot-state.json, ralph-state.json, ultrawork-state.json, ultraqa-state.json
</Steps>
<Tool_Usage>
Task(subagent_type="dog:architect", ...) for Phase 4 architecture validationTask(subagent_type="dog:security-reviewer", ...) for Phase 4 security reviewTask(subagent_type="dog:code-reviewer", ...) for Phase 4 quality review<Escalation_And_Stop_Conditions>
/deep-interview for Socratic clarification, or pause and ask the user for clarification before proceeding
</Escalation_And_Stop_Conditions><Final_Checklist>
Optional settings in .claude/settings.json:
{
"dog": {
"autopilot": {
"maxIterations": 10,
"maxQaCycles": 5,
"maxValidationRounds": 3,
"pauseAfterExpansion": false,
"pauseAfterPlanning": false,
"skipQa": false,
"skipValidation": false
}
}
}
If autopilot was cancelled or failed, run /dog:autopilot again to resume from where it stopped.
Stuck in a phase? Check TODO list for blocked tasks, review .dog/autopilot-state.json, 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.
When autopilot is invoked with a vague input, Phase 0 can redirect to /deep-interview for Socratic clarification:
User: "autopilot build me something cool"
Autopilot: "Your request is open-ended. Would you like to run a deep interview first?"
[Yes, interview first (Recommended)] [No, expand directly]
If a deep-interview spec already exists at .dog/specs/deep-interview-*.md, autopilot uses it directly as Phase 0 output (the spec has already been mathematically validated for clarity).
The recommended full pipeline chains three quality gates:
/deep-interview "vague idea"
→ Socratic Q&A → spec (ambiguity ≤ 20%)
→ /ralplan --direct → consensus plan (Planner/Architect/Critic approved)
→ /autopilot → skips Phase 0+1, starts at Phase 2 (Execution)
When autopilot detects a ralplan consensus plan (.dog/plans/ralplan-*.md or .dog/plans/consensus-*.md), it skips both Phase 0 (Expansion) and Phase 1 (Planning) because the plan has already been:
Autopilot starts directly at Phase 2 (Execution via Ralph + Ultrawork). </Advanced>