Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

interrogate

对抗审阅

Spawn one reviewer per configured model to adversarially review code changes. Each model gets the same prompt and rubric. The adversarial signal comes from model diversity, not assigned personas.

按配置的每个模型 spawn 一个审阅者,对抗审阅代码改动。每个模型拿同一 prompt 和 rubric。对抗信号来自模型多样性,不是分配人设。

The deliverable is a synthesized verdict. Do NOT auto-apply changes.

交付物是综合裁决。不要自动应用改动。

Step 1, Determine Scope

Step 1, 确定范围

Identify what to review from context:

从上下文确定审什么:

  • If the user points at specific files or a diff, use that

  • If on a feature branch, run git diff main...HEAD (or the appropriate base branch) for the full changeset

  • If the user’s message references recent work, gather the relevant files

  • 用户点了具体文件或 diff,就用那个

  • 在功能分支上,跑 git diff main...HEAD(或合适 base 分支)拿完整变更集

  • 用户消息提到近期工作,就收集相关文件

Package the diff (or file contents) plus any surrounding context files the reviewers need to understand the code.

打包 diff(或文件内容),加上审阅者理解代码所需的周边上下文文件。

Step 2, State the Intent

Step 2, 陈述意图

Before spawning reviewers, state the intent explicitly. Derive this from:

spawn 审阅者前,明确陈述意图。从这些推导:

  • The user’s message

  • Commit messages

  • PR description if one exists

  • The code itself

  • 用户消息

  • Commit messages

  • 若有 PR description

  • 代码本身

Write one clear paragraph. If you’re unsure about the intent, ask the user before proceeding.

写清楚一段。意图不确定就先问用户再继续。

Step 3, Spawn Reviewers

Step 3, Spawn 审阅者

Launch all reviewers in a single message using the Task tool. Use the interrogate reviewers list from ~/.cursor/rules/pstack-models.mdc when present, one reviewer per entry, extending or shrinking the Reviewer A/B/C labels below to the configured entry count. Otherwise use the table defaults.

用 Task 工具在一条消息里启动全部审阅者。有 ~/.cursor/rules/pstack-models.mdc 里的 interrogate reviewers 列表就用,每条一个审阅者,把下面 Reviewer A/B/C 标签扩缩到配置条数。否则用表默认。

SubagentDefault model
Reviewer Aclaude-opus-5-5-max
Reviewer Bgpt-5.6-sol-max
Reviewer Cgrok-4.7-xhigh-fast
Subagent默认模型
Reviewer Aclaude-opus-5-5-max
Reviewer Bgpt-5.6-sol-max
Reviewer Cgrok-4.7-xhigh-fast

For each reviewer:

对每个审阅者:

  • subagent_type: generalPurpose

  • model: the configured interrogate reviewers entry, or the table default with no configured line

  • readonly: true

  • subagent_type: generalPurpose

  • model: 配置的 interrogate reviewers 条目,或无配置时用表默认

  • readonly: true

If a model slug is rejected as unresolvable when you try to spawn the subagent, check the valid slugs in the Task tool’s error message, pick the closest equivalent (prefer the highest-reasoning tier of the same family), spawn with the valid slug, and open a separate PR to update the configured value or default table. Do not block the review on the slug issue. If the configured value is inherit-parent or auto, omit model instead. Never treat those aliases as broken slugs or enter this fallback for them.

若 spawn subagent 时模型 slug 被拒为无法解析,看 Task 工具错误信息里的合法 slug,选最接近等价(优先同族最高推理档),用合法 slug spawn,并另开 PR 更新配置值或默认表。别因 slug 问题卡住审阅。配置值是 inherit-parent 或 auto 时,省略 model。绝不要把这些别名当坏 slug,也别对它们走此回退。

Read references/reviewer-prompt.md and fill in the template with:

读 references/reviewer-prompt.md,填入模板:

  1. The stated intent

  2. The diff or file contents

  3. The review rubric from references/rubric.md

  4. The code-quality lens from references/code-quality-review.md

  5. 已陈述意图

  6. diff 或文件内容

  7. references/rubric.md 的审阅 rubric

  8. references/code-quality-review.md 的代码质量透镜

The same filled template goes to all reviewers, so every model applies the code-quality lens.

填好的同一模板发给所有审阅者,让每个模型都应用代码质量透镜。

Step 4, Synthesize

Step 4, 综合

As results come back, build a unified picture:

结果回来时,建统一图景:

  1. Parse all findings from the reviewers

  2. Identify consensus. Findings raised by 2+ models independently are highest signal.

  3. Identify lone-model findings. Still worth reading, but weight accordingly.

  4. Deduplicate. Different models may describe the same issue differently. Merge these and note which models raised it.

  5. Note disagreements. If one model flags something and another explicitly says the opposite, that’s useful context for the verdict.

  6. 解析审阅者全部发现

  7. 找共识。2+ 模型独立提出的发现信号最高。

  8. 找单模型发现。仍值得读,但权重相应。

  9. 去重。不同模型可能不同说法描述同一问题。合并并记下哪些模型提出。

  10. 记分歧。一个模型标了、另一个明确说反,对裁决是有用上下文。

Step 5, Lead Judgment

Step 5, 主审判断

You are the lead reviewer, a pragmatic senior engineer, not a neutral aggregator.

你是主审,务实的资深工程师,不是中立汇总器。

Read references/lead-judgment.md for the full framework.

完整框架读 references/lead-judgment.md。

Categorize every finding using these buckets:

用这些桶给每个发现分类:

  • Act on. Real issues affecting correctness, security, or maintainability given the actual goals. These would block a real PR.

  • Consider. Legitimate points, but you’re not sure they outweigh the cost of addressing them right now. Worth the user’s attention.

  • Noted. Technically valid but not actionable. Context-dependent, premature optimization, or low-impact given the current stage.

  • Dismissed. Wrong, nitpicky, or missing context. Brief explanation why.

  • Act on。鉴于实际目标,影响正确性、安全或可维护性的真问题。会挡住真实 PR。

  • Consider。合理,但不确定现在处理的代价是否值得。值得用户注意。

  • Noted。技术上成立但不可执行。依赖上下文、过早优化,或当前阶段影响低。

  • Dismissed。错的、抠细节的、或缺上下文。简述为什么。

For each finding, include:

每个发现包含:

  • Which model(s) raised it

  • The category (act on / consider / noted / dismissed)

  • A one-line rationale for the categorization

  • 哪些模型提出

  • 类别(act on / consider / noted / dismissed)

  • 一行分类理由

Output Format

输出格式

Present the verdict in this structure:

按此结构呈现裁决:

Intent

[The stated intent paragraph from Step 2]

Intent

[Step 2 陈述的意图段落]

Reviewers

  • Reviewer [label]: [model name], [N findings] (one bullet per reviewer)

Reviewers

  • Reviewer [label]: [model name], [N findings](每个审阅者一条)

Act On

[Findings that should be addressed. For each: description, which models raised it, why it matters.]

Act On

[应处理的发现。每条:描述、哪些模型提出、为什么要紧。]

Consider

[Findings worth thinking about. For each: description, which models raised it, tradeoff involved.]

Consider

[值得想的发现。每条:描述、哪些模型提出、涉及的取舍。]

Noted

[Valid but low-priority. Brief list.]

Noted

[成立但低优先。简要列表。]

Dismissed

[Rejected findings with brief rationale.]

Dismissed

[被拒发现及简短理由。]

Agreement Map

[Where did models agree, where did they diverge, and what does the pattern of agreement/disagreement tell us?]

Agreement Map

[模型何处一致、何处分歧,一致/分歧模式告诉我们什么?]