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 Math V4 —— 常驻自组织合作研究框架(架构设计与实现方案)
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
  > **一句话定位**:把 v3 的"中央规划器 + 确定性角色(explorer/solver/verifier/planner/method-keeper)"调度,升级为一组**持久化的常驻子代理**——它们之间**互相留言、集体开会**,自主决定接下来的一切任务(探索、尝试、验证、分工)。框架只做**媒介(消息总线/会议/任务板)、产物沉淀、共识验证、上下文管理、断点续跑**,**绝不分配任务**。像现实中的合作研究小组:人人有自己持续积累的笔记本与成果库,互相看、互相讨论、共同定论。
4
10
 
5
11
  ---
@@ -89,17 +89,22 @@
89
89
  Main controls (recommended flow: configure FIRST, then start):
90
90
  - vibe_v5_configure {project?, institute?, problem?, params?} — create/configure the institute WITHOUT starting it.
91
91
  - vibe_v5_start {problem?, researcherCount?, academician?, seedDirections?} — found the institute (academician + researchers) and begin.
92
- - vibe_v5_set {…} — tune params (persisted). provider/model override staff LLM routes (empty = inherit YOUR route); toolAllow/toolDeny restrict staff tools.
92
+ - vibe_v5_set {…} — tune params (persisted). provider/model override staff LLM routes (empty = inherit YOUR route); toolAllow/toolDeny restrict staff tools; finalPaper/paperFormat/paperLanguage/paperCompilePdf/paperEditor/paperLatexCommand tune the FINAL PAPER.
93
93
  - vibe_v5_pause / vibe_v5_resume / vibe_v5_stop / vibe_v5_status / vibe_v5_report.
94
94
  - vibe_v5_message {to|all, content} — relay a human message into the institute.
95
95
  - vibe_v5_meeting {agenda, kind} — convene a meeting.
96
96
  - vibe_v5_members — roster (office/employer/status/direction).
97
97
  - vibe_v5_hire / vibe_v5_fire — temp workers: hire one (office, academician or a permanent researcher) / dismiss one for real.
98
98
  - vibe_v5_add_researcher / vibe_v5_remove_researcher — OFFICE only: add or dismiss a PERMANENT researcher (the academician can only propose those).
99
- - vibe_v5_lean_run / vibe_v5_lean_archive / vibe_v5_lean_lib — Lean formal
100
- verification (execute / archive / list the reuse library). Members use them
101
- too; they work in every mode.
102
- A /v5 slash command mirrors these (configure|start|resume|pause|stop|status|report|members|message|meeting|hire|fire|add|remove|set).
99
+ - vibe_v5_paper {lang?, format?, editor?, force?} — write the FINAL PAPER: the permanent staff write their own parts, cross-review each other, then the editor finalises. lang/format/editor override this one paper only.
100
+ - vibe_v5_finalize_paper {decision, note, conclusion?} — OFFICE only when paperEditor=office: consult the institute first (>=1 office message + >=1 meeting), then finalise and put the conclusion in note.
101
+ - vibe_v5_lean_run / vibe_v5_lean_archive / vibe_v5_lean_lib / vibe_v5_lean_read / vibe_v5_lean_job — Lean formal
102
+ verification (execute / archive / list the reuse library / read an archived file
103
+ verbatim / watch the background compile queue). Members use them too; they work in every mode.
104
+ - math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
105
+ - 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>),你可以用普通文件工具打开并编辑它;编辑后用 mode:'file' 指向它重跑,会写出一份**新回执/新 attempt**(含新的 scriptHash)。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
106
+ - Archive -> edit -> re-run: for mode:'code' the script original is at the receipt's scriptPath (Computation/<id>/script.<ext>) and you may open/edit it with your normal file tools; after editing, re-run it with mode:'file' to write a NEW receipt/attempt with a NEW scriptHash. **An old receipt is NOT evidence for edited code** - cite the receipt whose scriptHash matches the current code; the tool warns explicitly via scriptChanged / scriptChangedDuringRun.
107
+ A /v5 slash command mirrors these (configure|start|resume|pause|stop|status|report|members|message|meeting|hire|fire|add|remove|set|paper).
103
108
 
104
109
  LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
105
110
  - 'off' (default, no extra requirement) | 'encourage' (members decide by
@@ -114,6 +119,19 @@
114
119
  reported as LEAN_NOT_FOUND, a host with no subprocess service as NO_SUBPROCESS
115
120
  (on a timeout the process is terminated first), and in every one of those cases the
116
121
  code can still be written down and archived.
122
+ - Daily eagerness is a SEPARATE knob: leanInitiative 'off' (no daily drive) |
123
+ 'normal' (default; the reminder rides with formalVerify) | 'eager' (push valuable
124
+ small lemmas/propositions/definitions into the library even in ordinary rounds).
125
+ - Reuse first: check vibe_v5_lean_lib BEFORE writing a definition, reuse archived
126
+ content via `import Formal.Lib.<name>` / `import Formal.Proved.<name>` (the compile
127
+ gets `--search-path <VibeMath root>`, preceded by any leanSearchPaths), or copy the
128
+ exact text with vibe_v5_lean_read. Re-archiving identical content is de-duplicated.
129
+ - Compiles are ASYNC by default (leanAsync=true, leanJobsMaxParallel default 1):
130
+ vibe_v5_lean_run / vibe_v5_lean_archive enqueue and return at once; watch them with
131
+ vibe_v5_lean_job {jobId, waitMs} or vibe_v5_lean_lib.jobs, and NEVER treat an object
132
+ as passed before its job settles ok (exit 0, same content, same build context).
133
+ - Only formalize what you are confident about; when unsure record kind='blocked' with a
134
+ reason instead of dressing uncertainty up as a formalization.
117
135
  - vibe_v5_status / vibe_v5_report show the mode, per-object formal status and the
118
136
  formalization TODO. The framework never installs Lean and never judges fidelity.
119
137
 
@@ -185,17 +203,22 @@
185
203
  Main controls (recommended flow: configure FIRST, then start):
186
204
  - vibe_v5_configure {project?, institute?, problem?, params?} — create/configure the institute WITHOUT starting it.
187
205
  - vibe_v5_start {problem?, researcherCount?, academician?, seedDirections?} — found the institute (academician + researchers) and begin.
188
- - vibe_v5_set {…} — tune params (persisted). provider/model override staff LLM routes (empty = inherit YOUR route); toolAllow/toolDeny restrict staff tools.
206
+ - vibe_v5_set {…} — tune params (persisted). provider/model override staff LLM routes (empty = inherit YOUR route); toolAllow/toolDeny restrict staff tools; finalPaper/paperFormat/paperLanguage/paperCompilePdf/paperEditor/paperLatexCommand tune the FINAL PAPER.
189
207
  - vibe_v5_pause / vibe_v5_resume / vibe_v5_stop / vibe_v5_status / vibe_v5_report.
190
208
  - vibe_v5_message {to|all, content} — relay a human message into the institute.
191
209
  - vibe_v5_meeting {agenda, kind} — convene a meeting.
192
210
  - vibe_v5_members — roster (office/employer/status/direction).
193
211
  - vibe_v5_hire / vibe_v5_fire — temp workers: hire one (office, academician or a permanent researcher) / dismiss one for real.
194
212
  - vibe_v5_add_researcher / vibe_v5_remove_researcher — OFFICE only: add or dismiss a PERMANENT researcher (the academician can only propose those).
195
- - vibe_v5_lean_run / vibe_v5_lean_archive / vibe_v5_lean_lib — Lean formal
196
- verification (execute / archive / list the reuse library). Members use them
197
- too; they work in every mode.
198
- A /v5 slash command mirrors these (configure|start|resume|pause|stop|status|report|members|message|meeting|hire|fire|add|remove|set).
213
+ - vibe_v5_paper {lang?, format?, editor?, force?} — write the FINAL PAPER: the permanent staff write their own parts, cross-review each other, then the editor finalises. lang/format/editor override this one paper only.
214
+ - vibe_v5_finalize_paper {decision, note, conclusion?} — OFFICE only when paperEditor=office: consult the institute first (>=1 office message + >=1 meeting), then finalise and put the conclusion in note.
215
+ - vibe_v5_lean_run / vibe_v5_lean_archive / vibe_v5_lean_lib / vibe_v5_lean_read / vibe_v5_lean_job — Lean formal
216
+ verification (execute / archive / list the reuse library / read an archived file
217
+ verbatim / watch the background compile queue). Members use them too; they work in every mode.
218
+ - math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
219
+ - 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>),你可以用普通文件工具打开并编辑它;编辑后用 mode:'file' 指向它重跑,会写出一份**新回执/新 attempt**(含新的 scriptHash)。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
220
+ - Archive -> edit -> re-run: for mode:'code' the script original is at the receipt's scriptPath (Computation/<id>/script.<ext>) and you may open/edit it with your normal file tools; after editing, re-run it with mode:'file' to write a NEW receipt/attempt with a NEW scriptHash. **An old receipt is NOT evidence for edited code** - cite the receipt whose scriptHash matches the current code; the tool warns explicitly via scriptChanged / scriptChangedDuringRun.
221
+ A /v5 slash command mirrors these (configure|start|resume|pause|stop|status|report|members|message|meeting|hire|fire|add|remove|set|paper).
199
222
 
200
223
  LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
201
224
  - 'off' (default, no extra requirement) | 'encourage' (members decide by
@@ -210,6 +233,19 @@
210
233
  reported as LEAN_NOT_FOUND, a host with no subprocess service as NO_SUBPROCESS
211
234
  (on a timeout the process is terminated first), and in every one of those cases the
212
235
  code can still be written down and archived.
236
+ - Daily eagerness is a SEPARATE knob: leanInitiative 'off' (no daily drive) |
237
+ 'normal' (default; the reminder rides with formalVerify) | 'eager' (push valuable
238
+ small lemmas/propositions/definitions into the library even in ordinary rounds).
239
+ - Reuse first: check vibe_v5_lean_lib BEFORE writing a definition, reuse archived
240
+ content via `import Formal.Lib.<name>` / `import Formal.Proved.<name>` (the compile
241
+ gets `--search-path <VibeMath root>`, preceded by any leanSearchPaths), or copy the
242
+ exact text with vibe_v5_lean_read. Re-archiving identical content is de-duplicated.
243
+ - Compiles are ASYNC by default (leanAsync=true, leanJobsMaxParallel default 1):
244
+ vibe_v5_lean_run / vibe_v5_lean_archive enqueue and return at once; watch them with
245
+ vibe_v5_lean_job {jobId, waitMs} or vibe_v5_lean_lib.jobs, and NEVER treat an object
246
+ as passed before its job settles ok (exit 0, same content, same build context).
247
+ - Only formalize what you are confident about; when unsure record kind='blocked' with a
248
+ reason instead of dressing uncertainty up as a formalization.
213
249
  - vibe_v5_status / vibe_v5_report show the mode, per-object formal status and the
214
250
  formalization TODO. The framework never installs Lean and never judges fidelity.
215
251