1实现原理 · 为什么它能做到
这是一个『生成器』skill:不直接验证,而是为仓库生成一个项目本地技能(.cursor/skills/verify-<app>/),让后续 agent 能以『冷启动、无人讲解』的方式驱动真实应用取证。
Every serious project needs a scripted way to drive the real app and prove behavior: launch it, exercise a feature the way a user would, and capture evidence. This skill generates that as a project-local skill (`.cursor/skills/verify-<app>/`) tailored to the repo.
先访谈仓库而非用户:五个问题(Surface/Run/Drive/Observe/Isolate)全部优先从代码库自答,只有观察不到的才问人;现有 harness(Playwright/Cypress/expect/PTY/curl/debug port)优先于通用配方。
Answer these from the codebase and only ask the user what you cannot observe
生成物有强制六段结构(Launch/Doctor/Drive/Evidence/Cleanup/Helpers),每段内容必须来自访谈实证、禁留占位符;frontmatter 缺失会导致技能不注册,被列为必写。
Write `.cursor/skills/verify-<app>/SKILL.md` with YAML frontmatter (`name: verify-<app>` and a `description` that names the app, the surface, and when to reach for it — without frontmatter the skill never registers) and these sections, each grounded in what the interview actually found (no placeholders left)
证据标准与 mock 边界被写成硬规则:必须走真实用户路径而非内部 setter/test-only 端点;同时捕获动作与结果状态;副作用(写文件/插行/发消息)与可见面一起核验;mock 只在生产边界已隔离外部系统时允许;dry-run/test 模式要实证其真的跳过而不是信名字。
exercise the real user path, not internal setters or test-only endpoints; capture the action and the resulting state, not just the final screen; verify side effects (files written, rows inserted, messages sent) alongside what's visible; mocks only where a production boundary already isolates the external system
种子化 feature map:生成 features/README.md 索引 + 每用户功能一文件(首批 3-5 个,来自 routes/commands/menus/docs),形状照抄 references/feature-map-example/,固定四个 H2(Sub-features / How to get to it (user POV) / Driving it with <harness> / Gotchas),以用户视角写。
Follow the shape in [`references/feature-map-example/`](references/feature-map-example/), with a README index and one file per feature.
交付门禁=端到端实证:生成后必须亲自跑一遍生成技能(launch→doctor→驱动一个 feature→取证→cleanup),失败迭代也要跑 cleanup 防残留进程/端口;没跑过的生成物只是草稿。
A generated skill that was never executed is a draft, not a deliverable.
隔离纪律内建:Interview 的 Isolate 题评估双实例并行能力;不能安全并行时必须写进生成技能『拒绝双驱共享实例』,防污染用户真实会话。
If not, say so in the generated skill: refusing to double-drive a shared instance beats corrupting the user's session.
2核心能力
3外部依赖
| 类型 | 依赖 |
|---|---|
| cli | 无固定第三方 CLI;harness 按仓库访谈结果选定(Playwright/Cypress/expect/curl/tmux/PTY/browser CDP 等,均为宿主工具或仓库既有依赖) |
4风险提醒 风险提醒:蓝色 · 知晓即可
- 信任仓库提供的启动/驱动信息:恶意或损坏的 repo(package scripts/README/Makefile)可诱导 agent 执行任意本地命令;Doctor 只读检查与『先修后生成』是仅有的防线。 — injection_surface:仓库内容作为访谈输入被信任
- 端到端实证会真实启动并驱动目标应用:若隔离纪律执行不到位(共享实例、未用独立数据目录),可能触碰用户真实数据/会话。 — skill 已内建 'refusing to double-drive a shared instance beats corrupting the user's session',依赖 agent 执行
- 生成物二次传播风险:verify skill 内容是对仓库的归纳,被投毒仓库会生成带误导步骤的技能,影响后续所有验证会话。 — 供应链式风险,skill 无法自防 [INFERENCE]
5第二遍独立确认
- [ok] 纯 prompt 生成器、无自带脚本 — 目录仅 SKILL.md + references/feature-map-example/{README,create-note,search}.md;skill 自身无可执行代码。
- [ok] 五问访谈与『先仓库后用户』 — 'Answer these from the codebase and only ask the user what you cannot observe' 原文在;五问标题逐字齐全(含 Isolate 双实例题)。
- [ok] 生成技能六段结构 + frontmatter 必写 — Launch/Doctor/Drive/Evidence/Cleanup/Helpers 六段均以 '- **X:**' 形式存在;'without frontmatter the skill never registers' 原文在。
- [ok] 证据标准/mock/dry-run 边界 — 真实用户路径、副作用核验、mock 边界句逐字存在;'some dry-runs still touch the network or open a browser.' 原文在。
- [ok] feature map 契约(四 H2 + 用户 POV + 3-5 起步) — 四 H2 名称原文在;example 三个文件均按 README→功能文件的索引关系组织,create-note.md 与 search.md 各含四 H2 与 Preconditions。
- [ok] 端到端实证门禁与清理纪律 — 'A generated skill that was never executed is a draft, not a deliverable.'、'Never kill by process name; kill what you started.'、'a cleanup that eats the proof fails this step' 均逐字存在。
- [ok] 外部依赖清单(动态 harness) — 无固定第三方;harness 列表(Playwright/Cypress/expect/curl/debug port/tmux/PTY/CDP/HTTP)是候选配方而非强制依赖,已在条目中限定表述。
- [ok] 无凭证/无固定外发 — 全文无密钥/token/env 读取指令;Interview 提及 env vars/auth 仅作为『要记录的运行前提』,不是采集动作。
6结论
b679c7c74e03480f…df3fb154fb