/pstack:interrogate
自动调用一句话让几个不同的模型给改动挑错,只留下能跑出失败的问题。它只看不改。
- 什么时候用
- 代码写完了心里没底,合并前想被挑一遍刺。
/pstack:interrogate 审一下整个分支,挑剔一点。不是真 bug 或功能倒退,就别报。用它和不用它
同一件事,直接跟 AI 说,和点名用 /pstack:interrogate,AI 的做法不一样:
用 /pstack:interrogate文档写了什么
原文分 4 节,约 350 个英文单词,中文译文约 550 字,读完约 2 分钟。点一节直接跳到全文。
开头说明几个对手 AI 专门想办法弄坏改动,只有跑出来的问题才算数,它只报告,不动手修。
写法亮点
挑了几句原文:每句让 AI 做什么、为什么这样写管用、你写提示词时怎么借来用。
给 AI 一个对立的身份
Adversaries try to break a change or a design.
对手们想办法弄坏一个改动或一个设计。
- 让 AI
- 派出去的帮手 AI 不是来帮代码说好话的,而是专门想办法把它弄坏。
- 为什么管用
- 「对手」「弄坏」把任务从「检查一下」变成「攻破它」,AI 会更卖力地找问题。
- 借来用
- 让 AI 审方案时说:「你是最挑剔的竞争对手,想办法证明这份方案行不通。」
要实际和应该并排写
Report each finding with a title, the exact command, the output it printed, and the output the intent requires.
每个发现都要报告:标题、确切的命令、它打印出的输出,以及意图要求的输出。
- 让 AI
- 每个问题都附上命令、实际输出和本该有的输出,你自己就能重跑核对。
- 为什么管用
- 把「实际是什么」和「应该是什么」并排写出来,问题在哪一目了然,也没法空口说。
- 借来用
- 让 AI 报 bug 时写:「每条都写清:怎么操作、看到了什么、本来应该看到什么。」
点明规则管到哪些
Leave out anything you did not run. That covers style, naming, structure, and risks that need a future change to matter.
没跑过的,都不要写。这包括风格、命名、结构,以及要等将来某次改动才会成问题的风险。
- 让 AI
- 它不会拿命名、风格或「以后可能出事」来凑数,报上来的都是跑出来的问题。
- 为什么管用
- 光说「没跑过的不写」,AI 会觉得风格意见不算;把最容易混进来的几类点名,就没有空子可钻。
- 借来用
- 让 AI 挑错时写:「只报会让顾客付不了钱的问题。配色、措辞、以后可能出的问题都不算。」
明说「没有」也算交差
No findings is a valid result.
没有发现,也是一个有效的结果。
- 让 AI
- 代码没问题时,它就说没问题,不会硬凑几个问题显得卖力。
- 为什么管用
- AI 默认觉得「找问题」就得找出点什么,明说空结果也有效,就卸掉了这份压力。
- 借来用
- 让 AI 检查时加一句:「如果没找到错别字,直接回复『没找到』就行。」
全文
AI 读到的就是这份 SKILL.md。可以看中文、看原文,或者一段一段对照着看。
descriptionUse for "interrogate", "adversarial review", "multi-model review", "challenge this", "stress test this code", "find blind spots", or "tear this apart". Adversaries try to break a change or design, and only findings proven by a run survive.
description用于「interrogate」「对抗式审查」「多模型审查」「挑战一下这个」「压力测试这段代码」「找盲点」或「把它拆个稀烂」。对手们想办法弄坏一个改动或设计,只有被一次运行证明了的发现才能留下。
Interrogate
Interrogate(审问)
Adversaries try to break a change or a design. A finding survives only when a run proves it. Report the findings. Do not apply fixes.
对手们想办法弄坏一个改动或一个设计。一个发现,只有被一次运行证明了,才能留下。报告这些发现。不要动手修。
Frame
定好范围和意图
The scope is what the user names. Otherwise it is the branch diff from its merge base with the base branch, through the working tree. State the intent with the in-your-own-words skill, from the user's message, the commits, and the PR description. Ask the user when the intent is unclear.
范围是用户点名的东西。否则,就是当前分支从它和基础分支的合并基点开始、一直到工作区的 diff。用 in-your-own-words 技能,根据用户的消息、提交和 PR 说明,复述出意图(这个改动想做到什么)。意图不清楚时,问用户。
Fan out
分头出击
Run Phase A steps 3 and 4 and Phase B of the arena skill, with four changes. Read the interrogate reviewers line in place of arena runners. Copy the scope's uncommitted changes into each worktree. Spawn each adversary as a general-purpose subagent (generalPurpose in Cursor). In place of the arena task and rationale, give each adversary the scope, the intent, and this brief:
运行 arena 技能 Phase A 的第 3、4 步和 Phase B,但做四处改动。读 interrogate reviewers 这一行,代替 arena runners。把范围里还没提交的改动复制到每个 worktree。把每个对手都派成一个通用帮手 AI(Cursor 里是 generalPurpose)。不给 arena 的任务和理由,改为给每个对手:范围、意图,以及这份简报:
Break this change. Prove each finding with a run against the real code, such as a failing test, a repro script, or command output that shows the wrong behavior. For a design or plan, run a prototype or probe the current tree. Keep repros in your own worktree. Report each finding with a title, the exact command, the output it printed, and the output the intent requires. Leave out anything you did not run. That covers style, naming, structure, and risks that need a future change to matter. No findings is a valid result.
弄坏这个改动。每个发现都要用一次针对真实代码的运行来证明,比如一个失败的测试、一个复现脚本,或者显示出错误行为的命令输出。如果是设计或计划,就跑一个原型,或者去探查当前的代码树。复现都放在你自己的 worktree 里。每个发现都要报告:标题、确切的命令、它打印出的输出,以及意图要求的输出。没跑过的,都不要写。这包括风格、命名、结构,以及要等将来某次改动才会成问题的风险。没有发现,也是一个有效的结果。
Verify
核实
Verify each finding per arena Phase F by rerunning its command. Keep a finding when the output shows the failure and the failure breaks the intent. Drop the rest. Merge findings that share a root cause.
按 arena 的 Phase F,重跑每个发现的命令来核实它。输出显示了失败,而且这个失败违背了意图,就留下这个发现。其余的丢掉。真正原因相同的发现,合并成一个。
Skip arena Phases C, D, and E. Adversaries find different failures, so the verdict keeps every verified finding, not one adversary's list.
跳过 arena 的 Phase C、D 和 E。不同的对手会找到不同的失败,所以结论保留每一个核实过的发现,而不是只用某一个对手的清单。
Output
输出
- Intent: the restatement.
- Findings: for each verified finding, the command, its output, how it breaks the intent, and the adversaries that found it. Say "no verified findings" when none survive.
- Dropped: for each adversary, the count of dropped findings and why.
- 意图:复述出来的意图。
- 发现:每个核实过的发现,写出命令、它的输出、它怎样违背了意图,以及是哪些对手找到的。一个都没留下时,写「没有核实过的发现」。
- 丢掉的:每个对手丢掉了几个发现,以及为什么。
原文作者 Lauren Tan(poteto),MIT 许可。译文由本站翻译,核对到 pstack 镜像 97de40d。 在 GitHub 上看