dsh-vibe-math 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.en.md +29 -29
  2. package/README.md +31 -30
  3. package/SECURITY.md +56 -0
  4. package/cordis.patch.yml +38 -15
  5. package/docs/AUDIT-CHECKLIST.md +518 -429
  6. package/docs/COMPAT-AUDIT-ROUND3.md +16 -1
  7. package/docs/release-notes/RELEASE-NOTES-2.4.1.md +129 -0
  8. package/docs/release-notes/RELEASE-NOTES-2.5.0.md +173 -0
  9. package/docs/test-timing.md +73 -40
  10. package/installer.js +225 -45
  11. package/package.json +6 -3
  12. package/preset-declaration.js +38 -7
  13. package/prompt-corpus-persona/persona-corpus.json +9 -9
  14. package/prompt-corpus-persona/persona-corpus.md +69 -23
  15. package/prompt-corpus-v2/formal-verify-v2.json +116 -92
  16. package/prompt-corpus-v2/formal-verify-v2.md +240 -93
  17. package/prompt-corpus-v3/formal-verify-v3.json +81 -81
  18. package/prompt-corpus-v3/formal-verify-v3.md +288 -1111
  19. package/prompt-corpus-v4/formal-verify-v4.json +38 -8
  20. package/prompt-corpus-v4/formal-verify-v4.md +157 -25
  21. package/prompt-corpus-v5/prompt-corpus-v5.json +17 -17
  22. package/prompt-corpus-v5/prompt-corpus-v5.md +32 -26
  23. package/tests/audit-installer-compat.test.mjs +70 -4
  24. package/tests/audit-installer-policy.test.mjs +229 -4
  25. package/tests/audit-persona-sensitivity.mjs +11 -4
  26. package/tests/audit-persona-surface.test.mjs +5 -1
  27. package/tests/audit-v5-sensitivity.mjs +47 -6
  28. package/tests/e2e-v5-round2.test.mjs +354 -0
  29. package/tests/formal-verify-v2.test.mjs +54 -2
  30. package/tests/formal-verify-v3.test.mjs +63 -2
  31. package/tests/formal-verify-v4.test.mjs +120 -4
  32. package/tests/run-tests.mjs +104 -23
  33. package/vibe-math-v2/agent.cordis.yml +11 -5
  34. package/vibe-math-v2/preset.yml +1 -1
  35. package/vibe-math-v2/vibe-math-v2.js +607 -160
  36. package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +20 -4
  37. package/vibe-math-v3/agent.cordis.yml +26 -10
  38. package/vibe-math-v3/vibe-math-v3.js +744 -305
  39. package/vibe-math-v3//345/256/236/347/216/260/346/226/271/346/241/210.md +5 -5
  40. package/vibe-math-v4/agent.cordis.yml +26 -6
  41. package/vibe-math-v4/vibe-math-v4.js +487 -89
  42. package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +91 -9
  43. package/vibe-math-v5/agent.cordis.yml +8 -4
  44. package/vibe-math-v5/vibe-math-v5.js +607 -160
  45. package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +73 -40
@@ -146,11 +146,11 @@ VibeMath/ # 工作区级
146
146
  ├─ tasks.json # 验证任务等
147
147
  ├─ plans.json # 当前待执行计划队列
148
148
  ├─ index.json # 锚点扫描重建的机器索引(调度唯一读取面)
149
- ├─ verifier_accuracy.json # 验证器历史准确率
149
+ ├─ verifier_accuracy.json # 验证器投票记录(审计轨迹;不参与加权,见 §9 裁决)
150
150
  ├─ method_log.json # 方法库操作日志(上报/沉淀/晋升)
151
151
  ├─ formal.json # 【新】形式化记录(records/todo/libRuns,按对象 id)
152
152
  ├─ process_epoch.json # 进程纪元(断点续跑判据)
153
- └─ project.lock # 会话级项目锁(防并发写冲突)
153
+ └─ project_lock.json # 会话级项目锁(租约;运行中每 10s 续租,夺取需显式 override)
154
154
  ```
155
155
 
156
156
  **路径职责**:`Problems/` 问题清单类、`Progress/` progress 类、`Propos/` 结论/命题类、`Methods/` 理论发明类、`Formal/`(项目内)与 `Formal/{Lib,Proved}`(工作区级,见 §11.1)Lean 形式化类、`Verified/` 绝对可信类(含 `Verified/Lean/` 归档证明)、`Reliable/` 可信参考、`Notes/` 自由记录、`Logs/` 审计、`State/` 机器状态——**不同类型,不同路径**(需求 1)。
@@ -398,7 +398,7 @@ VibeMath/ # 工作区级
398
398
  - **目标对象**:单个命题 / 命题+证明或证伪 / 问题+解法,从 md 读取(锚点 + 正文全文);
399
399
  - **独立审查**:≥3 个验证器各自独立输出 `{Result ∈ [0,1], Reason}`(判定 1 需完整证明,判定 0 需严谨证伪,否则取中间值);独立前互不通气;
400
400
  - **辩论(交流群)**:轮流发言,回应他人、可改变立场(须说明理由);上限 `debateMaxRounds`;全部一致(全 1 或全 0)即终止;
401
- - **裁决**:`verdictMode` —— `flat`(均衡)/ `forced`(按历史准确率+严谨性加权)/ `manual`(人工);中间结果回写证明/证伪列表与对应概率。
401
+ - **裁决**:`verdictMode` —— `flat`(均衡:分歧时 0.5)/ `forced`(强制裁决:对每票**等权取均值**——严格 1/0 是唯一"绝对投票"语义,其影响通过数值本身拉向端点;**不按"历史准确率"加权**,因为那只是"与本批裁决的一致度",没有后续真值可纠正它)/ `manual`(人工);中间结果回写证明/证伪列表与对应概率。**最小票数**:一个对象至少要有 `max(2, verifierCount)` 票才能裁决(`allReported` 同时要求"已派出的验证器数达到预期"且"本轮全部回报"),单票绝不结论。
402
402
 
403
403
  ### 8.2 v3 默认修复 v2 审计发现的缺陷
404
404
 
@@ -610,7 +610,7 @@ VibeMath/ # 工作区级
610
610
  | 4. 方法库 | 方法卡+体系层级、应用记录自动追加、`new_inventions` 上报、Method Keeper 提炼、经验条目可信约束、项目→全局晋升 | 上报→沉淀→体系化链路通;经验条目不被当定理;晋升走门 |
611
611
  | 5. 控制面 | 参数/工具/命令、人工干预门(计划审批/裁决/方法晋升)、汇报、提示词全量 | manual 门挂起与 decide 放行;push 汇报触发 |
612
612
  | 6. 多会话 | per-session 隔离 + 项目锁 + 进程纪元 | 双会话并行各跑各的项目;resume 0 误中断 |
613
- | 7. 文档与迁移 | README(v3 为主推)、可选 v2→v3 迁移工具(JSON 项目 → md 骨架) | 迁移后项目可被 v3 调度器索引与续跑 |
613
+ | 7. 文档与迁移 | README(v3 为经典)、可选 v2→v3 迁移工具(JSON 项目 → md 骨架) | 迁移后项目可被 v3 调度器索引与续跑 |
614
614
 
615
615
  ---
616
616
 
@@ -634,7 +634,7 @@ VibeMath/ # 工作区级
634
634
  3. **Verified 采用"调度器生成副本"**(Propos 保留历史,Verified 为定论只读版本),而非原位删除/移动。
635
635
  4. **规划代理输出 JSON**(机器接口),知识才用 md——调度器需要可校验的动作流,JSON 是最低成本的机器契约;md 的自由叙述留给知识对象。
636
636
  5. **软规范取折中**(锚点行强制 + 正文自由),而非完全零规范——否则调度器无法可靠索引;锚点仅 4~7 行,符合"不设较高严格规范"。
637
- 6. **v3 作为新 preset id** `vibe-math-v3` 并入现有 npm 包 `dsh-vibe-math`(与 v2/v4 同包多预设),版本发布策略沿用(README 标注 v2 与 v3 同级主推、按需选择;老的 `vibe-math-v1` 已于 v2.0.0 移除,本包仅含 v2/v3/v4)。
637
+ 6. **v3 作为新 preset id** `vibe-math-v3` 并入现有 npm 包 `dsh-vibe-math`(与 v2/v4 同包多预设),版本发布策略沿用(README 标注四者同级、v2 与 v3 为经典;老的 `vibe-math-v1` 已于 v2.0.0 移除,本包仅含 v2/v3/v4/v5)。
638
638
  7. **v2 审计发现的两个缺陷**(flat 高置信分歧误判 0.5、引用被证伪卡片)在 v3 默认修复(§8.2)。
639
639
  8. **方法库收录范围**:不限解题技巧——任何过程中发明的/经验性总结出的有价值理论体系、框架、工具、方法、思想、范式、技巧均可沉淀(§7.1);允许经验性条目(§7.4);条目可组成体系层级并跨项目持续扩充(§7.3)。
640
640
 
@@ -71,14 +71,24 @@
71
71
  (execute / archive / list the reuse library). Residents use them too; they work in every mode.
72
72
  - vibe_v4_formal_report — human-readable Lean formal-verification mirror (mode, Lean-passed
73
73
  objects, recorded blockers, formalization TODO, library paths).
74
- - vibe_v4_prompts {which: brainstorm|normal|heartbeat|verify|coreRules, member?, target?, stage?} — read the exact prompt text a resident would receive (prompt auditing; prompt text is the product).
75
- A /v4 slash command mirrors the main controls (configure|start|resume|pause|abort|status|report|message <to|all> <content>|meeting|members|add|remove|set).
74
+ - vibe_v4_prompts {which: brainstorm|normal|heartbeat|meeting|verify|coreRules, member?, target?, stage?} — read the exact prompt text a resident would receive (prompt auditing; prompt text is the product).
75
+ A /v4 slash command mirrors the main controls (configure|start [problem]|resume|pause|abort|status|report|message <to|all> <content>|meeting|members|add|remove|set <k=v>...).
76
76
 
77
77
  TRUST RULE: only Verified/ (and Propos/ entries marked 已验证·真/假) are absolutely
78
78
  trustworthy; everything else — unverified resident claims, Progress/, Method claims —
79
79
  is experiential reference. A proposition / method / theory only reaches Verified/ when
80
80
  ALL residents unanimously agree true (or all agree false); otherwise it stays in its
81
- library with a probability estimate.
81
+ library with a probability estimate. Closure rule (identical across the presets): the framework
82
+ writes the Verified/ card — a resident's own claim never does — and what counts as a vote is
83
+ stated once in the VOTE CONTRACT below.
84
+
85
+ VOTE CONTRACT: a verification vote is a probability of truth in [0,1], but only an EXACT
86
+ 1 (absolutely true) and an EXACT 0 (absolutely false) count as a vote. Anything strictly
87
+ between (0.9, 0.95, 0.5 …) is an ABSTENTION carrying that probability estimate: the run
88
+ does NOT conclude, and the group's MEAN probability is written back to the object's card
89
+ so it stays in its library with a probability. The same absoluteness applies to the
90
+ meeting stop-vote: every resident on the roster must answer `voteSolved:true` — one
91
+ abstention keeps the run alive.
82
92
 
83
93
  LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
84
94
  - 'off' (default, no extra requirement) | 'encourage' (the residents decide by implementation
@@ -153,14 +163,24 @@
153
163
  (execute / archive / list the reuse library). Residents use them too; they work in every mode.
154
164
  - vibe_v4_formal_report — human-readable Lean formal-verification mirror (mode, Lean-passed
155
165
  objects, recorded blockers, formalization TODO, library paths).
156
- - vibe_v4_prompts {which: brainstorm|normal|heartbeat|verify|coreRules, member?, target?, stage?} — read the exact prompt text a resident would receive (prompt auditing; prompt text is the product).
157
- A /v4 slash command mirrors the main controls (configure|start|resume|pause|abort|status|report|message <to|all> <content>|meeting|members|add|remove|set).
166
+ - vibe_v4_prompts {which: brainstorm|normal|heartbeat|meeting|verify|coreRules, member?, target?, stage?} — read the exact prompt text a resident would receive (prompt auditing; prompt text is the product).
167
+ A /v4 slash command mirrors the main controls (configure|start [problem]|resume|pause|abort|status|report|message <to|all> <content>|meeting|members|add|remove|set <k=v>...).
158
168
 
159
169
  TRUST RULE: only Verified/ (and Propos/ entries marked 已验证·真/假) are absolutely
160
170
  trustworthy; everything else — unverified resident claims, Progress/, Method claims —
161
171
  is experiential reference. A proposition / method / theory only reaches Verified/ when
162
172
  ALL residents unanimously agree true (or all agree false); otherwise it stays in its
163
- library with a probability estimate.
173
+ library with a probability estimate. Closure rule (identical across the presets): the framework
174
+ writes the Verified/ card — a resident's own claim never does — and what counts as a vote is
175
+ stated once in the VOTE CONTRACT below.
176
+
177
+ VOTE CONTRACT: a verification vote is a probability of truth in [0,1], but only an EXACT
178
+ 1 (absolutely true) and an EXACT 0 (absolutely false) count as a vote. Anything strictly
179
+ between (0.9, 0.95, 0.5 …) is an ABSTENTION carrying that probability estimate: the run
180
+ does NOT conclude, and the group's MEAN probability is written back to the object's card
181
+ so it stays in its library with a probability. The same absoluteness applies to the
182
+ meeting stop-vote: every resident on the roster must answer `voteSolved:true` — one
183
+ abstention keeps the run alive.
164
184
 
165
185
  LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
166
186
  - 'off' (default, no extra requirement) | 'encourage' (the residents decide by implementation