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 -- , "ralplan"
--consensus - 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 instead
autopilot - User wants to start coding immediately with a clear task -- use or delegate to executor
ralph - 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 agent before asking the user about them
explore - 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>
<目的>
Plan通过智能交互创建全面、可执行的工作计划。它会自动检测是需要与用户进行访谈(针对宽泛的请求)还是直接制定计划(针对详细的请求),并且支持共识模式(Planner/Architect/Critic循环迭代)和评审模式(Critic对现有计划进行评估)。
</目的>
<适用场景>
- 用户希望在实施前进行规划——例如“规划这个”、“规划一下”、“我们来做个计划”
- 用户希望为模糊的想法收集结构化需求
- 用户希望对现有计划进行评审——例如“评审这个计划”、
--review - 用户希望获得多视角的计划共识——例如、“ralplan”
--consensus - 任务宽泛或模糊,需要在编写代码前确定范围 </适用场景>
<不适用场景>
- 用户希望自主完成端到端执行——请改用
autopilot - 用户希望针对明确任务立即开始编码——请使用或委托给执行器
ralph - 用户提出可直接回答的简单问题——直接回答即可
- 任务是单一明确的修复工作,范围清晰——跳过规划,直接执行 </不适用场景>
<存在意义>
在不理解需求的情况下直接编写代码会导致返工、范围蔓延和遗漏边缘情况。Plan提供结构化的需求收集、专家分析和质量管控的计划,让执行工作从坚实的基础开始。共识模式为高风险项目添加了多视角验证。
</存在意义>
<执行策略>
- 根据请求的具体程度自动检测访谈模式还是直接模式
- 访谈时一次只提一个问题——绝不批量提问
- 在向用户询问代码库相关问题前,先通过Agent收集代码库事实
explore - 计划必须符合质量标准:80%以上的内容引用文件/行号,90%以上的验收标准可测试
- 共识模式在进入实施阶段前需要获得用户的明确批准 </执行策略>
<步骤>
Mode Selection
模式选择
| Mode | Trigger | Behavior |
|---|---|---|
| Interview | Default for broad requests | Interactive requirements gathering |
| Direct | | Skip interview, generate plan directly |
| Consensus | | Planner -> Architect -> Critic loop until agreement |
| Review | | Critic evaluation of existing plan |
| 模式 | 触发条件 | 行为 |
|---|---|---|
| 访谈模式 | 宽泛请求的默认模式 | 交互式需求收集 |
| 直接模式 | | 跳过访谈,直接生成计划 |
| 共识模式 | | Planner -> Architect -> Critic循环,直到达成共识 |
| 评审模式 | | Critic对现有计划进行评估 |
Interview Mode (broad/vague requests)
访谈模式(针对宽泛/模糊请求)
- Classify the request: Broad (vague verbs, no specific files, touches 3+ areas) triggers interview mode
- Ask one focused question using for preferences, scope, and constraints
AskUserQuestion - Gather codebase facts first: Before asking "what patterns does your code use?", spawn an agent to find out, then ask informed follow-up questions
explore - Build on answers: Each question builds on the previous answer
- Consult Analyst (Opus) for hidden requirements, edge cases, and risks
- Create plan when the user signals readiness: "create the plan", "I'm ready", "make it a work plan"
- 分类请求:宽泛的请求(模糊动词、无特定文件、涉及3个以上领域)会触发访谈模式
- 提出聚焦的问题:使用询问偏好、范围和约束相关问题
AskUserQuestion - 先收集代码库事实:在询问“你的代码使用了什么模式?”之前,先启动Agent进行查找,然后提出有依据的后续问题
explore - 基于回答逐步深入:每个问题都基于上一个问题的回答展开
- 咨询分析师(Opus):获取隐藏需求、边缘情况和风险相关信息
- 创建计划:当用户表示准备好时——例如“创建计划”、“我准备好了”、“制定工作计划”
Direct Mode (detailed requests)
直接模式(针对详细请求)
- Quick Analysis: Optional brief Analyst consultation
- Create plan: Generate comprehensive work plan immediately
- Review (optional): Critic review if requested
- 快速分析:可选的简短分析师咨询
- 创建计划:立即生成全面的工作计划
- 评审(可选):如果用户要求,由Critic进行评审
Consensus Mode (--consensus
/ "ralplan")
--consensus共识模式(--consensus
/ "ralplan")
--consensus- Planner creates initial plan
- Architect reviews for architectural soundness (prefer with
ask_codexrole)architect - Critic evaluates against quality criteria (prefer with
ask_codexrole)critic - If Critic rejects: iterate with feedback (max 5 iterations)
- On Critic approval: enter Plan Mode for explicit user consent
- User chooses: Approve (execute), Request changes (re-plan), or Reject (discard)
- Planner创建初始计划
- Architect评审架构合理性(优先使用带有角色的
architect)ask_codex - Critic根据质量标准进行评估(优先使用带有角色的
critic)ask_codex - 如果Critic否决:根据反馈迭代(最多5次迭代)
- 获得Critic批准后:进入计划模式,等待用户明确同意
- 用户选择:批准(执行)、要求修改(重新规划)或否决(放弃)
Review Mode (--review
)
--review评审模式(--review
)
--review- Read plan file from
.omc/plans/ - Evaluate via Critic (prefer with
ask_codexrole)critic - Return verdict: APPROVED, REVISE (with specific feedback), or REJECT (replanning required)
- 从读取计划文件
.omc/plans/ - 通过Critic进行评估(优先使用带有角色的
critic)ask_codex - 返回结论:批准、需要修订(附带具体反馈)或否决(需要重新规划)
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 . Drafts go to .
</Steps>
.omc/plans/.omc/drafts/<Tool_Usage>
- Before first MCP tool use, call to discover deferred MCP tools
ToolSearch("mcp") - Use for preference questions (scope, priority, timeline, risk tolerance) -- provides clickable UI
AskUserQuestion - Use plain text for questions needing specific values (port numbers, names, follow-up clarifications)
- Use agent (Haiku, 30s timeout) to gather codebase facts before asking the user
explore - Use with
ask_codexfor planning validation on large-scope plansagent_role: "planner" - Use with
ask_codexfor requirements analysisagent_role: "analyst" - Use with
ask_codexfor plan review in consensus and review modesagent_role: "critic" - If ToolSearch finds no MCP tools or Codex is unavailable, fall back to equivalent Claude agents -- never block on external tools </Tool_Usage>
<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>
每个计划都包含:
- 需求摘要
- 验收标准(可测试)
- 实施步骤(含文件引用)
- 风险与缓解措施
- 验证步骤
计划会保存到。草稿保存到。
</步骤>
.omc/plans/.omc/drafts/<工具使用>
- 在首次使用MCP工具前,调用发现延迟加载的MCP工具
ToolSearch("mcp") - 使用询问偏好类问题(范围、优先级、时间线、风险容忍度)——提供可点击的UI
AskUserQuestion - 对于需要具体值的问题(端口号、名称、后续澄清),使用纯文本提问
- 在向用户询问前,使用Agent(Haiku,30秒超时)收集代码库事实
explore - 对于大范围计划,使用带有的
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:
- Overview (2-3 sentences)
- Option A with trade-offs
- [Wait for user reaction]
- Option B with trade-offs
- [Wait for user reaction]
- Recommendation (only after options discussed)
Format for each option:
undefined在访谈过程中展示设计选择时,应分块呈现:
- 概述(2-3句话)
- 方案A及权衡
- [等待用户反馈]
- 方案B及权衡
- [等待用户反馈]
- 推荐方案(仅在讨论完所有选项后提出)
每个选项的格式:
undefinedOption A: [Name]
方案A: [名称]
Approach: [1 sentence]
Pros: [bullets]
Cons: [bullets]
What's your reaction to this approach?
undefined方法: [1句话]
优势: [项目符号]
劣势: [项目符号]
你对这个方法有什么看法?
undefinedQuestion Classification
问题分类
Before asking any interview question, classify it:
| Type | Examples | Action |
|---|---|---|
| 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
评审质量标准
| Criterion | Standard |
|---|---|
| Clarity | 80%+ claims cite file/line |
| Testability | 90%+ criteria are concrete |
| Verification | All file refs exist |
| Specificity | No vague terms |
| 标准 | 要求 |
|---|---|
| 清晰度 | 80%以上的内容引用文件/行号 |
| 可测试性 | 90%以上的标准为具体内容 |
| 验证性 | 所有文件引用均存在 |
| 明确性 | 无模糊术语 |
Deprecation Notice
弃用通知
The separate , , and skills have been merged into . All workflows (interview, direct, consensus, review) are available through .
</Advanced>
/planner/ralplan/review/plan/plan独立的、和技能已合并到中。所有工作流(访谈、直接、共识、评审)均可通过访问。
</高级内容>
/planner/ralplan/review/plan/plan