plan

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<Purpose> Plan creates comprehensive, actionable work plans through intelligent interaction. It auto-detects whether to interview the user (broad requests) or plan directly (detailed requests), and supports consensus mode (iterative Planner/Architect/Critic loop) and review mode (Critic evaluation of existing plans). </Purpose>
<Use_When>
  • User wants to plan before implementing -- "plan this", "plan the", "let's plan"
  • User wants structured requirements gathering for a vague idea
  • User wants an existing plan reviewed -- "review this plan",
    --review
  • User wants multi-perspective consensus on a plan --
    --consensus
    , "ralplan"
  • Task is broad or vague and needs scoping before any code is written </Use_When>
<Do_Not_Use_When>
  • User wants autonomous end-to-end execution -- use
    autopilot
    instead
  • User wants to start coding immediately with a clear task -- use
    ralph
    or delegate to executor
  • User asks a simple question that can be answered directly -- just answer it
  • Task is a single focused fix with obvious scope -- skip planning, just do it </Do_Not_Use_When>
<Why_This_Exists> Jumping into code without understanding requirements leads to rework, scope creep, and missed edge cases. Plan provides structured requirements gathering, expert analysis, and quality-gated plans so that execution starts from a solid foundation. The consensus mode adds multi-perspective validation for high-stakes projects. </Why_This_Exists>
<Execution_Policy>
  • Auto-detect interview vs direct mode based on request specificity
  • Ask one question at a time during interviews -- never batch multiple questions
  • Gather codebase facts via
    explore
    agent before asking the user about them
  • Plans must meet quality standards: 80%+ claims cite file/line, 90%+ criteria are testable
  • Consensus mode requires explicit user approval before proceeding to implementation </Execution_Policy>
<Steps>
<目的> Plan通过智能交互创建全面、可执行的工作计划。它会自动检测是需要与用户进行访谈(针对宽泛的请求)还是直接制定计划(针对详细的请求),并且支持共识模式(Planner/Architect/Critic循环迭代)和评审模式(Critic对现有计划进行评估)。 </目的>
<适用场景>
  • 用户希望在实施前进行规划——例如“规划这个”、“规划一下”、“我们来做个计划”
  • 用户希望为模糊的想法收集结构化需求
  • 用户希望对现有计划进行评审——例如“评审这个计划”、
    --review
  • 用户希望获得多视角的计划共识——例如
    --consensus
    、“ralplan”
  • 任务宽泛或模糊,需要在编写代码前确定范围 </适用场景>
<不适用场景>
  • 用户希望自主完成端到端执行——请改用
    autopilot
  • 用户希望针对明确任务立即开始编码——请使用
    ralph
    或委托给执行器
  • 用户提出可直接回答的简单问题——直接回答即可
  • 任务是单一明确的修复工作,范围清晰——跳过规划,直接执行 </不适用场景>
<存在意义> 在不理解需求的情况下直接编写代码会导致返工、范围蔓延和遗漏边缘情况。Plan提供结构化的需求收集、专家分析和质量管控的计划,让执行工作从坚实的基础开始。共识模式为高风险项目添加了多视角验证。 </存在意义>
<执行策略>
  • 根据请求的具体程度自动检测访谈模式还是直接模式
  • 访谈时一次只提一个问题——绝不批量提问
  • 在向用户询问代码库相关问题前,先通过
    explore
    Agent收集代码库事实
  • 计划必须符合质量标准:80%以上的内容引用文件/行号,90%以上的验收标准可测试
  • 共识模式在进入实施阶段前需要获得用户的明确批准 </执行策略>
<步骤>

Mode Selection

模式选择

ModeTriggerBehavior
InterviewDefault for broad requestsInteractive requirements gathering
Direct
--direct
, or detailed request
Skip interview, generate plan directly
Consensus
--consensus
, "ralplan"
Planner -> Architect -> Critic loop until agreement
Review
--review
, "review this plan"
Critic evaluation of existing plan
模式触发条件行为
访谈模式宽泛请求的默认模式交互式需求收集
直接模式
--direct
,或详细的请求
跳过访谈,直接生成计划
共识模式
--consensus
、“ralplan”
Planner -> Architect -> Critic循环,直到达成共识
评审模式
--review
、“review this plan”
Critic对现有计划进行评估

Interview Mode (broad/vague requests)

访谈模式(针对宽泛/模糊请求)

  1. Classify the request: Broad (vague verbs, no specific files, touches 3+ areas) triggers interview mode
  2. Ask one focused question using
    AskUserQuestion
    for preferences, scope, and constraints
  3. Gather codebase facts first: Before asking "what patterns does your code use?", spawn an
    explore
    agent to find out, then ask informed follow-up questions
  4. Build on answers: Each question builds on the previous answer
  5. Consult Analyst (Opus) for hidden requirements, edge cases, and risks
  6. Create plan when the user signals readiness: "create the plan", "I'm ready", "make it a work plan"
  1. 分类请求:宽泛的请求(模糊动词、无特定文件、涉及3个以上领域)会触发访谈模式
  2. 提出聚焦的问题:使用
    AskUserQuestion
    询问偏好、范围和约束相关问题
  3. 先收集代码库事实:在询问“你的代码使用了什么模式?”之前,先启动
    explore
    Agent进行查找,然后提出有依据的后续问题
  4. 基于回答逐步深入:每个问题都基于上一个问题的回答展开
  5. 咨询分析师(Opus):获取隐藏需求、边缘情况和风险相关信息
  6. 创建计划:当用户表示准备好时——例如“创建计划”、“我准备好了”、“制定工作计划”

Direct Mode (detailed requests)

直接模式(针对详细请求)

  1. Quick Analysis: Optional brief Analyst consultation
  2. Create plan: Generate comprehensive work plan immediately
  3. Review (optional): Critic review if requested
  1. 快速分析:可选的简短分析师咨询
  2. 创建计划:立即生成全面的工作计划
  3. 评审(可选):如果用户要求,由Critic进行评审

Consensus Mode (
--consensus
/ "ralplan")

共识模式(
--consensus
/ "ralplan")

  1. Planner creates initial plan
  2. Architect reviews for architectural soundness (prefer
    ask_codex
    with
    architect
    role)
  3. Critic evaluates against quality criteria (prefer
    ask_codex
    with
    critic
    role)
  4. If Critic rejects: iterate with feedback (max 5 iterations)
  5. On Critic approval: enter Plan Mode for explicit user consent
  6. User chooses: Approve (execute), Request changes (re-plan), or Reject (discard)
  1. Planner创建初始计划
  2. Architect评审架构合理性(优先使用带有
    architect
    角色的
    ask_codex
  3. Critic根据质量标准进行评估(优先使用带有
    critic
    角色的
    ask_codex
  4. 如果Critic否决:根据反馈迭代(最多5次迭代)
  5. 获得Critic批准后:进入计划模式,等待用户明确同意
  6. 用户选择:批准(执行)、要求修改(重新规划)或否决(放弃)

Review Mode (
--review
)

评审模式(
--review

  1. Read plan file from
    .omc/plans/
  2. Evaluate via Critic (prefer
    ask_codex
    with
    critic
    role)
  3. Return verdict: APPROVED, REVISE (with specific feedback), or REJECT (replanning required)
  1. .omc/plans/
    读取计划文件
  2. 通过Critic进行评估(优先使用带有
    critic
    角色的
    ask_codex
  3. 返回结论:批准、需要修订(附带具体反馈)或否决(需要重新规划)

Plan Output Format

计划输出格式

Every plan includes:
  • Requirements Summary
  • Acceptance Criteria (testable)
  • Implementation Steps (with file references)
  • Risks and Mitigations
  • Verification Steps
Plans are saved to
.omc/plans/
. Drafts go to
.omc/drafts/
. </Steps>
<Tool_Usage>
  • Before first MCP tool use, call
    ToolSearch("mcp")
    to discover deferred MCP tools
  • Use
    AskUserQuestion
    for preference questions (scope, priority, timeline, risk tolerance) -- provides clickable UI
  • Use plain text for questions needing specific values (port numbers, names, follow-up clarifications)
  • Use
    explore
    agent (Haiku, 30s timeout) to gather codebase facts before asking the user
  • Use
    ask_codex
    with
    agent_role: "planner"
    for planning validation on large-scope plans
  • Use
    ask_codex
    with
    agent_role: "analyst"
    for requirements analysis
  • Use
    ask_codex
    with
    agent_role: "critic"
    for plan review in consensus and review modes
  • If ToolSearch finds no MCP tools or Codex is unavailable, fall back to equivalent Claude agents -- never block on external tools </Tool_Usage>
<Examples> <Good> Adaptive interview (gathering facts before asking): ``` Planner: [spawns explore agent: "find authentication implementation"] Planner: [receives: "Auth is in src/auth/ using JWT with passport.js"] Planner: "I see you're using JWT authentication with passport.js in src/auth/. For this new feature, should we extend the existing auth or add a separate auth flow?" ``` Why good: Answers its own codebase question first, then asks an informed preference question. </Good> <Good> Single question at a time: ``` Q1: "What's the main goal?" A1: "Improve performance" Q2: "For performance, what matters more -- latency or throughput?" A2: "Latency" Q3: "For latency, are we optimizing for p50 or p99?" ``` Why good: Each question builds on the previous answer. Focused and progressive. </Good> <Bad> Asking about things you could look up: ``` Planner: "Where is authentication implemented in your codebase?" User: "Uh, somewhere in src/auth I think?" ``` Why bad: The planner should spawn an explore agent to find this, not ask the user. </Bad> <Bad> Batching multiple questions: ``` "What's the scope? And the timeline? And who's the audience?" ``` Why bad: Three questions at once causes shallow answers. Ask one at a time. </Bad> <Bad> Presenting all design options at once: ``` "Here are 4 approaches: Option A... Option B... Option C... Option D... Which do you prefer?" ``` Why bad: Decision fatigue. Present one option with trade-offs, get reaction, then present the next. </Bad> </Examples>
<Escalation_And_Stop_Conditions>
  • Stop interviewing when requirements are clear enough to plan -- do not over-interview
  • In consensus mode, stop after 5 Planner/Architect/Critic iterations and present the best version
  • Consensus mode requires explicit user approval before any implementation begins
  • If the user says "just do it" or "skip planning", transition to execution mode (ralph or executor)
  • Escalate to the user when there are irreconcilable trade-offs that require a business decision </Escalation_And_Stop_Conditions>
<Final_Checklist>
  • Plan has testable acceptance criteria (90%+ concrete)
  • Plan references specific files/lines where applicable (80%+ claims)
  • All risks have mitigations identified
  • No vague terms without metrics ("fast" -> "p99 < 200ms")
  • Plan saved to
    .omc/plans/
  • In consensus mode: user explicitly approved before any execution </Final_Checklist>
<Advanced>
每个计划都包含:
  • 需求摘要
  • 验收标准(可测试)
  • 实施步骤(含文件引用)
  • 风险与缓解措施
  • 验证步骤
计划会保存到
.omc/plans/
。草稿保存到
.omc/drafts/
。 </步骤>
<工具使用>
  • 在首次使用MCP工具前,调用
    ToolSearch("mcp")
    发现延迟加载的MCP工具
  • 使用
    AskUserQuestion
    询问偏好类问题(范围、优先级、时间线、风险容忍度)——提供可点击的UI
  • 对于需要具体值的问题(端口号、名称、后续澄清),使用纯文本提问
  • 在向用户询问前,使用
    explore
    Agent(Haiku,30秒超时)收集代码库事实
  • 对于大范围计划,使用带有
    agent_role: "planner"
    ask_codex
    进行规划验证
  • 使用带有
    agent_role: "analyst"
    ask_codex
    进行需求分析
  • 在共识模式和评审模式下,使用带有
    agent_role: "critic"
    ask_codex
    进行计划评审
  • 如果ToolSearch未找到MCP工具或Codex不可用, fallback到等效的Claude Agent——绝不要因外部工具而阻塞流程 </工具使用>
<示例> <良好示例> 自适应访谈(先收集事实再提问):
Planner: [启动explore agent: "查找认证实现位置"]
Planner: [收到回复: "认证在src/auth/中使用JWT和passport.js实现"]
Planner: "我了解到你的代码库在src/auth/中使用JWT和passport.js实现认证。
         对于这个新功能,我们应该扩展现有认证体系还是添加独立的认证流程?"
为何良好:先自行查找代码库相关问题的答案,再提出有依据的偏好问题。 </良好示例>
<良好示例> 一次只提一个问题:
问题1: "主要目标是什么?"
回答1: "提升性能"
问题2: "关于性能,你更关注延迟还是吞吐量?"
回答2: "延迟"
问题3: "关于延迟,我们是针对p50还是p99进行优化?"
为何良好:每个问题都基于上一个回答展开,聚焦且循序渐进。 </良好示例>
<不良示例> 询问可自行查找的信息:
Planner: "你的代码库中认证功能在哪里实现?"
用户: "呃,我想是在src/auth的某个地方?"
为何不良:Planner应该启动explore Agent来查找该信息,而不是询问用户。 </不良示例>
<不良示例> 批量提问:
"范围是什么?时间线呢?受众是谁?"
为何不良:一次提出三个问题会导致回答不够深入。应一次只提一个问题。 </不良示例>
<不良示例> 一次性展示所有设计选项:
"这里有4种方案:方案A... 方案B... 方案C... 方案D... 你偏好哪一种?"
为何不良:会导致决策疲劳。应一次展示一个选项并说明权衡,获取反馈后再展示下一个。 </不良示例> </示例>
<升级与停止条件>
  • 当需求足够清晰可制定计划时,停止访谈——不要过度访谈
  • 在共识模式下,经过5次Planner/Architect/Critic迭代后停止,展示最佳版本
  • 共识模式在开始任何实施工作前需要获得用户的明确批准
  • 如果用户说“直接做”或“跳过规划”,则切换到执行模式(ralph或执行器)
  • 当存在无法调和的权衡、需要业务决策时,将问题升级给用户 </升级与停止条件>
<最终检查清单>
  • 计划包含可测试的验收标准(90%以上为具体内容)
  • 计划在适用时引用了具体的文件/行号(80%以上的内容)
  • 所有风险都已确定缓解措施
  • 没有无度量标准的模糊术语(例如将“快”改为“p99 < 200ms”)
  • 计划已保存到
    .omc/plans/
  • 共识模式:在开始任何执行工作前已获得用户明确批准 </最终检查清单>
<高级内容>

Design Option Presentation

设计选项展示

When presenting design choices during interviews, chunk them:
  1. Overview (2-3 sentences)
  2. Option A with trade-offs
  3. [Wait for user reaction]
  4. Option B with trade-offs
  5. [Wait for user reaction]
  6. Recommendation (only after options discussed)
Format for each option:
undefined
在访谈过程中展示设计选择时,应分块呈现:
  1. 概述(2-3句话)
  2. 方案A及权衡
  3. [等待用户反馈]
  4. 方案B及权衡
  5. [等待用户反馈]
  6. 推荐方案(仅在讨论完所有选项后提出)
每个选项的格式:
undefined

Option A: [Name]

方案A: [名称]

Approach: [1 sentence] Pros: [bullets] Cons: [bullets]
What's your reaction to this approach?
undefined
方法: [1句话] 优势: [项目符号] 劣势: [项目符号]
你对这个方法有什么看法?
undefined

Question Classification

问题分类

Before asking any interview question, classify it:
TypeExamplesAction
Codebase Fact"What patterns exist?", "Where is X?"Explore first, do not ask user
User Preference"Priority?", "Timeline?"Ask user via AskUserQuestion
Scope Decision"Include feature Y?"Ask user
Requirement"Performance constraints?"Ask user
在提出任何访谈问题前,先对问题进行分类:
类型示例操作
代码库事实“使用了什么模式?”、“X在哪里?”先进行探索,不要询问用户
用户偏好“优先级?”、“时间线?”使用AskUserQuestion询问用户
范围决策“是否包含功能Y?”询问用户
需求“性能约束?”询问用户

Review Quality Criteria

评审质量标准

CriterionStandard
Clarity80%+ claims cite file/line
Testability90%+ criteria are concrete
VerificationAll file refs exist
SpecificityNo vague terms
标准要求
清晰度80%以上的内容引用文件/行号
可测试性90%以上的标准为具体内容
验证性所有文件引用均存在
明确性无模糊术语

Deprecation Notice

弃用通知

The separate
/planner
,
/ralplan
, and
/review
skills have been merged into
/plan
. All workflows (interview, direct, consensus, review) are available through
/plan
. </Advanced>
独立的
/planner
/ralplan
/review
技能已合并到
/plan
中。所有工作流(访谈、直接、共识、评审)均可通过
/plan
访问。 </高级内容>