review

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Review Skill

审查Skill

Overview

概述

One adversarial review pass over the complete integrated diff (the feature branch vs
main
). A single fresh-context reviewer judges spec-compliance, code quality, and test adequacy together — there is no separate spec-then-quality staging. The pass emits one verdict (
reviews.review.status
).
Posture: you are an ADVERSARIAL reviewer. Your job is to find what is wrong, not to confirm what is right.
MANDATORY: before accepting any rationalization for approving without full verification, consult
references/rationalization-refutation.md
. Every common excuse is catalogued with a counter-argument and the correct action.
针对完整集成差异(特性分支与
main
分支对比)的单次对抗式审查。由一位无前置上下文的评审员同时评估规范合规性、代码质量和测试充分性——没有先审查规范再审查质量的分阶段流程。本次审查会输出一个结论(
reviews.review.status
)。
定位: 你是一名对抗式评审员。你的职责是找出问题,而非确认正确之处。
强制要求: 在接受任何未完全验证就批准的合理化理由之前,请查阅
references/rationalization-refutation.md
。所有常见借口都配有反驳论据和正确操作指引。

Execution Context

执行上下文

This skill runs in a SUBAGENT spawned by the orchestrator, not inline — a clean reviewer with no authoring transcript, provisioned with the diff + the spec.
The orchestrator:
  1. Generates the integrated diff once:
    exarchos_orchestrate({ action: "review_diff", baseBranch: "main" })
    (or
    git diff main...HEAD
    ).
  2. Passes the diff content + the state file path (for artifact resolution) + the intent grounding in the dispatch prompt.
The subagent reads the spec from state, runs the gates against the working tree, performs the adversarial walkthrough, and returns one structured JSON verdict.
该Skill运行在由orchestrator(编排器)生成的SUBAGENT(子代理)中,而非内联运行——这是一个无作者记录的独立评审员,会被提供差异内容和规范。
编排器:
  1. 生成一次集成差异:
    exarchos_orchestrate({ action: "review_diff", baseBranch: "main" })
    (或
    git diff main...HEAD
    )。
  2. 将差异内容 + 状态文件路径(用于工件解析) + 意图基准信息传入调度提示语。
子代理从状态中读取规范,针对工作树运行关卡,执行对抗式走查,并返回一个结构化JSON结论。

Intent grounding (intended-vs-delivered)

意图基准(预期vs交付)

The orchestrator captures the intended change as
artifacts.intent
and threads it into the dispatch as an
intentGrounding
directive. When present, verify the delivered diff against it:
  • Intended-but-missing — a surface or outcome the intent calls for that the diff does not deliver. Flag as a
    spec
    issue.
  • Delivered-but-unintended (scope creep) — changes outside the intended surfaces with no spec justification. Flag as a
    spec
    issue.
When no
intentGrounding
is supplied, review against the diff alone — do not fabricate an intent.
编排器将预期变更捕获为
artifacts.intent
,并将其作为
intentGrounding
指令传入调度流程。如果存在该指令,请验证交付的差异是否符合预期:
  • 预期但未实现——意图中要求的功能或结果未在差异中体现。标记为
    spec
    问题。
  • 已实现但超出预期(范围蔓延)——超出预期范围且无规范依据的变更。标记为
    spec
    问题。
如果未提供
intentGrounding
,仅针对差异本身进行审查——请勿编造意图。

What the pass covers

审查覆盖范围

Pick the approach first:
exarchos_orchestrate({ action: "runbook", id: "review-strategy" })
— single-pass vs two-pass, by diff size and prior fix-cycle count.
Review the combined diff across all tasks in one view — this catches cross-task interface mismatches, bugs invisible in isolation, and inconsistent patterns. Cover all three lenses in the single pass:
  1. Spec-compliance — functional completeness, specification alignment, intended-vs-delivered. See
    references/spec-compliance-checklist.md
    .
  2. Test adequacy — outcome-based, tier-scaled (not test-first ordering). Run the kill-probe so a vacuous test fails the gate:
    typescript
    exarchos_orchestrate({
      action: "check_test_adequacy",
      featureId: "<featureId>",
      taskId: "<taskId>",
      branch: "<branch>",
      riskTier: "<low|medium|high>",
      phase: "review"
    })
  3. Code quality — correctness, SOLID, error handling, security, performance, maintainability, and test desiderata (behavioral / structure-insensitive / deterministic / specific). See
    references/code-quality-checklist.md
    ,
    references/security-checklist.md
    ,
    references/typescript-standards.md
    .
先选择审查方式:
exarchos_orchestrate({ action: "runbook", id: "review-strategy" })
——根据差异大小和之前的修复周期数选择单次审查还是两次审查。
在同一视图中审查所有任务的合并差异——这能发现跨任务接口不匹配、孤立场景下不可见的Bug以及不一致的模式。单次审查需覆盖以下三个维度:
  1. 规范合规性——功能完整性、规范一致性、预期vs交付。详见
    references/spec-compliance-checklist.md
  2. 测试充分性——基于结果、按风险等级划分(不按测试优先顺序)。运行kill-probe(失效探测),使无效测试无法通过关卡:
    typescript
    exarchos_orchestrate({
      action: "check_test_adequacy",
      featureId: "<featureId>",
      taskId: "<taskId>",
      branch: "<branch>",
      riskTier: "<low|medium|high>",
      phase: "review"
    })
  3. 代码质量——正确性、SOLID原则、错误处理、安全性、性能、可维护性,以及测试需求(行为化/结构无关/确定性/特定性)。详见
    references/code-quality-checklist.md
    references/security-checklist.md
    references/typescript-standards.md

Gate execution

关卡执行

Run the quality-evaluation gates via runbook —
exarchos_orchestrate({ action: "runbook", id: "quality-evaluation" })
— then execute the MCP-served quality-check catalog. See
references/gate-execution.md
for signatures.
  1. check_static_analysis
    — lint + typecheck (D2). Must pass.
  2. check_security_scan
    — security pattern detection (D1).
  3. prepare_review
    — returns the deterministic check catalog (grep / structural / heuristic) +
    pluginStatus
    . Execute each check against the changed files; collect findings as
    pluginFindings
    .
  4. Optional D3–D5 gates (
    check_context_economy
    ,
    check_operational_resilience
    ,
    check_workflow_determinism
    ) — advisory; feed the convergence view.
mutation-adequacy (HIGH tier only): a separate required dimension that gates the HIGH risk tier at the
/review
boundary — see
@skills/mutation-adequacy/SKILL.md
. Do not run mutation testing in this skill; the closest in-scope proxy is the Specific test-desiderata property plus the delegation-time
check_test_adequacy
gate.
通过运行手册执行质量评估关卡——
exarchos_orchestrate({ action: "runbook", id: "quality-evaluation" })
——然后执行MCP提供的质量检查目录。签名详见
references/gate-execution.md
  1. check_static_analysis
    ——代码检查+类型校验(D2)。必须通过。
  2. check_security_scan
    ——安全模式检测(D1)。
  3. prepare_review
    ——返回确定性检查目录(grep/结构/启发式)+
    pluginStatus
    。针对变更文件执行每项检查;将结果收集为
    pluginFindings
  4. 可选D3–D5关卡(
    check_context_economy
    check_operational_resilience
    check_workflow_determinism
    )——建议性关卡;为收敛视图提供数据。
变异充分性(仅高风险等级):这是一个独立的必填维度,在
/review
边界处管控高风险等级——详见
@skills/mutation-adequacy/SKILL.md
。请勿在此Skill中运行变异测试;最接近的范围内替代方案是特定性测试需求属性,加上委派阶段的
check_test_adequacy
关卡。

Verdict & fix loop

结论与修复循环

Compute the verdict once over the merged finding set. Route it via the decision runbook —
exarchos_orchestrate({ action: "runbook", id: "review-escalation" })
. See
references/convergence-and-verdict.md
.
check_review_verdict
takes the finding counts + the
pluginFindings
, emits the gate event, and returns APPROVED or NEEDS_FIXES:
typescript
exarchos_orchestrate({
  action: "check_review_verdict",
  featureId: "<id>",
  high: nativeHighCount,
  medium: nativeMediumCount,
  low: nativeLowCount,
  pluginFindings: catalogFindings,
})
The fix loop is bounded by the shared escalation policy (config-resolvable
escalation.maxIterations
, default 5) — the same bound the shepherd loop uses.
check_review_verdict
reads the event-sourced fix-cycle count and returns the escalate decision the loop MUST honor:
  • Auto-fix (under the bound, mechanical findings)
    escalate
    absent/falsy: re-dispatch to the implementer with the findings and re-review.
  • Escalate to the user
    escalate: true
    : surface the findings +
    escalationReason
    and ask how to proceed, when EITHER the bound is reached OR a finding is intent-touching (a
    spec
    issue that changes what was asked for — a human decides, not the loop).
Companion plugin (platform-dependent): on platforms with skill support the orchestrator may also invoke
impeccable:critique
for frontend diffs; feed its findings as additional
pluginFindings
.
Gate events: do NOT manually emit
gate.executed
check_review_verdict
emits it. Manual emission duplicates.
基于合并后的结果集计算一次结论。通过决策运行手册路由结论——
exarchos_orchestrate({ action: "runbook", id: "review-escalation" })
。详见
references/convergence-and-verdict.md
check_review_verdict
接收问题数量+
pluginFindings
,输出关卡事件,并返回APPROVED或NEEDS_FIXES:
typescript
exarchos_orchestrate({
  action: "check_review_verdict",
  featureId: "<id>",
  high: nativeHighCount,
  medium: nativeMediumCount,
  low: nativeLowCount,
  pluginFindings: catalogFindings,
})
修复循环受共享升级策略限制(可配置的
escalation.maxIterations
,默认5)——与引导循环使用相同的限制。
check_review_verdict
读取事件源的修复周期数,并返回循环必须遵守的升级决策:
  • 自动修复(在限制内,机械性问题)——
    escalate
    不存在/为假:将结果重新派发给实现者并重新审查。
  • 升级给用户——
    escalate: true
    :展示问题+
    escalationReason
    并询问后续操作,当达到限制次数问题涉及意图变更(即改变需求的
    spec
    问题——需由人工决策,而非循环自动处理)时触发。
**配套插件(依赖平台):**在支持Skill的平台上,编排器还可能针对前端差异调用
impeccable:critique
;将其结果作为额外的
pluginFindings
传入。
**关卡事件:**请勿手动输出
gate.executed
——
check_review_verdict
会自动输出。手动输出会导致重复。

Required output format

要求输出格式

The subagent MUST return one structured JSON verdict. Any other format is an error.
json
{
  "verdict": "pass | fail | blocked",
  "summary": "1-2 sentence summary",
  "issues": [
    {
      "severity": "HIGH | MEDIUM | LOW",
      "category": "spec | tdd | coverage | security | solid | dry | perf | naming | test-quality | other",
      "file": "path/to/file",
      "line": 123,
      "description": "Issue description",
      "required_fix": "What must change"
    }
  ],
  "test_results": { "passed": 0, "failed": 0, "coverage_percent": 0 }
}
子代理必须返回一个结构化JSON结论。任何其他格式均视为错误。
json
{
  "verdict": "pass | fail | blocked",
  "summary": "1-2 sentence summary",
  "issues": [
    {
      "severity": "HIGH | MEDIUM | LOW",
      "category": "spec | tdd | coverage | security | solid | dry | perf | naming | test-quality | other",
      "file": "path/to/file",
      "line": 123,
      "description": "Issue description",
      "required_fix": "What must change"
    }
  ],
  "test_results": { "passed": 0, "failed": 0, "coverage_percent": 0 }
}

State & transition

状态与转换

Record the verdict as an object with a
status
field (a flat string is silently ignored by the guard):
APPROVED:
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
  reviews: { "review": { status: "pass", summary: "...", issues: [] } }
}})
exarchos_workflow({ action: "transition", featureId: "<id>", target: "synthesize" })
Then invoke
synthesize
.
NEEDS_FIXES:
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
  reviews: { "review": { status: "fail", summary: "...", issues: [{ severity: "HIGH", file: "...", description: "..." }] } }
}})
Then invoke
delegate --fixes
.
Guard:
review → synthesize
requires
all-reviews-passed
— every required dimension's
reviews.{name}.status
must be a passing value (
pass | passed | approved | fixes-applied
, case-insensitive). The feature roster is
review
(+
mutation-adequacy
at HIGH tier).
review → delegate
fires on
any-review-failed
.
All transitions are automatic — this is not a human checkpoint. See
references/auto-transition.md
.
将结论记录为带有
status
字段的对象(纯字符串会被守卫静默忽略):
APPROVED(已批准):
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
  reviews: { "review": { status: "pass", summary: "...", issues: [] } }
}})
exarchos_workflow({ action: "transition", featureId: "<id>", target: "synthesize" })
然后调用
synthesize
NEEDS_FIXES(需要修复):
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
  reviews: { "review": { status: "fail", summary: "...", issues: [{ severity: "HIGH", file: "...", description: "..." }] } }
}})
然后调用
delegate --fixes
守卫规则:
review → synthesize
需要满足
all-reviews-passed
——每个必填维度的
reviews.{name}.status
必须为通过值(
pass | passed | approved | fixes-applied
,大小写不敏感)。特性清单为
review
(+高风险等级的
mutation-adequacy
)。
review → delegate
any-review-failed
时触发。
所有转换都是自动的——这不是人工检查点。详见
references/auto-transition.md

Anti-patterns

反模式

Don'tDo instead
Confirm what's rightHunt for what's wrong (adversarial posture)
Approve without the kill-probeRun
check_test_adequacy
— a test that can't fail is not coverage
Rubber-stamp on a rationalizationConsult
references/rationalization-refutation.md
Let scope creep passFlag intended-vs-delivered drift as a
spec
issue
Block on LOW-priority nitsRecord and track; reserve blocking for HIGH
禁止操作正确做法
确认正确之处寻找问题所在(对抗式定位)
未运行失效探测就批准运行
check_test_adequacy
——无法失败的测试不算覆盖
对合理化理由盖章通过查阅
references/rationalization-refutation.md
允许范围蔓延将预期vs交付的偏差标记为
spec
问题
因低优先级细节阻塞记录并跟踪;仅对高优先级问题阻塞

Schema discovery

Schema 发现

Use
exarchos_workflow({ action: "describe", actions: ["update"] })
and
exarchos_orchestrate({ action: "describe", actions: ["check_static_analysis", "check_security_scan", "check_test_adequacy", "check_review_verdict", "prepare_review"] })
for current parameter schemas.
使用
exarchos_workflow({ action: "describe", actions: ["update"] })
exarchos_orchestrate({ action: "describe", actions: ["check_static_analysis", "check_security_scan", "check_test_adequacy", "check_review_verdict", "prepare_review"] })
获取当前参数 schema。