1实现原理 · 为什么它能做到
核心机制是「模型多样性即对抗信号」:同一份 diff、同一份 prompt、同一份 rubric,交给 N 个**不同模型家族**的只读子代理各审一遍;不做 persona 扮演。
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.
只读、只给结论:评审子代理以 readonly 模式拉起,本 skill 明确禁止自动应用任何改动。
The deliverable is a synthesized verdict. Do NOT auto-apply changes.
评审范围由上下文决定,最典型的输入是 `git diff main...HEAD` 这条真正的 CLI 调用点。
- If on a feature branch, run `git diff main...HEAD` (or the appropriate base branch) for the full changeset
评审者数量与模型由用户级配置驱动:读 ~/.cursor/rules/pstack-models.mdc 的 `interrogate reviewers` 列表,缺省才用内置四模型表。
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/D labels below to the configured entry count. Otherwise use the table defaults.
提示词模板与验收标准都外置成 references/,其中固定了「质疑执行、不质疑意图」和 severity 三档(critical/warning/nit)与结构化输出格式。
You are an adversarial code reviewer. Find real problems in the code below: bugs, design flaws, security issues, and maintainability concerns. You are not here to be helpful or encouraging. You are here to stress-test.
合成阶段不是简单拼接:按「2+ 模型独立命中 = 高信号」做共识识别,保留孤证但降权,合并同一问题的不同表述,并显式记录模型间分歧。
2. **Identify consensus**. Findings raised by 2+ models independently are highest signal.
最后一步是「主导者判断」而不是中立聚合:人类主导评审者身份被显式写进流程,产出按 Act on / Consider / Noted / Dismissed 四桶分类,每条注明是哪些模型提的。
You are the lead reviewer, a pragmatic senior engineer, not a neutral aggregator.
除通用 rubric 外还强制叠加一份很硬的代码质量 lens(对结构简化、文件大小、spaghetti 增长提出高于普通 code review 的要求)。
1. **Do not let a PR push a file from under 1k lines to over 1k lines without a very strong reason.** Treat this as a strong smell.
有降级路径:模型 slug 不可解析时不阻塞评审,改选同族最强档并在错误信息里取有效 slug,同时另开 PR 修默认值。
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.
2核心能力
3外部依赖
| 类型 | 依赖 |
|---|---|
| cli | git(读取分支变动做评审输入) |
| api | Cursor Task 子代理(多模型执行面:generalPurpose 子代理 + 指定 model slug) |
| network | 用户级配置文件 ~/.cursor/rules/pstack-models.mdc(读取 interrogate reviewers 一行) |
4风险提醒 风险提醒:蓝色 · 知晓即可
- 代码内容向多厂商模型外发是功能默认值 — 评审输入是 diff 加周边上下文文件,会被送进默认 4 个不同厂商的模型。私有/受合规约束的代码库需先确认允许外发的模型范围,或把 reviewers 列表收窄到已批准的那家。readonly 只约束写工具,不改变数据流向。
- 成本与时长随模型数线性放大 — 默认 4 路评审者,每个都拿到完整 diff + rubric + code-quality lens(提示词很长),且可配置得更多(列表长度即评审者数量)。大型分支上这是显著的时间与费用开销。
- 提示词注入面(被评审代码是外部输入) — diff 中的注释/字符串理论上可嵌入指令影响评审者。危害被限定在「评审结论被误导」——因为评审者只读、主导者要过滤、且没有任何自动应用。但用户不应把输出的 Act On 清单当作可信背书。
- 唯一越出只读边界的指令:模型 slug 被拒时让 agent 自动开 PR 修配置 — SKILL.md 指示 'open a separate PR to update the configured value or default table'。这会在用户仓库产生实际写操作(分支+PR),尽管对象是配置值;不希望被自动开 PR 的团队需在本地约定层面覆盖该指令。
- 模型 slug 是时效性依赖 — 默认表里的 slug(claude-fable-5-1-thinking-max 等)会随供应商迭代失效;skill 提供了降级,但降级意味着实际评审模型的组合与预期不同,评审结论的可比性下降。
- 结论质量仍取决于主导者过滤,缺乏可自动校验的验收 — 除「Act On ≤5 条」这条软纪律外,没有任何机制验证 verdict 的完备性,也无测试资产;输出好坏的判断权在用户手里。
5第二遍独立确认
- [ok] 「每模型一个评审者」是否真按配置读 — SKILL.md Step 3 明写从 ~/.cursor/rules/pstack-models.mdc 的 `interrogate reviewers` 取列表,'one reviewer per entry, extending or shrinking the Reviewer A/B/C/D labels';配置缺失才落回四模型默认表。setup-pstack 的 SKILL.md 第 55 行确实生成 'interrogate reviewers: claude-fable-5-1-thinking-max, gpt-5.6-sol-max, grok-4.6-fast-xhigh, claude-opus-5-thinking-xhigh',两端严丝合缝。
- [ok] 只读与「不自动应用」两个断言 — SKILL.md 第 11 行 'The deliverable is a synthesized verdict. Do NOT auto-apply changes.';第 48 行子代理参数 '`readonly`: `true`'。仓库其他位置(docs/guide/04-design.md)亦复述 'applies nothing automatically'。无写文件指令。
- [ok] 外部依赖清单的完备性(是否有漏网 CLI/API) — token 扫描仅 `git diff main...HEAD` 一处命令;其余依赖都是宿主的 Task 工具与本地配置文件。不存在壳脚本、curl、MCP 端点或第三方 SaaS 调用。
- [ok] 安全面:有无凭证读取或隐蔽网络 — 六个文件对 API_KEY/token/secret/env/curl/requests/http 零命中;无脚本文件可执行任何东西。第一遍判定的 blue 档依据(本地读写 + 宿主调度)成立。
- [ok] 功能声明是否有夸大('Multiple LLM reviewers challenge changes from independent angles.') — Step 3 用同一模板喂所有评审者(reviewer-prompt.md 明确 placeholders),所以「independent」指的是模型家族不同而非提示词不同——SKILL.md 自己在第一段就澄清 'The adversarial signal comes from model diversity, not assigned personas',措辞与实现一致,未夸大。
- [ok] 配置损坏时的降级行为是否可能造成意外(自动开 PR) — SKILL.md 指示 'open a separate PR to update the configured value or default table'——这是让 agent 在仓库里另开 PR 的动作指令,属跨出「只读评审」范围的唯一指令。它只在模型 slug 被拒时才触发,且对象是配置仓库;用户若不希望自动开 PR,应在使用前知悉。已在 risks 中列出。
- [ok] installs 数值可信度 — installs=3 直接取自池内 pool.json(source 'skills.sh-hot',同时 github_stars/license/last_push 为 null);该数字明显是 skills.sh 热度榜的低值采样,不代表真实装机量,故 meta 中照录池值、stars 与 last_push 用 gh api 实采(7799 / 2026-09-15T03:14:54Z)。
- [ok] 授权归属 — 仓库根无 LICENSE(gh api license=null);MIT 只存在于 pstack/LICENSE(Copyright (c) 2026 Lauren Tan)与 pstack/.cursor-plugin/plugin.json 的 "license": "MIT"。结论「MIT(限 pstack 插件目录)」有据。
6结论
8282cc302a8de1c3…df3fb154fb