quality

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Quality

质量门禁

Review completed cook work. Emit a
stage_message
event with your assessment. See
references/stage-message-schema.md
for the event schema.
Operate fully autonomously. Never ask the user.
评审已完成的cook工作。输出带有评估结果的
stage_message
事件。事件 schema 参见
references/stage-message-schema.md
。
全程自主运行。无需询问用户。

Step 0 -- Load Principles

第0步 -- 加载原则

Read
brain/principles.md
and follow every
[[wikilink]]
. These govern the review. Do NOT skip this.
读取
brain/principles.md
并跟进所有
[[wikilink]]
链接。这些是评审的依据,请勿跳过此步骤。

Assessment Pipeline

评估流水线

Run in order. Stop early and reject on any high-severity finding.
按顺序执行。若发现任何高严重级别的问题,立即终止并驳回。

1. Scope Check

1. 范围检查

  • Read the plan phase the cook was assigned (from the cook's initial prompt or mise context).
  • Run
    git diff --stat
    and
    git log --oneline
    for the cook's commits.
  • Flag files changed outside the plan phase's stated scope as scope violations.
  • 读取分配给cook的计划阶段内容(来自cook的初始提示或mise上下文)。
  • 针对cook的提交执行
    git diff --stat
    和
    git log --oneline
    命令。
  • 将计划阶段声明范围之外的文件变更标记为范围违规。

2. Code Quality

2. 代码质量

  • go vet ./...
    and
    go test ./...
    must pass.
  • Run
    sh scripts/lint-arch.sh
    if it exists.
  • Check error handling follows project conventions (failure-state messages, not expectation messages).
  • go vet ./...
    和
    go test ./...
    必须全部通过。
  • 若存在
    sh scripts/lint-arch.sh
    脚本则执行该脚本。
  • 检查错误处理是否符合项目规范(应使用失败状态消息,而非预期消息)。

3. Principle Compliance

3. 原则遵循情况

  • For each changed file, check against loaded principles.
  • Common violations: bolted-on changes instead of redesign (redesign-from-first-principles), missing verification (prove-it-works), unnecessarily added complexity (subtract-before-you-add).
  • 针对每个变更文件,对照已加载的原则进行检查。
  • 常见违规情况:采用附加式变更而非重新设计(违反redesign-from-first-principles原则)、缺少验证(违反prove-it-works原则)、不必要地增加复杂度(违反subtract-before-you-add原则)。

4. Test Evidence

4. 测试证明

  • New behavior must have new tests.
  • Tests must assert outcomes, not implementation details.
  • Check coverage of edge cases mentioned in the plan phase.
  • 新功能必须配有新测试。
  • 测试必须断言结果,而非实现细节。
  • 检查计划阶段中提及的边界用例的覆盖情况。

5. Runtime Verification

5. 运行时验证

  • If the plan phase specifies runtime checks, verify they were performed.
  • "It compiles" is not verification.
  • 若计划阶段指定了运行时检查,需验证这些检查已执行。
  • "能编译通过"不算验证。

Verdict

评审结论

Emit a
stage_message
event with your assessment:
sh
noodle event emit --session $NOODLE_SESSION_ID stage_message --payload '<json>'
Accept: Emit with
blocking: false
. The pipeline continues and the scheduler sees the green light.
json
{ "message": "All checks pass. Tests green, scope clean.", "blocking": false }
Reject: Emit with
blocking: true
(or omit
blocking
). The scheduler reads findings and decides (retry, add oops stage, or abort).
json
{ "message": "Rejected: 3 high issues. [1] Missing test for edge case in handleCompletion. [2] Scope violation: modified cook_merge.go outside plan phase scope. [3] Error message uses expectation form.", "blocking": true }
Write the message as natural language the scheduler can act on. Include specific file paths, line context, and principle violations so the scheduler can brief the retry cook.
输出包含评估结果的
stage_message
事件:
sh
noodle event emit --session $NOODLE_SESSION_ID stage_message --payload '<json>'
通过:输出时设置
blocking: false
。流水线将继续运行,调度器会收到放行信号。
json
{ "message": "All checks pass. Tests green, scope clean.", "blocking": false }
驳回:输出时设置
blocking: true
(或省略
blocking
字段)。调度器会读取检查结果并做出决策(重试、新增oops阶段或中止)。
json
{ "message": "Rejected: 3 high issues. [1] Missing test for edge case in handleCompletion. [2] Scope violation: modified cook_merge.go outside plan phase scope. [3] Error message uses expectation form.", "blocking": true }
消息需使用调度器可执行的自然语言编写。需包含具体的文件路径、行上下文以及违反的原则,以便调度器向重试的cook下达指令。

Non-blocking Issues

非阻塞问题

Issues that don't warrant rejection (style nits, minor improvements, documentation gaps): file as backlog items via the backlog adapter.
不构成驳回理由的问题(风格瑕疵、小改进、文档缺失):通过backlog适配器记录为待办事项。

Principles

相关原则

  • [[prove-it-works]]
  • [[outcome-oriented-execution]]
  • [[prove-it-works]]
  • [[outcome-oriented-execution]]