plan-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePhase gate: PLAN checkpoint. MUST get APPROVE from all reviewers before proceeding to Build.
阶段门禁:PLAN检查点。在进入构建阶段前必须获得所有评审人员的批准。
Inputs
输入参数
- Plan file path (default: most recent non-file in
.done.md)ai-workspace/plans/ - : Force-add an agent to the panel
--include <agent> - : Remove an agent (except technical-editor, which cannot be excluded)
--exclude <agent>
- 计划文件路径(默认:目录下最新的非
ai-workspace/plans/文件).done.md - :强制将某个Agent添加到评审小组
--include <agent> - :移除某个Agent(technical-editor除外,不可被移除)
--exclude <agent>
Steps
执行步骤
-
Find the plan file:bash
ls -t ai-workspace/plans/*.md | grep -v '.done.md' | head -1If no plan file found → error: "No plan file in ai-workspace/plans/. Write a plan first." If plan file is→ error: "This plan is already finalized.".done.md -
Read the plan and extract:
- Files to Modify section
- Full body text
- Plan scope (count files changed, count body lines)
-
Auto-assemble the review panel using these deterministic rules:Tier 1 — Always included:
Agent When technical-editorEVERY plan review (cannot be excluded) Tier 2 — Auto-included by scope:Agent Trigger code-reviewerPlan includes ANY code changes (files ending in ,.ts,.js,.sh, or paths containing.yml,src/)tests/architect-reviewerPlan is medium/large: >3 files changed, OR plan body >100 lines, OR multiple workflow steps affected Tier 3 — Auto-included by keyword scanning:Agent Trigger keywords (scan Files to Modify + body) codex-specialistAGENTS.md, config.toml, sync.sh, skills, dotfiles +designerdesign-reviewercomponent, UI, CSS, design, wireframe, mockup, Figma, layout security-auditorauth, credentials, permissions, OWASP, token, secret, vulnerability accessibility-testera11y, WCAG, aria, keyboard, screen reader, focus, semantic HTML fact-checkerdocs, research, ecosystem, reference, guide, educational Log which agents were selected and why. -
Apply overrides:adds agents,
--includeremoves (except technical-editor).--exclude -
Dispatch all selected agents IN PARALLEL using the Agent tool (single message, multiple Agent tool calls). Each agent receives:
- The plan file content
- Their specific review mandate
- Instructions to return: APPROVE / REVISE / DROP with findings tagged P0/P1/P2
-
Collect verdicts and synthesize into a summary table:
## Plan Review Summary | Agent | Verdict | P0 | P1 | P2 | Key Finding | |-------|---------|----|----|-----|-------------| -
Gate logic:
- All APPROVE → "Proceed to Build"
- Any P0 REVISE → MUST fix before proceeding. List required fixes.
- P1 REVISE → should fix. List recommended fixes.
- P2 → nice to have, can proceed.
- If P0 exists, enter revise-resubmit loop (up to 2 rounds). After 2 rounds, escalate to human.
-
查找计划文件:bash
ls -t ai-workspace/plans/*.md | grep -v '.done.md' | head -1如果未找到计划文件 → 错误:"ai-workspace/plans/目录下不存在计划文件,请先编写计划。" 如果计划文件是格式 → 错误:"该计划已完成定稿。".done.md -
读取计划并提取以下内容:
- 待修改文件章节
- 完整正文内容
- 计划范围(统计变更文件数量、正文行数)
-
按照以下确定性规则自动组建评审小组:第一层 — 固定纳入:
Agent 触发条件 technical-editor所有计划评审都必须纳入(不可被排除) 第二层 — 根据计划范围自动纳入:Agent 触发条件 code-reviewer计划包含任意代码变更(文件后缀为 、.ts、.js、.sh,或路径包含.yml、src/)tests/architect-reviewer计划为中/大型:变更文件超过3个,或计划正文超过100行,或影响多个工作流步骤 第三层 — 通过关键词扫描自动纳入(扫描待修改文件列表+正文):Agent 触发关键词 codex-specialistAGENTS.md、config.toml、sync.sh、skills、dotfiles +designerdesign-reviewercomponent、UI、CSS、design、wireframe、mockup、Figma、layout security-auditorauth、credentials、permissions、OWASP、token、secret、vulnerability accessibility-testera11y、WCAG、aria、keyboard、screen reader、focus、semantic HTML fact-checkerdocs、research、ecosystem、reference、guide、educational 记录入选的Agent及其入选原因。 -
应用覆盖规则:参数可添加Agent,
--include参数可移除Agent(technical-editor除外)。--exclude -
使用Agent工具并行调度所有入选的Agent(单条消息,多Agent工具调用)。每个Agent会收到:
- 计划文件内容
- 其专属的评审要求
- 返回要求:需返回APPROVE / REVISE / DROP结论,且发现的问题需标注P0/P1/P2等级
-
收集评审结论,整合为汇总表:
## Plan Review Summary | Agent | Verdict | P0 | P1 | P2 | Key Finding | |-------|---------|----|----|-----|-------------| -
门禁逻辑:
- 全部通过 → "进入构建阶段"
- 存在任意P0等级需修改问题 → 继续推进前必须修复,列出必填修复项
- 存在P1等级需修改问题 → 建议修复,列出推荐修复项
- P2等级问题 → 优化项,可继续推进
- 如果存在P0问题,进入修改-重提交流程(最多2轮),2轮后仍未通过则上报人工处理
Panel Bounds
评审小组规模范围
- Minimum: technical-editor alone (1 agent, trivial plans)
- Typical: technical-editor + code-reviewer + architect-reviewer (3)
- Maximum: all agents (rare, large cross-cutting plans)
- 最小:仅technical-editor(1个Agent,适用于极简计划)
- 常规:technical-editor + code-reviewer + architect-reviewer(3个Agent)
- 最大:所有Agent(极少出现,适用于大型跨领域计划)