dsh-vibe-math 2.5.0 → 2.7.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 (59) hide show
  1. package/README.en.md +175 -369
  2. package/README.md +175 -370
  3. package/cordis.patch.yml +78 -22
  4. package/docs/AUDIT-CHECKLIST.md +3 -3
  5. package/docs/final-paper.md +172 -0
  6. package/docs/formal-verification.md +184 -29
  7. package/docs/math-computation.md +121 -0
  8. package/docs/release-notes/RELEASE-NOTES-2.6.0.md +268 -0
  9. package/docs/release-notes/RELEASE-NOTES-2.7.0.en.md +151 -0
  10. package/docs/release-notes/RELEASE-NOTES-2.7.0.md +115 -0
  11. package/docs/test-timing.md +25 -9
  12. package/installer.js +7 -4
  13. package/package.json +21 -3
  14. package/prompt-corpus-persona/persona-corpus.json +16 -16
  15. package/prompt-corpus-persona/persona-corpus.md +164 -52
  16. package/prompt-corpus-v2/formal-verify-v2.json +128 -92
  17. package/prompt-corpus-v2/formal-verify-v2.md +1574 -108
  18. package/prompt-corpus-v3/formal-verify-v3.json +137 -53
  19. package/prompt-corpus-v3/formal-verify-v3.md +1406 -100
  20. package/prompt-corpus-v4/formal-verify-v4.json +14 -14
  21. package/prompt-corpus-v4/formal-verify-v4.md +247 -14
  22. package/prompt-corpus-v5/prompt-corpus-v5.json +62 -62
  23. package/prompt-corpus-v5/prompt-corpus-v5.md +570 -3
  24. package/tests/audit-math-computation-contract.mjs +191 -0
  25. package/tests/audit-math-computation-parity.mjs +169 -0
  26. package/tests/audit-math-computation-sensitivity.mjs +231 -0
  27. package/tests/audit-persona-sensitivity.mjs +64 -11
  28. package/tests/audit-persona-surface.test.mjs +53 -16
  29. package/tests/audit-v5-integrity.mjs +14 -0
  30. package/tests/e2e-v5-round2.test.mjs +923 -3
  31. package/tests/formal-verify-v2.test.mjs +295 -6
  32. package/tests/formal-verify-v3.test.mjs +275 -4
  33. package/tests/formal-verify-v4.test.mjs +295 -6
  34. package/tests/formal-verify-v5.test.mjs +9 -1
  35. package/tests/helpers/math-computation-fake-seam.mjs +135 -0
  36. package/tests/math-computation-shared.test.mjs +504 -0
  37. package/tests/prompt-v5-integrity.test.mjs +14 -8
  38. package/tests/selfdrive-v5.mjs +55 -4
  39. package/vibe-math-v2/agent.cordis.yml +36 -14
  40. package/vibe-math-v2/math-computation.js +936 -0
  41. package/vibe-math-v2/math-engines.js +156 -0
  42. package/vibe-math-v2/vibe-math-v2.js +1653 -48
  43. package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +6 -0
  44. package/vibe-math-v3/agent.cordis.yml +30 -12
  45. package/vibe-math-v3/math-computation.js +936 -0
  46. package/vibe-math-v3/math-engines.js +156 -0
  47. package/vibe-math-v3/vibe-math-v3.js +1623 -53
  48. package/vibe-math-v3//345/256/236/347/216/260/346/226/271/346/241/210.md +6 -0
  49. package/vibe-math-v4/agent.cordis.yml +44 -8
  50. package/vibe-math-v4/math-computation.js +936 -0
  51. package/vibe-math-v4/math-engines.js +156 -0
  52. package/vibe-math-v4/vibe-math-v4.js +1592 -37
  53. package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +6 -0
  54. package/vibe-math-v5/agent.cordis.yml +46 -10
  55. package/vibe-math-v5/math-computation.js +936 -0
  56. package/vibe-math-v5/math-engines.js +156 -0
  57. package/vibe-math-v5/vibe-math-v5.js +2233 -42
  58. package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +153 -4
  59. package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +251 -0
@@ -1,5 +1,11 @@
1
1
  # Vibe Mathematics —— 多代理数学问题求解与验证框架
2
2
 
3
+ > **状态说明(round-3 补记)**:本文是**设计期文档**,写于 `math_computation`(数学计算工具)、
4
+ > `leanAsync`/`leanJobsMaxParallel`/`leanSearchPaths`(Lean 异步作业与复用)、`paperEditor` 与
5
+ > `paper.lock.json`(最终论文定稿/写锁)等新功能之前;**功能与参数的权威描述以 `docs/` 为准**
6
+ > (`docs/math-computation.md`、`docs/formal-verification.md`、`docs/final-paper.md`、`docs/test-timing.md`),
7
+ > 参数表以 README 的双语「共用参数 / 各预设专属参数」表为准。本文保留其原始设计意图,不再逐条追平。
8
+
3
9
  项目需具备以下核心功能:
4
10
 
5
11
  1. **断点续跑**:保存各代理的对话记录及任务栈,支持状态恢复。
@@ -47,7 +47,10 @@
47
47
  plannerEnabled/plannerProvider/plannerModel/plannerPersona, planMinIntervalMs, plannerMaxFails,
48
48
  methodKeepIntervalMs/methodKeepEvery, methodAutoPromote, indexAutoRebuild, projectLockTimeoutMs,
49
49
  formalVerify/leanCommand/leanArgs/leanTimeoutMs — Lean 形式化验证(off = 默认不额外要求,
50
- encourage = 按实现难度自行形式化、Lean 通过后审查对象变为忠实性,require = 同上并加结论门禁)).
50
+ encourage = 按实现难度自行形式化、Lean 通过后审查对象变为忠实性,require = 同上并加结论门禁),
51
+ finalPaper/paperFormat/paperLanguage/paperCompilePdf/paperLatexCommand — 最终论文(收口时自动派遣
52
+ 「论文撰写」子代理,把已收口的解法/命题/成果整理成 Paper/<project>/;finalPaper=false 只关自动触发,
53
+ /vibe paper 仍可手动触发)。
51
54
  - vibe_math_setup / vibe_math_save_settings / vibe_math_template — guided configuration / persist defaults / generate template.
52
55
  - vibe_math_plan {force?} — show queued plan / last plan, or force a planning round.
53
56
  - vibe_math_index — rebuild State/index.json from the Markdown knowledge base.
@@ -57,12 +60,18 @@
57
60
  - vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
58
61
  - vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
59
62
  - vibe_math_list_agents / vibe_math_message_agent / vibe_math_interrupt_agent — inspect / steer / interrupt subagents.
60
- - vibe_math_lean_run / vibe_math_lean_archive / vibe_math_lean_lib — Lean formal
61
- verification (execute / archive / list the reuse library). The scheduler's child agents
62
- use them too; they work in every mode.
63
+ - vibe_math_lean_run / vibe_math_lean_archive / vibe_math_lean_lib / vibe_math_lean_read /
64
+ vibe_math_lean_job — Lean formal verification (execute / archive / list + read the reuse
65
+ library / inspect or wait for a background compile job). leanAsync=true (default) queues the
66
+ compile and returns a jobId; nothing counts as proved until that job settles ok (so "有把握"
67
+ is not the same as "已验证"). The scheduler's child agents use them too; they work in every
68
+ mode.
69
+
70
+ - math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
71
+ - 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>),你可以用普通文件工具打开并编辑它;编辑后用 mode:'file' 指向它重跑,会写出一份**新回执/新 attempt**(含新的 scriptHash)。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
63
72
 
64
73
  A /vibe slash command mirrors the main controls (/vibe start [override]|resume [override]|pause|abort|status|report|mode
65
- <auto|manual>|setup|save|add <id> <desc>|add-proposition <id> <概述>|list-propositions|methods|index|plan|lock|...).
74
+ <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]).
66
75
  Data survives restarts via vibe_math_resume.
67
76
 
68
77
  Key rules when reporting: a problem is "solved" when one of its 解法候选 entries reaches 概率 = 1
@@ -87,7 +96,7 @@
87
96
  explicit, reasoned blocker record; the scheduler is never wedged by it).
88
97
  - Paths: work file Formal/<id>.lean; archived proof Verified/Lean/<id>.lean; reusable
89
98
  definitions VibeMath/Formal/Lib/; proved lemmas VibeMath/Formal/Proved/.
90
- - The toolchain knobs leanCommand / leanArgs / leanTimeoutMs are tunable as well
99
+ - The toolchain knobs leanCommand / leanArgs / leanTimeoutMs / leanAsync / leanInitiative / leanSearchPaths / leanJobsMaxParallel are tunable as well
91
100
  (e.g. leanCommand='lake' with leanArgs=['env','lean']); a missing Lean binary is
92
101
  reported as LEAN_NOT_FOUND and still lets the code be written and archived.
93
102
  - vibe_math_status / vibe_math_report show the mode, the per-object formal status and the
@@ -129,7 +138,10 @@
129
138
  plannerEnabled/plannerProvider/plannerModel/plannerPersona, planMinIntervalMs, plannerMaxFails,
130
139
  methodKeepIntervalMs/methodKeepEvery, methodAutoPromote, indexAutoRebuild, projectLockTimeoutMs,
131
140
  formalVerify/leanCommand/leanArgs/leanTimeoutMs — Lean 形式化验证(off = 默认不额外要求,
132
- encourage = 按实现难度自行形式化、Lean 通过后审查对象变为忠实性,require = 同上并加结论门禁)).
141
+ encourage = 按实现难度自行形式化、Lean 通过后审查对象变为忠实性,require = 同上并加结论门禁),
142
+ finalPaper/paperFormat/paperLanguage/paperCompilePdf/paperLatexCommand — 最终论文(收口时自动派遣
143
+ 「论文撰写」子代理,把已收口的解法/命题/成果整理成 Paper/<project>/;finalPaper=false 只关自动触发,
144
+ /vibe paper 仍可手动触发)。
133
145
  - vibe_math_setup / vibe_math_save_settings / vibe_math_template — guided configuration / persist defaults / generate template.
134
146
  - vibe_math_plan {force?} — show queued plan / last plan, or force a planning round.
135
147
  - vibe_math_index — rebuild State/index.json from the Markdown knowledge base.
@@ -139,12 +151,18 @@
139
151
  - vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
140
152
  - vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
141
153
  - vibe_math_list_agents / vibe_math_message_agent / vibe_math_interrupt_agent — inspect / steer / interrupt subagents.
142
- - vibe_math_lean_run / vibe_math_lean_archive / vibe_math_lean_lib — Lean formal
143
- verification (execute / archive / list the reuse library). The scheduler's child agents
144
- use them too; they work in every mode.
154
+ - vibe_math_lean_run / vibe_math_lean_archive / vibe_math_lean_lib / vibe_math_lean_read /
155
+ vibe_math_lean_job — Lean formal verification (execute / archive / list + read the reuse
156
+ library / inspect or wait for a background compile job). leanAsync=true (default) queues the
157
+ compile and returns a jobId; nothing counts as proved until that job settles ok (so "有把握"
158
+ is not the same as "已验证"). The scheduler's child agents use them too; they work in every
159
+ mode.
160
+
161
+ - math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
162
+ - 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>),你可以用普通文件工具打开并编辑它;编辑后用 mode:'file' 指向它重跑,会写出一份**新回执/新 attempt**(含新的 scriptHash)。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
145
163
 
146
164
  A /vibe slash command mirrors the main controls (/vibe start [override]|resume [override]|pause|abort|status|report|mode
147
- <auto|manual>|setup|save|add <id> <desc>|add-proposition <id> <概述>|list-propositions|methods|index|plan|lock|...).
165
+ <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]).
148
166
  Data survives restarts via vibe_math_resume.
149
167
 
150
168
  Key rules when reporting: a problem is "solved" when one of its 解法候选 entries reaches 概率 = 1
@@ -169,7 +187,7 @@
169
187
  explicit, reasoned blocker record; the scheduler is never wedged by it).
170
188
  - Paths: work file Formal/<id>.lean; archived proof Verified/Lean/<id>.lean; reusable
171
189
  definitions VibeMath/Formal/Lib/; proved lemmas VibeMath/Formal/Proved/.
172
- - The toolchain knobs leanCommand / leanArgs / leanTimeoutMs are tunable as well
190
+ - The toolchain knobs leanCommand / leanArgs / leanTimeoutMs / leanAsync / leanInitiative / leanSearchPaths / leanJobsMaxParallel are tunable as well
173
191
  (e.g. leanCommand='lake' with leanArgs=['env','lean']); a missing Lean binary is
174
192
  reported as LEAN_NOT_FOUND and still lets the code be written and archived.
175
193
  - vibe_math_status / vibe_math_report show the mode, the per-object formal status and the