code-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- markdownlint-disable MD013 -->
<!-- markdownlint-disable MD013 -->
Code Review
代码审查
Three-axis review of the diff between and a fixed point the user
supplies:
HEAD- Standards — does the code conform to this repo's documented coding standards?
- Spec — does the code faithfully implement the originating issue / PRD / spec?
A third, lighter axis applies when the change is non-trivial: Stability —
does the diff ship the property-based tests named in the spec? The Spec agent
additionally verifies that each named invariant/property test exists and fails
loud on a broken invariant, not just example coverage.
Both axes run as parallel sub-agents () so they don't pollute
each other's context; this skill aggregates their findings side by side. The
issue tracker comes from .
delegate_taskdocs/agents/issue-tracker.md针对用户指定的与固定版本之间差异的三维度审查:
HEAD- 标准 — 代码是否符合本仓库已归档的编码标准?
- 需求规范 — 代码是否忠实地实现了源问题/PRD/需求规范?
当变更较为复杂时,会启用第三个轻量化维度:稳定性 — 差异代码是否交付了需求规范中指定的基于属性的测试?Spec Agent还会验证每个指定的不变量/属性测试是否存在,且在不变量被破坏时能明确报错,而非仅覆盖示例场景。
所有维度均以并行子Agent()的形式运行,避免互相干扰上下文;本Skill会将它们的审查结果汇总展示。问题追踪器来源为。
delegate_taskdocs/agents/issue-tracker.mdProcess
流程
1. Pin the fixed point
1. 锁定固定版本
Whatever the user said — a commit SHA, bookmark, tag, , . If
unspecified, ask. Capture once (prefer , fall back to ):
/ (three-dot, merge-base), and
/ . Confirm the ref
resolves ( / ) and the diff is non-empty before
spawning sub-agents — a bad ref or empty diff fails here, not inside two
children.
main@~5jjgitjj diff -r <fixed>..@git diff <fixed>...HEADjj log -r <fixed>..@git log <fixed>..HEAD --onelinejj log -r <rev>git rev-parse用户指定的任意标识——提交SHA、书签、标签、、均可。若用户未指定,则询问用户。一次性获取差异信息(优先使用, fallback到): / (三点表示基于合并基准),以及 / 。在启动子Agent前,需确认引用可解析(通过 / )且差异非空——若引用无效或差异为空,将在此阶段终止,而非在子Agent中失败。
main@~5jjgitjj diff -r <fixed>..@git diff <fixed>...HEADjj log -r <fixed>..@git log <fixed>..HEAD --onelinejj log -r <rev>git rev-parse2. Identify the spec source
2. 确定需求规范来源
In order: issue references in commit messages (, ) fetched per
; a path the user passed; a spec under ,
, or matching the branch. If none, ask; if the user says
there isn't one, the Spec sub-agent reports "no spec available".
#123Closes #45docs/agents/issue-tracker.mddocs/specs/.scratch/优先级顺序:提交消息中的问题引用(如、,根据获取);用户提供的路径;与分支匹配的、或目录下的规范文件。若以上均不存在,则询问用户;若用户表示无相关规范,Spec子Agent将报告“无可用规范”。
#123Closes #45docs/agents/issue-tracker.mddocs/specs/.scratch/3. Identify the standards sources
3. 确定标准来源
CODING_STANDARDS.mdCONTRIBUTING.mdAGENTS.md.cursorrulesCODING_STANDARDS.mdCONTRIBUTING.mdAGENTS.md.cursorrules4. Run both axes in parallel
4. 并行运行各维度审查
Spawn two sub-agents with :
delegate_task- Standards agent — the diff + the standards sources + smell baseline.
- Spec agent — the diff + the spec. Reports each user story / acceptance criterion as met / partial / missing.
通过启动两个子Agent:
delegate_task- 标准Agent — 输入内容为差异代码 + 标准来源 + 代码异味基线。
- 需求规范Agent — 输入内容为差异代码 + 需求规范。会将每个用户故事/验收标准标记为已满足/部分满足/未满足。
5. Aggregate
5. 汇总结果
Report the two axes side by side. Per finding: location (), the
issue, and the fix. End with a verdict per axis (pass / changes requested) and
the single most important change.
path:line将两个维度的审查结果并列展示。每条审查结果需包含:位置()、问题描述及修复建议。结尾需给出各维度的结论(通过/需修改),以及最重要的一项修改建议。
path:lineBoundaries
边界说明
This review is the agent's pre-flight; the gating approving review is human.
After it passes, hand the PR to a human (label ) — never treat
this review as the merge gate. Reviews; does not apply fixes. The
over-engineering pass is folded into the workflow as the minimalism
over-engineering audit (see — /
/ / / tags, ending in
); run it from before this review. For
deeper correctness/security, escalate to a dedicated review pass.
ready-for-humandocs/agents/workflow.mddelete:stdlib:native:yagni:shrink:net: -<N> lines possibleimplement本次审查是Agent执行的预检查;最终的批准审查由人工完成。审查通过后,需将PR移交至人工(标记)——绝不能将本次审查作为合并的准入条件。本Skill仅执行审查,不自动应用修复。过度设计检查已整合到工作流中,作为极简主义过度设计审计(详见——包含////标签,最终输出);需在本次审查前,从阶段启动该审计。若需更深入的正确性/安全性审查,需升级至专门的审查流程。
ready-for-humandocs/agents/workflow.mddelete:stdlib:native:yagni:shrink:net: -<N> lines possibleimplement