dsh-vibe-math 2.4.1 → 2.6.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 (46) hide show
  1. package/README.en.md +53 -14
  2. package/README.md +54 -14
  3. package/cordis.patch.yml +54 -17
  4. package/docs/AUDIT-CHECKLIST.md +26 -7
  5. package/docs/COMPAT-AUDIT-ROUND3.md +16 -1
  6. package/docs/final-paper.md +171 -0
  7. package/docs/release-notes/RELEASE-NOTES-2.5.0.md +173 -0
  8. package/docs/release-notes/RELEASE-NOTES-2.6.0.md +268 -0
  9. package/docs/test-timing.md +77 -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 +13 -13
  14. package/prompt-corpus-persona/persona-corpus.md +113 -39
  15. package/prompt-corpus-v2/formal-verify-v2.json +128 -92
  16. package/prompt-corpus-v2/formal-verify-v2.md +380 -142
  17. package/prompt-corpus-v3/formal-verify-v3.json +117 -81
  18. package/prompt-corpus-v3/formal-verify-v3.md +693 -1189
  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 +68 -8
  26. package/tests/audit-persona-surface.test.mjs +21 -8
  27. package/tests/audit-v5-sensitivity.mjs +47 -6
  28. package/tests/e2e-v5-round2.test.mjs +825 -1
  29. package/tests/formal-verify-v2.test.mjs +57 -2
  30. package/tests/formal-verify-v3.test.mjs +67 -2
  31. package/tests/formal-verify-v4.test.mjs +120 -4
  32. package/tests/prompt-v5-integrity.test.mjs +9 -3
  33. package/tests/run-tests.mjs +104 -23
  34. package/tests/selfdrive-v5.mjs +55 -4
  35. package/vibe-math-v2/agent.cordis.yml +20 -4
  36. package/vibe-math-v2/vibe-math-v2.js +1318 -106
  37. package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +20 -4
  38. package/vibe-math-v3/agent.cordis.yml +36 -14
  39. package/vibe-math-v3/vibe-math-v3.js +1348 -179
  40. package/vibe-math-v3//345/256/236/347/216/260/346/226/271/346/241/210.md +3 -3
  41. package/vibe-math-v4/agent.cordis.yml +36 -8
  42. package/vibe-math-v4/vibe-math-v4.js +1195 -57
  43. package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +91 -9
  44. package/vibe-math-v5/agent.cordis.yml +16 -8
  45. package/vibe-math-v5/vibe-math-v5.js +1628 -112
  46. package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +143 -41
@@ -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
 
@@ -61,7 +61,7 @@
61
61
  Main controls (recommended flow: configure FIRST, then start):
62
62
  - vibe_v4_configure {project?, problem?, params?} — create/configure the project (name, problem, params) WITHOUT starting a run; set everything here first.
63
63
  - vibe_v4_start {problem?, residentCount?, seedDirections?} — begin the run (spawn residents, brainstorm). If problem was configured, omit it.
64
- - vibe_v4_set {residentCount, compactThreshold, compactAfterRounds, meetingKeepEvery, maxParallel, activityTimeoutMs, stallAutoMeetingMs, verdictMaxRounds, provider, model, residentPersona, toolAllow, toolDeny, formalVerify, leanCommand, leanArgs, leanTimeoutMs} — tune params (persisted to the settings file). provider/model override the residents' LLM route (empty = they inherit YOUR model/provider); toolAllow/toolDeny are per-resident tool permissions (empty = they inherit all tools). stallAutoMeetingMs is the stalled-group auto-sync-meeting threshold (分级保活 B). formalVerify (off|encourage|require, default off) enables Lean formal verification; leanCommand/leanArgs/leanTimeoutMs configure the toolchain.
64
+ - vibe_v4_set {residentCount, compactThreshold, compactAfterRounds, meetingKeepEvery, maxParallel, activityTimeoutMs, stallAutoMeetingMs, verdictMaxRounds, provider, model, residentPersona, toolAllow, toolDeny, formalVerify, leanCommand, leanArgs, leanTimeoutMs, finalPaper, paperFormat, paperLanguage, paperCompilePdf, paperEditor, paperLatexCommand} — tune params (persisted to the settings file). provider/model override the residents' LLM route (empty = they inherit YOUR model/provider); toolAllow/toolDeny are per-resident tool permissions (empty = they inherit all tools). stallAutoMeetingMs is the stalled-group auto-sync-meeting threshold (分级保活 B). formalVerify (off|encourage|require, default off) enables Lean formal verification; leanCommand/leanArgs/leanTimeoutMs configure the toolchain. The FINAL PAPER is tuned by finalPaper (true|false, default true), paperFormat (both|md|tex), paperLanguage (zh|en), paperCompilePdf (true|false), paperEditor (office|resident:<id>, default office = the human/assistant side finalises) and paperLatexCommand.
65
65
  - vibe_v4_resume / vibe_v4_pause / vibe_v4_abort / vibe_v4_status / vibe_v4_report.
66
66
  - vibe_v4_message {to|all, content} — inject a message to a resident (human/assistant intervention).
67
67
  - vibe_v4_meeting {agenda} — force a meeting.
@@ -71,14 +71,28 @@
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|paper [lang=zh|en] [format=md|tex|both] [editor=office|resident:<id>] [force]|members|add|remove|set <k=v>...).
76
+ Final paper: after the unanimous stop vote the run enters a PAPER phase — every resident writes their part, each
77
+ cross-reviews at least one other part, and the paperEditor finalises (office = the human/assistant side, or one named
78
+ resident); only then is the run marked complete. finalPaper=false skips the phase; /v4 paper [lang=zh|en]
79
+ [format=md|tex|both] [editor=office|resident:<id>] [force] starts or re-runs it by hand.
76
80
 
77
81
  TRUST RULE: only Verified/ (and Propos/ entries marked 已验证·真/假) are absolutely
78
82
  trustworthy; everything else — unverified resident claims, Progress/, Method claims —
79
83
  is experiential reference. A proposition / method / theory only reaches Verified/ when
80
84
  ALL residents unanimously agree true (or all agree false); otherwise it stays in its
81
- library with a probability estimate.
85
+ library with a probability estimate. Closure rule (identical across the presets): the framework
86
+ writes the Verified/ card — a resident's own claim never does — and what counts as a vote is
87
+ stated once in the VOTE CONTRACT below.
88
+
89
+ VOTE CONTRACT: a verification vote is a probability of truth in [0,1], but only an EXACT
90
+ 1 (absolutely true) and an EXACT 0 (absolutely false) count as a vote. Anything strictly
91
+ between (0.9, 0.95, 0.5 …) is an ABSTENTION carrying that probability estimate: the run
92
+ does NOT conclude, and the group's MEAN probability is written back to the object's card
93
+ so it stays in its library with a probability. The same absoluteness applies to the
94
+ meeting stop-vote: every resident on the roster must answer `voteSolved:true` — one
95
+ abstention keeps the run alive.
82
96
 
83
97
  LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
84
98
  - 'off' (default, no extra requirement) | 'encourage' (the residents decide by implementation
@@ -143,7 +157,7 @@
143
157
  Main controls (recommended flow: configure FIRST, then start):
144
158
  - vibe_v4_configure {project?, problem?, params?} — create/configure the project (name, problem, params) WITHOUT starting a run; set everything here first.
145
159
  - vibe_v4_start {problem?, residentCount?, seedDirections?} — begin the run (spawn residents, brainstorm). If problem was configured, omit it.
146
- - vibe_v4_set {residentCount, compactThreshold, compactAfterRounds, meetingKeepEvery, maxParallel, activityTimeoutMs, stallAutoMeetingMs, verdictMaxRounds, provider, model, residentPersona, toolAllow, toolDeny, formalVerify, leanCommand, leanArgs, leanTimeoutMs} — tune params (persisted to the settings file). provider/model override the residents' LLM route (empty = they inherit YOUR model/provider); toolAllow/toolDeny are per-resident tool permissions (empty = they inherit all tools). stallAutoMeetingMs is the stalled-group auto-sync-meeting threshold (分级保活 B). formalVerify (off|encourage|require, default off) enables Lean formal verification; leanCommand/leanArgs/leanTimeoutMs configure the toolchain.
160
+ - vibe_v4_set {residentCount, compactThreshold, compactAfterRounds, meetingKeepEvery, maxParallel, activityTimeoutMs, stallAutoMeetingMs, verdictMaxRounds, provider, model, residentPersona, toolAllow, toolDeny, formalVerify, leanCommand, leanArgs, leanTimeoutMs, finalPaper, paperFormat, paperLanguage, paperCompilePdf, paperEditor, paperLatexCommand} — tune params (persisted to the settings file). provider/model override the residents' LLM route (empty = they inherit YOUR model/provider); toolAllow/toolDeny are per-resident tool permissions (empty = they inherit all tools). stallAutoMeetingMs is the stalled-group auto-sync-meeting threshold (分级保活 B). formalVerify (off|encourage|require, default off) enables Lean formal verification; leanCommand/leanArgs/leanTimeoutMs configure the toolchain. The FINAL PAPER is tuned by finalPaper (true|false, default true), paperFormat (both|md|tex), paperLanguage (zh|en), paperCompilePdf (true|false), paperEditor (office|resident:<id>, default office = the human/assistant side finalises) and paperLatexCommand.
147
161
  - vibe_v4_resume / vibe_v4_pause / vibe_v4_abort / vibe_v4_status / vibe_v4_report.
148
162
  - vibe_v4_message {to|all, content} — inject a message to a resident (human/assistant intervention).
149
163
  - vibe_v4_meeting {agenda} — force a meeting.
@@ -153,14 +167,28 @@
153
167
  (execute / archive / list the reuse library). Residents use them too; they work in every mode.
154
168
  - vibe_v4_formal_report — human-readable Lean formal-verification mirror (mode, Lean-passed
155
169
  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).
170
+ - 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).
171
+ A /v4 slash command mirrors the main controls (configure|start [problem]|resume|pause|abort|status|report|message <to|all> <content>|meeting|paper [lang=zh|en] [format=md|tex|both] [editor=office|resident:<id>] [force]|members|add|remove|set <k=v>...).
172
+ Final paper: after the unanimous stop vote the run enters a PAPER phase — every resident writes their part, each
173
+ cross-reviews at least one other part, and the paperEditor finalises (office = the human/assistant side, or one named
174
+ resident); only then is the run marked complete. finalPaper=false skips the phase; /v4 paper [lang=zh|en]
175
+ [format=md|tex|both] [editor=office|resident:<id>] [force] starts or re-runs it by hand.
158
176
 
159
177
  TRUST RULE: only Verified/ (and Propos/ entries marked 已验证·真/假) are absolutely
160
178
  trustworthy; everything else — unverified resident claims, Progress/, Method claims —
161
179
  is experiential reference. A proposition / method / theory only reaches Verified/ when
162
180
  ALL residents unanimously agree true (or all agree false); otherwise it stays in its
163
- library with a probability estimate.
181
+ library with a probability estimate. Closure rule (identical across the presets): the framework
182
+ writes the Verified/ card — a resident's own claim never does — and what counts as a vote is
183
+ stated once in the VOTE CONTRACT below.
184
+
185
+ VOTE CONTRACT: a verification vote is a probability of truth in [0,1], but only an EXACT
186
+ 1 (absolutely true) and an EXACT 0 (absolutely false) count as a vote. Anything strictly
187
+ between (0.9, 0.95, 0.5 …) is an ABSTENTION carrying that probability estimate: the run
188
+ does NOT conclude, and the group's MEAN probability is written back to the object's card
189
+ so it stays in its library with a probability. The same absoluteness applies to the
190
+ meeting stop-vote: every resident on the roster must answer `voteSolved:true` — one
191
+ abstention keeps the run alive.
164
192
 
165
193
  LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
166
194
  - 'off' (default, no extra requirement) | 'encourage' (the residents decide by implementation