quality
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQuality
质量门禁
Review completed cook work. Emit a event with your assessment. See for the event schema.
stage_messagereferences/stage-message-schema.mdOperate fully autonomously. Never ask the user.
评审已完成的cook工作。输出带有评估结果的事件。事件 schema 参见。
stage_messagereferences/stage-message-schema.md全程自主运行。无需询问用户。
Step 0 -- Load Principles
第0步 -- 加载原则
Read and follow every . These govern the review. Do NOT skip this.
brain/principles.md[[wikilink]]读取并跟进所有链接。这些是评审的依据,请勿跳过此步骤。
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 and
git diff --statfor the cook's commits.git log --oneline - 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. 代码质量
- and
go vet ./...must pass.go test ./... - Run if it exists.
sh scripts/lint-arch.sh - 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 event with your assessment:
stage_messagesh
noodle event emit --session $NOODLE_SESSION_ID stage_message --payload '<json>'Accept: Emit with . The pipeline continues and the scheduler sees the green light.
blocking: falsejson
{ "message": "All checks pass. Tests green, scope clean.", "blocking": false }Reject: Emit with (or omit ). The scheduler reads findings and decides (retry, add oops stage, or abort).
blocking: trueblockingjson
{ "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_messagesh
noodle event emit --session $NOODLE_SESSION_ID stage_message --payload '<json>'通过:输出时设置。流水线将继续运行,调度器会收到放行信号。
blocking: falsejson
{ "message": "All checks pass. Tests green, scope clean.", "blocking": false }驳回:输出时设置(或省略字段)。调度器会读取检查结果并做出决策(重试、新增oops阶段或中止)。
blocking: trueblockingjson
{ "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]]