review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReview Skill
审查Skill
Overview
概述
One adversarial review pass over the complete integrated diff (the feature branch vs ). 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 ().
mainreviews.review.statusPosture: 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. Every common excuse is catalogued with a counter-argument and the correct action.references/rationalization-refutation.md
针对完整集成差异(特性分支与分支对比)的单次对抗式审查。由一位无前置上下文的评审员同时评估规范合规性、代码质量和测试充分性——没有先审查规范再审查质量的分阶段流程。本次审查会输出一个结论()。
mainreviews.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:
- Generates the integrated diff once: (or
exarchos_orchestrate({ action: "review_diff", baseBranch: "main" })).git diff main...HEAD - 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(子代理)中,而非内联运行——这是一个无作者记录的独立评审员,会被提供差异内容和规范。
编排器:
- 生成一次集成差异:(或
exarchos_orchestrate({ action: "review_diff", baseBranch: "main" }))。git diff main...HEAD - 将差异内容 + 状态文件路径(用于工件解析) + 意图基准信息传入调度提示语。
子代理从状态中读取规范,针对工作树运行关卡,执行对抗式走查,并返回一个结构化JSON结论。
Intent grounding (intended-vs-delivered)
意图基准(预期vs交付)
The orchestrator captures the intended change as and threads it into the dispatch as an directive. When present, verify the delivered diff against it:
artifacts.intentintentGrounding- Intended-but-missing — a surface or outcome the intent calls for that the diff does not deliver. Flag as a issue.
spec - Delivered-but-unintended (scope creep) — changes outside the intended surfaces with no spec justification. Flag as a issue.
spec
When no is supplied, review against the diff alone — do not fabricate an intent.
intentGrounding编排器将预期变更捕获为,并将其作为指令传入调度流程。如果存在该指令,请验证交付的差异是否符合预期:
artifacts.intentintentGrounding- 预期但未实现——意图中要求的功能或结果未在差异中体现。标记为问题。
spec - 已实现但超出预期(范围蔓延)——超出预期范围且无规范依据的变更。标记为问题。
spec
如果未提供,仅针对差异本身进行审查——请勿编造意图。
intentGroundingWhat the pass covers
审查覆盖范围
Pick the approach first: — single-pass vs two-pass, by diff size and prior fix-cycle count.
exarchos_orchestrate({ action: "runbook", id: "review-strategy" })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:
- Spec-compliance — functional completeness, specification alignment, intended-vs-delivered. See .
references/spec-compliance-checklist.md - 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" }) - 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以及不一致的模式。单次审查需覆盖以下三个维度:
- 规范合规性——功能完整性、规范一致性、预期vs交付。详见。
references/spec-compliance-checklist.md - 测试充分性——基于结果、按风险等级划分(不按测试优先顺序)。运行kill-probe(失效探测),使无效测试无法通过关卡:
typescript
exarchos_orchestrate({ action: "check_test_adequacy", featureId: "<featureId>", taskId: "<taskId>", branch: "<branch>", riskTier: "<low|medium|high>", phase: "review" }) - 代码质量——正确性、SOLID原则、错误处理、安全性、性能、可维护性,以及测试需求(行为化/结构无关/确定性/特定性)。详见、
references/code-quality-checklist.md、references/security-checklist.md。references/typescript-standards.md
Gate execution
关卡执行
Run the quality-evaluation gates via runbook — — then execute the MCP-served quality-check catalog. See for signatures.
exarchos_orchestrate({ action: "runbook", id: "quality-evaluation" })references/gate-execution.md- — lint + typecheck (D2). Must pass.
check_static_analysis - — security pattern detection (D1).
check_security_scan - — returns the deterministic check catalog (grep / structural / heuristic) +
prepare_review. Execute each check against the changed files; collect findings aspluginStatus.pluginFindings - Optional D3–D5 gates (,
check_context_economy,check_operational_resilience) — advisory; feed the convergence view.check_workflow_determinism
mutation-adequacy (HIGH tier only): a separate required dimension that gates the HIGH risk tier at theboundary — see/review. Do not run mutation testing in this skill; the closest in-scope proxy is the Specific test-desiderata property plus the delegation-time@skills/mutation-adequacy/SKILL.mdgate.check_test_adequacy
通过运行手册执行质量评估关卡————然后执行MCP提供的质量检查目录。签名详见。
exarchos_orchestrate({ action: "runbook", id: "quality-evaluation" })references/gate-execution.md- ——代码检查+类型校验(D2)。必须通过。
check_static_analysis - ——安全模式检测(D1)。
check_security_scan - ——返回确定性检查目录(grep/结构/启发式)+
prepare_review。针对变更文件执行每项检查;将结果收集为pluginStatus。pluginFindings - 可选D3–D5关卡(、
check_context_economy、check_operational_resilience)——建议性关卡;为收敛视图提供数据。check_workflow_determinism
变异充分性(仅高风险等级):这是一个独立的必填维度,在边界处管控高风险等级——详见/review。请勿在此Skill中运行变异测试;最接近的范围内替代方案是特定性测试需求属性,加上委派阶段的@skills/mutation-adequacy/SKILL.md关卡。check_test_adequacy
Verdict & fix loop
结论与修复循环
Compute the verdict once over the merged finding set. Route it via the decision runbook — . See .
exarchos_orchestrate({ action: "runbook", id: "review-escalation" })references/convergence-and-verdict.mdcheck_review_verdictpluginFindingstypescript
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 , default 5) — the same bound the shepherd loop uses. reads the event-sourced fix-cycle count and returns the escalate decision the loop MUST honor:
escalation.maxIterationscheck_review_verdict- Auto-fix (under the bound, mechanical findings) — absent/falsy: re-dispatch to the implementer with the findings and re-review.
escalate - Escalate to the user — : surface the findings +
escalate: trueand ask how to proceed, when EITHER the bound is reached OR a finding is intent-touching (aescalationReasonissue that changes what was asked for — a human decides, not the loop).spec
Companion plugin (platform-dependent): on platforms with skill support the orchestrator may also invokefor frontend diffs; feed its findings as additionalimpeccable:critique.pluginFindings
Gate events: do NOT manually emit—gate.executedemits it. Manual emission duplicates.check_review_verdict
基于合并后的结果集计算一次结论。通过决策运行手册路由结论——。详见。
exarchos_orchestrate({ action: "runbook", id: "review-escalation" })references/convergence-and-verdict.mdcheck_review_verdictpluginFindingstypescript
exarchos_orchestrate({
action: "check_review_verdict",
featureId: "<id>",
high: nativeHighCount,
medium: nativeMediumCount,
low: nativeLowCount,
pluginFindings: catalogFindings,
})修复循环受共享升级策略限制(可配置的,默认5)——与引导循环使用相同的限制。读取事件源的修复周期数,并返回循环必须遵守的升级决策:
escalation.maxIterationscheck_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 field (a flat string is silently ignored by the guard):
statusAPPROVED:
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
reviews: { "review": { status: "pass", summary: "...", issues: [] } }
}})
exarchos_workflow({ action: "transition", featureId: "<id>", target: "synthesize" })Then invoke .
synthesizeNEEDS_FIXES:
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
reviews: { "review": { status: "fail", summary: "...", issues: [{ severity: "HIGH", file: "...", description: "..." }] } }
}})Then invoke .
delegate --fixesGuard:requiresreview → synthesize— every required dimension'sall-reviews-passedmust be a passing value (reviews.{name}.status, case-insensitive). The feature roster ispass | passed | approved | fixes-applied(+reviewat HIGH tier).mutation-adequacyfires onreview → delegate.any-review-failed
All transitions are automatic — this is not a human checkpoint. See .
references/auto-transition.md将结论记录为带有字段的对象(纯字符串会被守卫静默忽略):
statusAPPROVED(已批准):
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
reviews: { "review": { status: "pass", summary: "...", issues: [] } }
}})
exarchos_workflow({ action: "transition", featureId: "<id>", target: "synthesize" })然后调用。
synthesizeNEEDS_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.mdAnti-patterns
反模式
| Don't | Do instead |
|---|---|
| Confirm what's right | Hunt for what's wrong (adversarial posture) |
| Approve without the kill-probe | Run |
| Rubber-stamp on a rationalization | Consult |
| Let scope creep pass | Flag intended-vs-delivered drift as a |
| Block on LOW-priority nits | Record and track; reserve blocking for HIGH |
| 禁止操作 | 正确做法 |
|---|---|
| 确认正确之处 | 寻找问题所在(对抗式定位) |
| 未运行失效探测就批准 | 运行 |
| 对合理化理由盖章通过 | 查阅 |
| 允许范围蔓延 | 将预期vs交付的偏差标记为 |
| 因低优先级细节阻塞 | 记录并跟踪;仅对高优先级问题阻塞 |
Schema discovery
Schema 发现
Use and
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。
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"] })