autopilot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<Purpose> 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. </Purpose>
<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
  • Cancel with
    /oh-my-claudecode:cancel
    at any time; progress is preserved for resume </Execution_Policy>
<Steps> 1. **Phase 0 - Expansion**: Turn the user's idea into a detailed spec - Analyst (Opus): Extract requirements - Architect (Opus): Create technical specification - Output: `.omc/autopilot/spec.md`
  1. Phase 1 - Planning: Create an implementation plan from the spec
    • Architect (Opus): Create plan (direct mode, no interview)
    • Critic (Opus): Validate plan
    • Output:
      .omc/plans/autopilot-impl.md
  2. 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
  3. 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)
  4. 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
  5. Phase 5 - Cleanup: Delete all state files on successful completion
    • Remove
      .omc/state/autopilot-state.json
      ,
      ralph-state.json
      ,
      ultrawork-state.json
      ,
      ultraqa-state.json
    • Run
      /oh-my-claudecode:cancel
      for clean exit </Steps>
<Tool_Usage>
  • Before first MCP tool use, call
    ToolSearch("mcp")
    to discover deferred MCP tools
  • Use
    ask_codex
    with
    agent_role: "architect"
    for Phase 4 architecture validation
  • Use
    ask_codex
    with
    agent_role: "security-reviewer"
    for Phase 4 security review
  • Use
    ask_codex
    with
    agent_role: "code-reviewer"
    for Phase 4 quality review
  • Agents form their own analysis first, then consult Codex for cross-validation
  • If ToolSearch finds no MCP tools or Codex is unavailable, proceed without it -- never block on external tools </Tool_Usage>
<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>
<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 ask the user for clarification 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>
<Advanced>
<Purpose> Autopilot 接收简短的产品创意,自主处理全生命周期:需求分析、技术设计、规划、并行实现、QA循环以及多视角验证。它仅通过2-3行描述即可生成可运行、经过验证的代码。 </Purpose>
<Use_When>
  • 用户需要从创意到可运行代码的端到端自主执行
  • 用户说出“autopilot”、“auto pilot”、“autonomous”、“build me”、“create me”、“make me”、“full auto”、“handle it all”或“I want a/an...”
  • 任务需要多个阶段:规划、编码、测试和验证
  • 用户希望无需手动干预,让系统运行至完成 </Use_When>
<Do_Not_Use_When>
  • 用户希望探索选项或头脑风暴——改用
    plan
    技能
  • 用户说“just explain”、“draft only”或“what would you suggest”——以对话方式回应
  • 用户需要单一聚焦的代码变更——使用
    ralph
    或委托给执行Agent
  • 用户希望评审或批评现有计划——使用
    plan --review
  • 任务是快速修复或小bug——直接委托给执行Agent </Do_Not_Use_When>
<Why_This_Exists> 大多数非琐碎的软件任务需要协调多个阶段:理解需求、设计解决方案、并行实现、测试以及验证质量。Autopilot可自动编排所有这些阶段,因此用户只需描述需求,即可获取可运行代码,无需管理每个步骤。 </Why_This_Exists>
<Execution_Policy>
  • 每个阶段必须完成后才能进入下一个阶段
  • 在可能的阶段内使用并行执行(阶段2和阶段4)
  • QA循环最多重复5次;如果相同错误持续出现3次,停止并报告根本问题
  • 验证需要所有评审方的批准;被拒绝的内容会被修复并重新验证
  • 可随时使用
    /oh-my-claudecode:cancel
    取消;进度会被保存以便恢复 </Execution_Policy>
<Steps> 1. **阶段0 - 扩展**:将用户的创意转化为详细规格说明 - 分析师(Opus):提取需求 - 架构师(Opus):创建技术规格 - 输出:`.omc/autopilot/spec.md`
  1. 阶段1 - 规划:根据规格说明创建实现计划
    • 架构师(Opus):创建计划(直接模式,无需沟通)
    • 评审员(Opus):验证计划
    • 输出:
      .omc/plans/autopilot-impl.md
  2. 阶段2 - 执行:使用Ralph + Ultrawork实现计划
    • 低级执行器(Haiku):处理简单任务
    • 标准执行器(Sonnet):处理标准任务
    • 高级执行器(Opus):处理复杂任务
    • 并行执行独立任务
  3. 阶段3 - QA:循环直至所有测试通过(UltraQA模式)
    • 构建、代码检查、测试、修复失败项
    • 最多重复5次循环
    • 如果相同错误出现3次则提前停止(表明存在根本问题)
  4. 阶段4 - 验证:多视角并行评审
    • 架构师:功能完整性检查
    • 安全评审员:漏洞检查
    • 代码评审员:质量评审
    • 所有评审方必须批准;被拒绝的内容需修复后重新验证
  5. 阶段5 - 清理:成功完成后删除所有状态文件
    • 删除
      .omc/state/autopilot-state.json
      ralph-state.json
      ultrawork-state.json
      ultraqa-state.json
    • 运行
      /oh-my-claudecode:cancel
      以干净退出 </Steps>
<Tool_Usage>
  • 在首次使用MCP工具前,调用
    ToolSearch("mcp")
    来发现延迟加载的MCP工具
  • 在阶段4架构验证中,使用
    ask_codex
    并设置
    agent_role: "architect"
  • 在阶段4安全评审中,使用
    ask_codex
    并设置
    agent_role: "security-reviewer"
  • 在阶段4质量评审中,使用
    ask_codex
    并设置
    agent_role: "code-reviewer"
  • Agent先自行分析,然后咨询Codex进行交叉验证
  • 如果ToolSearch未找到MCP工具或Codex不可用,无需等待直接继续——绝不要因外部工具而阻塞 </Tool_Usage>
<Examples> <Good> 用户:“autopilot 一个使用TypeScript实现的书店库存REST API,支持CRUD操作” 为何合适:领域明确(书店)、功能清晰(CRUD)、技术约束明确(TypeScript)。Autopilot有足够上下文来扩展为完整规格说明。 </Good> <Good> 用户:“build me 一个用于跟踪日常习惯并计算连续天数的CLI工具” 为何合适:产品概念清晰,具备特定功能。“build me”触发词可激活autopilot。 </Good> <Bad> 用户:“修复登录页面的bug” 为何不合适:这是单一聚焦的修复任务,而非多阶段项目。应直接委托给执行Agent或使用ralph。 </Bad> <Bad> 用户:“添加缓存有哪些好方法?” 为何不合适:这是探索/头脑风暴请求。应以对话方式回应或使用plan技能。 </Bad> </Examples>
<Escalation_And_Stop_Conditions>
  • 当相同QA错误在3次循环中持续出现时,停止并报告(需要人工干预的根本问题)
  • 当验证在3次重新验证后仍持续失败时,停止并报告
  • 当用户说出“stop”、“cancel”或“abort”时停止
  • 如果需求过于模糊,扩展后生成的规格说明不清晰,暂停并向用户请求澄清后再继续 </Escalation_And_Stop_Conditions>
<Final_Checklist>
  • 完成所有5个阶段(扩展、规划、执行、QA、验证)
  • 阶段4中所有验证方均已批准
  • 测试通过(通过最新测试运行输出验证)
  • 构建成功(通过最新构建输出验证)
  • 状态文件已清理
  • 已通知用户完成,并总结构建内容 </Final_Checklist>
<Advanced>

Configuration

配置

Optional settings in
.claude/settings.json
:
json
{
  "omc": {
    "autopilot": {
      "maxIterations": 10,
      "maxQaCycles": 5,
      "maxValidationRounds": 3,
      "pauseAfterExpansion": false,
      "pauseAfterPlanning": false,
      "skipQa": false,
      "skipValidation": false
    }
  }
}
可在
.claude/settings.json
中设置可选参数:
json
{
  "omc": {
    "autopilot": {
      "maxIterations": 10,
      "maxQaCycles": 5,
      "maxValidationRounds": 3,
      "pauseAfterExpansion": false,
      "pauseAfterPlanning": false,
      "skipQa": false,
      "skipValidation": false
    }
  }
}

Resume

恢复

If autopilot was cancelled or failed, run
/oh-my-claudecode:autopilot
again to resume from where it stopped.
如果Autopilot被取消或失败,再次运行
/oh-my-claudecode:autopilot
即可从停止处恢复。

Best Practices for Input

输入最佳实践

  1. Be specific about the domain -- "bookstore" not "store"
  2. Mention key features -- "with CRUD", "with authentication"
  3. Specify constraints -- "using TypeScript", "with PostgreSQL"
  4. Let it run -- avoid interrupting unless truly needed
  1. 明确领域——使用“书店”而非“商店”
  2. 提及关键功能——“支持CRUD”、“带认证功能”
  3. 指定约束条件——“使用TypeScript”、“搭配PostgreSQL”
  4. 让其运行——除非必要,避免中断

Troubleshooting

故障排除

Stuck in a phase? Check TODO list for blocked tasks, review
.omc/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. </Advanced>
卡在某个阶段? 检查待办事项列表中的阻塞任务,查看
.omc/autopilot-state.json
,或取消后恢复。
QA循环耗尽? 相同错误出现3次表明存在根本问题。查看错误模式;可能需要人工干预。
验证持续失败? 查看具体问题。需求可能过于模糊——取消并提供更多细节。 </Advanced> ",