dsh-vibe-math 2.4.1 → 2.6.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 (46) hide show
  1. package/README.en.md +53 -14
  2. package/README.md +54 -14
  3. package/cordis.patch.yml +54 -17
  4. package/docs/AUDIT-CHECKLIST.md +26 -7
  5. package/docs/COMPAT-AUDIT-ROUND3.md +16 -1
  6. package/docs/final-paper.md +171 -0
  7. package/docs/release-notes/RELEASE-NOTES-2.5.0.md +173 -0
  8. package/docs/release-notes/RELEASE-NOTES-2.6.0.md +268 -0
  9. package/docs/test-timing.md +77 -40
  10. package/installer.js +225 -45
  11. package/package.json +6 -3
  12. package/preset-declaration.js +38 -7
  13. package/prompt-corpus-persona/persona-corpus.json +13 -13
  14. package/prompt-corpus-persona/persona-corpus.md +113 -39
  15. package/prompt-corpus-v2/formal-verify-v2.json +128 -92
  16. package/prompt-corpus-v2/formal-verify-v2.md +380 -142
  17. package/prompt-corpus-v3/formal-verify-v3.json +117 -81
  18. package/prompt-corpus-v3/formal-verify-v3.md +693 -1189
  19. package/prompt-corpus-v4/formal-verify-v4.json +38 -8
  20. package/prompt-corpus-v4/formal-verify-v4.md +157 -25
  21. package/prompt-corpus-v5/prompt-corpus-v5.json +17 -17
  22. package/prompt-corpus-v5/prompt-corpus-v5.md +32 -26
  23. package/tests/audit-installer-compat.test.mjs +70 -4
  24. package/tests/audit-installer-policy.test.mjs +229 -4
  25. package/tests/audit-persona-sensitivity.mjs +68 -8
  26. package/tests/audit-persona-surface.test.mjs +21 -8
  27. package/tests/audit-v5-sensitivity.mjs +47 -6
  28. package/tests/e2e-v5-round2.test.mjs +825 -1
  29. package/tests/formal-verify-v2.test.mjs +57 -2
  30. package/tests/formal-verify-v3.test.mjs +67 -2
  31. package/tests/formal-verify-v4.test.mjs +120 -4
  32. package/tests/prompt-v5-integrity.test.mjs +9 -3
  33. package/tests/run-tests.mjs +104 -23
  34. package/tests/selfdrive-v5.mjs +55 -4
  35. package/vibe-math-v2/agent.cordis.yml +20 -4
  36. package/vibe-math-v2/vibe-math-v2.js +1318 -106
  37. package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +20 -4
  38. package/vibe-math-v3/agent.cordis.yml +36 -14
  39. package/vibe-math-v3/vibe-math-v3.js +1348 -179
  40. package/vibe-math-v3//345/256/236/347/216/260/346/226/271/346/241/210.md +3 -3
  41. package/vibe-math-v4/agent.cordis.yml +36 -8
  42. package/vibe-math-v4/vibe-math-v4.js +1195 -57
  43. package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +91 -9
  44. package/vibe-math-v5/agent.cordis.yml +16 -8
  45. package/vibe-math-v5/vibe-math-v5.js +1628 -112
  46. package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +143 -41
package/README.en.md CHANGED
@@ -79,7 +79,7 @@ flowchart TB
79
79
  subgraph FW["⚙️ Framework vibe-v5 —— only a medium (middleware), never assigns tasks"]
80
80
  M["Message relay · meetings/debates · task board CAS+DAG<br/>m-vote consensus verification · context and liveness · roster and hiring · scheduler"]
81
81
  end
82
- PROJ["💾 State/&lt;institute&gt;.v5state.json (hardened JSON, authoritative)<br/>11 kinds of events · pure fold applyV5Event · serial writes · recovery = load before read"]
82
+ PROJ["💾 State/&lt;institute&gt;.v5state.json (hardened JSON, authoritative)<br/>12 kinds of events · pure fold applyV5Event · serial writes · recovery = load before read"]
83
83
  FS["📁 Members/&lt;id&gt;/* · Shared/* · Verified/ · Problems/"]
84
84
  RULE{{"Truth gate: Boolean unanimity and Boolean votes ≥ m = min(quorumCap, number of registered voting members)"}}
85
85
  OFF <-->|"vibe_v5_* / /v5 commands ↔ status / report"| M
@@ -402,7 +402,7 @@ Then start a new session and select **"Vibe Math V2"** / **"Vibe Math V3"** / **
402
402
  > - **Choose `vibe-math-v5` (institute system)** if you want:
403
403
  > - **organized self-organization** — like a real research institute, with a **leader (academician)** responsible for decomposition, assignment, prioritization, chairing meetings and supervising progress, but **judgment still belongs to each individual**;
404
404
  > - a **roster that can grow or shrink** — resident researchers + temp workers who can be **autonomously hired/dismissed** (temp workers have no voting rights, suitable for chores such as checking, trial computation and material organization);
405
- > - an **adjustable consistency threshold** — `m = min(quorumCap, number of voting members)` boolean-consistent votes settle the matter (easier to converge than "unanimity", while **opposing votes still block**, so a minority will not be drowned out by abstentions);
405
+ > - an **adjustable consistency threshold** — `m = min(quorumCap, number of voting members)` boolean-consistent votes settle the matter (because an opposing vote blocks, the effective threshold is still "every Boolean vote points the same way"; it differs only when fewer than `m` members cast a Boolean vote);
406
406
  > - **zero-token-cost state persistence** — the institute state is written to a hardened JSON file under the institute directory and does not consume member context budget.
407
407
  >
408
408
  > **⚠️ `vibe-math-v2` and `vibe-math-v3` are the classic architectures; `vibe-math-v4` and `vibe-math-v5` are experimental architectures,** all four are peers and all are selectable; the old `vibe-math-v1` has been removed (this package contains only v2/v3/v4/v5).
@@ -651,11 +651,11 @@ The main agent runs `vibe_math_status` and reports in plain language: the number
651
651
  **Step 3 — Tune parameters by conversation (optional)**
652
652
 
653
653
  ```
654
- I want it to use weighted voting, with the concurrency limit set to 6.
654
+ I want it to use forced verdict mode, with the concurrency limit set to 6.
655
655
  ```
656
656
 
657
- The main agent `vibe_math_set_params {"verdictMode":"weighted-vote","maxParallelThreshold":6}`,
658
- and asks you whether to `vibe_math_save_settings` to save them.
657
+ The main agent `vibe_math_set_params {"verdictMode":"forced","maxParallelThreshold":6}`,
658
+ and asks you whether to `vibe_math_save_settings` to save them. (`verdictMode` accepts only `flat|forced`; any other value is **not an error** — it is silently reverted to that architecture's default, `flat` in v2 and `forced` in v3.)
659
659
 
660
660
  **Step 4 — Intervene midway (optional)**
661
661
 
@@ -704,7 +704,7 @@ The main agent `vibe_math_status`: in `qs/qs.json`, `q1` has been written back w
704
704
  | `directionsPerSolver` | 1 | Total number of directions visible to each solver prompt (1 = only its own direction, no mutual interference; N>1 = its own plus summaries of up to N-1 other active directions) |
705
705
  | `verifierCount` | 3 | Number of independent verifiers per verification target |
706
706
  | `debateMaxRounds` | 5 | Maximum number of rounds of verification debate (chat group) |
707
- | `verdictMode` | `flat` | `flat` = balanced mechanism (inconsistency judged 0.5) / `forced` = forced verdict (historical accuracy + rigor weighting) |
707
+ | `verdictMode` | `flat` | `flat` = the **equal-weight mean** of the probabilities the verifiers report (an inconsistency is no longer judged 0.5) / `forced` = forced verdict (weighted by historical accuracy + rigor; accuracy is tracked per model and scored only when the object later receives a boolean verdict) |
708
708
  | `reportMode` | `file` | `file` = write a report file / `push` = push a report to the main agent / `both` |
709
709
  | `promoteValueThreshold` | 0.7 | A proposition in Propos with "value/criticality" ≥ this value and undecided (0,1) is automatically added to qs.json |
710
710
  | `priorityAdjust` | `none` | `none` / `deadend-deprioritize` (deprioritize all dead ends) / `survival-map` (recompute by survival rate) |
@@ -725,6 +725,15 @@ The main agent `vibe_math_status`: in `qs/qs.json`, `q1` has been written back w
725
725
  | `leanCommand` | `'lean'` | The Lean executable to run (e.g. `'lake'`) |
726
726
  | `leanArgs` | `[]` | Additional arguments inserted before the file name (e.g. `['env','lean']` together with `leanCommand='lake'`) |
727
727
  | `leanTimeoutMs` | `120000` | Upper limit for a single Lean run (milliseconds) |
728
+ | `finalPaper` | `true` | **Final paper**: written automatically at closure (`false` disables only the automatic trigger; the manual command still works). Full contract: `docs/final-paper.md` |
729
+ | `paperFormat` | `both` | Which text versions to produce: `both` (md+tex) / `md` (skips compilation and must not warn about a missing tex) / `tex` |
730
+ | `paperLanguage` | `zh` | Paper language: `zh` (ctexart, engine prefers xelatex) / `en` (article, pdflatex first) |
731
+ | `paperCompilePdf` | `true` | Compile `paper.pdf` when a LaTeX engine is detected; with no engine or a failed compile, tex+md are still delivered and a warning is logged |
732
+ | `paperLatexCommand` | `''` | Force one LaTeX engine executable (empty = auto-detect per language: xelatex→latexmk→pdflatex→lualatex→tectonic) |
733
+
734
+ #### Final paper
735
+
736
+ All four presets have it **on by default**: after the closure signal fires and **before the run is marked complete**, the run enters the paper phase. In v2 a dedicated "paper writer" subagent assembles the concluded evidence into `Paper/<project>/{paper.md,paper.tex,paper.meta.json,paper.log.md}` (plus `paper.pdf` only when an engine is detected). Manual: `/vibe paper [lang=zh|en] [format=both|md|tex] [force]`. A PDF needs a LaTeX engine on the host (`xelatex` preferred for Chinese); with no engine or a failed compile the tex+md are still delivered with only a logged warning — the finalisation is never blocked and an existing pdf is never overwritten. Full contract: `docs/final-paper.md`.
728
737
 
729
738
  ### v3 (paper-style md + planner agent + method library) defaults
730
739
 
@@ -732,12 +741,12 @@ Added/adjusted on top of all v2 parameters:
732
741
 
733
742
  | Parameter | Default | Description |
734
743
  |---|---|---|
735
- | `verdictMode` | `forced` | v3 first makes a **near-consensus determination** (all results on the same side with a mean ≥0.85/≤0.15 takes the mean), otherwise `forced` = weighted by historical accuracy + rigor / `flat` = balanced (0.5). Fixes the v2 flat problem of misjudging "0.9 vs 1" as 0.5 |
744
+ | `verdictMode` | `forced` | v3 first makes a **near-consensus determination** (all results on the same side with a mean ≥0.85/≤0.15 takes the mean) — this runs BEFORE the mode, so 0.9 vs 1 yields ≈0.95 in either mode; otherwise `forced` takes the **equal-weight mean** of the reported probabilities (no accuracy weighting; strict 1/0 still act as absolute votes), while `flat` rules `0.5` (a disagreement is undecided) |
736
745
  | `planningHorizon` | 3 | Maximum number of actions in one plan by the planner agent ("the next n times") |
737
746
  | `plannerEnabled` | true | false = fully use the built-in heuristic scheduling (planner agent disabled) |
738
747
  | `plannerProvider` / `plannerModel` | empty | Planner agent model route (empty = inherit the root agent) |
739
748
  | `plannerPersona` | empty | Persona/requirements injected at the start of the planner agent prompt |
740
- | `planMinIntervalMs` | 30000 | Minimum interval between two planning calls (milliseconds); ignored when the system is idle and there is work |
749
+ | `planMinIntervalMs` | 30000 | Minimum interval between two planning calls (milliseconds); it applies to **every** planning call (empty plans included, and "idle but still work" — the idle bypass is gone) |
741
750
  | `plannerMaxFails` | 3 | The planner agent reaching this number of consecutive failures → automatic degradation to heuristics |
742
751
  | `methodKeepIntervalMs` | 0 | Method Keeper periodic consolidation interval (0 = event-driven) |
743
752
  | `methodKeepEvery` | 5 | Trigger one consolidation every N accumulated inventions/new propositions awaiting sedimentation |
@@ -749,6 +758,15 @@ Added/adjusted on top of all v2 parameters:
749
758
  | `leanCommand` | `'lean'` | The Lean executable to run (e.g. `'lake'`) |
750
759
  | `leanArgs` | `[]` | Additional arguments inserted before the file name (e.g. `['env','lean']` together with `leanCommand='lake'`) |
751
760
  | `leanTimeoutMs` | `120000` | Upper limit for a single Lean run (milliseconds) |
761
+ | `finalPaper` | `true` | **Final paper**: written automatically at closure (`false` disables only the automatic trigger; the manual command still works). Full contract: `docs/final-paper.md` |
762
+ | `paperFormat` | `both` | Which text versions to produce: `both` (md+tex) / `md` (skips compilation and must not warn about a missing tex) / `tex` |
763
+ | `paperLanguage` | `zh` | Paper language: `zh` (ctexart, engine prefers xelatex) / `en` (article, pdflatex first) |
764
+ | `paperCompilePdf` | `true` | Compile `paper.pdf` when a LaTeX engine is detected; with no engine or a failed compile, tex+md are still delivered and a warning is logged |
765
+ | `paperLatexCommand` | `''` | Force one LaTeX engine executable (empty = auto-detect per language: xelatex→latexmk→pdflatex→lualatex→tectonic) |
766
+
767
+ #### Final paper
768
+
769
+ v3 uses the same switch and the same ordering as v2 (strict termination; the writer is spawned **before** the scheduler stops): a dedicated "paper writer" subagent produces `Paper/<project>/{paper.md,paper.tex,paper.meta.json,paper.log.md}` (plus `paper.pdf` when an engine is detected). Manual: `/vibe paper [lang=zh|en] [format=both|md|tex] [force]`. No engine or a failed compile still delivers tex+md, logs a warning and never blocks the finalisation. Full contract: `docs/final-paper.md`.
752
770
 
753
771
  ### v4 (resident self-organization · experimental) defaults
754
772
 
@@ -771,6 +789,16 @@ Adjustable via `vibe_v4_set` (persisted to `State/settings.json`):
771
789
  | `leanCommand` | `'lean'` | The Lean executable to run (e.g. `'lake'`) |
772
790
  | `leanArgs` | `[]` | Additional arguments inserted before the file name (e.g. `['env','lean']` together with `leanCommand='lake'`) |
773
791
  | `leanTimeoutMs` | `120000` | Upper limit for a single Lean run (milliseconds) |
792
+ | `finalPaper` | `true` | **Final paper**: written automatically at closure (`false` disables only the automatic trigger; the manual command still works). Full contract: `docs/final-paper.md` |
793
+ | `paperFormat` | `both` | Which text versions to produce: `both` (md+tex) / `md` (skips compilation and must not warn about a missing tex) / `tex` |
794
+ | `paperLanguage` | `zh` | Paper language: `zh` (ctexart, engine prefers xelatex) / `en` (article, pdflatex first) |
795
+ | `paperCompilePdf` | `true` | Compile `paper.pdf` when a LaTeX engine is detected; with no engine or a failed compile, tex+md are still delivered and a warning is logged |
796
+ | `paperLatexCommand` | `''` | Force one LaTeX engine executable (empty = auto-detect per language: xelatex→latexmk→pdflatex→lualatex→tectonic) |
797
+ | `paperEditor` | `office` | Who finalises: `office` (the session root / human side, default) or `resident:<id>` (if that resident has left, it degrades to office and the meta/log say so) |
798
+
799
+ #### Final paper
800
+
801
+ On by default; v4 enters the paper phase after the closing meeting casts its unanimous stop vote and **before** the run is marked complete. Team flow: each resident writes its own part → merge (deduplicate, unify terms and notation) → at least one **cross-review** round → the editor named by `paperEditor` (default `office`, or `resident:<id>`) turns it into the final draft → the paper is finalised only on **unanimous "deliverable"** (objections keep iterating; past the round cap a warning is recorded and the disagreement goes into the appendix). Manual: `/v4 paper [lang=] [format=] [editor=office|resident:<id>] [force]`. Output: `Paper/<run id>/{paper.md,paper.tex,paper.meta.json,paper.log.md}` (plus `paper.pdf` when an engine is available). Full contract: `docs/final-paper.md`.
774
802
 
775
803
  ### v5 (institute system · experimental) defaults
776
804
 
@@ -802,6 +830,16 @@ Adjustable via `vibe_v5_set` (persisted in the institute state file `State/<inst
802
830
  | `leanCommand` | `'lean'` | The Lean executable to run (e.g. `'lake'`) |
803
831
  | `leanArgs` | `[]` | Additional arguments inserted before the file name (e.g. `['env','lean']` together with `leanCommand='lake'`) |
804
832
  | `leanTimeoutMs` | `120000` | Upper limit for a single Lean run (milliseconds) |
833
+ | `finalPaper` | `true` | **Final paper**: written automatically at closure (`false` disables only the automatic trigger; the manual command still works). Full contract: `docs/final-paper.md` |
834
+ | `paperFormat` | `both` | Which text versions to produce: `both` (md+tex) / `md` (skips compilation and must not warn about a missing tex) / `tex` |
835
+ | `paperLanguage` | `zh` | Paper language: `zh` (ctexart, engine prefers xelatex) / `en` (article, pdflatex first) |
836
+ | `paperCompilePdf` | `true` | Compile `paper.pdf` when a LaTeX engine is detected; with no engine or a failed compile, tex+md are still delivered and a warning is logged |
837
+ | `paperLatexCommand` | `''` | Force one LaTeX engine executable (empty = auto-detect per language: xelatex→latexmk→pdflatex→lualatex→tectonic) |
838
+ | `paperEditor` | `academician` | Who finalises: `academician` (default, the only editor an unattended run can reach) or `office` (manual `/v5 paper editor=office` only, and only after consulting the whole institute) |
839
+
840
+ #### Final paper
841
+
842
+ On by default; v5 enters the paper phase after `checkSolved` concludes the problem is solved and **before** the run is marked complete. The permanent staff and the academician write their own parts, merge them and cross-review; the editor is set by `paperEditor`: the **automatic flow always uses `academician`** (the office is the root session and has no wake path), while `office` is available only through the manual `/v5 paper editor=office`. That path requires the office to consult the whole institute first (>=1 `vibe_v5_message` plus >=1 `vibe_v5_meeting`), state the conclusion in the finalisation note, and then call `vibe_v5_finalize_paper`; without both counts it is refused (`V5_PAPER_CONSULT_REQUIRED`). Tools: `vibe_v5_paper`, `vibe_v5_finalize_paper`. Output: `Paper/<institute id>/{paper.md,paper.tex,paper.meta.json,paper.log.md}` (plus `paper.pdf` when an engine is available). Full contract: `docs/final-paper.md`.
805
843
 
806
844
  Common controls: `vibe_v5_configure` (configure first) → `vibe_v5_start` (start work) → `vibe_v5_report` / `vibe_v5_status`; `vibe_v5_message` / `vibe_v5_meeting` / `vibe_v5_members` / `vibe_v5_hire` / `vibe_v5_fire` (temp worker) / `vibe_v5_add_researcher` / `vibe_v5_remove_researcher` (add/remove residents, institute office only) / `vibe_v5_pause` / `vibe_v5_resume` / `vibe_v5_stop`; slash command `/v5`.
807
845
 
@@ -825,8 +863,9 @@ Common controls: `vibe_v5_configure` (configure first) → `vibe_v5_start` (star
825
863
  - **Four sets of Lean prompt corpora**: [`prompt-corpus-v2/formal-verify-v2.md`](prompt-corpus-v2/formal-verify-v2.md) · [`prompt-corpus-v3/formal-verify-v3.md`](prompt-corpus-v3/formal-verify-v3.md) · [`prompt-corpus-v4/formal-verify-v4.md`](prompt-corpus-v4/formal-verify-v4.md) (each covering off / encourage / **require** / fidelity branches / work rounds / receipt contract; the workspace is normalized to `<WS>` and the VibeMath root to `<VIBEMATH>`)
826
864
  - **The persona source text of the four presets**: [`prompt-corpus-persona/persona-corpus.md`](prompt-corpus-persona/persona-corpus.md) (the prompts the main agent actually receives: which tools, which parameters, which slash subcommands; generated by `audit-persona-surface.test.mjs` and shipped with the package)
827
865
  - **Lean formal verification (a contract shared by the four architectures)**: [`docs/formal-verification.md`](docs/formal-verification.md)
828
- - **Test timing baseline and parallel run recipes**: [`docs/test-timing.md`](docs/test-timing.md) (`node tests/run-tests.mjs` runs all suites in parallel in ≈1.9 min; the probe scripts ≈2.6 min; every runner prints its elapsed time/speedup for choosing a strategy next time)
829
- - **Static prompt-surface consistency (persona ↔ tool registry ↔ slash command hint/usage)**: [`audit-persona-surface.test.mjs`](tests/audit-persona-surface.test.mjs) (197 assertions, and generates [`prompt-corpus-persona/persona-corpus.md`](prompt-corpus-persona/persona-corpus.md) for manual review) + [`audit-persona-sensitivity.mjs`](tests/audit-persona-sensitivity.mjs) (11 sensitivity probes) — guarding "every registered tool must appear in the persona / every name in the persona must really be registered / the `prefix` and `text` blocks must match line by line / hint, usage, and the actual branch must agree in all three places"
866
+ - **Final paper (a contract shared by the four architectures)**: [`docs/final-paper.md`](docs/final-paper.md) (the five parameters plus `paperEditor` on v4/v5, the "paper phase before the run is marked complete" ordering, the `Paper/<id>/` artifacts and the nine-section skeleton, LaTeX detection with repair-then-degrade, the v4/v5 team co-authoring flow and the v5 office-consultation rule)
867
+ - **Test timing baseline and parallel run recipes**: [`docs/test-timing.md`](docs/test-timing.md) (`node tests/run-tests.mjs` runs **every suite AND every probe** in parallel: `TOTAL 57` (39 suites + 18 probes/variants) in ≈3.5 min; which 18 of them ship in the package and which are repository-only is in §1.1 of that document; every runner prints its elapsed time/speedup so the next strategy can be chosen from data)
868
+ - **Static prompt-surface consistency (persona ↔ tool registry ↔ slash command hint/usage)**: [`audit-persona-surface.test.mjs`](tests/audit-persona-surface.test.mjs) (208 assertions, and generates [`prompt-corpus-persona/persona-corpus.md`](prompt-corpus-persona/persona-corpus.md) for manual review) + [`audit-persona-sensitivity.mjs`](tests/audit-persona-sensitivity.mjs) (16 sensitivity probes) — guarding "every registered tool must appear in the persona / every name in the persona must really be registered / the `prefix` and `text` blocks must match line by line / hint, usage, and the actual branch must agree in all three places"
830
869
  - **Mandatory checklist for a full review**: [`AUDIT-CHECKLIST.md`](docs/AUDIT-CHECKLIST.md) (this repository's mandatory audit process; §1.9 specifically checks "whether the tool parameter schema can accommodate them")
831
870
  - **Prompt/interaction invariants (all four sets together, re-checkable in one command)**: [`audit-prompt-invariants.mjs`](tests/audit-prompt-invariants.mjs) (157 assertions) — encoding, one by one, "the classes of prompt/tool-surface defects that have really occurred historically" as static invariants (abbreviated tool names, projecting a fidelity defect as 0, `defect` written only in the prompt but not implemented, a receipt contract missing `defect`, passing without a note, wrong field names, the `off` tier still being able to write state in its receipt, uncertain corpora, missing probes, **a tool's closed schema that cannot accommodate the parameters in its own documentation**, **keys that the schema declares at the parameter level but silently drops**). Adding `--self-probe` injects these defect shapes in memory and requires the corresponding invariants to **turn red** while the unmutated control run **stays green** (5/5); the script itself additionally carries six self-checks X5–X8b (the comment scanner must recognize regex literals — including regexes **after a keyword** such as `return /…/` — `//` inside strings must be preserved, stripping comments must not change line structure, and the parse-level criterion that "the four sets of source, with comments stripped, must still parse under `node --check`")
832
871
  - **Specification ↔ code traceability (all four sets together)**: [`audit-spec-traceability.mjs`](tests/audit-spec-traceability.mjs) (94 assertions) — tools promised in `实现方案.md`/README must really be registered; the four Lean parameters must be accepted by both the documentation and the code
@@ -840,16 +879,16 @@ Common controls: `vibe_v5_configure` (configure first) → `vibe_v5_start` (star
840
879
  - **(DSH ≤ 0.1.6, the directory form)** The installer has **versioned auto-update**: on every DSH start it compares the package version against the record in `<presetRoot>/.vibe-math-installed.json` — **as soon as the version changes (or on the first run of an older installation with no record) it replaces the managed files wholesale, regardless of whether they were modified**; replaced hand-edited originals are first backed up to `<presetRoot>/.vibe-math-backup/<old version>/<preset>/` and listed in the log. Within the same version it **rewrites no files at all** (restarting DSH will not rewrite the presets, nor disturb the generation index it records by mtime), and missing files are restored at any time. To force a full reinstall: delete those four preset directories and restart DSH.
841
880
  On DSH ≥ 0.1.7 the installer **writes none of these directories** (the composition rows of the "Installation" section above supply the presets); at startup it only logs that leftover copies can safely be deleted.
842
881
  - **On DSH ≤ 0.1.6 these four directories are owned by the installer**: deleting any file in them or the whole directory only leads to it being restored on the next DSH start (which is exactly why the "force a full reinstall" above works). On DSH ≥ 0.1.7 they are neither read nor written any more, so you can simply delete them; to get rid of them entirely, uninstall this package (`dsh plugin --profile <your profile> remove dsh-vibe-math`).
843
- - A `flat` verdict directly rules `0.5` when the debate is inconsistent (high-confidence disagreement such as 0.9 vs 1 is also misjudged as 0.5 — **v3 has fixed this with the near-consensus rule**); `forced` weights by historical accuracy + confidence.
882
+ - A `flat` verdict takes the **equal-weight mean** of the probabilities the verifiers report when the debate is inconsistent (it is no longer judged `0.5`; the early problem of misjudging a high-confidence disagreement such as 0.9 vs 1 as 0.5 is fixed in v2/v3); `forced` is weighted by historical accuracy + rigor, and accuracy is scored only when the object later receives a boolean verdict.
844
883
  - Problems/propositions with `never` priority are **never scheduled**, and do not block strict termination (they count as voluntarily abstaining).
845
884
  - The four preset files are mutually independent and can coexist; only one preset can be selected in a given session at a time.
846
885
 
847
886
  **v3**:
848
887
  - **Soft specification rather than zero specification**: the md knowledge base only enforces the 4–7 anchor lines at the head of an object (`- ID/类型/状态/概率/优先级/依赖/...`) and the entry title line (`### 解法/证明/证伪 N|标题|概率X|状态Y`), so that the scheduler can index reliably; the body is entirely free paper-style prose, and the scheduler never parses the body. Manually editing the anchors may cause index drift (the scheduler keeps the last valid index and warns).
849
- - **The planning agent is an enhancement, not a requirement**: when `plannerEnabled=false` or the planning agent fails repeatedly (`plannerMaxFails`), it automatically falls back to v2-style heuristic scheduling; the `planMinIntervalMs` cooldown takes effect while subagents are in flight (when the system is idle and there is work, it plans immediately).
888
+ - **The planning agent is an enhancement, not a requirement**: when `plannerEnabled=false` or the planning agent fails repeatedly (`plannerMaxFails`), it automatically falls back to v2-style heuristic scheduling; the `planMinIntervalMs` cooldown applies to **every** planning call — empty plans and "idle but still work" included (idleness no longer bypasses the cooldown, which is exactly what amplified the planner's per-tick spinning).
850
889
  - **Trust tiers in the method library**: a method card's `可信断言` may only link IDs that have entered `Verified/`; all other content of a method entry (including unverified strategies/intuitions/heuristics) is treated as **empirical reference** and must not be cited as a theorem.
851
890
  - **Project lock**: only one session may schedule a given project at a time (starting a second session reports "occupied by session X"); the lock is released automatically on pause/termination/when everything is resolved.
852
- - **Near-consensus verdicts**: when all verifier results fall on the same side and the mean is ≥0.85/≤0.15, the mean is taken (e.g. 0.9 vs 1 → 0.95); otherwise `forced` weighting / `flat` rules 0.5 — this fixes the problem in v2 where conclusions that were "mathematically correct but formally flawed" were misjudged as uncertain.
891
+ - **Near-consensus verdicts**: when all verifier results fall on the same side and the mean is ≥0.85/≤0.15, the mean is taken (e.g. 0.9 vs 1 → 0.95); otherwise `forced` takes the **equal-weight mean** of the votes and `flat` rules `0.5` — this fixes the problem in v2 where conclusions that were "mathematically correct but formally flawed" were misjudged as uncertain.
853
892
 
854
893
  **v5**:
855
894
  - **The framework never assigns tasks**: this is a hard design boundary, not a feature that has yet to be implemented. The creation and allocation of tasks belong to **institute self-governance**
@@ -857,7 +896,7 @@ Common controls: `vibe_v5_configure` (configure first) → `vibe_v5_start` (star
857
896
  - **`≥ m` agreement ≠ mathematically proved**: the quorum only guarantees that "a consistent judgment has been reached within the institute", not that the conclusion is really correct.
858
897
  The depth of truth-seeking rests on the members' own derivations and the paper trail in the debate records; objects that do not reach quorum are **kept in the library with their average probability attached** and are not forcibly ruled true or false.
859
898
  - **The consistency quorum is not "majority rule"**: any single opposing boolean vote blocks a conclusion, and abstention helps neither truth nor falsehood.
860
- To converge more easily, lower `quorumCap` or reduce the number of members with voting rights; for stricter behavior, switch to `quorumMode: "all-unanimous"`.
899
+ Under this rule (`m = min(quorumCap, number of voting members)`) **as soon as anyone casts a Boolean vote, the threshold is effectively "every Boolean vote points the same way"**: lowering `quorumCap` only lowers how many Boolean votes are required (`m`) and does **not** make convergence easier; for stricter behavior, switch to `quorumMode: "all-unanimous"` (which does not even allow abstentions).
861
900
  - **A member whose round never ends will not be forcibly released** (the same boundary as v4): the heartbeat re-arms it every time,
862
901
  so the scheduler will not freeze permanently; when manual intervention is needed, use `vibe_v5_fire` (temp worker) or have the institute office add or remove positions.
863
902
  - **Meetings and verification are strictly mutually exclusive**: while one is in progress, the other queues/is held. Therefore "concluding an object on the spot in a meeting" first queues,
package/README.md CHANGED
@@ -79,7 +79,7 @@ flowchart TB
79
79
  subgraph FW["⚙️ 框架 vibe-v5 —— 只是媒介(middleware),绝不指派任务"]
80
80
  M["消息中继 · 会议/辩论 · 任务板 CAS+DAG<br/>m 票共识验证 · 上下文与活性 · 编制与雇佣 · 调度器"]
81
81
  end
82
- PROJ["💾 State/&lt;研究所&gt;.v5state.json(加固 JSON 权威源)<br/>11 类事件 · 纯折叠 applyV5Event · 串行写 · 恢复=读前必 load"]
82
+ PROJ["💾 State/&lt;研究所&gt;.v5state.json(加固 JSON 权威源)<br/>12 类事件 · 纯折叠 applyV5Event · 串行写 · 恢复=读前必 load"]
83
83
  FS["📁 Members/&lt;id&gt;/* · Shared/* · Verified/ · Problems/"]
84
84
  RULE{{"求真门槛:布尔一致 且 布尔票 ≥ m = min(quorumCap, 在册有表决权人数)"}}
85
85
  OFF <-->|"vibe_v5_* / /v5 命令 ↔ status / report"| M
@@ -402,7 +402,7 @@ dsh plugin --profile <你的 profile> add github:ChongCyrus/Vibe-Mathematics
402
402
  > - **选 `vibe-math-v5`(研究所体系)**,如果你想要:
403
403
  > - **有组织的自组织**——现实研究所那样有**领头人(院士)**负责拆解、分派、定优先级、主持会议、督导进度,但**判断仍归每个人自己**;
404
404
  > - **可增减的编制**——常驻研究员 + 可**自主雇佣/解雇**的临时工(临时工无表决权,适合处理核对、试算、资料整理等杂活);
405
- > - **可调的一致性门槛**——`m = min(quorumCap, 有表决权人数)` 票布尔一致即定论(比"全体一致"更容易收敛,同时**反向票仍然阻塞**,少数派不会被弃权淹没);
405
+ > - **可调的一致性门槛**——`m = min(quorumCap, 有表决权人数)` 票布尔一致即定论(因为反向票阻塞,实际门槛仍是"全部布尔票同向";只有投出布尔票的人少于 `m` 时才不同);
406
406
  > - **零 token 成本的状态持久化**——研究所状态写在研究所目录下的加固 JSON 里,不占成员上下文预算。
407
407
  >
408
408
  > **⚠️ `vibe-math-v2` 与 `vibe-math-v3` 是经典架构;`vibe-math-v4`、`vibe-math-v5` 是实验性架构,** 四者同级、均可选择;老 `vibe-math-v1` 已被移除(本包仅含 v2/v3/v4/v5)。
@@ -652,11 +652,11 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
652
652
  **Step 3 — 问答式调参(可选)**
653
653
 
654
654
  ```
655
- 我想让它用加权投票,并发数设成 6。
655
+ 我想让它用强制裁决模式(forced)跑,并发数设成 6。
656
656
  ```
657
657
 
658
- 主代理 `vibe_math_set_params {"verdictMode":"weighted-vote","maxParallelThreshold":6}`,
659
- 并问你是否 `vibe_math_save_settings` 保存。
658
+ 主代理 `vibe_math_set_params {"verdictMode":"forced","maxParallelThreshold":6}`,
659
+ 并问你是否 `vibe_math_save_settings` 保存。(`verdictMode` 只接受 `flat|forced`;写其它值**不报错**,会被静默回退成该架构的默认值——v2 是 `flat`、v3 是 `forced`。)
660
660
 
661
661
  **Step 4 — 中途干预(可选)**
662
662
 
@@ -705,7 +705,7 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
705
705
  | `directionsPerSolver` | 1 | 每个 solver 提示词可见的方向总数(1 = 只看自己方向、互不干扰;N>1 = 自己 + 最多 N-1 个其他活跃方向摘要) |
706
706
  | `verifierCount` | 3 | 每个验证对象的独立验证器数量 |
707
707
  | `debateMaxRounds` | 5 | 验证辩论(交流群)最大轮数 |
708
- | `verdictMode` | `flat` | `flat` = 均衡机制(不一致判 0.5)/ `forced` = 强制裁决(历史准确率+严谨性加权) |
708
+ | `verdictMode` | `flat` | `flat` = 取各验证者报告概率的**等权平均**(不一致时不再一律判 0.5)/ `forced` = 强制裁决(按历史准确率+严谨性加权;准确率按模型追踪,且只在对象此后获得布尔裁决时计分) |
709
709
  | `reportMode` | `file` | `file` = 写报告文件 / `push` = 推送主代理汇报 / `both` |
710
710
  | `promoteValueThreshold` | 0.7 | Propos 中「价值/关键性」≥ 该值且未决(0,1) 的命题自动加入 qs.json |
711
711
  | `priorityAdjust` | `none` | `none` / `deadend-deprioritize`(全死路降优先级)/ `survival-map`(按存活率重算) |
@@ -726,6 +726,15 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
726
726
  | `leanCommand` | `'lean'` | 要执行的 Lean 可执行文件(例:`'lake'`) |
727
727
  | `leanArgs` | `[]` | 插在文件名之前的附加参数(例:`['env','lean']` 配合 `leanCommand='lake'`) |
728
728
  | `leanTimeoutMs` | `120000` | 单次 Lean 运行的上限(毫秒) |
729
+ | `finalPaper` | `true` | **最终论文**:收口时自动撰写(`false` 只关自动触发,手动命令仍可用)。完整契约见 `docs/final-paper.md` |
730
+ | `paperFormat` | `both` | 论文产出格式:`both`(md+tex)/ `md`(跳过编译,且不报"缺 tex")/ `tex` |
731
+ | `paperLanguage` | `zh` | 论文语言:`zh`(ctexart,引擎优先 xelatex)/ `en`(article,pdflatex 优先) |
732
+ | `paperCompilePdf` | `true` | 检测到 LaTeX 时编译 `paper.pdf`;无引擎或编译失败则保留 tex+md 并记日志告警 |
733
+ | `paperLatexCommand` | `''` | 指定 LaTeX 引擎可执行文件(空 = 按语言自动探测 xelatex→latexmk→pdflatex→lualatex→tectonic) |
734
+
735
+ #### 最终论文(final paper)
736
+
737
+ 四个预设都**默认开启**:收口判定命中后、**在 run 被标记完成之前**进入 paper 阶段。v2 由一名专职「论文撰写」子代理把已定论证据整理成 `Paper/<项目>/{paper.md,paper.tex,paper.meta.json,paper.log.md}`(检测到引擎时才有 `paper.pdf`)。手动:`/vibe paper [lang=zh|en] [format=both|md|tex] [force]`。PDF 需要宿主上有 LaTeX 引擎(中文优先 `xelatex`);没有引擎或编译失败时 tex+md 照常交付,只记日志告警——不阻塞定稿、不覆盖已有 pdf。完整契约见 `docs/final-paper.md`。
729
738
 
730
739
  ### v3(论文式 md + 规划代理 + 方法库)默认值
731
740
 
@@ -733,12 +742,12 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
733
742
 
734
743
  | 参数 | 默认 | 说明 |
735
744
  |---|---|---|
736
- | `verdictMode` | `forced` | v3 先做**近共识判定**(全部结果同侧且均值 ≥0.85/≤0.15 取均值),否则 `forced`=按历史准确率+严谨性加权 / `flat`=均衡(0.5)。修复了 v2 flat 把"0.9 vs 1"误判成 0.5 的问题 |
745
+ | `verdictMode` | `forced` | v3 先做**近共识判定**(全部结果同侧且均值 ≥0.85/≤0.15 取均值)——这一步先于模式生效,所以 0.9 vs 1 在两种模式下都得到 ≈0.95;否则 `forced` 取各验证者概率的**等权平均**(不再按准确率加权;严格的 1/0 仍以绝对票生效),`flat` 则判 `0.5`(不一致即不确定) |
737
746
  | `planningHorizon` | 3 | 规划代理一次计划的最多动作数("接下来 n 次") |
738
747
  | `plannerEnabled` | true | false = 完全走内置启发式调度(规划代理禁用) |
739
748
  | `plannerProvider` / `plannerModel` | 空 | 规划代理模型路由(空 = 继承根代理) |
740
749
  | `plannerPersona` | 空 | 注入规划代理提示词开头的人格/要求 |
741
- | `planMinIntervalMs` | 30000 | 两次规划调用的最小间隔(毫秒);系统空闲且有工作时忽略 |
750
+ | `planMinIntervalMs` | 30000 | 两次规划调用的最小间隔(毫秒);对**每一次**规划调用都生效(含空计划、含"空闲但仍有工作",不再有空闲绕过) |
742
751
  | `plannerMaxFails` | 3 | 规划代理连续失败达此值 → 自动降级启发式 |
743
752
  | `methodKeepIntervalMs` | 0 | Method Keeper 定时整理间隔(0 = 事件驱动) |
744
753
  | `methodKeepEvery` | 5 | 每积累 N 个待沉淀发明/新命题触发一次整理 |
@@ -750,6 +759,15 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
750
759
  | `leanCommand` | `'lean'` | 要执行的 Lean 可执行文件(例:`'lake'`) |
751
760
  | `leanArgs` | `[]` | 插在文件名之前的附加参数(例:`['env','lean']` 配合 `leanCommand='lake'`) |
752
761
  | `leanTimeoutMs` | `120000` | 单次 Lean 运行的上限(毫秒) |
762
+ | `finalPaper` | `true` | **最终论文**:收口时自动撰写(`false` 只关自动触发,手动命令仍可用)。完整契约见 `docs/final-paper.md` |
763
+ | `paperFormat` | `both` | 论文产出格式:`both`(md+tex)/ `md`(跳过编译,且不报"缺 tex")/ `tex` |
764
+ | `paperLanguage` | `zh` | 论文语言:`zh`(ctexart,引擎优先 xelatex)/ `en`(article,pdflatex 优先) |
765
+ | `paperCompilePdf` | `true` | 检测到 LaTeX 时编译 `paper.pdf`;无引擎或编译失败则保留 tex+md 并记日志告警 |
766
+ | `paperLatexCommand` | `''` | 指定 LaTeX 引擎可执行文件(空 = 按语言自动探测 xelatex→latexmk→pdflatex→lualatex→tectonic) |
767
+
768
+ #### 最终论文(final paper)
769
+
770
+ v3 与 v2 同一开关、同一时序(严格收口;**在调度器停止之前**派遣撰写者):专职「论文撰写」子代理产出 `Paper/<项目>/{paper.md,paper.tex,paper.meta.json,paper.log.md}`(检测到引擎时才有 `paper.pdf`)。手动:`/vibe paper [lang=zh|en] [format=both|md|tex] [force]`。无引擎或编译失败仍交付 tex+md、记警告、不阻塞定稿。完整契约见 `docs/final-paper.md`。
753
771
 
754
772
  ### v4(常驻自组织 · 实验)默认值
755
773
 
@@ -772,6 +790,16 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
772
790
  | `leanCommand` | `'lean'` | 要执行的 Lean 可执行文件(例:`'lake'`) |
773
791
  | `leanArgs` | `[]` | 插在文件名之前的附加参数(例:`['env','lean']` 配合 `leanCommand='lake'`) |
774
792
  | `leanTimeoutMs` | `120000` | 单次 Lean 运行的上限(毫秒) |
793
+ | `finalPaper` | `true` | **最终论文**:收口时自动撰写(`false` 只关自动触发,手动命令仍可用)。完整契约见 `docs/final-paper.md` |
794
+ | `paperFormat` | `both` | 论文产出格式:`both`(md+tex)/ `md`(跳过编译,且不报"缺 tex")/ `tex` |
795
+ | `paperLanguage` | `zh` | 论文语言:`zh`(ctexart,引擎优先 xelatex)/ `en`(article,pdflatex 优先) |
796
+ | `paperCompilePdf` | `true` | 检测到 LaTeX 时编译 `paper.pdf`;无引擎或编译失败则保留 tex+md 并记日志告警 |
797
+ | `paperLatexCommand` | `''` | 指定 LaTeX 引擎可执行文件(空 = 按语言自动探测 xelatex→latexmk→pdflatex→lualatex→tectonic) |
798
+ | `paperEditor` | `office` | 定稿代表:`office`(会话根/人类侧,默认)或 `resident:<id>`(该 resident 已离职则降级 office 并在 meta/log 记明) |
799
+
800
+ #### 最终论文(final paper)
801
+
802
+ 默认开启;v4 在一致性会议投出「一致停止」票后、**标记完成之前**进入 paper 阶段。团队流程:各 resident 写自己库里的部分 → 合并(去重、统一术语与记号)→ 至少一轮**交叉互审** → 定稿代表按 `paperEditor`(默认 `office`,或 `resident:<id>`)梳理成最终稿 → **全体明确"可交付"**才定稿(有反对则继续迭代,超轮次上限记警告并把分歧写进附录)。手动:`/v4 paper [lang=] [format=] [editor=office|resident:<id>] [force]`。产物 `Paper/<run id>/{paper.md,paper.tex,paper.meta.json,paper.log.md}`(引擎可用时另有 `paper.pdf`)。完整契约见 `docs/final-paper.md`。
775
803
 
776
804
  ### v5(研究所体系 · 实验)默认值
777
805
 
@@ -803,6 +831,16 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
803
831
  | `leanCommand` | `'lean'` | 要执行的 Lean 可执行文件(例:`'lake'`) |
804
832
  | `leanArgs` | `[]` | 插在文件名之前的附加参数(例:`['env','lean']` 配合 `leanCommand='lake'`) |
805
833
  | `leanTimeoutMs` | `120000` | 单次 Lean 运行的上限(毫秒) |
834
+ | `finalPaper` | `true` | **最终论文**:收口时自动撰写(`false` 只关自动触发,手动命令仍可用)。完整契约见 `docs/final-paper.md` |
835
+ | `paperFormat` | `both` | 论文产出格式:`both`(md+tex)/ `md`(跳过编译,且不报"缺 tex")/ `tex` |
836
+ | `paperLanguage` | `zh` | 论文语言:`zh`(ctexart,引擎优先 xelatex)/ `en`(article,pdflatex 优先) |
837
+ | `paperCompilePdf` | `true` | 检测到 LaTeX 时编译 `paper.pdf`;无引擎或编译失败则保留 tex+md 并记日志告警 |
838
+ | `paperLatexCommand` | `''` | 指定 LaTeX 引擎可执行文件(空 = 按语言自动探测 xelatex→latexmk→pdflatex→lualatex→tectonic) |
839
+ | `paperEditor` | `academician` | 定稿代表:`academician`(默认,无人值守也能完成)或 `office`(仅手动 `/v5 paper editor=office`,须先与全所交流 + 开会) |
840
+
841
+ #### 最终论文(final paper)
842
+
843
+ 默认开启;v5 在 `checkSolved` 判定「已解决」后、**标记完成之前**进入 paper 阶段。常驻研究员与院士各自写、合并、交叉互审,定稿代表由 `paperEditor` 决定:**自动流程固定用 `academician`**(所办是根会话,没有唤醒路径);`office` 只能通过手动 `/v5 paper editor=office` 选择,此时**所办必须先与全所交流、商讨、优化、审查**(≥1 条 `vibe_v5_message` + ≥1 次 `vibe_v5_meeting`),把结论写进定稿说明,再调用 `vibe_v5_finalize_paper`;缺一即被拒(`V5_PAPER_CONSULT_REQUIRED`)。工具入口:`vibe_v5_paper`、`vibe_v5_finalize_paper`。产物 `Paper/<研究所 id>/{paper.md,paper.tex,paper.meta.json,paper.log.md}`(引擎可用时另有 `paper.pdf`)。完整契约见 `docs/final-paper.md`。
806
844
 
807
845
  常用控制:`vibe_v5_configure`(先配置)→ `vibe_v5_start`(开工)→ `vibe_v5_report` / `vibe_v5_status`;`vibe_v5_message` / `vibe_v5_meeting` / `vibe_v5_members` / `vibe_v5_hire` / `vibe_v5_fire`(临时工)/ `vibe_v5_add_researcher` / `vibe_v5_remove_researcher`(增删常驻,仅所办)/ `vibe_v5_pause` / `vibe_v5_resume` / `vibe_v5_stop`;斜杠命令 `/v5`。
808
846
 
@@ -826,8 +864,9 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
826
864
  - **四套 Lean 提示词语料**:[`prompt-corpus-v2/formal-verify-v2.md`](prompt-corpus-v2/formal-verify-v2.md) · [`prompt-corpus-v3/formal-verify-v3.md`](prompt-corpus-v3/formal-verify-v3.md) · [`prompt-corpus-v4/formal-verify-v4.md`](prompt-corpus-v4/formal-verify-v4.md)(各自覆盖 off / encourage / **require** / 忠实性分支 / 工作轮 / 回执契约;工作区归一化为 `<WS>`、VibeMath 根为 `<VIBEMATH>`)
827
865
  - **四个预设的 persona 原文**:[`prompt-corpus-persona/persona-corpus.md`](prompt-corpus-persona/persona-corpus.md)(主代理实际收到的提示词:有哪些工具、哪些参数、哪些斜杠子命令;由 `audit-persona-surface.test.mjs` 生成,随包发布)
828
866
  - **Lean 形式化验证(四架构共用契约)**:[`docs/formal-verification.md`](docs/formal-verification.md)
829
- - **测试耗时基线与并行跑法**:[`docs/test-timing.md`](docs/test-timing.md)(`node tests/run-tests.mjs` 并行跑全部套件 ≈1.9 min;探针脚本 ≈2.6 min;每个 runner 都会打印耗时/加速比供下次选策略)
830
- - **静态提示词面一致性(persona ↔ 工具注册表 ↔ 斜杠命令 hint/usage)**:[`audit-persona-surface.test.mjs`](tests/audit-persona-surface.test.mjs)(197 条断言,并生成 [`prompt-corpus-persona/persona-corpus.md`](prompt-corpus-persona/persona-corpus.md) 供人工复核)+ [`audit-persona-sensitivity.mjs`](tests/audit-persona-sensitivity.mjs)(11 条灵敏度探针)——守"注册的工具必须在 persona 里出现 / persona 里的名字必须真的注册 / `prefix` 与 `text` 两块逐行一致 / hint、usage、实际分支三处必须一致"
867
+ - **最终论文(四架构共用契约)**:[`docs/final-paper.md`](docs/final-paper.md)(五个参数与 v4/v5 的 `paperEditor`、收口顺序"先论文后完成"、`Paper/<id>/` 产物与 9 节骨架、LaTeX 检测顺序与"先修复后降级"、v4/v5 团队合写流程与 v5 所办咨询规则)
868
+ - **测试耗时基线与并行跑法**:[`docs/test-timing.md`](docs/test-timing.md)(`node tests/run-tests.mjs` 并行跑**全部套件 + 全部探针**:`TOTAL 57`(39 套件 + 18 探针/变体)≈3.5 min;哪 18 项随包发布、哪些仅仓库见该文档 §1.1;每个 runner 都会打印耗时/加速比供下次选策略)
869
+ - **静态提示词面一致性(persona ↔ 工具注册表 ↔ 斜杠命令 hint/usage)**:[`audit-persona-surface.test.mjs`](tests/audit-persona-surface.test.mjs)(208 条断言,并生成 [`prompt-corpus-persona/persona-corpus.md`](prompt-corpus-persona/persona-corpus.md) 供人工复核)+ [`audit-persona-sensitivity.mjs`](tests/audit-persona-sensitivity.mjs)(16 条灵敏度探针)——守"注册的工具必须在 persona 里出现 / persona 里的名字必须真的注册 / `prefix` 与 `text` 两块逐行一致 / hint、usage、实际分支三处必须一致"
831
870
  - **全面检查必查清单**:[`AUDIT-CHECKLIST.md`](docs/AUDIT-CHECKLIST.md)(本仓库的强制审计流程;§1.9 专门查"工具参数 schema 收不收得下")
832
871
  - **提示词/交互不变式(四套一起,可一键复核)**:[`audit-prompt-invariants.mjs`](tests/audit-prompt-invariants.mjs)(157 条断言)——把"历史上真实发生过的提示词/工具面缺陷类别"逐条编码成静态不变式(缩写工具名、把忠实性缺陷投成 0、`defect` 只写在提示词里没实现、回执契约缺 `defect`、无 note 放行、字段名错、`off` 档回执仍能写状态、语料不确定、探针缺失、**工具的封闭 schema 收不下它自己文档里的参数**、**schema 声明了参数层却静默丢弃的键**)。加 `--self-probe` 会在内存里注入这些缺陷形状,要求对应不变式**变红**、未变异的对照跑**仍为绿**(5/5);脚本自身另带 X5–X8b 六条自检(注释扫描器必须认正则字面量——包括 `return /…/ ` 这种**关键字后面**的正则——字符串里的 `//` 必须保留、抹注释不改变行结构,以及"四套源码抹掉注释后仍必须能被 `node --check` 解析"这条解析级判据)
833
872
  - **规格 ↔ 代码可追溯(四套一起)**:[`audit-spec-traceability.mjs`](tests/audit-spec-traceability.mjs)(94 条断言)——`实现方案.md`/README 里承诺的工具必须真的注册;四个 Lean 参数必须同时被文档与代码接受
@@ -841,16 +880,16 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
841
880
  - **(DSH ≤ 0.1.6 的目录形式)** 安装器带**版本化自动更新**:每次 DSH 启动时对比包版本与 `<presetRoot>/.vibe-math-installed.json` 记录——**版本一变(或无记录的老安装首次运行)就整体替换受管文件,不看它是否被改过**;被替换的手改原文先备份到 `<presetRoot>/.vibe-math-backup/<旧版本>/<preset>/` 并在日志里列出。同一个版本内**不重写任何文件**(重启 DSH 不会改写 preset、也不会扰动它按 mtime 记的生成代际),缺失文件随时补回。想强制全量重装:删除那四个 preset 目录后重启 DSH。
842
881
  在 DSH ≥ 0.1.7 上安装器**不写这些目录**(预设由上文「安装」里的组合行提供),启动时只会提示旧副本可安全删除。
843
882
  - **在 DSH ≤ 0.1.6 上,这四个目录由安装器负责**:删掉其中任一文件或整个目录,只会在下次启动 DSH 时被补回(这正是上面"强制全量重装"可行的原因)。在 DSH ≥ 0.1.7 上它们不再被读取、也不再被写入,直接删掉即可;想彻底不要本包的预设,就卸载本包(`dsh plugin --profile <你的 profile> remove dsh-vibe-math`)。
844
- - `flat` 裁决在辩论不一致时直接判 `0.5`(高置信分歧如 0.9 vs 1 也会被误判 0.5——**v3 已用近共识规则修复**);`forced` 按历史准确率+置信度加权。
883
+ - `flat` 裁决在辩论不一致时取各验证者概率的**等权平均**(不再直接判 `0.5`;早期把高置信分歧 0.9 vs 1 误判为 0.5 的问题已在 v2/v3 修复);`forced` 按历史准确率+严谨性加权,且准确率只在对象此后获得布尔裁决时计分。
845
884
  - `never` 优先级的问题/命题**永不调度**,且不阻塞严格终止(视为主动弃权)。
846
885
  - 四个 preset 文件互相独立、可共存;同一会话同时只能选一个预设。
847
886
 
848
887
  **v3**:
849
888
  - **软规范而非零规范**:md 知识库只强制对象头部的 4~7 行锚点(`- ID/类型/状态/概率/优先级/依赖/...`)与条目标题行(`### 解法/证明/证伪 N|标题|概率X|状态Y`),供调度器可靠索引;正文完全自由论文式叙述,调度器从不解析正文。手工编辑锚点可能导致索引漂移(调度器会保留上次有效索引并告警)。
850
- - **规划代理是增强而非必需**:`plannerEnabled=false` 或规划代理连续失败(`plannerMaxFails`)时自动回退 v2 式启发式调度;`planMinIntervalMs` 冷却在有在途子代理时生效(系统空闲时有工作则立即规划)。
889
+ - **规划代理是增强而非必需**:`plannerEnabled=false` 或规划代理连续失败(`plannerMaxFails`)时自动回退 v2 式启发式调度;`planMinIntervalMs` 冷却对**每一次**规划调用生效——包括空计划和"空闲但仍有工作"的情形(空闲不再绕过冷却,那正是规划代理每 tick 空转的放大器)。
851
890
  - **方法库可信分层**:方法卡的 `可信断言` 只允许链接已进 `Verified/` 的 ID;方法条目的其余内容(含未验证的策略/直觉/启发式)一律视为**经验参考**,不得当定理引用。
852
891
  - **项目锁**:同一项目同一时刻只允许一个会话调度(第二个会话启动会提示"被会话 X 占用");锁在暂停/终止/全部解决时自动释放。
853
- - **近共识裁决**:全部验证器结果同侧且均值 ≥0.85/≤0.15 时取均值(如 0.9 vs 1 → 0.95),否则 `forced` 加权 / `flat` 判 0.5——修复了 v2 中"数学上正确但形式有瑕疵"的结论被误判为不确定的问题。
892
+ - **近共识裁决**:全部验证器结果同侧且均值 ≥0.85/≤0.15 时取均值(如 0.9 vs 1 → 0.95),否则 `forced` 取各票的**等权平均**、`flat` 判 `0.5`——修复了 v2 中"数学上正确但形式有瑕疵"的结论被误判为不确定的问题。
854
893
 
855
894
  **v5**:
856
895
  - **框架绝不指派任务**:这是设计上的硬边界,不是尚未实现的功能。任务的产生与分配属于**所内自治**
@@ -858,7 +897,8 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
858
897
  - **`≥ m` 一致 ≠ 数学上已证明**:门槛只保证"所内达成了一致判断",不保证结论真的正确。
859
898
  求真的纵深靠成员自己的推导与辩论录留痕;未达门槛的对象会**留库附平均概率**,不会被强行判真判假。
860
899
  - **一致性门槛不是"少数服从多数"**:任何一张反向布尔票都阻塞定论,弃权既不帮真也不帮假。
861
- 要更容易收敛就调低 `quorumCap` 或减少有表决权人数;要更严格可切 `quorumMode: "all-unanimous"`。
900
+ 因此在本口径下(`m = min(quorumCap, 有表决权人数)`)**只要有人投布尔票,门槛就等于"全部布尔票同向"**:
901
+ 调低 `quorumCap` 只是把"至少几张布尔票"降到 `m`,**不会让收敛更容易**;要更严格可切 `quorumMode: "all-unanimous"`(它连弃权都不允许)。
862
902
  - **一个回合永不结束的成员不会被强行释放**(与 v4 同一边界):心跳每次都会重新武装,
863
903
  所以调度器不会永久冻结;需要人工介入时用 `vibe_v5_fire`(临时工)或所办增删编制。
864
904
  - **会议与验证严格互斥**:一方进行中,另一方排队/暂存。因此"在会议上当场定论一个对象"会先排队,
package/cordis.patch.yml CHANGED
@@ -70,7 +70,7 @@
70
70
  - vibe_math_status / vibe_math_report — read scheduler status / full progress report (report also writes Progress_Logs/report.json).
71
71
  - vibe_math_pause / vibe_math_abort — pause / abort (abort interrupts all children).
72
72
  - vibe_math_set_mode {mode: manual|auto} — switch manual / auto control.
73
- - vibe_math_set_params {...} — tune any parameter (see vibe_math_setup for the full schema; e.g. reportMode file|push|both, promoteValueThreshold, verdictMode flat|forced, formalVerify off|encourage|require).
73
+ - vibe_math_set_params {...} — tune any parameter (see vibe_math_setup for the full schema; e.g. reportMode file|push|both, promoteValueThreshold, verdictMode flat|forced, formalVerify off|encourage|require, finalPaper true|false, paperFormat both|md|tex, paperLanguage zh|en, paperCompilePdf true|false, paperLatexCommand <engine>).
74
74
  - vibe_math_setup / vibe_math_save_settings / vibe_math_template — guided configuration / persist defaults / generate template.
75
75
  - vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
76
76
  - vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
@@ -79,13 +79,21 @@
79
79
  verification (execute / archive / list the reuse library). The scheduler's child agents
80
80
  use them too; they work in every mode.
81
81
 
82
- A /vibe slash command mirrors the main controls. Data lives under {{cwd}}/VibeMath/Projects/<project>/
82
+ Final paper: strict termination writes Paper/<project>/{paper.md,paper.tex,paper.pdf,paper.meta.json,paper.log.md}
83
+ automatically — a dedicated paper-writing child assembles the solved material (finalPaper=false disables only that
84
+ automatic run). /vibe paper [lang=zh|en] [format=both|md|tex] [force] writes or rewrites it by hand. md/tex follow
85
+ paperFormat; a PDF is produced only when a LaTeX engine is detected and paperCompilePdf is true.
86
+ A /vibe slash command mirrors the main controls (/vibe start|resume|pause|abort|status|report|mode <auto|manual>|setup|save|template [global|project]|add <id> <desc>|add-proposition <id> <概述>|list-propositions|project [list|new <name>|<name>]|decisions|agents|paper [lang=zh|en] [format=both|md|tex] [force]).
87
+ Data lives under {{cwd}}/VibeMath/Projects/<project>/
83
88
  (qs/qs.json, Propos/<分类>_Propos.json, Reliable/, Verified/, Verification_logs/, Progress_Logs/, VibeMath_State/)
84
89
  and survives restarts via vibe_math_resume.
85
90
 
86
91
  Key rules to remember when reporting: a problem is "solved" when one of its solutions reaches
87
92
  正确概率 = 1; a proposition reaches 布尔估计 = 1/0 when a proof/refutation in its lists reaches
88
93
  正确概率 = 1; Propos propositions with 价值/关键性 ≥ promoteValueThreshold auto-promote to qs.json.
94
+ Closure rule (identical across the presets): the 1/0 values above are written ONLY by the scheduler,
95
+ after ≥2 independent verifier agents settle the object (one lone reviewer can never conclude), and
96
+ Verified/ is written by that same scheduler path — an agent's own self-reported 1 is never a conclusion.
89
97
  When the user asks about progress, call vibe_math_report and summarize in plain language.
90
98
 
91
99
  Configuration highlights (all tunable via vibe_math_set_params / the settings file):
@@ -329,7 +337,8 @@
329
337
  - vibe_math_add_problem {id, description, priority, dependencies?} — add a problem (creates Problems/<id>.md).
330
338
  - vibe_math_add_proposition {id, 概述, 概率, 优先级, 价值/关键性, 分类} — add a proposition (Propos/<分类>/<id>.md).
331
339
  - vibe_math_list_propositions — list the proposition knowledge base.
332
- - vibe_math_start / vibe_math_resume — start / resume the scheduler (resume = continue after checkpoint/restart).
340
+ - vibe_math_start / vibe_math_resume — start / resume the scheduler (resume = continue after checkpoint/restart);
341
+ both accept override=true to take the project lock over from another session (only after you verified that session is gone).
333
342
  - vibe_math_status / vibe_math_report — read status / full progress report (report writes Progress_Logs/report.json + Logs/报告.md).
334
343
  - vibe_math_pause / vibe_math_abort — pause / abort.
335
344
  - vibe_math_set_mode {mode: manual|auto} — switch manual / auto (manual gates: 计划审批 / 裁决 / 方法晋升).
@@ -337,12 +346,16 @@
337
346
  plannerEnabled/plannerProvider/plannerModel/plannerPersona, planMinIntervalMs, plannerMaxFails,
338
347
  methodKeepIntervalMs/methodKeepEvery, methodAutoPromote, indexAutoRebuild, projectLockTimeoutMs,
339
348
  formalVerify/leanCommand/leanArgs/leanTimeoutMs — Lean 形式化验证(off = 默认不额外要求,
340
- encourage = 按实现难度自行形式化、Lean 通过后审查对象变为忠实性,require = 同上并加结论门禁)).
349
+ encourage = 按实现难度自行形式化、Lean 通过后审查对象变为忠实性,require = 同上并加结论门禁),
350
+ finalPaper/paperFormat/paperLanguage/paperCompilePdf/paperLatexCommand — 最终论文(收口时自动派遣
351
+ 「论文撰写」子代理,把已收口的解法/命题/成果整理成 Paper/<project>/;finalPaper=false 只关自动触发,
352
+ /vibe paper 仍可手动触发)。
341
353
  - vibe_math_setup / vibe_math_save_settings / vibe_math_template — guided configuration / persist defaults / generate template.
342
354
  - vibe_math_plan {force?} — show queued plan / last plan, or force a planning round.
343
355
  - vibe_math_index — rebuild State/index.json from the Markdown knowledge base.
344
356
  - vibe_math_method_add / vibe_math_method_list — manually add / list method cards (Methods/ + global).
345
- - vibe_math_lock_status — project lock occupancy.
357
+ - 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).
358
+ 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.
346
359
  - vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
347
360
  - vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
348
361
  - vibe_math_list_agents / vibe_math_message_agent / vibe_math_interrupt_agent — inspect / steer / interrupt subagents.
@@ -350,14 +363,20 @@
350
363
  verification (execute / archive / list the reuse library). The scheduler's child agents
351
364
  use them too; they work in every mode.
352
365
 
353
- A /vibe slash command mirrors the main controls (/vibe start|resume|pause|abort|status|report|mode
354
- <auto|manual>|setup|save|add <id> <desc>|add-proposition <id> <概述>|list-propositions|methods|index|plan|lock|...).
366
+ A /vibe slash command mirrors the main controls (/vibe start [override]|resume [override]|pause|abort|status|report|mode
367
+ <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]).
355
368
  Data survives restarts via vibe_math_resume.
356
369
 
357
370
  Key rules when reporting: a problem is "solved" when one of its 解法候选 entries reaches 概率 = 1
358
371
  (the scheduler writes Verified/问题/<id>.md); a proposition reaches 已验证·真/假 when a 证明/证伪
359
- entry reaches 概率 = 1 (Verified/命题/<id>.md); Propos propositions with 价值/关键性 ≥
360
- promoteValueThreshold auto-promote into Problems/ as "判断下述命题是否成立:<命题>" (verification
372
+ entry reaches 概率 = 1 (Verified/命题/<id>.md).
373
+ Closure rule (identical across the presets): those 概率 = 1 values are written ONLY by the scheduler,
374
+ after ≥2 independent verifier agents settle the object (a lone reviewer can never conclude; see
375
+ minVotes), and Verified/ is written by that same scheduler path — a self-reported 1 is never a
376
+ conclusion. Propos propositions whose 价值/关键性 ≥
377
+ promoteValueThreshold (write that anchor on the proposition card, or report it as lemmas[].价值/关键性 in
378
+ vibe_math_sync_meta — default 0.5 never promotes) and that are still undecided
379
+ auto-promote into Problems/ as "判断下述命题是否成立:<命题>" (verification
361
380
  results sync back to the source proposition); a solver-reported sub-question q_sub registers THREE
362
381
  objects (q_sub problem + judge problem + p-tmp temporary-assumption proposition) with full 来源与动机.
363
382
 
@@ -616,7 +635,7 @@
616
635
  Main controls (recommended flow: configure FIRST, then start):
617
636
  - vibe_v4_configure {project?, problem?, params?} — create/configure the project (name, problem, params) WITHOUT starting a run; set everything here first.
618
637
  - vibe_v4_start {problem?, residentCount?, seedDirections?} — begin the run (spawn residents, brainstorm). If problem was configured, omit it.
619
- - 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.
638
+ - vibe_v4_set {residentCount, compactThreshold, compactAfterRounds, meetingKeepEvery, maxParallel, activityTimeoutMs, stallAutoMeetingMs, verdictMaxRounds, provider, model, residentPersona, toolAllow, toolDeny, formalVerify, leanCommand, leanArgs, leanTimeoutMs, 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. 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.
620
639
  - vibe_v4_resume / vibe_v4_pause / vibe_v4_abort / vibe_v4_status / vibe_v4_report.
621
640
  - vibe_v4_message {to|all, content} — inject a message to a resident (human/assistant intervention).
622
641
  - vibe_v4_meeting {agenda} — force a meeting.
@@ -626,14 +645,28 @@
626
645
  (execute / archive / list the reuse library). Residents use them too; they work in every mode.
627
646
  - vibe_v4_formal_report — human-readable Lean formal-verification mirror (mode, Lean-passed
628
647
  objects, recorded blockers, formalization TODO, library paths).
629
- - 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).
630
- A /v4 slash command mirrors the main controls (configure|start|resume|pause|abort|status|report|message <to|all> <content>|meeting|members|add|remove|set).
648
+ - 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).
649
+ 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>...).
650
+ Final paper: after the unanimous stop vote the run enters a PAPER phase — every resident writes their part, each
651
+ cross-reviews at least one other part, and the paperEditor finalises (office = the human/assistant side, or one named
652
+ resident); only then is the run marked complete. finalPaper=false skips the phase; /v4 paper [lang=zh|en]
653
+ [format=md|tex|both] [editor=office|resident:<id>] [force] starts or re-runs it by hand.
631
654
 
632
655
  TRUST RULE: only Verified/ (and Propos/ entries marked 已验证·真/假) are absolutely
633
656
  trustworthy; everything else — unverified resident claims, Progress/, Method claims —
634
657
  is experiential reference. A proposition / method / theory only reaches Verified/ when
635
658
  ALL residents unanimously agree true (or all agree false); otherwise it stays in its
636
- library with a probability estimate.
659
+ library with a probability estimate. Closure rule (identical across the presets): the framework
660
+ writes the Verified/ card — a resident's own claim never does — and what counts as a vote is
661
+ stated once in the VOTE CONTRACT below.
662
+
663
+ VOTE CONTRACT: a verification vote is a probability of truth in [0,1], but only an EXACT
664
+ 1 (absolutely true) and an EXACT 0 (absolutely false) count as a vote. Anything strictly
665
+ between (0.9, 0.95, 0.5 …) is an ABSTENTION carrying that probability estimate: the run
666
+ does NOT conclude, and the group's MEAN probability is written back to the object's card
667
+ so it stays in its library with a probability. The same absoluteness applies to the
668
+ meeting stop-vote: every resident on the roster must answer `voteSolved:true` — one
669
+ abstention keeps the run alive.
637
670
 
638
671
  LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
639
672
  - 'off' (default, no extra requirement) | 'encourage' (the residents decide by implementation
@@ -912,23 +945,27 @@
912
945
  Shared/TaskBoard.md (human view), Shared/Chat/<day>.md,
913
946
  Shared/Meetings/<id>.md, Shared/Debates/<target>.md,
914
947
  Problems/<id>.md, Verified/<kind>/<id>.md (read-only; m-vote only),
915
- State/ (a human-readable MIRROR only — the authoritative state is the
916
- session log projection; never hand-edit State/).
948
+ State/ (the AUTHORITATIVE state is State/<institute>.v5state.json in this
949
+ directory; it is a hardened JSON file, never a host session log. Everything
950
+ else here and elsewhere in the tree is a human-readable MIRROR — never
951
+ hand-edit any of it).
917
952
 
918
953
  Main controls (recommended flow: configure FIRST, then start):
919
954
  - vibe_v5_configure {project?, institute?, problem?, params?} — create/configure the institute WITHOUT starting it.
920
955
  - vibe_v5_start {problem?, researcherCount?, academician?, seedDirections?} — found the institute (academician + researchers) and begin.
921
- - vibe_v5_set {…} — tune params (persisted). provider/model override staff LLM routes (empty = inherit YOUR route); toolAllow/toolDeny restrict staff tools.
956
+ - 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.
922
957
  - vibe_v5_pause / vibe_v5_resume / vibe_v5_stop / vibe_v5_status / vibe_v5_report.
923
958
  - vibe_v5_message {to|all, content} — relay a human message into the institute.
924
959
  - vibe_v5_meeting {agenda, kind} — convene a meeting.
925
960
  - vibe_v5_members — roster (office/employer/status/direction).
926
961
  - vibe_v5_hire / vibe_v5_fire — temp workers: hire one (office, academician or a permanent researcher) / dismiss one for real.
927
962
  - vibe_v5_add_researcher / vibe_v5_remove_researcher — OFFICE only: add or dismiss a PERMANENT researcher (the academician can only propose those).
963
+ - 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.
964
+ - 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.
928
965
  - vibe_v5_lean_run / vibe_v5_lean_archive / vibe_v5_lean_lib — Lean formal
929
966
  verification (execute / archive / list the reuse library). Members use them
930
967
  too; they work in every mode.
931
- A /v5 slash command mirrors these (configure|start|resume|pause|stop|status|report|members|message|meeting|hire|fire|add|remove|set).
968
+ A /v5 slash command mirrors these (configure|start|resume|pause|stop|status|report|members|message|meeting|hire|fire|add|remove|set|paper).
932
969
 
933
970
  LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
934
971
  - 'off' (default, no extra requirement) | 'encourage' (members decide by