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
@@ -125,6 +125,11 @@
125
125
  - 记 `p_{q-tmp}` 为对 `q_sub` 的某种回答/答案的**临时假设**(**命题类对象**);
126
126
  - 把**临时问题 `q_sub`** 与**「判断下述命题是否成立:`p_{q-tmp}`」**两个问题一起加入 `qs.json`(两者的概述、定义必须完整——所涉及的对象、依赖、环境、背景等一律给出完整定义,避免断章取义);
127
127
  - 将 `p_{q-tmp}` 作为命题对象写入 `Propos/`(布尔估计记 `0.5`,`progress` 标注“临时假设 · 依赖 `q_sub`”);若该假设被证伪,则依赖它的主线结论需重新审视;
128
+ - 依赖关系**必须落库**:处在某条在力假设之下的引理会带上 `依赖假设` 字段(`vibe_math_list_propositions`
129
+ 与验证提示词都会显示它),假设被证伪时依赖它的结论被标记 `依赖假设已证伪` 并重新进入验证候选;
130
+ - “判断下述命题是否成立:p_{q-tmp}”这个问题**自带一条种子解法**(就是"该假设成立"这一候选回答,概率 `0.5`,
131
+ 不是定论)。没有它,验证候选集里永远没有属于这个问题的对象(裸 `p-tmp-*` 命题被显式跳过),
132
+ 于是 `p_{q-tmp}` 永远停在 `0.5`、判断问题永不收口、终止规则不可达;
128
133
  - 在当前线程中,**临时假设 `p_{q-tmp}` 成立**,继续推进主线;
129
134
  - 后续所得命题/结论中**凡依赖该假设的**,必须把假设作为前提显式写出,形如「若 `p_{q-tmp}` 成立,则:...」(概述、定义完整,不断章取义)。
130
135
  4. **终止条件(进入 `END` 状态)**:
@@ -171,14 +176,25 @@
171
176
 
172
177
  3. **共识判定与强制裁决**
173
178
  - 若达到最大轮数后仍未一致,则按预设参数采用以下方式之一:
174
- - 均衡机制:直接判定为 `0.5`;
175
- - 强制裁决机制:基于各代理历史准确率与本次推理严谨性评分(系统动态评估),综合计算得到 `r` 的判定结果(介于 `(0,1)`)。
179
+ - 均衡机制(`verdictMode='flat'`):取各评审**自报概率的均值**(只有精确的 `1`/`0` 才是绝对真/假,
180
+ `0<Result<1` 是"它为真的概率";不再把高置信分歧折叠成固定的 `0.5`);
181
+ - 强制裁决机制(`verdictMode='forced'`):按验证者的历史准确率与布尔票置信度加权求平均,得到
182
+ `(0,1)` 内的判定结果。准确率按**稳定身份**(`provider/model`)记,且只在对象**后来**取得布尔
183
+ 定论时回溯计分——按一次性的子代理 id 记(恒 `0.5`)或拿本次聚合值给同一批评审打分都是自指的。
184
+ - 无论哪种机制,中段结果(`0<r<1`)都**不是**定论:对象重新变为可验证(冷却期后重新入选),
185
+ 绝不把中段结果当成绝对真/假来写卡片或收口。
186
+ - 每次裁定需要**至少 2 名独立评审**:票数不足时先补派,补不足就搁置该对象等冷却期后重试,
187
+ 绝不退化成单票结论。为保证"另一个对象也凑得齐 2 票",单个验证对象同时占用的评审槽位不超过
188
+ `maxParallelThreshold - 2`(容量宽裕时就是 `verifierCount`)。
176
189
 
177
190
  4. **更新数据**
178
191
  - 若 `r` 为单个命题,则记 `a = r`;若 `r` 为“命题+证明/证伪”或“问题+解法”,则记 `a` 为 `r` 中的那个证明/证伪/解法。
179
- - 若判定结果为 `0`:更新 `a` 的正确概率为 `0`,并将完整证伪过程记录到证伪列表;
192
+ - 若判定对象是**命题本身**且结果为 `0`:更新 `a` 的布尔估计为 `0`,并将完整证伪过程记录到证伪列表(概率 `1`);
193
+ - 若判定对象是**某一条证明/证伪**且结果为 `0`:那只表示**这一条过程无效**(`a` 的正确概率记 `0`、`已验`),
194
+ **不是**"命题为假"——绝不因此向对侧列表伪造一条概率 `1` 的反条目,也绝不改写命题的布尔估计。
195
+ 伪否定会经由收口规则变成一张"已验证·假"的卡片,那正是这条规则要避免的(与 `defect` 同类事故)。
180
196
  - 若判定结果为 `1`:更新 `a` 的正确概率为 `1`,并将完整证明过程记录到证明列表;
181
- - 若判定结果介于 `0` 和 `1` 之间:更新 `a` 的正确概率为该结果,并分别向证明、证伪列表添加根据辩论得出的尽可能正确的过程/支撑信息及相应概率。
197
+ - 若判定结果介于 `0` 和 `1` 之间:更新 `a` 的正确概率为该结果,并分别向证明、证伪列表添加根据辩论得出的尽可能正确的过程/支撑信息及相应概率;对象在冷却期后重新进入验证候选(中段值不是定论)。
182
198
  - 辩论全程发言记录存入 `Verification_logs/` 对应日志,便于复盘与审计。
183
199
 
184
200
  ---
@@ -38,7 +38,8 @@
38
38
  - vibe_math_add_problem {id, description, priority, dependencies?} — add a problem (creates Problems/<id>.md).
39
39
  - vibe_math_add_proposition {id, 概述, 概率, 优先级, 价值/关键性, 分类} — add a proposition (Propos/<分类>/<id>.md).
40
40
  - vibe_math_list_propositions — list the proposition knowledge base.
41
- - vibe_math_start / vibe_math_resume — start / resume the scheduler (resume = continue after checkpoint/restart).
41
+ - vibe_math_start / vibe_math_resume — start / resume the scheduler (resume = continue after checkpoint/restart);
42
+ both accept override=true to take the project lock over from another session (only after you verified that session is gone).
42
43
  - vibe_math_status / vibe_math_report — read status / full progress report (report writes Progress_Logs/report.json + Logs/报告.md).
43
44
  - vibe_math_pause / vibe_math_abort — pause / abort.
44
45
  - vibe_math_set_mode {mode: manual|auto} — switch manual / auto (manual gates: 计划审批 / 裁决 / 方法晋升).
@@ -46,12 +47,16 @@
46
47
  plannerEnabled/plannerProvider/plannerModel/plannerPersona, planMinIntervalMs, plannerMaxFails,
47
48
  methodKeepIntervalMs/methodKeepEvery, methodAutoPromote, indexAutoRebuild, projectLockTimeoutMs,
48
49
  formalVerify/leanCommand/leanArgs/leanTimeoutMs — Lean 形式化验证(off = 默认不额外要求,
49
- encourage = 按实现难度自行形式化、Lean 通过后审查对象变为忠实性,require = 同上并加结论门禁)).
50
+ encourage = 按实现难度自行形式化、Lean 通过后审查对象变为忠实性,require = 同上并加结论门禁),
51
+ finalPaper/paperFormat/paperLanguage/paperCompilePdf/paperLatexCommand — 最终论文(收口时自动派遣
52
+ 「论文撰写」子代理,把已收口的解法/命题/成果整理成 Paper/<project>/;finalPaper=false 只关自动触发,
53
+ /vibe paper 仍可手动触发)。
50
54
  - vibe_math_setup / vibe_math_save_settings / vibe_math_template — guided configuration / persist defaults / generate template.
51
55
  - vibe_math_plan {force?} — show queued plan / last plan, or force a planning round.
52
56
  - vibe_math_index — rebuild State/index.json from the Markdown knowledge base.
53
57
  - vibe_math_method_add / vibe_math_method_list — manually add / list method cards (Methods/ + global).
54
- - vibe_math_lock_status — project lock occupancy.
58
+ - vibe_math_lock_status — project lock occupancy (the lock is a renewed lease: while a session is running it never expires; taking it over needs override=true, or happens automatically once the owner's lease has clearly expired after a crash).
59
+ Only ONE session may run a project: a second session is refused with PROJECT_LOCKED instead of silently writing the same knowledge base in parallel.
55
60
  - vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
56
61
  - vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
57
62
  - vibe_math_list_agents / vibe_math_message_agent / vibe_math_interrupt_agent — inspect / steer / interrupt subagents.
@@ -59,14 +64,20 @@
59
64
  verification (execute / archive / list the reuse library). The scheduler's child agents
60
65
  use them too; they work in every mode.
61
66
 
62
- A /vibe slash command mirrors the main controls (/vibe start|resume|pause|abort|status|report|mode
63
- <auto|manual>|setup|save|add <id> <desc>|add-proposition <id> <概述>|list-propositions|methods|index|plan|lock|...).
67
+ A /vibe slash command mirrors the main controls (/vibe start [override]|resume [override]|pause|abort|status|report|mode
68
+ <auto|manual>|setup|save|template [global|project]|add <id> <desc>|add-proposition <id> <概述>|list-propositions|methods|index|plan|lock|project [list|new <name>|<name>]|decisions|agents|paper [lang=zh|en] [format=both|md|tex] [force]).
64
69
  Data survives restarts via vibe_math_resume.
65
70
 
66
71
  Key rules when reporting: a problem is "solved" when one of its 解法候选 entries reaches 概率 = 1
67
72
  (the scheduler writes Verified/问题/<id>.md); a proposition reaches 已验证·真/假 when a 证明/证伪
68
- entry reaches 概率 = 1 (Verified/命题/<id>.md); Propos propositions with 价值/关键性 ≥
69
- promoteValueThreshold auto-promote into Problems/ as "判断下述命题是否成立:<命题>" (verification
73
+ entry reaches 概率 = 1 (Verified/命题/<id>.md).
74
+ Closure rule (identical across the presets): those 概率 = 1 values are written ONLY by the scheduler,
75
+ after ≥2 independent verifier agents settle the object (a lone reviewer can never conclude; see
76
+ minVotes), and Verified/ is written by that same scheduler path — a self-reported 1 is never a
77
+ conclusion. Propos propositions whose 价值/关键性 ≥
78
+ promoteValueThreshold (write that anchor on the proposition card, or report it as lemmas[].价值/关键性 in
79
+ vibe_math_sync_meta — default 0.5 never promotes) and that are still undecided
80
+ auto-promote into Problems/ as "判断下述命题是否成立:<命题>" (verification
70
81
  results sync back to the source proposition); a solver-reported sub-question q_sub registers THREE
71
82
  objects (q_sub problem + judge problem + p-tmp temporary-assumption proposition) with full 来源与动机.
72
83
 
@@ -112,7 +123,8 @@
112
123
  - vibe_math_add_problem {id, description, priority, dependencies?} — add a problem (creates Problems/<id>.md).
113
124
  - vibe_math_add_proposition {id, 概述, 概率, 优先级, 价值/关键性, 分类} — add a proposition (Propos/<分类>/<id>.md).
114
125
  - vibe_math_list_propositions — list the proposition knowledge base.
115
- - vibe_math_start / vibe_math_resume — start / resume the scheduler (resume = continue after checkpoint/restart).
126
+ - vibe_math_start / vibe_math_resume — start / resume the scheduler (resume = continue after checkpoint/restart);
127
+ both accept override=true to take the project lock over from another session (only after you verified that session is gone).
116
128
  - vibe_math_status / vibe_math_report — read status / full progress report (report writes Progress_Logs/report.json + Logs/报告.md).
117
129
  - vibe_math_pause / vibe_math_abort — pause / abort.
118
130
  - vibe_math_set_mode {mode: manual|auto} — switch manual / auto (manual gates: 计划审批 / 裁决 / 方法晋升).
@@ -120,12 +132,16 @@
120
132
  plannerEnabled/plannerProvider/plannerModel/plannerPersona, planMinIntervalMs, plannerMaxFails,
121
133
  methodKeepIntervalMs/methodKeepEvery, methodAutoPromote, indexAutoRebuild, projectLockTimeoutMs,
122
134
  formalVerify/leanCommand/leanArgs/leanTimeoutMs — Lean 形式化验证(off = 默认不额外要求,
123
- encourage = 按实现难度自行形式化、Lean 通过后审查对象变为忠实性,require = 同上并加结论门禁)).
135
+ encourage = 按实现难度自行形式化、Lean 通过后审查对象变为忠实性,require = 同上并加结论门禁),
136
+ finalPaper/paperFormat/paperLanguage/paperCompilePdf/paperLatexCommand — 最终论文(收口时自动派遣
137
+ 「论文撰写」子代理,把已收口的解法/命题/成果整理成 Paper/<project>/;finalPaper=false 只关自动触发,
138
+ /vibe paper 仍可手动触发)。
124
139
  - vibe_math_setup / vibe_math_save_settings / vibe_math_template — guided configuration / persist defaults / generate template.
125
140
  - vibe_math_plan {force?} — show queued plan / last plan, or force a planning round.
126
141
  - vibe_math_index — rebuild State/index.json from the Markdown knowledge base.
127
142
  - vibe_math_method_add / vibe_math_method_list — manually add / list method cards (Methods/ + global).
128
- - vibe_math_lock_status — project lock occupancy.
143
+ - vibe_math_lock_status — project lock occupancy (the lock is a renewed lease: while a session is running it never expires; taking it over needs override=true, or happens automatically once the owner's lease has clearly expired after a crash).
144
+ Only ONE session may run a project: a second session is refused with PROJECT_LOCKED instead of silently writing the same knowledge base in parallel.
129
145
  - vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
130
146
  - vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
131
147
  - vibe_math_list_agents / vibe_math_message_agent / vibe_math_interrupt_agent — inspect / steer / interrupt subagents.
@@ -133,14 +149,20 @@
133
149
  verification (execute / archive / list the reuse library). The scheduler's child agents
134
150
  use them too; they work in every mode.
135
151
 
136
- A /vibe slash command mirrors the main controls (/vibe start|resume|pause|abort|status|report|mode
137
- <auto|manual>|setup|save|add <id> <desc>|add-proposition <id> <概述>|list-propositions|methods|index|plan|lock|...).
152
+ A /vibe slash command mirrors the main controls (/vibe start [override]|resume [override]|pause|abort|status|report|mode
153
+ <auto|manual>|setup|save|template [global|project]|add <id> <desc>|add-proposition <id> <概述>|list-propositions|methods|index|plan|lock|project [list|new <name>|<name>]|decisions|agents|paper [lang=zh|en] [format=both|md|tex] [force]).
138
154
  Data survives restarts via vibe_math_resume.
139
155
 
140
156
  Key rules when reporting: a problem is "solved" when one of its 解法候选 entries reaches 概率 = 1
141
157
  (the scheduler writes Verified/问题/<id>.md); a proposition reaches 已验证·真/假 when a 证明/证伪
142
- entry reaches 概率 = 1 (Verified/命题/<id>.md); Propos propositions with 价值/关键性 ≥
143
- promoteValueThreshold auto-promote into Problems/ as "判断下述命题是否成立:<命题>" (verification
158
+ entry reaches 概率 = 1 (Verified/命题/<id>.md).
159
+ Closure rule (identical across the presets): those 概率 = 1 values are written ONLY by the scheduler,
160
+ after ≥2 independent verifier agents settle the object (a lone reviewer can never conclude; see
161
+ minVotes), and Verified/ is written by that same scheduler path — a self-reported 1 is never a
162
+ conclusion. Propos propositions whose 价值/关键性 ≥
163
+ promoteValueThreshold (write that anchor on the proposition card, or report it as lemmas[].价值/关键性 in
164
+ vibe_math_sync_meta — default 0.5 never promotes) and that are still undecided
165
+ auto-promote into Problems/ as "判断下述命题是否成立:<命题>" (verification
144
166
  results sync back to the source proposition); a solver-reported sub-question q_sub registers THREE
145
167
  objects (q_sub problem + judge problem + p-tmp temporary-assumption proposition) with full 来源与动机.
146
168