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.
- package/README.en.md +175 -369
- package/README.md +175 -370
- package/cordis.patch.yml +78 -22
- package/docs/AUDIT-CHECKLIST.md +3 -3
- package/docs/final-paper.md +172 -0
- package/docs/formal-verification.md +184 -29
- package/docs/math-computation.md +121 -0
- package/docs/release-notes/RELEASE-NOTES-2.6.0.md +268 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.0.en.md +151 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.0.md +115 -0
- package/docs/test-timing.md +25 -9
- package/installer.js +7 -4
- package/package.json +21 -3
- package/prompt-corpus-persona/persona-corpus.json +16 -16
- package/prompt-corpus-persona/persona-corpus.md +164 -52
- package/prompt-corpus-v2/formal-verify-v2.json +128 -92
- package/prompt-corpus-v2/formal-verify-v2.md +1574 -108
- package/prompt-corpus-v3/formal-verify-v3.json +137 -53
- package/prompt-corpus-v3/formal-verify-v3.md +1406 -100
- package/prompt-corpus-v4/formal-verify-v4.json +14 -14
- package/prompt-corpus-v4/formal-verify-v4.md +247 -14
- package/prompt-corpus-v5/prompt-corpus-v5.json +62 -62
- package/prompt-corpus-v5/prompt-corpus-v5.md +570 -3
- package/tests/audit-math-computation-contract.mjs +191 -0
- package/tests/audit-math-computation-parity.mjs +169 -0
- package/tests/audit-math-computation-sensitivity.mjs +231 -0
- package/tests/audit-persona-sensitivity.mjs +64 -11
- package/tests/audit-persona-surface.test.mjs +53 -16
- package/tests/audit-v5-integrity.mjs +14 -0
- package/tests/e2e-v5-round2.test.mjs +923 -3
- package/tests/formal-verify-v2.test.mjs +295 -6
- package/tests/formal-verify-v3.test.mjs +275 -4
- package/tests/formal-verify-v4.test.mjs +295 -6
- package/tests/formal-verify-v5.test.mjs +9 -1
- package/tests/helpers/math-computation-fake-seam.mjs +135 -0
- package/tests/math-computation-shared.test.mjs +504 -0
- package/tests/prompt-v5-integrity.test.mjs +14 -8
- package/tests/selfdrive-v5.mjs +55 -4
- package/vibe-math-v2/agent.cordis.yml +36 -14
- package/vibe-math-v2/math-computation.js +936 -0
- package/vibe-math-v2/math-engines.js +156 -0
- package/vibe-math-v2/vibe-math-v2.js +1653 -48
- package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +6 -0
- package/vibe-math-v3/agent.cordis.yml +30 -12
- package/vibe-math-v3/math-computation.js +936 -0
- package/vibe-math-v3/math-engines.js +156 -0
- package/vibe-math-v3/vibe-math-v3.js +1623 -53
- package/vibe-math-v3//345/256/236/347/216/260/346/226/271/346/241/210.md +6 -0
- package/vibe-math-v4/agent.cordis.yml +44 -8
- package/vibe-math-v4/math-computation.js +936 -0
- package/vibe-math-v4/math-engines.js +156 -0
- package/vibe-math-v4/vibe-math-v4.js +1592 -37
- package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +6 -0
- package/vibe-math-v5/agent.cordis.yml +46 -10
- package/vibe-math-v5/math-computation.js +936 -0
- package/vibe-math-v5/math-engines.js +156 -0
- package/vibe-math-v5/vibe-math-v5.js +2233 -42
- package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +153 -4
- package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +251 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Vibe Math V3 —— 论文式多代理数学研究与验证框架(md 知识库 + 代理自组织调度 + 通用理论发明库)
|
|
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
|
> **一句话定位**:把项目知识从 JSON 字段解放为**论文/研究报告式的 md 叙述**,让代理像数学家一样"写论文、续写论文、沉淀理论";调度从代码启发式升级为**由规划代理自主制定 N 步计划**;并新增**通用理论发明库**,把解决过程中发明的/经验性的一切有价值理论、框架、工具、方法、思想沉淀为可跨问题复用、持续扩充的方法体系。
|
|
4
10
|
>
|
|
5
11
|
> **可信铁律**:只有 `Verified/` 中的 md 与经验证器判为真/假的对象绝对可信;其余一切 md(含方法库中未验证的断言、研究日志、未定论命题)仅作为经验性记录与参考。
|
|
@@ -61,18 +61,27 @@
|
|
|
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, leanAsync, leanInitiative, leanSearchPaths, leanJobsMaxParallel, 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; leanAsync (true|false, default true) queues each compile as a background job (the tool returns {async:{jobId,state}} and the result lands later), leanInitiative (off|normal|eager, default normal) says how PROACTIVE the group is while working (independent of what formalVerify requires at voting time), leanSearchPaths adds extra compiler search roots (injected BEFORE the automatic VibeMath root), and leanJobsMaxParallel (default 1) caps concurrent compiles. 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.
|
|
68
68
|
- vibe_v4_add_member {direction?} / vibe_v4_remove_member {id} — add / close a resident.
|
|
69
69
|
- vibe_v4_list_members — list residents.
|
|
70
|
-
- vibe_v4_lean_run / vibe_v4_lean_archive / vibe_v4_lean_lib
|
|
71
|
-
(execute / archive / list the reuse library
|
|
70
|
+
- vibe_v4_lean_run / vibe_v4_lean_archive / vibe_v4_lean_lib / vibe_v4_lean_read / vibe_v4_lean_job
|
|
71
|
+
— Lean formal verification (execute or ENQUEUE / archive / list the reuse library + background jobs /
|
|
72
|
+
read one archived library file verbatim / check or wait for a background job). Residents use them
|
|
73
|
+
too; they work in every mode.
|
|
72
74
|
- vibe_v4_formal_report — human-readable Lean formal-verification mirror (mode, Lean-passed
|
|
75
|
+
- math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
|
|
76
|
+
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>),你可以用普通文件工具打开并编辑它;编辑后用 mode:'file' 指向它重跑,会写出一份**新回执/新 attempt**(含新的 scriptHash)。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
|
|
77
|
+
- 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.
|
|
73
78
|
objects, recorded blockers, formalization TODO, library paths).
|
|
74
79
|
- 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>...).
|
|
80
|
+
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>...).
|
|
81
|
+
Final paper: after the unanimous stop vote the run enters a PAPER phase — every resident writes their part, each
|
|
82
|
+
cross-reviews at least one other part, and the paperEditor finalises (office = the human/assistant side, or one named
|
|
83
|
+
resident); only then is the run marked complete. finalPaper=false skips the phase; /v4 paper [lang=zh|en]
|
|
84
|
+
[format=md|tex|both] [editor=office|resident:<id>] [force] starts or re-runs it by hand.
|
|
76
85
|
|
|
77
86
|
TRUST RULE: only Verified/ (and Propos/ entries marked 已验证·真/假) are absolutely
|
|
78
87
|
trustworthy; everything else — unverified resident claims, Progress/, Method claims —
|
|
@@ -99,6 +108,15 @@
|
|
|
99
108
|
explicit, reasoned blocker record; the run is never wedged by it).
|
|
100
109
|
- Paths: work file Formal/<id>.lean; archived proof Verified/Lean/<id>.lean; reusable
|
|
101
110
|
definitions VibeMath/Formal/Lib/; proved lemmas VibeMath/Formal/Proved/.
|
|
111
|
+
- Reuse FIRST: call vibe_v4_lean_lib (and vibe_v4_lean_read for the verbatim text) BEFORE writing a new
|
|
112
|
+
definition; reuse an archived file with `import Formal.Lib.<name>` / `import Formal.Proved.<name>`
|
|
113
|
+
(the framework passes --search-path <VibeMath root>, so VibeMath is the module root).
|
|
114
|
+
- Choose WHAT to formalize with three criteria: (1) valuable or likely reusable, (2) rather key or
|
|
115
|
+
necessary, (3) you are confident in the statement — when you are NOT confident, record blocked
|
|
116
|
+
with the difficulty instead of hiding uncertainty behind a formalization.
|
|
117
|
+
- Compiles are BACKGROUND JOBS by default: a queued job is not a verification. An object only becomes
|
|
118
|
+
Lean-passed once its job settles green; the result is announced in the next prompt and visible via
|
|
119
|
+
vibe_v4_lean_lib.jobs / vibe_v4_lean_job (waitMs).
|
|
102
120
|
- The toolchain knobs leanCommand / leanArgs / leanTimeoutMs are tunable as well
|
|
103
121
|
(e.g. leanCommand='lake' with leanArgs=['env','lean']); a missing Lean binary is
|
|
104
122
|
reported as LEAN_NOT_FOUND and still lets the code be written and archived.
|
|
@@ -153,18 +171,27 @@
|
|
|
153
171
|
Main controls (recommended flow: configure FIRST, then start):
|
|
154
172
|
- vibe_v4_configure {project?, problem?, params?} — create/configure the project (name, problem, params) WITHOUT starting a run; set everything here first.
|
|
155
173
|
- vibe_v4_start {problem?, residentCount?, seedDirections?} — begin the run (spawn residents, brainstorm). If problem was configured, omit it.
|
|
156
|
-
- 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.
|
|
174
|
+
- vibe_v4_set {residentCount, compactThreshold, compactAfterRounds, meetingKeepEvery, maxParallel, activityTimeoutMs, stallAutoMeetingMs, verdictMaxRounds, provider, model, residentPersona, toolAllow, toolDeny, formalVerify, leanCommand, leanArgs, leanTimeoutMs, leanAsync, leanInitiative, leanSearchPaths, leanJobsMaxParallel, 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; leanAsync (true|false, default true) queues each compile as a background job (the tool returns {async:{jobId,state}} and the result lands later), leanInitiative (off|normal|eager, default normal) says how PROACTIVE the group is while working (independent of what formalVerify requires at voting time), leanSearchPaths adds extra compiler search roots (injected BEFORE the automatic VibeMath root), and leanJobsMaxParallel (default 1) caps concurrent compiles. 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.
|
|
157
175
|
- vibe_v4_resume / vibe_v4_pause / vibe_v4_abort / vibe_v4_status / vibe_v4_report.
|
|
158
176
|
- vibe_v4_message {to|all, content} — inject a message to a resident (human/assistant intervention).
|
|
159
177
|
- vibe_v4_meeting {agenda} — force a meeting.
|
|
160
178
|
- vibe_v4_add_member {direction?} / vibe_v4_remove_member {id} — add / close a resident.
|
|
161
179
|
- vibe_v4_list_members — list residents.
|
|
162
|
-
- vibe_v4_lean_run / vibe_v4_lean_archive / vibe_v4_lean_lib
|
|
163
|
-
(execute / archive / list the reuse library
|
|
180
|
+
- vibe_v4_lean_run / vibe_v4_lean_archive / vibe_v4_lean_lib / vibe_v4_lean_read / vibe_v4_lean_job
|
|
181
|
+
— Lean formal verification (execute or ENQUEUE / archive / list the reuse library + background jobs /
|
|
182
|
+
read one archived library file verbatim / check or wait for a background job). Residents use them
|
|
183
|
+
too; they work in every mode.
|
|
164
184
|
- vibe_v4_formal_report — human-readable Lean formal-verification mirror (mode, Lean-passed
|
|
185
|
+
- math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
|
|
186
|
+
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>),你可以用普通文件工具打开并编辑它;编辑后用 mode:'file' 指向它重跑,会写出一份**新回执/新 attempt**(含新的 scriptHash)。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
|
|
187
|
+
- 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.
|
|
165
188
|
objects, recorded blockers, formalization TODO, library paths).
|
|
166
189
|
- 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>...).
|
|
190
|
+
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>...).
|
|
191
|
+
Final paper: after the unanimous stop vote the run enters a PAPER phase — every resident writes their part, each
|
|
192
|
+
cross-reviews at least one other part, and the paperEditor finalises (office = the human/assistant side, or one named
|
|
193
|
+
resident); only then is the run marked complete. finalPaper=false skips the phase; /v4 paper [lang=zh|en]
|
|
194
|
+
[format=md|tex|both] [editor=office|resident:<id>] [force] starts or re-runs it by hand.
|
|
168
195
|
|
|
169
196
|
TRUST RULE: only Verified/ (and Propos/ entries marked 已验证·真/假) are absolutely
|
|
170
197
|
trustworthy; everything else — unverified resident claims, Progress/, Method claims —
|
|
@@ -191,6 +218,15 @@
|
|
|
191
218
|
explicit, reasoned blocker record; the run is never wedged by it).
|
|
192
219
|
- Paths: work file Formal/<id>.lean; archived proof Verified/Lean/<id>.lean; reusable
|
|
193
220
|
definitions VibeMath/Formal/Lib/; proved lemmas VibeMath/Formal/Proved/.
|
|
221
|
+
- Reuse FIRST: call vibe_v4_lean_lib (and vibe_v4_lean_read for the verbatim text) BEFORE writing a new
|
|
222
|
+
definition; reuse an archived file with `import Formal.Lib.<name>` / `import Formal.Proved.<name>`
|
|
223
|
+
(the framework passes --search-path <VibeMath root>, so VibeMath is the module root).
|
|
224
|
+
- Choose WHAT to formalize with three criteria: (1) valuable or likely reusable, (2) rather key or
|
|
225
|
+
necessary, (3) you are confident in the statement — when you are NOT confident, record blocked
|
|
226
|
+
with the difficulty instead of hiding uncertainty behind a formalization.
|
|
227
|
+
- Compiles are BACKGROUND JOBS by default: a queued job is not a verification. An object only becomes
|
|
228
|
+
Lean-passed once its job settles green; the result is announced in the next prompt and visible via
|
|
229
|
+
vibe_v4_lean_lib.jobs / vibe_v4_lean_job (waitMs).
|
|
194
230
|
- The toolchain knobs leanCommand / leanArgs / leanTimeoutMs are tunable as well
|
|
195
231
|
(e.g. leanCommand='lake' with leanArgs=['env','lean']); a missing Lean binary is
|
|
196
232
|
reported as LEAN_NOT_FOUND and still lets the code be written and archived.
|