assemble-panel

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Assemble Panel

组建评审团

Centralizes reviewer selection and loop governance. Callers invoke this via the Skill tool to get a panel and policy back — they handle dispatch themselves. This skill produces data. It never dispatches agents or modifies files.
集中负责评审者选择和评审流程治理。调用方通过Skill工具调用此功能以获取评审团和相关规则,之后由调用方自行处理派发工作。本skill仅生成数据,永远不会派发agent或修改文件。

Integration Contract

集成契约

Callers provide:
  • scope
    : a plan file path OR a git diff (the artifact under review)
  • overrides
    (optional):
    { include: [], exclude: [] }
This skill returns (as structured text the caller parses):
  • panel
    : ordered list of reviewer agent names
  • policy
    : gate, cap, and the algebra below
If this skill is unavailable, callers fall back to
[technical-editor, code-reviewer]
with gate=P2, cap=3.
Cross-tool note: Codex/Cursor cannot invoke skills via the Skill tool. Read this file directly (
.claude/skills/assemble-panel/SKILL.md
) and apply the policy algebra inline.
调用方需要提供:
  • scope
    :计划文件路径 OR git diff(待评审的产物)
  • overrides
    (可选):
    { include: [], exclude: [] }
本skill返回(调用方需要解析该结构化文本):
  • panel
    :有序的评审agent名称列表
  • policy
    :准入阈值、最大轮次以及下方的算法规则
如果本skill不可用,调用方将回退使用
[technical-editor, code-reviewer]
配置,准入阈值gate=P2,最大轮次cap=3。
跨工具注意: Codex/Cursor无法通过Skill工具调用skill。请直接读取本文件(
.claude/skills/assemble-panel/SKILL.md
)并直接应用规则算法。

Policy Algebra (frozen — do not modify, version: 1)

规则算法(已冻结,请勿修改,版本:1)

DEFAULTS:
  gate    = P2                       # fix P0-P2, record P3+
  cap     = 3                        # max rounds before escalate
  always  = [technical-editor]       # expandable, never reducible

ASSEMBLE(scope: plan_file | diff):
  panel = always
        + select_by_scope(file_types(scope))
        + select_by_keywords(body(scope))
        + overrides.include
        - overrides.exclude            # cannot remove `always` members

RETAIN(reviewer, round_findings):
  keep(reviewer) while round_findings.any_above(gate)

EXPAND(panel, prior_scope, current_scope):
  new_coverage = file_types(current_scope) - file_types(prior_scope)
  panel += select_by_scope(new_coverage) when new_coverage

CONVERGE(round, panel, cap):
  APPROVE   when all(reviewer.done for reviewer in panel)
  ESCALATE  when round >= cap
  EXIT      when any(reviewer.verdict == DROP)
  continue  otherwise

ESCALATE_RECURRING(finding, rounds_present):
  finding.severity += 1 when rounds_present >= 2
DEFAULTS:
  gate    = P2                       # fix P0-P2, record P3+
  cap     = 3                        # max rounds before escalate
  always  = [technical-editor]       # expandable, never reducible

ASSEMBLE(scope: plan_file | diff):
  panel = always
        + select_by_scope(file_types(scope))
        + select_by_keywords(body(scope))
        + overrides.include
        - overrides.exclude            # cannot remove `always` members

RETAIN(reviewer, round_findings):
  keep(reviewer) while round_findings.any_above(gate)

EXPAND(panel, prior_scope, current_scope):
  new_coverage = file_types(current_scope) - file_types(prior_scope)
  panel += select_by_scope(new_coverage) when new_coverage

CONVERGE(round, panel, cap):
  APPROVE   when all(reviewer.done for reviewer in panel)
  ESCALATE  when round >= cap
  EXIT      when any(reviewer.verdict == DROP)
  continue  otherwise

ESCALATE_RECURRING(finding, rounds_present):
  finding.severity += 1 when rounds_present >= 2

Scope-to-Reviewer Map

范围-评审者映射表

Used by
select_by_scope(file_types)
:
File patternReviewer
.ts
,
.js
,
src/
,
tests/
code-reviewer
.yml
,
.github/workflows/
code-reviewer, security-auditor
.sh
,
scripts/
,
hooks/
code-reviewer, security-auditor
.md
(plans, ADRs, docs)
architect-reviewer
*.css
,
*.tsx
, UI components
design-reviewer, accessibility-tester
sync.sh
,
AGENTS.md
,
config.toml
, skills
codex-specialist
*.pem
,
*.key
, secrets patterns
security-auditor
When multiple patterns match, union all reviewers. Duplicates collapsed.
select_by_scope(file_types)
方法使用:
文件匹配模式评审者
.ts
,
.js
,
src/
,
tests/
code-reviewer
.yml
,
.github/workflows/
code-reviewer, security-auditor
.sh
,
scripts/
,
hooks/
code-reviewer, security-auditor
.md
(计划文档、架构决策记录ADR、普通文档)
architect-reviewer
*.css
,
*.tsx
, UI组件
design-reviewer, accessibility-tester
sync.sh
,
AGENTS.md
,
config.toml
, skill相关文件
codex-specialist
*.pem
,
*.key
, 密钥类模式
security-auditor
当有多个模式匹配时,合并所有评审者,自动去重。

Keyword-to-Reviewer Map

关键词-评审者映射表

Used by
select_by_keywords(body)
:
Keyword / phraseReviewer
"architecture", "ADR", "system design", "plan"architect-reviewer
"security", "auth", "token", "PAT", "OIDC"security-auditor
"WCAG", "accessibility", "a11y", "aria"accessibility-tester
"UI", "component", "layout", "design system"design-reviewer
"docs", "research", "ecosystem", "reference", "educational"fact-checker
"Codex", "cross-tool", "sync.sh"codex-specialist
Keywords are case-insensitive substring matches against the scope body.
select_by_keywords(body)
方法使用:
关键词/短语评审者
"architecture", "ADR", "system design", "plan"architect-reviewer
"security", "auth", "token", "PAT", "OIDC"security-auditor
"WCAG", "accessibility", "a11y", "aria"accessibility-tester
"UI", "component", "layout", "design system"design-reviewer
"docs", "research", "ecosystem", "reference", "educational"fact-checker
"Codex", "cross-tool", "sync.sh"codex-specialist
关键词匹配为不区分大小写的子字符串匹配,匹配范围为scope的正文内容。

Override Rules

覆写规则

  • overrides.include
    appends reviewers unconditionally.
  • overrides.exclude
    removes reviewers EXCEPT those in
    always
    . Attempting to exclude an
    always
    member is silently ignored.
  • Invalid reviewer names are rejected with an error listing valid names.
  • overrides.include
    会无条件追加评审者
  • overrides.exclude
    会移除评审者,但
    always
    列表中的评审者除外。尝试移除
    always
    成员的操作会被静默忽略
  • 无效的评审者名称会被拒绝,并返回包含有效名称列表的错误信息

Failure Modes

故障场景处理

  • Scope empty or unreadable: return
    always
    panel only, warn caller.
  • No file types detected: fall back to keyword matching only. If no keywords match either, return
    always
    panel.
  • Caller requests cap > 5: clamp to 5. Non-negotiable ceiling.
  • Panel exceeds 5 members: warn caller — likely a sign the change is too broad.
  • Reviewer unavailable at dispatch time: caller skips that reviewer and notes the gap. This skill assembles; callers dispatch.
  • scope为空或无法读取: 仅返回
    always
    列表中的评审团,同时向调用方发出警告
  • 未检测到任何文件类型: 仅回退到关键词匹配。如果也没有匹配到任何关键词,则返回
    always
    列表的评审团
  • 调用方请求的cap>5: 强制限制为5,为不可协商的上限
  • 评审团成员超过5人: 向调用方发出警告——通常意味着变更范围过宽
  • 派发时评审者不可用: 调用方跳过该评审者并记录空缺。本skill仅负责组建评审团,派发由调用方处理

Output Format

输出格式

PANEL: technical-editor, code-reviewer, security-auditor
GATE: P2
CAP: 3
ALWAYS: technical-editor
NOTE: codex-specialist included — scope touches sync.sh
One
NOTE
line per non-obvious selection decision. Callers surface these in review summaries.
PANEL: technical-editor, code-reviewer, security-auditor
GATE: P2
CAP: 3
ALWAYS: technical-editor
NOTE: codex-specialist included — scope touches sync.sh
每一条非显而易见的选择决策对应一条
NOTE
记录。调用方需要在评审摘要中展示这些备注。