quality-review

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Quality Review Skill

质量评审Skill

Overview

概述

Stage 2 of two-stage review: Assess code quality, maintainability, and engineering best practices.
Prerequisite: Spec review must PASS before quality review.
MANDATORY: Before accepting any rationalization for rubber-stamping code quality, consult
references/rationalization-refutation.md
. Every common excuse is catalogued with a counter-argument and the correct action.
两阶段评审的第二阶段:评估代码质量、可维护性及工程最佳实践。
前置条件: 质量评审前必须通过Spec review。
强制要求: 在接受任何对代码质量放行的合理化解释之前,请查阅
references/rationalization-refutation.md
。所有常见借口都已收录,并配有反驳论据及正确处理方案。

Triggers

触发条件

Activate this skill when:
  • Spec review has passed
  • /review
    command (after spec review)
  • Ready to assess code quality
  • Before synthesis/merge
在以下场景激活此Skill:
  • Spec review已通过
  • 执行
    /review
    指令(Spec review完成后)
  • 准备评估代码质量时
  • 代码合并/合成前

Execution Context

执行上下文

This skill runs in a SUBAGENT spawned by the orchestrator, not inline.
The orchestrator provides the state file path, diff output from
exarchos_orchestrate({ action: "review_diff" })
, task ID, and spec review results (must be PASS).
The subagent reads the state file for artifact paths, uses the diff output instead of full files, runs static analysis, performs a code walkthrough, generates a report, and returns the verdict.
此Skill在由orchestrator生成的SUBAGENT中运行,而非内联运行。
Orchestrator会提供状态文件路径、
exarchos_orchestrate({ action: "review_diff" })
生成的diff输出、任务ID以及Spec review结果(必须为PASS)。
子代理会读取状态文件获取工件路径,使用diff输出而非完整文件,运行静态分析,执行代码走查,生成报告并返回评审结论。

Data Handoff Protocol

数据传递协议

The orchestrator is responsible for generating the diff before dispatching the quality-review subagent. The subagent does NOT generate its own diff.
Orchestrator responsibilities:
  1. Generate diff:
    git diff main...HEAD
    or
    git diff main...integration-branch
  2. Pass diff content in the subagent dispatch prompt
  3. Include state file path for artifact resolution
  4. Include spec review results (must be PASS)
Subagent responsibilities:
  1. Receive diff content from dispatch prompt (do NOT re-generate)
  2. Read state file for design/plan artifact paths
  3. Run static analysis and security scripts against the working tree
  4. Return structured JSON verdict
Orchestrator职责:
  1. 生成diff:
    git diff main...HEAD
    git diff main...integration-branch
  2. 在子代理调度提示中传递diff内容
  3. 包含用于工件解析的状态文件路径
  4. 包含Spec review结果(必须为PASS)
子代理职责:
  1. 从调度提示中接收diff内容(请勿重新生成)
  2. 读取状态文件获取设计/计划工件路径
  3. 对工作树运行静态分析和安全脚本
  4. 返回结构化JSON结论

Context-Efficient Input

高效上下文输入

Instead of reading full files, receive the integrated diff:
bash
undefined
无需读取完整文件,只需接收整合后的diff:
bash
undefined

Generate integrated diff for review (branch stack vs main)

Generate integrated diff for review (branch stack vs main)

git diff main...HEAD > /tmp/stack-diff.patch
git diff main...HEAD > /tmp/stack-diff.patch

Alternative: git diff for integration branch

Alternative: git diff for integration branch

git diff main...integration-branch > /tmp/integration-diff.patch
git diff main...integration-branch > /tmp/integration-diff.patch

Alternative: use gh CLI to get PR diff

Alternative: use gh CLI to get PR diff

gh pr diff <number>

gh pr diff <number>

Or use GitHub MCP pull_request_read with method "get_diff" if available

Or use GitHub MCP pull_request_read with method "get_diff" if available


This reduces context consumption by 80-90% while providing the complete picture.

这能将上下文消耗减少80-90%,同时提供完整的变更视图。

Pre-Review Schema Discovery

评审前模式发现

Before evaluating, query the review strategy runbook to determine the appropriate evaluation approach:
  • Evaluation strategy:
    exarchos_orchestrate({ action: "runbook", id: "review-strategy" })
    to determine single-pass vs two-pass evaluation strategy based on diff size and task count.
在评估之前,查询评审策略手册以确定合适的评估方法:
  • 评估策略: 通过
    exarchos_orchestrate({ action: "runbook", id: "review-strategy" })
    根据diff大小和任务数量确定单轮或双轮评估策略。

Review Scope: Combined Changes

评审范围:合并后的变更

After delegation completes, quality review examines:
  • The complete stack diff (all task branches vs main), or the feature/integration-branch diff when using integration branches
  • All changes across all tasks in one view
  • The full picture of combined code quality
This enables catching:
  • Cross-task SOLID violations
  • Duplicate code across task boundaries
  • Inconsistent patterns between tasks
委托完成后,质量评审将检查:
  • 完整的栈diff(所有任务分支与main分支的对比),或使用集成分支时的功能/集成分支diff
  • 所有任务中的全部变更,统一查看
  • 合并后代码质量的完整情况
这有助于发现:
  • 跨任务的SOLID原则违反情况
  • 任务边界间的重复代码
  • 任务间的不一致模式

Review Scope

评审范围

Quality Review focuses on:
  • Code quality and readability
  • SOLID principles
  • Error handling
  • Test quality
  • Performance considerations
  • Security basics
Does NOT re-check:
  • Functional completeness (spec review)
  • TDD compliance (spec review)
质量评审重点关注:
  • 代码质量与可读性
  • SOLID原则
  • 错误处理
  • 测试质量
  • 性能考量
  • 基础安全性
不重复检查:
  • 功能完整性(由Spec review负责)
  • TDD合规性(由Spec review负责)

Review Process

评审流程

Check Quality Signals

检查质量信号

Before reviewing, query quality signals for the skill(s) under review:
mcp__exarchos__exarchos_view({ action: "code_quality", workflowId: "<featureId>" })
  • If
    regressions
    is non-empty, report active quality regressions to the user before proceeding
  • If any hint has
    confidenceLevel: 'actionable'
    , present the
    suggestedAction
    to the user
  • If
    gatePassRate < 0.80
    for the target skill, warn about degrading quality
评审前,查询待评审Skill的质量信号:
mcp__exarchos__exarchos_view({ action: "code_quality", workflowId: "<featureId>" })
  • 如果
    regressions
    不为空,在继续前向用户报告当前存在的质量退化问题
  • 如果任何提示的
    confidenceLevel
    为'actionable',向用户展示
    suggestedAction
  • 如果目标Skill的
    gatePassRate < 0.80
    ,警告用户质量正在下降

Step 0: Verify Spec Review Passed (MANDATORY)

步骤0:验证Spec review已通过(强制要求)

Before proceeding, confirm spec review passed for all tasks:
text
action: "get", featureId: "<id>", query: "reviews"
If ANY task has
specReview.status !== "pass"
, STOP and return:
json
{ "verdict": "blocked", "summary": "Spec review not passed — run spec-review first" }
开始前,确认所有任务的Spec review均已通过:
text
action: "get", featureId: "<id>", query: "reviews"
如果任何任务的
specReview.status !== "pass"
,立即停止并返回:
json
{ "verdict": "blocked", "summary": "Spec review未通过——请先执行spec-review" }

Step 0.5: Verify Review Triage (Conditional — run when delegation phase preceded this review)

步骤0.5:验证评审分流(可选——当评审前存在委托阶段时执行)

If this review follows a delegation phase, verify triage routing:
typescript
exarchos_orchestrate({
  action: "verify_review_triage",
  stateFile: "<state-file>"
})
passed: true
: triage routing correct — continue to Step 1.
passed: false
: triage issues found — investigate and resolve before proceeding.
如果此评审在委托阶段之后进行,验证分流路由是否正确:
typescript
exarchos_orchestrate({
  action: "verify_review_triage",
  stateFile: "<state-file>"
})
passed: true
:分流路由正确——继续步骤1。
passed: false
:发现分流问题——先调查并解决再继续。

Step 1: Static Analysis + Security + Extended Gates

步骤1:静态分析 + 安全检查 + 扩展闸门

Runbook: Run quality evaluation gates via runbook:
exarchos_orchestrate({ action: "runbook", id: "quality-evaluation" })
If runbook unavailable, use
describe
to retrieve gate schemas:
exarchos_orchestrate({ action: "describe", actions: ["check_static_analysis", "check_security_scan", "check_convergence", "check_review_verdict"] })
Run automated gates via orchestrate actions. See
references/gate-execution.md
for orchestrate action signatures and response handling.
  1. check_static_analysis
    — lint, typecheck, quality-check (D2). Must pass before continuing.
  2. check_security_scan
    — security pattern detection (D1). Include findings in report.
  3. Optional D3-D5 gates:
    check_context_economy
    ,
    check_operational_resilience
    ,
    check_workflow_determinism
    — advisory, feed convergence view.
执行手册: 通过运行手册执行质量评估闸门:
exarchos_orchestrate({ action: "runbook", id: "quality-evaluation" })
如果运行手册不可用,使用
describe
获取闸门模式:
exarchos_orchestrate({ action: "describe", actions: ["check_static_analysis", "check_security_scan", "check_convergence", "check_review_verdict"] })
通过orchestrate动作运行自动化闸门。有关orchestrate动作签名和响应处理,请参阅
references/gate-execution.md
  1. check_static_analysis
    ——代码检查、类型检查、质量检查(D2)。必须通过才能继续。
  2. check_security_scan
    ——安全模式检测(D1)。将检测结果纳入报告。
  3. 可选D3-D5闸门:
    check_context_economy
    check_operational_resilience
    check_workflow_determinism
    ——建议性检查,结果用于收敛视图。

Step 2: Test Desiderata Evaluation

步骤2:测试需求评估

Evaluate agent-generated tests against Kent Beck's Test Desiderata. Four properties are critical for agentic code:
PropertyWhat to checkFlag when
BehavioralTests assert on observable behavior, not implementation detailsMock call count assertions, internal state inspection, testing private methods
Structure-insensitiveTests survive refactoring without behavioral changeTests coupled to internal helper method signatures, tests that break when internals are renamed
DeterministicTests produce the same result every runUncontrolled
Date.now()
,
Math.random()
,
setTimeout
race conditions, network-dependent tests
SpecificTest failures pinpoint the cause
toBeTruthy()
/
toBeDefined()
without additional specific assertions, catch-all tests with vague descriptions
Test layer mismatch detection: Flag unit tests with >3 mocked dependencies as potential layer mismatches — unit tests with many mocks often indicate the test is asserting integration concerns rather than unit logic. Advisory finding: suggest re-classifying as integration test with real collaborators.
Include Test Desiderata findings in the quality review report under a "Test Quality" section. Output format: Report Test Desiderata violations as entries in the
issues
array with
category: "test-quality"
.
根据Kent Beck的测试需求评估代理生成的测试。以下四个特性对于代理生成的代码至关重要:
特性检查内容标记场景
行为化测试断言可观察行为,而非实现细节模拟调用次数断言、内部状态检查、测试私有方法
结构无关性测试在重构时无需修改行为即可保持有效测试与内部辅助方法签名耦合、内部重命名导致测试失败
确定性每次运行测试都会产生相同结果未受控的
Date.now()
Math.random()
setTimeout
竞态条件、依赖网络的测试
针对性测试失败能精确定位问题原因使用
toBeTruthy()
/
toBeDefined()
但无额外具体断言、描述模糊的全能测试
测试层不匹配检测: 将具有3个以上模拟依赖的单元测试标记为潜在层不匹配——带有大量模拟的单元测试通常表明该测试断言的是集成关注点而非单元逻辑。建议性发现:建议将其重新归类为使用真实协作对象的集成测试。
将测试需求评估结果纳入质量评审报告的“测试质量”部分。输出格式: 将测试需求违反情况作为
issues
数组中的条目,标记
category: "test-quality"

Step 3: Generate Report

步骤3:生成报告

Use the template from
references/review-report-template.md
to structure the review output.
使用
references/review-report-template.md
中的模板构建评审输出。

Priority Levels

优先级等级

PriorityActionExamples
HIGHMust fix before mergeSecurity issues, data loss risks
MEDIUMShould fix, may deferSOLID violations, complexity
LOWNice to haveStyle preferences, minor refactors
优先级操作示例
合并前必须修复安全问题、数据丢失风险
应修复,可延后SOLID原则违反、复杂度问题
锦上添花风格偏好、小型重构

Priority Classification Rules

优先级分类规则

  • HIGH: security vulnerabilities, data loss risk, API contract breaks, uncaught exception paths
  • MEDIUM: SOLID violations (LSP, ISP), cyclomatic complexity >15, test coverage <70%
  • LOW: naming, code style, comment clarity, non-impactful performance
If classification is ambiguous, default to MEDIUM and flag for human decision.
  • 高: 安全漏洞、数据丢失风险、API契约破坏、未捕获异常路径
  • 中: SOLID原则违反(LSP、ISP)、圈复杂度>15、测试覆盖率<70%
  • 低: 命名、代码风格、注释清晰度、无影响的性能问题
如果分类存在歧义,默认标记为中优先级并提请人工决策。

Fix Loop for HIGH-Priority

高优先级问题修复循环

If HIGH-priority issues found:
  1. Create fix task listing each HIGH finding with file, issue, and required fix
  2. Dispatch to implementer subagent
  3. Re-review quality after fixes
  4. Only mark APPROVED when all HIGH items resolved and tests pass
Fix loop iteration limit: max 3. If HIGH-priority issues persist after 3 fix-review cycles, pause and escalate to the user with a summary of unresolved issues. The user can override:
/review --max-fix-iterations 5
如果发现高优先级问题:
  1. 创建修复任务,列出每个高优先级问题的文件、问题描述及所需修复内容
  2. 派发给实现子代理
  3. 修复后重新进行质量评审
  4. 仅当所有高优先级问题解决且测试通过时,标记为APPROVED
修复循环迭代上限:最多3次。 如果经过3次修复-评审循环后仍存在高优先级问题,暂停并向用户提交未解决问题的总结。用户可通过
/review --max-fix-iterations 5
覆盖上限。

Post-Fix Spec Compliance Check (MANDATORY after fix cycle)

修复后规范合规性检查(修复循环完成后强制执行)

After the quality-review fix loop completes and quality passes, re-verify that the quality fixes did not break spec compliance. Run inline (not a full dispatch):
  1. Run spec verification commands:
    bash
    npm run test:run
    npm run typecheck
    typescript
    exarchos_orchestrate({
      action: "check_tdd_compliance",
      featureId: "<featureId>",
      taskId: "<taskId>",
      branch: "<branch>"
    })
  2. If all pass: proceed to APPROVED transition
  3. If any fail: return to NEEDS_FIXES with spec regression noted in issues array
质量评审修复循环完成且质量达标后,重新验证质量修复未破坏规范合规性。内联运行(无需完整调度):
  1. 运行规范验证命令:
    bash
    npm run test:run
    npm run typecheck
    typescript
    exarchos_orchestrate({
      action: "check_tdd_compliance",
      featureId: "<featureId>",
      taskId: "<taskId>",
      branch: "<branch>"
    })
  2. 如果全部通过:进入APPROVED状态转换
  3. 如果任何一项失败:返回NEEDS_FIXES状态,并在issues数组中注明规范退化问题

Required Output Format

要求的输出格式

The subagent MUST return results as structured JSON. The orchestrator parses this JSON to populate state. Any other format is an error.
json
{
  "verdict": "pass | fail | blocked",
  "summary": "1-2 sentence summary",
  "issues": [
    {
      "severity": "HIGH | MEDIUM | LOW",
      "category": "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返回结果。Orchestrator会解析此JSON以更新状态。任何其他格式均视为错误。
json
{
  "verdict": "pass | fail | blocked",
  "summary": "1-2 sentence summary",
  "issues": [
    {
      "severity": "HIGH | MEDIUM | LOW",
      "category": "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
  }
}

Anti-Patterns

反模式

Don'tDo Instead
Block on LOW priorityAccept and track for later
Review before spec passesComplete spec review first
Be overly pedanticFocus on impactful issues
Skip security checksAlways verify basics
Accept poor test qualityTests are code too
Apply generic standards to language issuesReference language-specific rules
请勿建议做法
因低优先级问题阻塞评审接受并跟踪后续处理
在Spec review通过前进行评审先完成Spec review
过于吹毛求疵关注有实际影响的问题
跳过安全检查始终验证基础安全性
接受低质量测试测试也是代码的一部分
对语言问题套用通用标准参考语言特定规则

Cross-Task Integration Issues

跨任务集成问题

If an issue spans multiple tasks:
  1. Classify as "cross-task integration"
  2. Create fix task specifying ALL affected tasks
  3. Dispatch fix to implementer with context from all affected tasks
  4. Mark original tasks as blocked until cross-task fix completes
如果问题涉及多个任务:
  1. 分类为"cross-task integration"
  2. 创建修复任务并指定所有受影响的任务
  3. 将修复任务派发给实现者,并提供所有受影响任务的上下文
  4. 将原始任务标记为阻塞,直到跨任务修复完成

State Management

状态管理

Key format: The review key MUST be kebab-case
reviews["quality-review"]
, not camelCase
reviews.qualityReview
. The guard matches on the exact key string.
On review complete:
text
action: "set", featureId: "<id>", updates: {
  "reviews": { "quality-review": { "status": "pass", "summary": "...", "issues": [...] } }
}
On all reviews pass — advance to synthesis:
text
action: "set", featureId: "<id>", phase: "synthesize"
关键格式: 评审键必须为短横线分隔的小写格式
reviews["quality-review"]
,而非驼峰式
reviews.qualityReview
。防护机制会匹配精确的键字符串。
评审完成后:
text
action: "set", featureId: "<id>", updates: {
  "reviews": { "quality-review": { "status": "pass", "summary": "...", "issues": [...] } }
}
所有评审通过后——进入合成阶段:
text
action: "set", featureId: "<id>", phase: "synthesize"

Phase Transitions and Guards

阶段转换与防护机制

For the full transition table, consult
@skills/workflow-state/references/phase-transitions.md
.
Quick reference:
  • review
    synthesize
    requires guard
    all-reviews-passed
    — all
    reviews.{name}.status
    must be passing
  • review
    delegate
    requires guard
    any-review-failed
    — triggers fix cycle when any review fails
完整的转换表请参阅
@skills/workflow-state/references/phase-transitions.md
快速参考:
  • review
    synthesize
    需要
    all-reviews-passed
    防护——所有
    reviews.{name}.status
    必须为通过状态
  • review
    delegate
    需要
    any-review-failed
    防护——当任何评审失败时触发修复循环

Schema Discovery

模式发现

Use
exarchos_workflow({ action: "describe", actions: ["set", "init"] })
for parameter schemas and
exarchos_workflow({ action: "describe", playbook: "feature" })
for phase transitions, guards, and playbook guidance. Use
exarchos_orchestrate({ action: "describe", actions: ["check_static_analysis", "check_security_scan", "check_review_verdict"] })
for orchestrate action schemas.
使用
exarchos_workflow({ action: "describe", actions: ["set", "init"] })
获取参数模式,使用
exarchos_workflow({ action: "describe", playbook: "feature" })
获取阶段转换、防护机制和手册指南。使用
exarchos_orchestrate({ action: "describe", actions: ["check_static_analysis", "check_security_scan", "check_review_verdict"] })
获取orchestrate动作模式。

Completion Criteria

完成标准

  • Static analysis passes
  • All HIGH-priority issues fixed
  • No security vulnerabilities
  • Test quality acceptable
  • Code is maintainable
  • State file updated with review results
  • 静态分析通过
  • 所有高优先级问题已修复
  • 无安全漏洞
  • 测试质量达标
  • 代码具备可维护性
  • 状态文件已更新评审结果

Decision Runbooks

决策手册

For review verdict routing, query the decision runbook:
exarchos_orchestrate({ action: "runbook", id: "review-escalation" })
This runbook provides structured criteria for routing between APPROVED and NEEDS_FIXES verdicts based on finding severity and fix cycle count. APPROVED transitions to synthesize; NEEDS_FIXES transitions back to delegate for a fix cycle. (BLOCKED routing is only relevant in plan-review, not here.)
如需评审结论路由,请查询决策手册:
exarchos_orchestrate({ action: "runbook", id: "review-escalation" })
该手册提供了基于问题严重性和修复循环次数,在APPROVED和NEEDS_FIXES结论之间进行路由的结构化标准。APPROVED状态会转换到合成阶段;NEEDS_FIXES状态会回到委托阶段进行修复循环。(BLOCKED路由仅与计划评审相关,与本阶段无关。)

MCP-Served Quality Check Catalog (Tier 2)

MCP提供的质量检查目录(第二层级)

After Tier 1 MCP gates complete, execute the quality check catalog. This provides deterministic quality checks (grep patterns, structural analysis) that run on any MCP platform — no companion plugins required.
第一层级MCP闸门完成后,执行质量检查目录。这提供了确定性的质量检查(grep模式、结构分析),可在任何MCP平台上运行——无需配套插件。

Step 2.5: Execute Check Catalog

步骤2.5:执行检查目录

typescript
exarchos_orchestrate({ action: "prepare_review", featureId: "<id>" })
The response contains:
  • catalog
    — structured check dimensions with grep patterns, structural thresholds, and heuristic instructions
  • findingFormat
    — the TypeScript interface for submitting findings
  • pluginStatus
    — which companion plugins are configured in
    .exarchos.yml
Execute each check in the catalog against the codebase:
  • grep checks: Run the
    pattern
    against files matching
    fileGlob
  • structural checks: Evaluate against the
    threshold
    (e.g., nesting depth, function length)
  • heuristic checks: Use judgment guided by the
    description
Collect all matches as findings in the format specified by
findingFormat
, then pass them as
pluginFindings
to
check_review_verdict
.
typescript
exarchos_orchestrate({ action: "prepare_review", featureId: "<id>" })
响应内容包括:
  • catalog
    ——结构化检查维度,包含grep模式、结构阈值和启发式说明
  • findingFormat
    ——提交检测结果的TypeScript接口
  • pluginStatus
    ——
    .exarchos.yml
    中配置的配套插件
针对代码库执行目录中的每项检查:
  • grep检查: 对匹配
    fileGlob
    的文件运行
    pattern
  • 结构检查: 对照
    threshold
    进行评估(例如嵌套深度、函数长度)
  • 启发式检查: 根据
    description
    进行判断
按照
findingFormat
指定的格式收集所有匹配结果作为检测项,然后将其作为
pluginFindings
传递给
check_review_verdict

Companion Plugin Enhancement (Tier 3 — Platform-Dependent)

配套插件增强(第三层级——平台相关)

On platforms with skill support (Claude Code, Cursor), the orchestrator may additionally invoke
axiom:audit
and
impeccable:critique
for deeper qualitative analysis. These findings are also passed as
pluginFindings
. See
references/axiom-integration.md
for the full three-tiered architecture.
在支持Skill的平台上(如Claude Code、Cursor),orchestrator可能会额外调用
axiom:audit
impeccable:critique
进行更深入的定性分析。这些检测结果也会作为
pluginFindings
传递。完整的三层架构请参阅
references/axiom-integration.md

Convergence & Verdict

收敛与结论

Query convergence status and compute verdict via orchestrate. See
references/convergence-and-verdict.md
for full orchestrate calls, response fields, and verdict routing logic.
Summary:
check_convergence
returns per-dimension D1-D5 status.
check_review_verdict
takes finding counts and optional
pluginFindings
array (from catalog execution and companion plugins), emits gate events, and returns APPROVED or NEEDS_FIXES.
通过orchestrate查询收敛状态并计算结论。完整的orchestrate调用、响应字段和结论路由逻辑请参阅
references/convergence-and-verdict.md
摘要:
check_convergence
返回各维度D1-D5的状态。
check_review_verdict
接收问题计数和可选的
pluginFindings
数组(来自目录执行和配套插件),触发闸门事件,并返回APPROVED或NEEDS_FIXES。

Auto-Transition

自动转换

All transitions are automatic — no user confirmation. See
references/auto-transition.md
for per-verdict transition details, Skill invocations, and integration notes.
所有转换均为自动完成——无需用户确认。各结论对应的转换细节、Skill调用和集成说明请参阅
references/auto-transition.md

Recording Results

记录结果

Before transitioning, record the review verdict. The reviews value MUST be an object with a
status
field, not a flat string:
APPROVED:
exarchos_workflow({ action: "set", featureId: "<id>", updates: {
  reviews: { "quality-review": { status: "pass", summary: "...", issues: [] } }
}, phase: "synthesize" })
Then invoke
/synthesize
.
NEEDS_FIXES:
exarchos_workflow({ action: "set", featureId: "<id>", updates: {
  reviews: { "quality-review": { status: "fail", summary: "...", issues: [{ severity: "HIGH", file: "...", description: "..." }] } }
}})
Then invoke
/delegate --fixes
.
Gate events: Do NOT manually emit
gate.executed
events via
exarchos_event
. Gate events are automatically emitted by the
check_review_verdict
orchestrate handler. Manual emission causes duplicates.
Guard shape: The
all-reviews-passed
guard requires
reviews.{name}.status
to be a passing value (
pass
,
passed
,
approved
,
fixes-applied
). Flat strings like
reviews: { "quality-review": "pass" }
are silently ignored and will block the
review → synthesize
transition.
转换前,记录评审结论。reviews值必须是包含
status
字段的对象,而非扁平字符串:
APPROVED:
exarchos_workflow({ action: "set", featureId: "<id>", updates: {
  reviews: { "quality-review": { status: "pass", summary: "...", issues: [] } }
}, phase: "synthesize" })
然后调用
/synthesize
NEEDS_FIXES:
exarchos_workflow({ action: "set", featureId: "<id>", updates: {
  reviews: { "quality-review": { status: "fail", summary: "...", issues: [{ severity: "HIGH", file: "...", description: "...", required_fix: "..." }] } }
}})
然后调用
/delegate --fixes
闸门事件: 请勿通过
exarchos_event
手动触发
gate.executed
事件。闸门事件由
check_review_verdict
的orchestrate处理程序自动触发。手动触发会导致重复事件。
防护机制格式:
all-reviews-passed
防护要求
reviews.{name}.status
为通过值(
pass
passed
approved
fixes-applied
)。扁平字符串格式如
reviews: { "quality-review": "pass" }
会被忽略,从而阻塞
review → synthesize
转换。