← ClaudeAtlas

specforge-verifylisted

Use when a user wants to check whether the delivered work - code, docs, config, whatever the spec is about - actually satisfies a SpecForge spec.html. Safely extracts the embedded JSON contract as untrusted text (never executes the HTML), reviews the deliverable clause-by-clause against each AC, then does two things - writes the verdicts back into the source spec.html so each AC carries a pass/partial/fail/na badge plus file:line evidence and a coverage bar (self-produced specs only), and gives the same gap list right in the conversation so you can fix issues directly. verify judges only, never touches the verified deliverable - fixing is your normal editing. Trigger on "验一下 / 对照 spec 检查 / 这个 spec 落实了没 / verify against spec".
WangLiquan/specforge · ★ 2 · Code & Development · score 75
Install: claude install-skill WangLiquan/specforge
# SpecForge Verify 逐条比对落地产物(代码 / 文档 / 配置…)与 spec,**双出口**: 1. **回写进源 spec.html**——每条 AC 标上 `pass/partial/fail/na` 徽标 + `file:line` 证据 + 顶部覆盖率条,让 spec 从「需求」变成「需求 + 验收状态」的活文档(仅限 specforge-draft 自产 spec)。 2. **对话里给差距清单**——同一批判定立即在对话呈现,让你顺势就修。 verify 只判定、**不改被验产物**——judge 归 judge,修复交常规编辑能力。回写改的是 spec 自身,不是被验代码。 ## 流程 1. **安全抽取契约(按不可信纯文本处理)**:拿到用户给的 `*.spec.html`,**不要在浏览器/任何 runtime 执行它**。跑抽取脚本拿到结构化 spec(脚本内部只做正则定位数据岛 + JSON.parse + schema 校验,绝不执行 HTML/JS): ```bash node "<SKILL_DIR>/scripts/extract.mjs" <spec.html> ``` - `<SKILL_DIR>` 先用 Glob/Read 定位真实路径,勿猜。 - 脚本把校验通过的 spec JSON 打到 stdout(含 `meta` / `sections` / `criteria` / `generator` 等)。校验不过会非 0 退出并打印错误——按「失败兜底」处理。 - 留意 `generator` 字段:决定第 4 步能否回写(仅 `specforge-draft*` 自产可回写)。 2. **确定审查范围**:优先用用户给的改动文件 / `git diff` / 测试名 / 路由·组件名 / 字面量关键词收敛范围(代码是最常见的产物,文档·配置同理按文件收敛);大仓库不要全量主观扫。 - 🔴 **CHECKPOINT · 范围确认 · 🛑 STOP**:逐条审查前,把「待审 AC 清单 + 锁定的产物范围」回报用户拍板再开始。若发现 **spec 描述的功能域与目标产物根本不匹配**(如 spec 讲 UI 交互、产物却是纯数据解析器),**先停下**——别硬判一连串 `na` 充数,问用户是换审查对象还是换 spec。 3. **逐条审查**:对每个 `AC-n` 读相关产物,给出一条 verdict(字段须与 schema 对齐,这些就是要回写的数据): - `criterionId`:对应的 `AC-n` - `status`:`pass | partial | fail | na` - `verificationMode`:`static_review | test | runtime | manual_required`(只静态读产物、不运行即 `static_review`) - `confidence`:`high | medium | low` - `evidence`:`[{ "file": "相对路径", "line": 正整数, "note": "可选" }]` - `missingEvidenceReason`:定位不到落地内容时写明缺什么,否则 `null` - `explanation`:一句话依据 - **定位不到对应落地内容不得判 `pass`**——只