feat: productize account calibration audit for v0.2.0#70
Conversation
Jooonnn
left a comment
There was a problem hiding this comment.
感谢这个 PR @jxtori ——整体质量很高,我想合。先说值得肯定的:
- guard 三字段的语义是真诚实:
hooks_enforced=true只能由 cheat-init Phase 4 的实际拦截测试写入,CLI / Codex 路径永远如实报none/false,且test_migration_does_not_claim_codex_hooks把语义锁进了测试。这是对旧hooks_installed语义债务的正确修复。 - audit 与盲预测通道的隔离做对了:全链路硬编码
reconstructed+calibration_samples_increment: 0、不写predictions/、不碰 state,Refusals 段直面「把历史爆款补写成预测」的滥用场景,并有测试锁死。 - 迁移链合规(1.4→1.5 migration + registry 登记 + 备份不覆盖 + 幂等),未迁移的 1.4 用户有优雅降级。12 个测试我在本地实跑全过。
- 安全干净:纯 stdlib、零网络、无 telemetry、无 license 改动。
合并前需要处理两个阻塞项:
1. Rebase 到最新 main(与今天合入的 #69 冲突)
#69 已经给部分 argument-hint 加了引号,你的第一个 commit 做了同一件事但口径不同(#69 只引号 [ 开头的值,你是全部引号)。实测 3 个文件冲突:SKILL.md、skills/cheat-init/SKILL.md、skills/cheat-migrate/SKILL.md。rebase 时请保留你「全部引号」的口径,并把 main 上剩余未引号的 hint(cheat-predict / cheat-publish / cheat-retro 等)也补齐——否则你自己新增的 test_skill_frontmatter.py 会红。
2. 隔离数据目录下的 hook 注册位置自相矛盾,预测锁会静默失效
根 SKILL.md 的新布局树把 .claude/settings.json 画在 <resolved-cheat-data-dir>/ 之下,cheat-init Phase 0 也写「后续所有脚手架、hook 路径都基于解析后的数据目录」。但 Claude Code 只读 workspace root 的 .claude/settings.json,且 hooks/prediction-immutability.json 的 command 是 ${CLAUDE_PROJECT_DIR}/.cheat-hooks/...。按现在的文档执行,选了 --dir 的用户 hook 永远不会被 harness 加载——Phase 4 会诚实地把 hooks_enforced 置 false,但用户只看到「没生效」,不知道原因,预测不可变的物理强制在新推荐布局下静默降级。
请明确:.claude/ 与 .cheat-hooks/ 必须留在 workspace root,只有数据文件进 data dir;修正布局树,并在 Phase 0 注记里排除这两项。
建议项(最好一起修,不强求):
deliverables/account-audit/*全是真实播放/互动数据,请显式加进 cheat-score-blind 的硬禁读表(deliverables/**→blocked_contaminated_input),与 rubric-memo.md / audience.md 的先例一致。- 根 SKILL.md 新 intro(「不用隐藏字段或硬模式切换」)与
cheat-predict里仍保留的 cold-start 简化段互相矛盾,二者留一。 migrate_state(payload, agent)的agent参数目前没用上,Claude Code 用户走 CLI migrate 后没有恢复 enforced 状态的入口——请在文档说明「CLI migrate 后如何重新验证 guard」,或加个verify子命令。skill_version1.0.0→0.2.0 是语义修正但数值上是降级,请在migrations/1.4-to-1.5.md注明一句「版本号修正,非降级」,避免未来有人做单调比较。
nit(可后续 PR):audit 的 URL 兜底硬编码了小红书域名(--platform douyin 也会生成 xiaohongshu 链接);adapters 的 4 份 paths.py 建议复用 cheat_paths 消掉重复解析(现在数据目录解析逻辑有 7 处复制且失败行为不一致);LATEST_SCHEMA 现在三处硬编码,registry 维护者注记里请补上 cheat_cli.py。
README 直接带 ¥999/¥2,999 价格表这件事与代码质量无关,是项目定位问题,我需要单独考虑一下,本 PR 先不用动。
What changed
cheat-audit, a productized 20–50 post account diagnostic that generates traceable JSON/Markdown and a four-week experiment planguard_scripts_installed,hooks_backend,hooks_enforced) so Codex no longer claims Claude Code hooks are active.cheat-content.jsondata-root isolation shared by CLI, hooks, and four performance adaptersinit,status,migrate, andauditentry pointsargument-hintcompatibility fix as a separate commitWhy
The repository already has a strong calibration loop, but the entry surface is developer-oriented and the old hook state can overstate enforcement outside Claude Code. This PR packages the existing methodology as a sellable account-audit result while preserving blind-prediction integrity: historical imports are always
reconstructedand never incrementcalibration_samples.Impact
Validation
python -m unittest discover -s tests -p 'test_*.py'— 12 passedtools/diff_pct_test.sh— 3 passedadapters/perf-data/linkedin-session/test_extract.py— 7 passedinstall.sh --copy --all: 16 Claude skills + 17 Codex entriesgit diff --checkDeliberately deferred
SaaS, auth, payments, multi-account MCN permissions, and automatic publishing remain out of scope until paid-pilot gates are met.