dsh-vibe-math 2.4.1 → 2.5.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 (42) hide show
  1. package/README.en.md +14 -14
  2. package/README.md +15 -14
  3. package/cordis.patch.yml +33 -10
  4. package/docs/AUDIT-CHECKLIST.md +25 -6
  5. package/docs/COMPAT-AUDIT-ROUND3.md +16 -1
  6. package/docs/release-notes/RELEASE-NOTES-2.5.0.md +173 -0
  7. package/docs/test-timing.md +73 -40
  8. package/installer.js +225 -45
  9. package/package.json +3 -2
  10. package/preset-declaration.js +38 -7
  11. package/prompt-corpus-persona/persona-corpus.json +9 -9
  12. package/prompt-corpus-persona/persona-corpus.md +67 -21
  13. package/prompt-corpus-v2/formal-verify-v2.json +116 -92
  14. package/prompt-corpus-v2/formal-verify-v2.md +240 -93
  15. package/prompt-corpus-v3/formal-verify-v3.json +81 -81
  16. package/prompt-corpus-v3/formal-verify-v3.md +288 -1111
  17. package/prompt-corpus-v4/formal-verify-v4.json +38 -8
  18. package/prompt-corpus-v4/formal-verify-v4.md +157 -25
  19. package/prompt-corpus-v5/prompt-corpus-v5.json +17 -17
  20. package/prompt-corpus-v5/prompt-corpus-v5.md +32 -26
  21. package/tests/audit-installer-compat.test.mjs +70 -4
  22. package/tests/audit-installer-policy.test.mjs +229 -4
  23. package/tests/audit-persona-sensitivity.mjs +11 -4
  24. package/tests/audit-persona-surface.test.mjs +5 -1
  25. package/tests/audit-v5-sensitivity.mjs +47 -6
  26. package/tests/e2e-v5-round2.test.mjs +354 -0
  27. package/tests/formal-verify-v2.test.mjs +54 -2
  28. package/tests/formal-verify-v3.test.mjs +63 -2
  29. package/tests/formal-verify-v4.test.mjs +120 -4
  30. package/tests/run-tests.mjs +104 -23
  31. package/vibe-math-v2/agent.cordis.yml +6 -0
  32. package/vibe-math-v2/vibe-math-v2.js +503 -99
  33. package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +20 -4
  34. package/vibe-math-v3/agent.cordis.yml +26 -10
  35. package/vibe-math-v3/vibe-math-v3.js +555 -175
  36. package/vibe-math-v3//345/256/236/347/216/260/346/226/271/346/241/210.md +3 -3
  37. package/vibe-math-v4/agent.cordis.yml +26 -6
  38. package/vibe-math-v4/vibe-math-v4.js +404 -51
  39. package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +91 -9
  40. package/vibe-math-v5/agent.cordis.yml +8 -4
  41. package/vibe-math-v5/vibe-math-v5.js +513 -105
  42. package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +73 -40
@@ -44,6 +44,9 @@ and survives restarts via vibe_math_resume.
44
44
  Key rules to remember when reporting: a problem is "solved" when one of its solutions reaches
45
45
  正确概率 = 1; a proposition reaches 布尔估计 = 1/0 when a proof/refutation in its lists reaches
46
46
  正确概率 = 1; Propos propositions with 价值/关键性 ≥ promoteValueThreshold auto-promote to qs.json.
47
+ Closure rule (identical across the presets): the 1/0 values above are written ONLY by the scheduler,
48
+ after ≥2 independent verifier agents settle the object (one lone reviewer can never conclude), and
49
+ Verified/ is written by that same scheduler path — an agent's own self-reported 1 is never a conclusion.
47
50
  When the user asks about progress, call vibe_math_report and summarize in plain language.
48
51
 
49
52
  Configuration highlights (all tunable via vibe_math_set_params / the settings file):
@@ -110,6 +113,9 @@ and survives restarts via vibe_math_resume.
110
113
  Key rules to remember when reporting: a problem is "solved" when one of its solutions reaches
111
114
  正确概率 = 1; a proposition reaches 布尔估计 = 1/0 when a proof/refutation in its lists reaches
112
115
  正确概率 = 1; Propos propositions with 价值/关键性 ≥ promoteValueThreshold auto-promote to qs.json.
116
+ Closure rule (identical across the presets): the 1/0 values above are written ONLY by the scheduler,
117
+ after ≥2 independent verifier agents settle the object (one lone reviewer can never conclude), and
118
+ Verified/ is written by that same scheduler path — an agent's own self-reported 1 is never a conclusion.
113
119
  When the user asks about progress, call vibe_math_report and summarize in plain language.
114
120
 
115
121
  Configuration highlights (all tunable via vibe_math_set_params / the settings file):
@@ -144,7 +150,7 @@ LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
144
150
  ## vibe-math-v3
145
151
 
146
152
  - 注册工具数:**33**
147
- - 斜杠命令 hint:`start|resume|pause|abort|status|report|mode <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`
153
+ - 斜杠命令 hint:`start [override]|resume [override]|pause|abort|status|report|mode <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`
148
154
 
149
155
  ### config.prefix
150
156
 
@@ -173,7 +179,8 @@ is experiential reference.
173
179
  - vibe_math_add_problem {id, description, priority, dependencies?} — add a problem (creates Problems/<id>.md).
174
180
  - vibe_math_add_proposition {id, 概述, 概率, 优先级, 价值/关键性, 分类} — add a proposition (Propos/<分类>/<id>.md).
175
181
  - vibe_math_list_propositions — list the proposition knowledge base.
176
- - vibe_math_start / vibe_math_resume — start / resume the scheduler (resume = continue after checkpoint/restart).
182
+ - vibe_math_start / vibe_math_resume — start / resume the scheduler (resume = continue after checkpoint/restart);
183
+ both accept override=true to take the project lock over from another session (only after you verified that session is gone).
177
184
  - vibe_math_status / vibe_math_report — read status / full progress report (report writes Progress_Logs/report.json + Logs/报告.md).
178
185
  - vibe_math_pause / vibe_math_abort — pause / abort.
179
186
  - vibe_math_set_mode {mode: manual|auto} — switch manual / auto (manual gates: 计划审批 / 裁决 / 方法晋升).
@@ -186,7 +193,8 @@ is experiential reference.
186
193
  - vibe_math_plan {force?} — show queued plan / last plan, or force a planning round.
187
194
  - vibe_math_index — rebuild State/index.json from the Markdown knowledge base.
188
195
  - vibe_math_method_add / vibe_math_method_list — manually add / list method cards (Methods/ + global).
189
- - vibe_math_lock_status — project lock occupancy.
196
+ - 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).
197
+ 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.
190
198
  - vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
191
199
  - vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
192
200
  - vibe_math_list_agents / vibe_math_message_agent / vibe_math_interrupt_agent — inspect / steer / interrupt subagents.
@@ -194,14 +202,20 @@ is experiential reference.
194
202
  verification (execute / archive / list the reuse library). The scheduler's child agents
195
203
  use them too; they work in every mode.
196
204
 
197
- A /vibe slash command mirrors the main controls (/vibe start|resume|pause|abort|status|report|mode
205
+ A /vibe slash command mirrors the main controls (/vibe start [override]|resume [override]|pause|abort|status|report|mode
198
206
  <auto|manual>|setup|save|add <id> <desc>|add-proposition <id> <概述>|list-propositions|methods|index|plan|lock|...).
199
207
  Data survives restarts via vibe_math_resume.
200
208
 
201
209
  Key rules when reporting: a problem is "solved" when one of its 解法候选 entries reaches 概率 = 1
202
210
  (the scheduler writes Verified/问题/<id>.md); a proposition reaches 已验证·真/假 when a 证明/证伪
203
- entry reaches 概率 = 1 (Verified/命题/<id>.md); Propos propositions with 价值/关键性 ≥
204
- promoteValueThreshold auto-promote into Problems/ as "判断下述命题是否成立:<命题>" (verification
211
+ entry reaches 概率 = 1 (Verified/命题/<id>.md).
212
+ Closure rule (identical across the presets): those 概率 = 1 values are written ONLY by the scheduler,
213
+ after ≥2 independent verifier agents settle the object (a lone reviewer can never conclude; see
214
+ minVotes), and Verified/ is written by that same scheduler path — a self-reported 1 is never a
215
+ conclusion. Propos propositions whose 价值/关键性 ≥
216
+ promoteValueThreshold (write that anchor on the proposition card, or report it as lemmas[].价值/关键性 in
217
+ vibe_math_sync_meta — default 0.5 never promotes) and that are still undecided
218
+ auto-promote into Problems/ as "判断下述命题是否成立:<命题>" (verification
205
219
  results sync back to the source proposition); a solver-reported sub-question q_sub registers THREE
206
220
  objects (q_sub problem + judge problem + p-tmp temporary-assumption proposition) with full 来源与动机.
207
221
 
@@ -250,7 +264,8 @@ is experiential reference.
250
264
  - vibe_math_add_problem {id, description, priority, dependencies?} — add a problem (creates Problems/<id>.md).
251
265
  - vibe_math_add_proposition {id, 概述, 概率, 优先级, 价值/关键性, 分类} — add a proposition (Propos/<分类>/<id>.md).
252
266
  - vibe_math_list_propositions — list the proposition knowledge base.
253
- - vibe_math_start / vibe_math_resume — start / resume the scheduler (resume = continue after checkpoint/restart).
267
+ - vibe_math_start / vibe_math_resume — start / resume the scheduler (resume = continue after checkpoint/restart);
268
+ both accept override=true to take the project lock over from another session (only after you verified that session is gone).
254
269
  - vibe_math_status / vibe_math_report — read status / full progress report (report writes Progress_Logs/report.json + Logs/报告.md).
255
270
  - vibe_math_pause / vibe_math_abort — pause / abort.
256
271
  - vibe_math_set_mode {mode: manual|auto} — switch manual / auto (manual gates: 计划审批 / 裁决 / 方法晋升).
@@ -263,7 +278,8 @@ is experiential reference.
263
278
  - vibe_math_plan {force?} — show queued plan / last plan, or force a planning round.
264
279
  - vibe_math_index — rebuild State/index.json from the Markdown knowledge base.
265
280
  - vibe_math_method_add / vibe_math_method_list — manually add / list method cards (Methods/ + global).
266
- - vibe_math_lock_status — project lock occupancy.
281
+ - 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).
282
+ 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.
267
283
  - vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
268
284
  - vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
269
285
  - vibe_math_list_agents / vibe_math_message_agent / vibe_math_interrupt_agent — inspect / steer / interrupt subagents.
@@ -271,14 +287,20 @@ is experiential reference.
271
287
  verification (execute / archive / list the reuse library). The scheduler's child agents
272
288
  use them too; they work in every mode.
273
289
 
274
- A /vibe slash command mirrors the main controls (/vibe start|resume|pause|abort|status|report|mode
290
+ A /vibe slash command mirrors the main controls (/vibe start [override]|resume [override]|pause|abort|status|report|mode
275
291
  <auto|manual>|setup|save|add <id> <desc>|add-proposition <id> <概述>|list-propositions|methods|index|plan|lock|...).
276
292
  Data survives restarts via vibe_math_resume.
277
293
 
278
294
  Key rules when reporting: a problem is "solved" when one of its 解法候选 entries reaches 概率 = 1
279
295
  (the scheduler writes Verified/问题/<id>.md); a proposition reaches 已验证·真/假 when a 证明/证伪
280
- entry reaches 概率 = 1 (Verified/命题/<id>.md); Propos propositions with 价值/关键性 ≥
281
- promoteValueThreshold auto-promote into Problems/ as "判断下述命题是否成立:<命题>" (verification
296
+ entry reaches 概率 = 1 (Verified/命题/<id>.md).
297
+ Closure rule (identical across the presets): those 概率 = 1 values are written ONLY by the scheduler,
298
+ after ≥2 independent verifier agents settle the object (a lone reviewer can never conclude; see
299
+ minVotes), and Verified/ is written by that same scheduler path — a self-reported 1 is never a
300
+ conclusion. Propos propositions whose 价值/关键性 ≥
301
+ promoteValueThreshold (write that anchor on the proposition card, or report it as lemmas[].价值/关键性 in
302
+ vibe_math_sync_meta — default 0.5 never promotes) and that are still undecided
303
+ auto-promote into Problems/ as "判断下述命题是否成立:<命题>" (verification
282
304
  results sync back to the source proposition); a solver-reported sub-question q_sub registers THREE
283
305
  objects (q_sub problem + judge problem + p-tmp temporary-assumption proposition) with full 来源与动机.
284
306
 
@@ -363,14 +385,24 @@ Main controls (recommended flow: configure FIRST, then start):
363
385
  (execute / archive / list the reuse library). Residents use them too; they work in every mode.
364
386
  - vibe_v4_formal_report — human-readable Lean formal-verification mirror (mode, Lean-passed
365
387
  objects, recorded blockers, formalization TODO, library paths).
366
- - vibe_v4_prompts {which: brainstorm|normal|heartbeat|verify|coreRules, member?, target?, stage?} — read the exact prompt text a resident would receive (prompt auditing; prompt text is the product).
367
- A /v4 slash command mirrors the main controls (configure|start|resume|pause|abort|status|report|message <to|all> <content>|meeting|members|add|remove|set).
388
+ - 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).
389
+ 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>...).
368
390
 
369
391
  TRUST RULE: only Verified/ (and Propos/ entries marked 已验证·真/假) are absolutely
370
392
  trustworthy; everything else — unverified resident claims, Progress/, Method claims —
371
393
  is experiential reference. A proposition / method / theory only reaches Verified/ when
372
394
  ALL residents unanimously agree true (or all agree false); otherwise it stays in its
373
- library with a probability estimate.
395
+ library with a probability estimate. Closure rule (identical across the presets): the framework
396
+ writes the Verified/ card — a resident's own claim never does — and what counts as a vote is
397
+ stated once in the VOTE CONTRACT below.
398
+
399
+ VOTE CONTRACT: a verification vote is a probability of truth in [0,1], but only an EXACT
400
+ 1 (absolutely true) and an EXACT 0 (absolutely false) count as a vote. Anything strictly
401
+ between (0.9, 0.95, 0.5 …) is an ABSTENTION carrying that probability estimate: the run
402
+ does NOT conclude, and the group's MEAN probability is written back to the object's card
403
+ so it stays in its library with a probability. The same absoluteness applies to the
404
+ meeting stop-vote: every resident on the roster must answer `voteSolved:true` — one
405
+ abstention keeps the run alive.
374
406
 
375
407
  LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
376
408
  - 'off' (default, no extra requirement) | 'encourage' (the residents decide by implementation
@@ -448,14 +480,24 @@ Main controls (recommended flow: configure FIRST, then start):
448
480
  (execute / archive / list the reuse library). Residents use them too; they work in every mode.
449
481
  - vibe_v4_formal_report — human-readable Lean formal-verification mirror (mode, Lean-passed
450
482
  objects, recorded blockers, formalization TODO, library paths).
451
- - vibe_v4_prompts {which: brainstorm|normal|heartbeat|verify|coreRules, member?, target?, stage?} — read the exact prompt text a resident would receive (prompt auditing; prompt text is the product).
452
- A /v4 slash command mirrors the main controls (configure|start|resume|pause|abort|status|report|message <to|all> <content>|meeting|members|add|remove|set).
483
+ - 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).
484
+ 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>...).
453
485
 
454
486
  TRUST RULE: only Verified/ (and Propos/ entries marked 已验证·真/假) are absolutely
455
487
  trustworthy; everything else — unverified resident claims, Progress/, Method claims —
456
488
  is experiential reference. A proposition / method / theory only reaches Verified/ when
457
489
  ALL residents unanimously agree true (or all agree false); otherwise it stays in its
458
- library with a probability estimate.
490
+ library with a probability estimate. Closure rule (identical across the presets): the framework
491
+ writes the Verified/ card — a resident's own claim never does — and what counts as a vote is
492
+ stated once in the VOTE CONTRACT below.
493
+
494
+ VOTE CONTRACT: a verification vote is a probability of truth in [0,1], but only an EXACT
495
+ 1 (absolutely true) and an EXACT 0 (absolutely false) count as a vote. Anything strictly
496
+ between (0.9, 0.95, 0.5 …) is an ABSTENTION carrying that probability estimate: the run
497
+ does NOT conclude, and the group's MEAN probability is written back to the object's card
498
+ so it stays in its library with a probability. The same absoluteness applies to the
499
+ meeting stop-vote: every resident on the roster must answer `voteSolved:true` — one
500
+ abstention keeps the run alive.
459
501
 
460
502
  LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
461
503
  - 'off' (default, no extra requirement) | 'encourage' (the residents decide by implementation
@@ -537,8 +579,10 @@ Data lives under {{cwd}}/VibeMath/Projects/<project>/Institutes/<institute>/:
537
579
  Shared/TaskBoard.md (human view), Shared/Chat/<day>.md,
538
580
  Shared/Meetings/<id>.md, Shared/Debates/<target>.md,
539
581
  Problems/<id>.md, Verified/<kind>/<id>.md (read-only; m-vote only),
540
- State/ (a human-readable MIRROR only — the authoritative state is the
541
- session log projection; never hand-edit State/).
582
+ State/ (the AUTHORITATIVE state is State/<institute>.v5state.json in this
583
+ directory; it is a hardened JSON file, never a host session log. Everything
584
+ else here and elsewhere in the tree is a human-readable MIRROR — never
585
+ hand-edit any of it).
542
586
 
543
587
  Main controls (recommended flow: configure FIRST, then start):
544
588
  - vibe_v5_configure {project?, institute?, problem?, params?} — create/configure the institute WITHOUT starting it.
@@ -634,8 +678,10 @@ Data lives under {{cwd}}/VibeMath/Projects/<project>/Institutes/<institute>/:
634
678
  Shared/TaskBoard.md (human view), Shared/Chat/<day>.md,
635
679
  Shared/Meetings/<id>.md, Shared/Debates/<target>.md,
636
680
  Problems/<id>.md, Verified/<kind>/<id>.md (read-only; m-vote only),
637
- State/ (a human-readable MIRROR only — the authoritative state is the
638
- session log projection; never hand-edit State/).
681
+ State/ (the AUTHORITATIVE state is State/<institute>.v5state.json in this
682
+ directory; it is a hardened JSON file, never a host session log. Everything
683
+ else here and elsewhere in the tree is a human-readable MIRROR — never
684
+ hand-edit any of it).
639
685
 
640
686
  Main controls (recommended flow: configure FIRST, then start):
641
687
  - vibe_v5_configure {project?, institute?, problem?, params?} — create/configure the institute WITHOUT starting it.