debate-review

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

debate-review

debate-review

Two models argue before anything is posted. A main reviewer finds issues. A debate reviewer tries to knock them down and may add its own. The main reviewer then makes the final call, and one review with inline comments lands on the PR or MR. It posts from the user's own
gh
or
glab
account as a
COMMENT
review. It never approves and never requests changes.
You are the orchestrator. You run one command and relay the result. You do not review the diff yourself, and you do not touch the PR.
在发布任何内容前,两个模型会展开辩论。主评审模型负责发现问题,辩论评审模型则试图反驳这些问题,同时也可能提出自己的问题。之后主评审模型做出最终决定,最终生成一份带有行内评论的评审内容发布到PR或MR上。评审内容将通过用户自己的
gh
glab
账户以
COMMENT
评审的形式发布,既不会批准也不会要求修改。
你作为协调者,只需运行一条命令并传递结果即可。无需你自行评审代码差异,也无需操作PR。

Run it

运行方式

bash
node "<skill-dir>/scripts/review-pr.mjs" <pr-url | number> [--dry-run]
  • <pr-url>
    is a GitHub
    /pull/N
    or GitLab
    /-/merge_requests/N
    URL. A bare number resolves against the cwd's
    origin
    .
  • The reviewers are two delegate-skills lanes,
    review-main
    and
    review-debate
    . If either is missing the script says so. Add them with
    delegate-setup
    . Pick two different implementers, since the debate is only worth something when the second model doesn't share the first one's blind spots (main
    claude
    or
    grok
    , debate
    codex
    at high effort is a good pair). For a one-off, pass
    --main <implementer>
    or
    --debate <implementer>
    . Only implementers whose relay has
    --read-only
    are accepted. These two lanes belong to the reviewer. Don't point them at a lane you use for other work, such as a plan-debate lane.
  • --dry-run
    prints the review instead of posting it. Use it when the user wants to see the review before it lands.
  • Exit code
    3
    means this head sha already has a debate-review. Re-run with
    --force
    to post again.
  • A run takes minutes, since it is two or three implementer sessions back to back. Run it in the background and report the printed URL when it finishes. Don't poll tightly.
All flags:
--help
. Contracts: references/schema.md. What gets posted: references/comment-format.md. The reviewer briefs live in
assets/prompts/
and the script fills them in; you don't need to read them.
bash
node "<skill-dir>/scripts/review-pr.mjs" <pr-url | number> [--dry-run]
  • <pr-url>
    是GitHub的
    /pull/N
    或GitLab的
    /-/merge_requests/N
    格式的URL。若仅输入数字,则会基于当前工作目录的
    origin
    仓库解析对应的PR/MR。
  • 评审由两个委托技能通道
    review-main
    review-debate
    完成。若缺少其中任意一个,脚本会给出提示。可通过
    delegate-setup
    命令添加这两个通道。请选择不同的模型实现方,因为只有当第二个模型不存在第一个模型的盲区时,辩论才有意义(主模型选
    claude
    grok
    ,辩论模型选高算力的
    codex
    是不错的组合)。若仅需单次使用,可通过
    --main <implementer>
    --debate <implementer>
    参数指定模型实现方。仅接受带有
    --read-only
    参数的中继实现方。这两个通道专用于评审,请勿指向你用于其他工作的通道,比如计划辩论通道。
  • --dry-run
    参数会打印评审内容而非直接发布。当用户希望在发布前预览评审内容时可使用该参数。
  • 退出码
    3
    表示当前提交哈希值对应的PR/MR已存在辩论式评审。可添加
    --force
    参数重新运行以再次发布。
  • 一次运行需要数分钟时间,因为会连续进行两到三次模型会话。建议在后台运行,完成后报告打印出的URL即可,无需频繁轮询。
所有可用参数:
--help
。相关约定:references/schema.md。发布内容格式:references/comment-format.md。评审提示语存储在
assets/prompts/
目录下,由脚本自动填充,无需你手动查看。

After it posts

发布后

Each posted comment carries a
<!-- debate-review:<id> status=... -->
marker.
babysit-pr
recognises the marker and handles the round like any other bot round (verify, fix blockers, reply in the thread, resolve). Don't act on the findings yourself unless the user asks.
每条发布的评论都带有
<!-- debate-review:<id> status=... -->
标记。
babysit-pr
工具可识别该标记,并像处理其他机器人评审回合一样处理本次评审(验证问题、解决阻塞、回复线程、标记已解决)。除非用户要求,否则请勿自行根据评审结果采取行动。

Artifacts

生成文件

~/.cache/debate-review/<owner>__<repo>/<N>/<head>/
holds
run.json
(all three documents, timings, what was posted) plus
main/
,
debate/
, and
final/
, each with the brief sent and the relay's
result.json
.
~/.cache/debate-review/<owner>__<repo>/<N>/<head>/
目录下存储了
run.json
文件(包含三次会话的所有文档、时间记录以及发布内容),还有
main/
debate/
final/
三个子目录,每个目录下都包含发送的提示语和中继的
result.json
文件。