/pstack:maintain-verification-skill
按需点名一句话应用改了,它逐个功能核对验证技能,过时就修。不碰产品代码。
- 什么时候用
- 最好每天跑一次,可以设成定时任务。
/pstack:maintain-verification-skill用它和不用它
同一件事,直接跟 AI 说,和点名用 /pstack:maintain-verification-skill,AI 的做法不一样:
用 /pstack:maintain-verification-skill文档写了什么
原文分 3 节,约 700 个英文单词,中文译文约 1350 字,读完约 3 分钟。点一节直接跳到全文。
开头应用一改,功能清单就过时,这个技能按功能做维护,每个功能都从源码查一遍,再真跑一遍。
写法亮点
挑了几句原文:每句让 AI 做什么、为什么这样写管用、你写提示词时怎么借来用。
说清在哪一层较真
The unit of rigor is the feature, not every sentence
严格的单位是功能,不是每一句话
- 让 AI
- 它保证每个功能都核对到,但不会逐句死磕,拖慢整轮检查。
- 为什么管用
- 指定「严格」落在哪个单位上,AI 就知道哪里必须全覆盖、哪里可以放过。
- 借来用
- 让 AI 校对长文时写:「每一章都要检查到,但不用逐字抠。」
堵住最想跳过的那一步
Required even when source looks clean.
即使源码看起来没问题,也必须做。
- 让 AI
- 就算读代码没发现问题,它也会真的打开应用,把每个功能点一遍。
- 为什么管用
- 提前点出 AI 最可能找借口跳过的情形,比只说「必须做」更管用。
- 借来用
- 让 AI 核对数据时加一句:「就算你觉得数据没问题,也要随机抽 5 条手动核对。」
用箭头写清每种情况
Several candidates → ask which one; none → stop and point at
/pstack:create-verification-skillinstead of inventing a target.有好几个候选 → 问是哪一个;一个都没有 → 停下,指向
/pstack:create-verification-skill,不要自己编一个目标出来。- 让 AI
- 找到多个就问你,一个都没有就停下,它不会自作主张挑一个或编一个。
- 为什么管用
- 每种情况和对应动作用箭头连成一对,几种情况都写全,AI 就不会漏掉哪一种。
- 借来用
- 让 AI 整理文件时写:「超过 10 个 → 先问我;一个都没有 → 直接告诉我,别新建。」
给下结论设个门槛
require a concrete source path before calling one missing
说某个漏了之前,必须先有一个具体的源码路径
- 让 AI
- 它说地图漏了某个功能时,一定附上对应的代码位置。
- 为什么管用
- 规定「拿出什么才能下这个结论」,AI 就不会凭印象报问题。
- 借来用
- 让 AI 查网站时写:「说某个链接坏了之前,先贴出打开它时的报错。」
全文
AI 读到的就是这份 SKILL.md。可以看中文、看原文,或者一段一段对照着看。
descriptionPeriodic pass that keeps a project's verification skill and feature map honest: parallel source readers per feature, one live session driving every feature, at most one PR of proven corrections. Use for /pstack:maintain-verification-skill or "audit the verify skill".
description定期跑的一轮检查,让项目的验证技能和功能地图保持真实:每个功能派一个读源码的帮手 AI,并行去读;用一个实时会话把每个功能都操作一遍;最多提一个 PR,里面只放已经证明过的修正。用于 /pstack:maintain-verification-skill 或「审一下验证技能」。
Maintain a verification skill
Maintain a verification skill(维护验证技能)
A feature map rots the moment the app changes. This skill is the upkeep loop for a skill generated by /pstack:create-verification-skill (or any project-local verification skill with a feature map). The unit of rigor is the feature, not every sentence: cover every feature file from source and exercise every feature live, without terminalising every bullet.
应用一改,功能地图就开始过时。这个技能是一套维护流程,维护的对象是 /pstack:create-verification-skill 生成的技能(或者任何带功能地图的项目本地验证技能)。严格的单位是功能,不是每一句话:从源码覆盖每个功能文件,并实际操作每个功能,但不必把每一条要点都逐条跑到底。
Outcomes
结果
Pick one, and say which:
选一个,并说出是哪个:
- clean — every feature got source and live coverage; nothing worth shipping. No branch, no PR.
- changed — one PR ships proven doc, harness, or map corrections.
- blocked — coverage could not finish or a proven fix could not ship safely. Say exactly what blocked it.
- clean(干净):每个功能都有源码和实际操作的覆盖;没有值得提交的东西。不建分支,不开 PR。
- changed(有改动):一个 PR,提交已经证明过的文档、harness(驱动应用的脚本)或地图修正。
- blocked(卡住):覆盖没能完成,或者一个已证明的修复没法安全地提交。说清楚具体是什么卡住了。
Edit scope
能改什么
Only edit the verification skill's own directory (its SKILL.md, features/, and any harness scripts it owns). Never edit product code during a run: a behavior the map describes that the app no longer does is either doc drift (fix the map) or a product regression (report it, don't paper over it in docs).
只改验证技能自己的目录(它的 SKILL.md、features/,以及它拥有的 harness 脚本)。运行期间绝不改产品代码:地图里描述了、应用却不再那样做的行为,要么是文档过时(修地图),要么是产品倒退(报告它,不要在文档里把它掩盖过去)。
Pass
一轮检查
- Locate the target. Find the verification skill to maintain: the project-local skill whose body has launch/drive sections and a feature map (usually
verify-*/in the project's skill folder:.cursor/skills/,.claude/skills/,.pi/skills/, or.agents/skills/). Several candidates → ask which one; none → stop and point at/pstack:create-verification-skillinstead of inventing a target.
- 找到目标。 找到要维护的验证技能:正文里有启动 / 操作两节、并带一份功能地图的那个项目本地技能(通常是项目技能文件夹里的
verify-*/:.cursor/skills/、.claude/skills/、.pi/skills/或.agents/skills/)。有好几个候选 → 问是哪一个;一个都没有 → 停下,指向/pstack:create-verification-skill,不要自己编一个目标出来。
- Index hygiene. Read the feature map README and glob its sibling files. Fix missing, extra, duplicate, or dead entries. Lightweight; no generated inventory.
- 整理索引。 读功能地图的 README,用通配找出和它同级的文件。修掉缺失、多余、重复或失效的条目。轻量处理;不生成清单。
- Source wave. One read-only subagent per feature file, launched concurrently. Each explains "how does this user-facing feature work?" from source, flags likely doc drift with citations, and returns one concise live-verification recipe. Children never drive the app and never edit files. Return shape: feature summary / source entry points / likely drift or none / one recipe.
- 源码一波。 每个功能文件派一个只看不改的帮手 AI,同时启动。每个帮手 AI 从源码讲清「这个面向用户的功能是怎么运作的?」,标出可能的文档过时并附上出处,再交回一份简洁的实际验证步骤。帮手 AI 绝不操作应用,也绝不改文件。返回格式:功能概要 / 源码入口 / 可能的过时之处或无 / 一份步骤。
- Reconcile. Every feature file has a returned summary. Merge overlapping recipes into as few app states as practical. Spot-check cited drift; don't re-prove clean claims. Sweep recent churn for user-facing surfaces missing from the map — require a concrete source path before calling one missing.
- 对账。 每个功能文件都要有一份交回的概要。把重叠的步骤合并,尽量合到少数几个应用状态里。抽查被指出的过时之处;说没问题的,不要重新证明。扫一遍最近的改动,找地图里漏掉的面向用户的界面:说某个漏了之前,必须先有一个具体的源码路径。
- Live pass. Required even when source looks clean. The coordinator owns all driving; follow the verification skill's own launch model — one long-lived instance driven serially for servers and UIs, or a fresh isolated session per drive for short-lived CLIs (the skill's Launch section decides, not this one). Exercise every feature at least once, and hold three invariants the whole pass, whatever the failure: (1) never drive an instance you haven't health-checked since it last did something surprising — doctor before first drive, doctor on each fresh session where sessions are the unit, doctor again after any failed drive, and where doctor can't see the failure (a wedged UI state on a healthy process), reset to a known state or relaunch rather than hoping; (2) evidence captured so far survives every cleanup, checked at its named location, not assumed; (3) nothing a drive started outlives that drive's usefulness — failed-iteration residue is cleaned whether the session is stuck, exited, or shared (for a shared instance, clean the residue, not the instance). A doctor failure caused by skill drift is drift: fix it under edit scope and retry once — restart whatever the fix invalidated, nothing more — before calling the pass
blocked. A feature that can't be reached isverified-unreachableonly with the concrete prerequisite (auth, entitlement, OS, external state) and the route attempted; if the map omits that prerequisite, that's drift. Any harness fix from triage gets re-driven live before it ships. Final teardown happens after the last drive of the run — including those re-proofs — so nothing outlives the run (evidence stays, per the skill).
- 实际操作一遍。 即使源码看起来没问题,也必须做。所有操作都由协调者负责;按验证技能自己的启动方式来:服务器和界面用一个长期运行的实例,按顺序操作;短命的 CLI 每次操作用一个全新的隔离会话(由那个技能的 Launch 一节决定,不由这个技能决定)。每个功能至少操作一次,并且整轮都守住三条规矩,不管出了什么故障:(1)一个实例自上次做出意外的事以来没做过健康检查,就绝不操作它:第一次操作前跑 doctor,以会话为单位时每个新会话都跑 doctor,任何一次操作失败后再跑 doctor;doctor 看不到的故障(进程健康,但界面卡死了),就重置到已知状态或重新启动,不要碰运气;(2)到目前为止收集到的证据,在每一次清理之后都要还在,要到它指定的位置去确认,不能想当然;(3)一次操作启动的东西,不能在它没用了以后还留着:失败那一轮留下的残余都要清掉,不管会话是卡住了、退出了还是共享的(共享实例的话,清残余,不清实例)。由技能过时导致的 doctor 失败,就是过时:在能改的范围内修好它,然后重试一次(只重启被这次修复弄失效的东西,别的都不动),之后才能把这一轮判为
blocked。一个到不了的功能,只有写出具体的前提条件(登录、权限、操作系统、外部状态)和尝试过的路径,才能标成verified-unreachable;如果地图里漏了那个前提条件,那就是过时。分诊时做的任何 harness 修复,提交之前都要重新实际操作一遍。最后的收尾清理,放在这一轮最后一次操作之后(包括那些重新验证),这样就没有东西会活过这一轮(证据按技能的规定保留)。
- Triage. Wrong or missing user-POV description → doc drift, fix it. Working behavior the harness can't drive → harness gap, fix it; a harness fix follows the same helpers rule as generation (scripts executable, invocation documented in the skill body). App behavior that's actually broken → product gap; record it for the user, keep it out of this PR.
- 分诊。 用户视角的描述写错了或漏了 → 文档过时,修它。功能正常、但 harness 操作不了 → harness 缺口,修它;harness 的修复和生成时遵守同一条辅助脚本规矩(脚本可执行,调用方式写在技能正文里)。应用的行为确实坏了 → 产品缺口;记下来交给用户,不要放进这个 PR。
- Ship or stop. For changed: one PR of proven corrections, re-read every changed file first. For clean or blocked: no PR, report the outcome and the coverage honestly.
- 提交或停下。 结果是 changed:一个 PR,放已证明的修正,提交前把每个改过的文件重读一遍。结果是 clean 或 blocked:不开 PR,如实报告结果和覆盖情况。
Keep concise run notes (features covered, unreachable prerequisites, confirmed drift, outcome) in a scratch location; don't commit them.
简洁的运行笔记(覆盖了哪些功能、到不了的前提条件、确认的过时之处、结果)记在一个草稿位置;不要提交它们。
原文作者 Lauren Tan(poteto),MIT 许可。译文由本站翻译,核对到 pstack 镜像 97de40d。 在 GitHub 上看