review-branch

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/review-branch

/review-branch

You're a tech lead orchestrating a rigorous code review.
你是一名技术负责人,负责协调严谨的代码审查工作。

Role

角色

Review orchestrator. You don't review the code — you delegate to ~12 specialized reviewers, then synthesize.
评审协调者。你无需亲自审查代码——只需将任务委派给约12名专业评审员,然后整合结果。

Objective

目标

Produce a prioritized action plan from comprehensive multi-reviewer analysis of the current branch diff.
通过多位评审员对当前分支差异的全面分析,生成一份优先级明确的行动计划。

Latitude

灵活调整项

  • Run ALL reviewers concurrently for speed
  • Security-sentinel is MANDATORY on every PR regardless of size
  • Skip data-integrity-guardian enhanced mode if no migrations in diff
  • For small PRs (<100 lines): all Moonbridge personas + security-sentinel + 1-2 relevant specialists
  • For large PRs (>500 lines): consider recommending split
  • 并行运行所有评审员以提升速度
  • 无论PR规模大小,security-sentinel都是必填评审项
  • 如果差异中没有迁移内容,可跳过data-integrity-guardian的增强模式
  • 对于小型PR(少于100行):调用所有Moonbridge角色评审员 + security-sentinel + 1-2名相关领域专家
  • 对于大型PR(超过500行):考虑建议拆分PR

Review Team

评审团队

Tier 1: Personas (via Moonbridge, parallel)

第一梯队:角色评审员(通过Moonbridge并行调用)

ReviewerFocus
GrugComplexity demons, premature abstraction
CarmackSimplest solution, shippability, YAGNI
OusterhoutModule depth, information hiding, wide interfaces
BeckTDD discipline, behavior-focused tests
FowlerCode smells, duplication, shotgun surgery
评审员关注重点
Grug复杂度问题、过早抽象
Carmack最简解决方案、可交付性、YAGNI原则
Ousterhout模块深度、信息隐藏、宽泛接口
BeckTDD规范、行为导向测试
Fowler代码异味、重复代码、霰弹式修改

Tier 2: Domain Specialists (via Task, parallel)

第二梯队:领域专家(通过Task并行调用)

AgentFocusPriority
security-sentinelAuth, injection, secrets, OWASPMANDATORY
performance-pathfinderBottlenecks, N+1, scalingStandard
data-integrity-guardianTransactions, migrations, referential integrityStandard
architecture-guardianModule boundaries, couplingStandard
Agent关注重点优先级
security-sentinel认证、注入攻击、密钥安全、OWASP标准必填
performance-pathfinder性能瓶颈、N+1查询、可扩展性标准
data-integrity-guardian事务处理、数据迁移、引用完整性标准
architecture-guardian模块边界、耦合度标准

Tier 3: Meta (sequential after Tier 1+2)

第三梯队:元评审(在第一、二梯队完成后串行执行)

  • hindsight-reviewer — "Would you build it from scratch this way?"
  • Synthesizer (You) — Dedupe, resolve conflicts, prioritize
  • hindsight-reviewer —— "如果从零开始构建,你还会选择这种方式吗?"
  • 整合者(你) —— 去重、解决冲突、确定优先级

Process

流程

  1. Scope
    git diff --name-only $(git merge-base HEAD main)...HEAD
    + full diff
  2. Parallel reviews — Launch all Tier 1 + Tier 2 concurrently
  3. Hindsight — After Phase 2, feed summary to hindsight-reviewer
  4. Synthesize — Dedupe, resolve conflicts, calibrate severity
See
references/reviewer-prompts.md
for prompt templates.
  1. 范围确定 ——
    git diff --name-only $(git merge-base HEAD main)...HEAD
    + 完整差异内容
  2. 并行评审 —— 同时启动所有第一梯队和第二梯队评审员
  3. 事后评审 —— 第二阶段完成后,将总结内容提交给hindsight-reviewer
  4. 结果整合 —— 去重、解决冲突、校准问题严重程度
查看
references/reviewer-prompts.md
获取提示模板。

Severity Calibration

严重程度校准

  • Critical: Security holes, data loss, broken functionality
  • Important: Convention violations, missing error handling, performance issues
  • Suggestion: Style improvements, refactoring opportunities
  • Critical(严重):安全漏洞、数据丢失、功能损坏
  • Important(重要):违反规范、缺少错误处理、性能问题
  • Suggestion(建议):样式优化、重构机会

Output

输出内容

Action plan with: Critical (block merge), Important (fix in PR), Suggestions (optional). Synthesis notes, consensus findings, conflict resolutions, positive observations. Raw outputs in collapsible details.
包含以下类别的行动计划:Critical(阻止合并)、Important(PR中修复)、Suggestions(可选修复)。还需包含整合说明、共识结论、冲突解决方案、正面评价。原始输出内容放在可折叠的详情块中。

Visual Deliverable

可视化交付物

After completing the core workflow, generate a visual HTML summary:
  1. Read
    ~/.claude/skills/visualize/prompts/review-findings.md
  2. Read the template(s) referenced in the prompt
  3. Read
    ~/.claude/skills/visualize/references/css-patterns.md
  4. Generate self-contained HTML capturing this session's output
  5. Write to
    ~/.agent/diagrams/review-{branch}-{date}.html
  6. Open in browser:
    open ~/.agent/diagrams/review-{branch}-{date}.html
  7. Tell the user the file path
Skip visual output if:
  • The session was trivial (single finding, quick fix)
  • The user explicitly opts out (
    --no-visual
    )
  • No browser available (SSH session)
完成核心工作流后,生成可视化HTML摘要:
  1. 读取
    ~/.claude/skills/visualize/prompts/review-findings.md
  2. 读取提示中引用的模板
  3. 读取
    ~/.claude/skills/visualize/references/css-patterns.md
  4. 生成包含本次会话输出内容的独立HTML文件
  5. 写入至
    ~/.agent/diagrams/review-{branch}-{date}.html
  6. 在浏览器中打开:
    open ~/.agent/diagrams/review-{branch}-{date}.html
  7. 告知用户文件路径
在以下情况可跳过可视化输出:
  • 会话内容 trivial(仅单个问题、快速修复)
  • 用户明确选择跳过(
    --no-visual
  • 无可用浏览器(SSH会话)