code-review

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

code-review

code-review

Purpose

目的

Review changes for regressions, contract mismatches, quality gaps, and missing evidence.
检查变更是否存在回归问题、契约不匹配、质量缺陷以及缺失的证据。

Use When

适用场景

  • An implementation handoff is ready for review.
  • A risky change needs focused regression analysis.
  • The repo needs findings ordered by severity.
  • 实现交付已准备好接受审查。
  • 高风险变更需要针对性的回归分析。
  • 需要按严重程度排序仓库中的问题发现。

Do Not Use When

不适用场景

  • The task is still in early scoping or spec drafting.
  • The request is to implement or refactor code rather than review it.
  • 任务仍处于早期范围界定或规范起草阶段。
  • 请求是实现或重构代码而非审查代码。

Inputs

输入

  • Change set
  • Governing spec
  • Validation evidence
  • 变更集
  • 主导规范
  • 验证证据

Outputs

输出

  • Findings by severity
  • Residual risk summary
  • Missing validation notes
  • 按严重程度排序的问题发现
  • 剩余风险摘要
  • 缺失的验证记录

Workflow

工作流程

  1. Compare the change set against the approved spec and stated scope.
  2. Inspect for broken behavior, missing tests, rule violations, or contract drift.
  3. Prioritize findings by severity and confidence.
  4. Summarize residual risks and validation gaps that remain.
  1. 将变更集与已批准的规范和既定范围进行对比。
  2. 检查是否存在行为异常、测试缺失、规则违反或契约偏离情况。
  3. 按严重程度和置信度对问题发现进行优先级排序。
  4. 总结剩余风险和仍存在的验证缺口。

Rules

规则

  • Lead with issues, not praise.
  • Anchor findings to files, behavior, or contracts.
  • Prefer concrete, testable statements over vague quality language.
  • 先指出问题,而非表扬。
  • 问题发现需关联到文件、行为或契约。
  • 优先使用具体、可测试的表述,而非模糊的质量描述。

Checklist

检查清单

  • The approved scope was checked.
  • Findings are prioritized.
  • Evidence gaps are called out.
  • Residual risk is summarized.
  • 已核对已批准的范围。
  • 问题发现已进行优先级排序。
  • 已指出证据缺口。
  • 已总结剩余风险。

Non-Negotiable Rules

不可妥协规则

  • Do not bury critical findings under summary text.
  • Do not approve behavior that conflicts with the governing spec.
  • Do not treat missing validation as a minor detail when risk is material.
  • 切勿将关键问题隐藏在总结文本之下。
  • 不得批准与主导规范冲突的行为。
  • 当风险重大时,不得将缺失验证视为次要细节。

References

参考资料

  • rules/global-rules.md
  • rules/agent-rules.md
  • checklists/review-ready.md
  • rules/global-rules.md
  • rules/agent-rules.md
  • checklists/review-ready.md

Examples

示例

Example Trigger

示例触发条件

Review this implementation for regressions, contract mismatches, and missing tests.
审查此实现是否存在回归问题、契约不匹配以及测试缺失情况。

Example Output Shape

示例输出格式

Produce findings ordered by severity with references to files or behaviors, then summarize residual risk and missing validation.
生成按严重程度排序的问题发现,并关联到文件或行为,然后总结剩余风险和缺失的验证。