pr-brief
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReview every one-way door; skim two-way doors with a localized blast radius.
Touch only the PR's body and labels; never push, open, merge, mark ready, or run checks.
attention:逐一审查每个 one-way door;对 blast radius 局部的 two-way door 进行 skim。
仅修改 PR 的正文和 标签;绝不可 push、open、merge、将 PR 标记为 ready,或运行 checks。
attention:1. Pin the branch
1. 锁定分支
Arguments: optional base ref (default: merge-base with the default branch), then optional spec path.
Stop if is empty or unresolvable.
Describe commits only.
<base>..HEADRun .
If the open PR's head is not , stop: the branch needs pushing.
With no open PR, or remote, print the body instead of applying it.
gh pr view --json number,url,body,headRefOid,labels,stateHEADgh参数顺序:先是可选的 base ref(默认取与默认分支的 merge-base),然后是可选的 spec 路径。
如果 为空或无法解析,则停止。
仅描述 commits。
<base>..HEAD运行 。
如果已 open 的 PR 的 head 与 不一致,则停止:该 branch 需要 push。
如果没有 open PR、 不可用或没有 remote,则输出正文而不应用。
gh pr view --json number,url,body,headRefOid,labels,stateHEADgh2. Gather
2. 收集
Read the diff, , the body, the spec (argument, else one the body or a commit names), (else root or ), and (, or root, any case).
One-way rules: references/one-way-doors.md plus any section in , or .
git log --reverse --format='%h %s%n%n%b' <base>..HEADspec/glossary.mdGLOSSARY.mdCONTEXT.mdpull_request_template.md.github/docs/## One-way doors.agents/coding-standards.mdCODING_STANDARDS.mdCONTRIBUTING.mdHarvest:
- findings: lines from review blocks, with SHA; every
Open:item (a spec departure the implementer chose) and anything left for the reviewer is aDeviations:[question] - pending sign-offs: items of a
Awaiting sign-off:commit with noSlice-Pending: <id>commit; off a slice branch, items with no later commit subject startingSlice: <id>Sign off - proof: verify runs, passing tests, before and after output, images
读取 diff、、正文、spec(优先使用参数;否则使用正文或某个 commit 指定的 spec)、(否则使用根目录下的 或 ),以及 (位于 、 或根目录,文件名大小写不限)。
one-way rules:references/one-way-doors.md,以及 、 或 中任何 section。
git log --reverse --format='%h %s%n%n%b' <base>..HEADspec/glossary.mdGLOSSARY.mdCONTEXT.mdpull_request_template.md.github/docs/.agents/coding-standards.mdCODING_STANDARDS.mdCONTRIBUTING.md## One-way doors收集:
- findings:review blocks 中带 SHA 的 行;每项
Open:(实现者主动选择偏离 spec 的内容)以及任何留给 reviewer 的事项都记为一个Deviations:[question] - pending sign-offs:对于 commit,若不存在对应的
Slice-Pending: <id>commit,则取其Slice: <id>项;不在 slice branch 上时,取那些后续不存在以Awaiting sign-off:开头的 commit subject 的项Sign off - 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 at , send it back once.
file:lineHEAD在下方填写 references/assessor-brief.md,然后启动一个 fresh-context subagent;与此同时编写第 4 步和第 5 步。
如果环境不支持 subagents,则在第 5 步后自行执行,并将结果标记为 self-graded。
如果 assessor 生成的 block 不符合模板,或在 处引用了错误的 ,将其退回修改一次。
HEADfile:line4. Summary
4. 摘要
One user-facing sentence, then at most two minimal visuals (pseudocode, a tree, an idea-shaped , or Mermaid).
diff先写一句面向用户的话,然后最多提供两个精简的可视化形式(pseudocode、tree、idea-shaped 或 Mermaid)。
diff5. 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 followed by that line.
Run nothing to produce evidence, and claim a test failed before the change only when a commit shows it did.
Evidence: none仅使用收集到的 proof,并按强度从高到低排列:before/after 输出、verify run id、以 pseudocode 表示的 branch test。
提供一组 Before: / After:(Before 可以是文字),然后最多写三行 proof。
如果掌握的全部信息只有 "checks passed",则写入 ,后跟该行。
不要运行任何命令来补充 evidence;只有当 commit 显示变更前测试确实失败时,才能声称该测试在变更前失败。
Evidence: none6. Attention level
6. Attention 等级
| Level | Any of these |
|---|---|
| one-way door; a |
| two-way with wide blast radius; any other |
| none of the above |
Highest match wins; findings never count; every reason cites its trigger.
[judgement]| 等级 | 满足以下任一条件 |
|---|---|
| one-way door;在 |
| blast radius 为 wide 的 two-way door;在 |
| 以上条件均不满足 |
取匹配到的最高等级; findings 永不计入;每个理由都必须注明对应的触发条件。
[judgement]7. Assemble
7. 组装
markdown
undefinedmarkdown
undefinedAttention
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>
```
- is the assessor's list; on
Read firstdrop it and the reason readsskim.- 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 as a
too big to summarise in one screenreason.spot-check
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>
```
- 是 assessor 给出的列表;在
Read first情况下将其移除,理由写为skim。- two-way, localized, with evidence - 填写模板中剩余的 headings;仅在有 evidence 时勾选 checklists。
- build log 存放原正文中的其余全部内容,并逐字保留;重新运行时,先将其解包以避免嵌套;若为空则省略。
- build log 上方的内容应控制在约 40 行以内;否则添加 ,并将其作为一条
too big to summarise in one screenreason。spot-check
8. Apply
8. 应用
gh pr edit <number> --body-file <tmpfile>attention: <level>attention:attention: readattention: spot-checkattention: skim运行 ,然后使 成为 PR 上唯一的 标签;如果 、 和 不存在,则创建它们。
gh pr edit <number> --body-file <tmpfile>attention: <level>attention:attention: readattention: spot-checkattention: skim9. Report
9. 报告
PR or printed body, level and reasons, self-grading, uncommitted changes, missing spec.
输出 PR 或打印出的正文、等级和 reasons、是否 self-graded、uncommitted changes,以及缺失的 spec。