dsh-vibe-math 2.6.0 → 2.7.1
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 +161 -389
- package/README.md +161 -390
- package/cordis.patch.yml +62 -14
- package/docs/AUDIT-CHECKLIST.md +2 -2
- package/docs/final-paper.md +1 -0
- package/docs/formal-verification.md +184 -29
- package/docs/math-computation.md +163 -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/release-notes/RELEASE-NOTES-2.7.1.en.md +86 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.1.md +86 -0
- package/docs/test-timing.md +24 -12
- package/installer.js +7 -4
- package/package.json +21 -3
- package/prompt-corpus-persona/persona-corpus.json +12 -12
- package/prompt-corpus-persona/persona-corpus.md +128 -32
- package/prompt-corpus-v2/formal-verify-v2.json +182 -92
- package/prompt-corpus-v2/formal-verify-v2.md +2379 -55
- package/prompt-corpus-v3/formal-verify-v3.json +215 -53
- package/prompt-corpus-v3/formal-verify-v3.md +2147 -22
- package/prompt-corpus-v4/formal-verify-v4.json +14 -14
- package/prompt-corpus-v4/formal-verify-v4.md +267 -14
- package/prompt-corpus-v5/prompt-corpus-v5.json +62 -62
- package/prompt-corpus-v5/prompt-corpus-v5.md +631 -3
- package/tests/audit-math-computation-contract.mjs +204 -0
- package/tests/audit-math-computation-parity.mjs +198 -0
- package/tests/audit-math-computation-sensitivity.mjs +231 -0
- package/tests/audit-persona-sensitivity.mjs +4 -4
- package/tests/audit-persona-surface.test.mjs +38 -10
- package/tests/audit-v5-integrity.mjs +14 -0
- package/tests/e2e-v5-round2.test.mjs +459 -2
- package/tests/formal-verify-v2.test.mjs +362 -8
- package/tests/formal-verify-v3.test.mjs +355 -6
- 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 +163 -0
- package/tests/math-computation-shared.test.mjs +806 -0
- package/tests/prompt-v5-integrity.test.mjs +5 -5
- package/vibe-math-v2/agent.cordis.yml +22 -8
- package/vibe-math-v2/math-computation.js +1279 -0
- package/vibe-math-v2/math-engines.js +197 -0
- package/vibe-math-v2/vibe-math-v2.js +853 -40
- 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 +22 -8
- package/vibe-math-v3/math-computation.js +1279 -0
- package/vibe-math-v3/math-engines.js +197 -0
- package/vibe-math-v3/vibe-math-v3.js +844 -47
- 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 +38 -6
- package/vibe-math-v4/math-computation.js +1279 -0
- package/vibe-math-v4/math-engines.js +197 -0
- package/vibe-math-v4/vibe-math-v4.js +816 -31
- 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 +42 -6
- package/vibe-math-v5/math-computation.js +1279 -0
- package/vibe-math-v5/math-engines.js +197 -0
- package/vibe-math-v5/vibe-math-v5.js +1132 -37
- package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +83 -3
- package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +251 -0
|
@@ -991,7 +991,7 @@ const RK = makeRoot()
|
|
|
991
991
|
await callTool('vibe_v5_start', { problem: 'Lean 提示词测试', researcherCount: 2 }, RK)
|
|
992
992
|
for (const sp of spawnsFor(RK)) { fireEnd(sp.childId, { progress: memberOfChild(sp.childId) + ':初始见解。', solved: false, contextPct: 10 }); await settle() }
|
|
993
993
|
await settleInstitute(RK)
|
|
994
|
-
await callTool('vibe_v5_set', { maxParallel: 8, formalVerify: 'encourage' }, RK)
|
|
994
|
+
await callTool('vibe_v5_set', { maxParallel: 8, formalVerify: 'encourage', leanAsync: false }, RK)
|
|
995
995
|
// (a) an ordinary work round carries the "formalize reusable things as you go" request
|
|
996
996
|
delivered.length = 0
|
|
997
997
|
await callTool('vibe_v5_say', { to: 'r-1', text: '继续推进。' }, childAgent(childOf(RK, 'acad')))
|
|
@@ -1024,7 +1024,7 @@ const RL2 = makeRoot()
|
|
|
1024
1024
|
await callTool('vibe_v5_start', { problem: 'Lean 忠实性提示词测试', researcherCount: 2 }, RL2)
|
|
1025
1025
|
for (const sp of spawnsFor(RL2)) { fireEnd(sp.childId, { progress: memberOfChild(sp.childId) + ':初始见解。', solved: false, contextPct: 10 }); await settle() }
|
|
1026
1026
|
await settleInstitute(RL2)
|
|
1027
|
-
await callTool('vibe_v5_set', { maxParallel: 8, formalVerify: 'encourage' }, RL2)
|
|
1027
|
+
await callTool('vibe_v5_set', { maxParallel: 8, formalVerify: 'encourage', leanAsync: false }, RL2)
|
|
1028
1028
|
await callTool('vibe_v5_record_proposition', { id: 'p-lean-b', statement: 'Lean 语料对象乙', value: 0.6, motive: 'm', p: 0.9 }, childAgent(childOf(RL2, 'r-1')))
|
|
1029
1029
|
const leanB = await callTool('vibe_v5_lean_archive', { kind: 'proof', target: 'p-lean-b', content: 'theorem p_lean_b : 1 + 1 = 2 := by decide\n' }, childAgent(childOf(RL2, 'r-1')))
|
|
1030
1030
|
assert(leanB.ok === true && leanB.passed === true, 'object 乙 has a proof that really passes (' + JSON.stringify({ ok: leanB.ok, passed: leanB.passed, code: leanB.run && leanB.run.code }) + ')')
|
|
@@ -1053,7 +1053,7 @@ const R_LEANREQ = makeRoot()
|
|
|
1053
1053
|
await callTool('vibe_v5_start', { problem: 'Lean require 提示词测试', researcherCount: 2 }, R_LEANREQ)
|
|
1054
1054
|
for (const sp of spawnsFor(R_LEANREQ)) { fireEnd(sp.childId, { progress: memberOfChild(sp.childId) + ':初始见解。', solved: false, contextPct: 10 }); await settle() }
|
|
1055
1055
|
await settleInstitute(R_LEANREQ)
|
|
1056
|
-
await callTool('vibe_v5_set', { maxParallel: 8, formalVerify: 'require' }, R_LEANREQ)
|
|
1056
|
+
await callTool('vibe_v5_set', { maxParallel: 8, formalVerify: 'require', leanAsync: false }, R_LEANREQ)
|
|
1057
1057
|
await callTool('vibe_v5_record_proposition', { id: 'p-lean-req', statement: 'Lean 语料对象丙(require 档)', value: 0.6, motive: 'm', p: 0.8 }, childAgent(childOf(R_LEANREQ, 'r-1')))
|
|
1058
1058
|
const propR = await callTool('vibe_v5_propose_verify', { target: 'p-lean-req', kind: 'proposition', reason: '语料' }, childAgent(childOf(R_LEANREQ, 'r-1')))
|
|
1059
1059
|
assert(propR.ok === true && propR.started === true, 'the require-mode ballot started (' + JSON.stringify(propR).slice(0, 90) + ')')
|
|
@@ -1077,7 +1077,7 @@ const R_LEANDEF = makeRoot()
|
|
|
1077
1077
|
await callTool('vibe_v5_start', { problem: 'Lean 缺陷后提示词测试', researcherCount: 2 }, R_LEANDEF)
|
|
1078
1078
|
for (const sp of spawnsFor(R_LEANDEF)) { fireEnd(sp.childId, { progress: memberOfChild(sp.childId) + ':初始见解。', solved: false, contextPct: 10 }); await settle() }
|
|
1079
1079
|
await settleInstitute(R_LEANDEF)
|
|
1080
|
-
await callTool('vibe_v5_set', { maxParallel: 8, formalVerify: 'encourage' }, R_LEANDEF)
|
|
1080
|
+
await callTool('vibe_v5_set', { maxParallel: 8, formalVerify: 'encourage', leanAsync: false }, R_LEANDEF)
|
|
1081
1081
|
await callTool('vibe_v5_record_proposition', { id: 'p-lean-def', statement: 'Lean 语料对象丁', value: 0.6, motive: 'm', p: 0.9 }, childAgent(childOf(R_LEANDEF, 'r-1')))
|
|
1082
1082
|
const leanD = await callTool('vibe_v5_lean_archive', { kind: 'proof', target: 'p-lean-def', content: 'theorem p_lean_d : 1 + 1 = 2 := by decide\n' }, childAgent(childOf(R_LEANDEF, 'r-1')))
|
|
1083
1083
|
assert(leanD.ok === true && leanD.passed === true, 'object 丁 has a passing proof before the defect')
|
|
@@ -1109,7 +1109,7 @@ const R_LEANHINT = makeRoot()
|
|
|
1109
1109
|
await callTool('vibe_v5_start', { problem: 'Lean 工具提示语料测试', researcherCount: 2 }, R_LEANHINT)
|
|
1110
1110
|
for (const sp of spawnsFor(R_LEANHINT)) { fireEnd(sp.childId, { progress: memberOfChild(sp.childId) + ':初始见解。', solved: false, contextPct: 10 }); await settle() }
|
|
1111
1111
|
await settleInstitute(R_LEANHINT)
|
|
1112
|
-
await callTool('vibe_v5_set', { maxParallel: 8, formalVerify: 'encourage' }, R_LEANHINT)
|
|
1112
|
+
await callTool('vibe_v5_set', { maxParallel: 8, formalVerify: 'encourage', leanAsync: false }, R_LEANHINT)
|
|
1113
1113
|
{
|
|
1114
1114
|
const r1 = childAgent(childOf(R_LEANHINT, 'r-1'))
|
|
1115
1115
|
// Labels are OURS (they name the call that produced the string); only the VALUES are
|
|
@@ -33,9 +33,16 @@
|
|
|
33
33
|
- vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
|
|
34
34
|
- vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
|
|
35
35
|
- vibe_math_list_agents / vibe_math_message_agent / vibe_math_interrupt_agent — inspect / steer / interrupt subagents.
|
|
36
|
-
- vibe_math_lean_run / vibe_math_lean_archive / vibe_math_lean_lib
|
|
37
|
-
verification (execute / archive / list the reuse
|
|
38
|
-
|
|
36
|
+
- vibe_math_lean_run / vibe_math_lean_archive / vibe_math_lean_lib / vibe_math_lean_read /
|
|
37
|
+
vibe_math_lean_job — Lean formal verification (execute / archive / list + read the reuse
|
|
38
|
+
library / inspect or wait for a background compile job). leanAsync=true (default) queues the
|
|
39
|
+
compile and returns a jobId; nothing counts as proved until that job settles ok (so "有把握"
|
|
40
|
+
is not the same as "已验证"). The scheduler's child agents use them too; they work in every
|
|
41
|
+
mode.
|
|
42
|
+
|
|
43
|
+
- math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
|
|
44
|
+
- 替代必须声明(诚实性):当替代方案改变了**精确性或结论强度**时(精确符号解 → 数值近似、闭式解 → 采样/求积、改了精度/容差/假设、换了算法类),结论里**必须写明**,不得读起来像得到了原本(精确/所要求的)结果;拿不到精确结果就直说。
|
|
45
|
+
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>),你可以用普通文件工具打开并编辑它;编辑后用 mode:'file' 指向它重跑,会写出一份**新回执/新 attempt**(含新的 scriptHash)。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
|
|
39
46
|
|
|
40
47
|
Final paper: strict termination writes Paper/<project>/{paper.md,paper.tex,paper.pdf,paper.meta.json,paper.log.md}
|
|
41
48
|
automatically — a dedicated paper-writing child assembles the solved material (finalPaper=false disables only that
|
|
@@ -74,7 +81,7 @@
|
|
|
74
81
|
explicit, reasoned blocker record; the scheduler is never wedged by it).
|
|
75
82
|
- Paths: work file Formal/<id>.lean; archived proof Verified/Lean/<id>.lean; reusable
|
|
76
83
|
definitions VibeMath/Formal/Lib/; proved lemmas VibeMath/Formal/Proved/.
|
|
77
|
-
- The toolchain knobs leanCommand / leanArgs / leanTimeoutMs are tunable as well
|
|
84
|
+
- The toolchain knobs leanCommand / leanArgs / leanTimeoutMs / leanAsync / leanInitiative / leanSearchPaths / leanJobsMaxParallel are tunable as well
|
|
78
85
|
(e.g. leanCommand='lake' with leanArgs=['env','lean']); a missing Lean binary is
|
|
79
86
|
reported as LEAN_NOT_FOUND and still lets the code be written and archived.
|
|
80
87
|
- vibe_math_status / vibe_math_report show the mode, the per-object formal status and the
|
|
@@ -104,9 +111,16 @@
|
|
|
104
111
|
- vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
|
|
105
112
|
- vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
|
|
106
113
|
- vibe_math_list_agents / vibe_math_message_agent / vibe_math_interrupt_agent — inspect / steer / interrupt subagents.
|
|
107
|
-
- vibe_math_lean_run / vibe_math_lean_archive / vibe_math_lean_lib
|
|
108
|
-
verification (execute / archive / list the reuse
|
|
109
|
-
|
|
114
|
+
- vibe_math_lean_run / vibe_math_lean_archive / vibe_math_lean_lib / vibe_math_lean_read /
|
|
115
|
+
vibe_math_lean_job — Lean formal verification (execute / archive / list + read the reuse
|
|
116
|
+
library / inspect or wait for a background compile job). leanAsync=true (default) queues the
|
|
117
|
+
compile and returns a jobId; nothing counts as proved until that job settles ok (so "有把握"
|
|
118
|
+
is not the same as "已验证"). The scheduler's child agents use them too; they work in every
|
|
119
|
+
mode.
|
|
120
|
+
|
|
121
|
+
- math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
|
|
122
|
+
- 替代必须声明(诚实性):当替代方案改变了**精确性或结论强度**时(精确符号解 → 数值近似、闭式解 → 采样/求积、改了精度/容差/假设、换了算法类),结论里**必须写明**,不得读起来像得到了原本(精确/所要求的)结果;拿不到精确结果就直说。
|
|
123
|
+
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>),你可以用普通文件工具打开并编辑它;编辑后用 mode:'file' 指向它重跑,会写出一份**新回执/新 attempt**(含新的 scriptHash)。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
|
|
110
124
|
|
|
111
125
|
Final paper: strict termination writes Paper/<project>/{paper.md,paper.tex,paper.pdf,paper.meta.json,paper.log.md}
|
|
112
126
|
automatically — a dedicated paper-writing child assembles the solved material (finalPaper=false disables only that
|
|
@@ -145,7 +159,7 @@
|
|
|
145
159
|
explicit, reasoned blocker record; the scheduler is never wedged by it).
|
|
146
160
|
- Paths: work file Formal/<id>.lean; archived proof Verified/Lean/<id>.lean; reusable
|
|
147
161
|
definitions VibeMath/Formal/Lib/; proved lemmas VibeMath/Formal/Proved/.
|
|
148
|
-
- The toolchain knobs leanCommand / leanArgs / leanTimeoutMs are tunable as well
|
|
162
|
+
- The toolchain knobs leanCommand / leanArgs / leanTimeoutMs / leanAsync / leanInitiative / leanSearchPaths / leanJobsMaxParallel are tunable as well
|
|
149
163
|
(e.g. leanCommand='lake' with leanArgs=['env','lean']); a missing Lean binary is
|
|
150
164
|
reported as LEAN_NOT_FOUND and still lets the code be written and archived.
|
|
151
165
|
- vibe_math_status / vibe_math_report show the mode, the per-object formal status and the
|