verify-app
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVerify the app
验证应用
The question this skill answers: which features did this change touch, how
do I exercise them on an isolated instance, and what proves they work?
Two parts, after Poteto's verification skills: a remote control
(, no argument lists every command) and a feature map
(, one file per area with the same four H2s: Sub-features, How
to get to it, Driving it with verify, Gotchas). The CLI drives a running
instance; it is not a test runner. Compose its commands: never write a driver
script for a verification.
node scripts/verify.mjsdocs/verify/The product's part of the CLI (seed states, the server folders
watches, extra flags, the browser's locale and permissions, the report's
words) lives in ; the rest is the same in every app.
doctorupscripts/verify-app.mjs本 skill 要回答的问题是:本次变更触及了哪些功能、如何在隔离实例中操作这些功能,以及有什么证据证明它们能正常工作?
在 Poteto 的验证 skills 之后,它分为两部分:一个 remote control(,不带参数时会列出所有命令)和一个 feature map(,每个领域一个文件,均使用相同的四个 H2:Sub-features、How to get to it、Driving it with verify、Gotchas)。该 CLI 用于驱动正在运行的实例,而不是 test runner。组合使用这些命令:验证时绝不编写 driver script。
node scripts/verify.mjsdocs/verify/CLI 中与产品相关的部分(seed 状态、 监视的 server 文件夹、额外的 flags、浏览器的 locale 和 permissions、报告措辞)位于 ;其余部分在所有应用中都相同。
doctorupscripts/verify-app.mjsPick a flow
选择流程
Every checkout gets its own instance: port, data folder, browser and logs are
derived from the checkout's path and live in . A git worktree
() never fights the main checkout or another
agent's worktree.
.verify/<port>/git rev-parse --git-dir- Fresh worktree or clone: installs dependencies and Chromium if missing, builds the page,
node scripts/verify.mjs setup,up.doctor - Already set up: then
up.doctor - Done: ;
downdeletes this instance's data and logs (cleanupalso reports, traces, screenshots). Remove a worktree yourself, from the main checkout, once its branch is pushed.cleanup --all
doctorfreshSTALE BUNDLEnpm run buildSTALE SERVERdownupWRONG INSTANCE每个 checkout 都有自己的实例:端口、数据文件夹、浏览器和日志均根据 checkout 的路径生成,并存放在 中。Git worktree()不会与主 checkout 或另一个 agent 的 worktree 发生冲突。
.verify/<port>/git rev-parse --git-dir- 全新 worktree 或 clone: 会在缺少依赖和 Chromium 时进行安装,然后构建页面、执行
node scripts/verify.mjs setup和up。doctor - 已经设置完成: 执行 ,然后执行
up。doctor - 完成: 执行 ;
down会删除该实例的数据和日志(cleanup还会清理 reports、traces 和 screenshots)。分支 push 后,需从主 checkout 中自行移除该 worktree。cleanup --all
doctorfreshSTALE BUNDLEnpm run buildSTALE SERVERdownupWRONG INSTANCEProcedure
操作步骤
- : name every area the change affects; read only those files (
node scripts/verify.mjs features), plusfeatures <area>when the change crosses areas. Read the laws the change touches injourneys.docs/INVARIANTS.md - : the gate, the project's check command (
node scripts/verify.mjs check): lint, the contracts (feature map, laws, architecture rules), unit tests, formal models, typecheck + build, bundle secrets, end-to-end journeys. It must pass before anything else counts.project.mdwhile iterating;check --fastalone needs no install. Formal models need Java: without it they are NOT RUN, and the gate says "incomplete", never "passed" (contract).formal/README.md - or
setup+up→doctor.fresh - writes
report <area…>, the template you fill..verify/report-<branch>.md - Put the instance in the state you need with instead of clicking through;
seed <state>for a blank instance. For running states (a reload or a switch mid-run):resetthendown.up --delay 4000 - , then drive the feature the way a person does:
mark "<what you test>",open,click,type,upload,press.wait-settle - Collect the proof: after the action and after a reload (
api <route>reloads);open "/"(the requests the action made, statuses, failures);network-summary --since-mark(no page error);console --errors --since-mark, orsnapshotfor the product owner.screenshot…trace startwhen a reviewer must replay the action (trace stop);npx playwright show-trace <zip>for a page-weight question.perf - Front laws on any state: (controls without an accessible name, tab order: APP-F6),
a11ythenviewport 375 812andoverflow(phone width: APP-F7), thenscreenshot.viewport 1440 900 - Fake models by default: they check the plumbing, not the wording. For a
change to what an agent writes, say that it needs . Use
up --realonly for agent behaviour, with the Codex login inup --real.CODEX_AUTH_FILE - If the change adds or changes something a person can see, update its file
in in the same branch (and a journey in
docs/verify/when it crosses areas).test/e2e/refuses a file without the four H2s. If it changes how a law is proved, updatecheck:scripts/verify/VERIFY.jsonrefuses a law with no evidence and no recorded deferral.check
- :列出变更影响的每个领域;只阅读这些领域对应的文件(
node scripts/verify.mjs features),如果变更跨越多个领域,还要阅读features <area>。阅读变更在journeys中触及的规则。docs/INVARIANTS.md - :运行 gate,即项目在
node scripts/verify.mjs check中定义的 check 命令,包括 lint、契约检查(feature map、规则、架构规则)、单元测试、形式化模型、类型检查 + 构建、bundle secrets 检查以及端到端 journey。其他验证产生效力之前,它必须通过。迭代期间可使用project.md;单独执行check --fast无需安装依赖。形式化模型需要 Java:没有 Java 时,它们会显示为 NOT RUN,gate 会报告contract,绝不会报告incomplete(passed)。formal/README.md - 执行 ,或
setup+up→doctor。fresh - 会写入
report <area…>,这是需要填写的模板。.verify/report-<branch>.md - 使用 将实例置于所需状态,不要通过逐项点击完成;使用
seed <state>清空实例。需要以运行状态启动时(中途 reload 或 switch),先执行reset,再执行down。up --delay 4000 - 执行 ,然后像用户一样操作功能:使用
mark "<what you test>"、open、click、type、upload和press。wait-settle - 收集证据:操作后及 reload 后执行 (
api <route>会触发 reload);执行open "/"(查看该操作发出的请求、状态和失败情况);执行network-summary --since-mark(确认没有页面错误);执行console --errors --since-mark,或为 product owner 提供snapshot。当 reviewer 需要重放操作时,执行screenshot…trace start(trace stop);涉及页面重量问题时执行npx playwright show-trace <zip>。perf - 任何状态下都要检查前端规则:(缺少 accessible name 的控件、tab 顺序:APP-F6),
a11y,然后执行viewport 375 812和overflow(手机宽度:APP-F7),最后执行screenshot。viewport 1440 900 - 默认使用 fake models:它们检查的是基础链路,而不是文案。若变更涉及 agent 写入的内容,应说明需要 。仅在涉及 agent 行为时使用
up --real,并在up --real中提供 Codex 登录信息。CODEX_AUTH_FILE - 如果变更新增或修改了用户可见内容,需在同一分支中更新 下的对应文件;如果变更跨越多个领域,还要更新
docs/verify/中的 journey。test/e2e/会拒绝缺少四个 H2 的文件。如果变更改变了某项规则的证明方式,需更新check:scripts/verify/VERIFY.json会拒绝既无证据也无延期记录的规则。check
Proof bar
证明标准
A proof exercises the production path and shows the result a skeptical
reviewer would accept.
- Drive through the page and its normal server calls. reads state after the user path ran;
evalonly prepares a state, likepost: neither is the proof.seed/apiact as that token's identity.post --bearer <token> - A proof from an instance that is not is not evidence.
fresh - Cover every reachable entry point and the success, failure, empty,
cancel/rerun and persistence paths the change can affect (the area file
lists them; in a journey, or a stopped server, makes a request fail).
page.route - Show the trigger and the stable end state together (, the action, the
markevidence).--since-mark - Side effects, not pixels: the stored record (), the run row (
api /api/<route>), the state after a reload or aapi /api/runs/down.up - Fake models count only because they sit behind the production boundary (the model provider, under the same runtime, server and web). Anything that skips the web or the server is not coverage of the page.
- Name what you could not reach (native file picker, OS drag and drop, real provider, production only) and the closest real path you covered instead.
证明必须走生产路径,并展示审慎的 reviewer 能够接受的结果。
- 通过页面及其正常 server 调用进行操作。读取用户路径执行后的状态;
eval只像post一样准备状态:二者都不是证明。seed/api以该 token 的身份执行操作。post --bearer <token> - 来自非 实例的证明不构成证据。
fresh - 覆盖变更可能影响的每个可达入口,以及成功、失败、空状态、取消/重跑和持久化路径(领域文件会列出这些路径;journey 中的 或停止 server 可使请求失败)。
page.route - 同时展示触发动作和稳定后的最终状态(、操作以及
mark证据)。--since-mark - 关注副作用,而不是像素:已存储的记录()、run 行(
api /api/<route>)、reload 或api /api/runs/down后的状态。up - Fake models 只有位于生产边界之后才具有证明力(model provider 位于相同的 runtime、server 和 web 之下)。任何绕过 web 或 server 的做法都不算覆盖页面。
- 说明哪些内容无法触达(native file picker、OS 拖放、real provider、仅生产环境可用的功能),并说明所覆盖的最接近真实路径。
Evidence, cheapest adequate first
证据:优先采用成本最低但足够充分的层级
text
lint + contracts + unit tests → formal models → end-to-end journeys (fake models)
→ driven instance (verify) → real models on the instance (up --real)
→ the people's own useA passing layer never proves a claim of a higher layer: a green unit test says
nothing about the page; a fake-model journey says nothing about the wording.
text
lint + contracts + unit tests → formal models → end-to-end journeys (fake models)
→ driven instance (verify) → real models on the instance (up --real)
→ the people's own use某一层通过,绝不能证明更高层的主张:unit test 全绿说明不了页面是否正常;fake-model journey 说明不了文案是否正确。
Never
绝不做
- Real user data anywhere in the repository, tests, fixtures, reports or committed screenshots: only invented data.
- Production as a test bed. The instance is yours; production is the users' (
verify upis read-only checks after a deploy).docs/verify/deploy.md - "Verified" from a merge, a green CI or a deployment: what ran where is the release skill's question, and "unknown" is a valid answer.
- 仓库、测试、fixtures、reports 或已提交的 screenshots 中绝不包含真实用户数据:只能使用虚构数据。
- 不要把 production 当作测试床。实例归你使用;production 属于用户(
verify up仅用于部署后的只读检查)。docs/verify/deploy.md - 不能仅凭 merge、绿色 CI 或 deployment 就声称“Verified”:在哪里运行了什么属于 release skill 的问题,而“unknown”也是有效答案。
Report before calling it verified
在称为 verified 之前编写报告
Fill (from ) and paste it in the
pull request (the evidence table of ):
.verify/report-<branch>.mdreport <area…>.github/pull_request_template.md- commit, line,
doctorresult (and whether formal models ran), models (fake / real);check - per area: the paths driven, the commands, the observed side effect (key output);
- skipped or unreachable paths: what blocks each one, and the closest real path covered;
- what is not proved here (for instance: wording needs real models).
填写 (由 生成),并将其粘贴到 pull request 中( 的证据表):
.verify/report-<branch>.mdreport <area…>.github/pull_request_template.md- commit、输出、
doctor结果(以及形式化模型是否运行)、所用模型(fake / real);check - 按领域列出:所操作的路径、执行的命令、观察到的副作用(关键输出);
- 跳过或无法触达的路径:各自的阻碍因素,以及所覆盖的最接近真实路径;
- 此处未证明的内容(例如,文案需要 real models 才能验证)。