pr-brief

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Review every one-way door; skim two-way doors with a localized blast radius. Touch only the PR's body and
attention:
labels; never push, open, merge, mark ready, or run checks.
逐一审查每个 one-way door;对 blast radius 局部的 two-way door 进行 skim。 仅修改 PR 的正文和
attention:
标签;绝不可 push、open、merge、将 PR 标记为 ready,或运行 checks。

1. Pin the branch

1. 锁定分支

Arguments: optional base ref (default: merge-base with the default branch), then optional spec path. Stop if
<base>..HEAD
is empty or unresolvable. Describe commits only.
Run
gh pr view --json number,url,body,headRefOid,labels,state
. If the open PR's head is not
HEAD
, stop: the branch needs pushing. With no open PR,
gh
or remote, print the body instead of applying it.
参数顺序:先是可选的 base ref(默认取与默认分支的 merge-base),然后是可选的 spec 路径。 如果
<base>..HEAD
为空或无法解析,则停止。 仅描述 commits。
运行
gh pr view --json number,url,body,headRefOid,labels,state
。 如果已 open 的 PR 的 head 与
HEAD
不一致,则停止:该 branch 需要 push。 如果没有 open PR、
gh
不可用或没有 remote,则输出正文而不应用。

2. Gather

2. 收集

Read the diff,
git log --reverse --format='%h %s%n%n%b' <base>..HEAD
, the body, the spec (argument, else one the body or a commit names),
spec/glossary.md
(else root
GLOSSARY.md
or
CONTEXT.md
), and
pull_request_template.md
(
.github/
,
docs/
or root, any case). One-way rules: references/one-way-doors.md plus any
## One-way doors
section in
.agents/coding-standards.md
,
CODING_STANDARDS.md
or
CONTRIBUTING.md
.
Harvest:
  • findings:
    Open:
    lines from review blocks, with SHA; every
    Deviations:
    item (a spec departure the implementer chose) and anything left for the reviewer is a
    [question]
  • pending sign-offs:
    Awaiting sign-off:
    items of a
    Slice-Pending: <id>
    commit with no
    Slice: <id>
    commit; off a slice branch, items with no later commit subject starting
    Sign off
  • proof: verify runs, passing tests, before and after output, images
读取 diff、
git log --reverse --format='%h %s%n%n%b' <base>..HEAD
、正文、spec(优先使用参数;否则使用正文或某个 commit 指定的 spec)、
spec/glossary.md
(否则使用根目录下的
GLOSSARY.md
或
CONTEXT.md
),以及
pull_request_template.md
(位于
.github/
、
docs/
或根目录,文件名大小写不限)。 one-way rules:references/one-way-doors.md,以及
.agents/coding-standards.md
、
CODING_STANDARDS.md
或
CONTRIBUTING.md
中任何
## One-way doors
section。
收集:
  • findings:review blocks 中带 SHA 的
    Open:
    行;每项
    Deviations:
    (实现者主动选择偏离 spec 的内容)以及任何留给 reviewer 的事项都记为一个
    [question]
  • pending sign-offs:对于
    Slice-Pending: <id>
    commit,若不存在对应的
    Slice: <id>
    commit,则取其
    Awaiting sign-off:
    项;不在 slice branch 上时,取那些后续不存在以
    Sign off
    开头的 commit subject 的项
  • proof:verify runs、通过的 tests、before/after 输出、images

3. Start the assessor

3. 启动 assessor

Start one fresh-context subagent with references/assessor-brief.md below the line, filled in, and write steps 4 and 5 meanwhile. Without subagents, run it yourself after step 5, marked self-graded. If its block breaks the template or cites a wrong
file:line
at
HEAD
, send it back once.
在下方填写 references/assessor-brief.md,然后启动一个 fresh-context subagent;与此同时编写第 4 步和第 5 步。 如果环境不支持 subagents,则在第 5 步后自行执行,并将结果标记为 self-graded。 如果 assessor 生成的 block 不符合模板,或在
HEAD
处引用了错误的
file:line
,将其退回修改一次。

4. Summary

4. 摘要

One user-facing sentence, then at most two minimal visuals (pseudocode, a tree, an idea-shaped
diff
, or Mermaid).
先写一句面向用户的话,然后最多提供两个精简的可视化形式(pseudocode、tree、idea-shaped
diff
或 Mermaid)。

5. Evidence

5. 证据

Harvested proof only, strongest first: before and after output, a verify run id, a branch test as pseudocode. One Before: / After: pair (Before may be words), then at most three proof lines. If all you have is "checks passed", write
Evidence: none
followed by that line. Run nothing to produce evidence, and claim a test failed before the change only when a commit shows it did.
仅使用收集到的 proof,并按强度从高到低排列:before/after 输出、verify run id、以 pseudocode 表示的 branch test。 提供一组 Before: / After:(Before 可以是文字),然后最多写三行 proof。 如果掌握的全部信息只有 "checks passed",则写入
Evidence: none
,后跟该行。 不要运行任何命令来补充 evidence;只有当 commit 显示变更前测试确实失败时,才能声称该测试在变更前失败。

6. Attention level

6. Attention 等级

LevelAny of these
read
one-way door; a
[blocks]
finding or
possible bug
question open at
HEAD
; a pending sign-off;
Evidence: none
; a self-graded verdict
spot-check
two-way with wide blast radius; any other
[question]
open at
HEAD
; over the step 7 budget
skim
none of the above
Highest match wins;
[judgement]
findings never count; every reason cites its trigger.
等级满足以下任一条件
read
one-way door;在
HEAD
处仍处于 open 状态的
[blocks]
finding 或
possible bug
question;pending sign-off;
Evidence: none
;self-graded verdict
spot-check
blast radius 为 wide 的 two-way door;在
HEAD
处仍处于 open 状态的其他
[question]
;超出第 7 步的篇幅预算
skim
以上条件均不满足
取匹配到的最高等级;
[judgement]
findings 永不计入;每个理由都必须注明对应的触发条件。

7. Assemble

7. 组装

markdown
undefined
markdown
undefined

Attention

Attention

<read | spot-check | skim>
  • <reason> - <file:line, rule, finding, or sign-off item>
Read first:
  • file:line - <why>
<read | spot-check | skim>
  • <reason> - <file:line, rule, finding, or sign-off item>
Read first:
  • file:line - <why>

Summary

Summary

<one sentence, then the visual>
<one sentence, then the visual>

Evidence

Evidence

Before: <...> After: <...>
Before: <...> After: <...>

Merge Danger

Merge Danger

Door: <one-way | two-way> - <why> Blast radius: <localized | wide> - <what it reaches> One-way rules checked: <rule names>; matched: <rule - file:line, or none> Graded by: <fresh context | self-graded>
<the template's remaining headings>
<details> <summary>Build log</summary> <everything else> </details> ```
  • Read first
    is the assessor's list; on
    skim
    drop it and the reason reads
    - two-way, localized, with evidence
    .
  • Fill remaining template headings; tick checklists only on evidence.
  • The build log holds the rest of the existing body verbatim; on a rerun, unwrap it first so nothing nests, and omit it when empty.
  • Above the build log, stay within about 40 lines, else add
    too big to summarise in one screen
    as a
    spot-check
    reason.
Door: <one-way | two-way> - <why> Blast radius: <localized | wide> - <what it reaches> One-way rules checked: <rule names>; matched: <rule - file:line, or none> Graded by: <fresh context | self-graded>
<the template's remaining headings>
<details> <summary>Build log</summary> <everything else> </details> ```
  • Read first
    是 assessor 给出的列表;在
    skim
    情况下将其移除,理由写为
    - two-way, localized, with evidence
    。
  • 填写模板中剩余的 headings;仅在有 evidence 时勾选 checklists。
  • build log 存放原正文中的其余全部内容,并逐字保留;重新运行时,先将其解包以避免嵌套;若为空则省略。
  • build log 上方的内容应控制在约 40 行以内;否则添加
    too big to summarise in one screen
    ,并将其作为一条
    spot-check
    reason。

8. Apply

8. 应用

gh pr edit <number> --body-file <tmpfile>
, then make
attention: <level>
the PR's only
attention:
label, creating
attention: read
,
attention: spot-check
and
attention: skim
if missing.
运行
gh pr edit <number> --body-file <tmpfile>
,然后使
attention: <level>
成为 PR 上唯一的
attention:
标签;如果
attention: read
、
attention: spot-check
和
attention: skim
不存在,则创建它们。

9. Report

9. 报告

PR or printed body, level and reasons, self-grading, uncommitted changes, missing spec.
输出 PR 或打印出的正文、等级和 reasons、是否 self-graded、uncommitted changes,以及缺失的 spec。