用途:ns-judge 是在父流程已拿到 Code Review: Approved 之后运行的交付证明技能,用来核对已交付 diff 是否匹配输入验收标准(AC)。它不负责 SOLID、安全性或代码质量,这些已由 ns-reviewer 处理。
主要能力:按模式核对 AC token、spec 覆盖台账、ui-contract 的 testid/文案以及视觉清单字面值与仓库的匹配。评分为 10 才可 Approved;零 Critical 且总分 10、AC token 全部命中才通过,得分 9 为 Rejected(Lift),≤8 为 Rejected。脚本 prove_ac.py 负责 AC/台账/ui-contract/视觉规则,scan_bypasses.py 扫描 diff 中候选绕过,review_gate.py 校验 findings.json。
使用方式:先确认最近代码结论为 Code Review: Approved,否则停止。可选探测 Python3:缺失或脚本退出 1 时跳过 preflight,残余 LLM 仍运行,不因缺 Python 判 Blocked。closure 模式命令为 prove_ac.py --mode closure [--repo .] [--version VERSION_SAN] [--requirements PATH];issue 模式为 --mode issue --ac-file PATH;adhoc 在无 --requirements/--ac-file 时跳过 AC 证明。之后运行 git diff | python3 scripts/scan_bypasses.py,再运行残余 LLM、写 findings.json 并用 review_gate.py 校验。
适用场景:run-implementation Step 5、ns-autonomous standalone close、ns-coder ad-hoc / C2、ns-execution-gitlab-issue Phase 4。
限制:ns-reviewer 不得调度本技能;无 Code Review: Approved 则不判定。对产品文件只读,不用 GitHub review API。findings 需给出 [{type:internal,ref:path:line}] 证据。残余 LLM 不重述 phpunit/lint 已捕获内容。详细 CLI 见 references/workflow.md,token 正则只在 scripts/prove_ac.py 中。