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.
- package/README.en.md +14 -14
- package/README.md +15 -14
- package/cordis.patch.yml +33 -10
- package/docs/AUDIT-CHECKLIST.md +25 -6
- package/docs/COMPAT-AUDIT-ROUND3.md +16 -1
- package/docs/release-notes/RELEASE-NOTES-2.5.0.md +173 -0
- package/docs/test-timing.md +73 -40
- package/installer.js +225 -45
- package/package.json +3 -2
- package/preset-declaration.js +38 -7
- package/prompt-corpus-persona/persona-corpus.json +9 -9
- package/prompt-corpus-persona/persona-corpus.md +67 -21
- package/prompt-corpus-v2/formal-verify-v2.json +116 -92
- package/prompt-corpus-v2/formal-verify-v2.md +240 -93
- package/prompt-corpus-v3/formal-verify-v3.json +81 -81
- package/prompt-corpus-v3/formal-verify-v3.md +288 -1111
- package/prompt-corpus-v4/formal-verify-v4.json +38 -8
- package/prompt-corpus-v4/formal-verify-v4.md +157 -25
- package/prompt-corpus-v5/prompt-corpus-v5.json +17 -17
- package/prompt-corpus-v5/prompt-corpus-v5.md +32 -26
- package/tests/audit-installer-compat.test.mjs +70 -4
- package/tests/audit-installer-policy.test.mjs +229 -4
- package/tests/audit-persona-sensitivity.mjs +11 -4
- package/tests/audit-persona-surface.test.mjs +5 -1
- package/tests/audit-v5-sensitivity.mjs +47 -6
- package/tests/e2e-v5-round2.test.mjs +354 -0
- package/tests/formal-verify-v2.test.mjs +54 -2
- package/tests/formal-verify-v3.test.mjs +63 -2
- package/tests/formal-verify-v4.test.mjs +120 -4
- package/tests/run-tests.mjs +104 -23
- package/vibe-math-v2/agent.cordis.yml +6 -0
- package/vibe-math-v2/vibe-math-v2.js +503 -99
- package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +20 -4
- package/vibe-math-v3/agent.cordis.yml +26 -10
- package/vibe-math-v3/vibe-math-v3.js +555 -175
- package/vibe-math-v3//345/256/236/347/216/260/346/226/271/346/241/210.md +3 -3
- package/vibe-math-v4/agent.cordis.yml +26 -6
- package/vibe-math-v4/vibe-math-v4.js +404 -51
- package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +91 -9
- package/vibe-math-v5/agent.cordis.yml +8 -4
- package/vibe-math-v5/vibe-math-v5.js +513 -105
- package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +73 -40
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/<institute>.v5state.json (hardened JSON, authoritative)<br/>
|
|
82
|
+
PROJ["💾 State/<institute>.v5state.json (hardened JSON, authoritative)<br/>12 kinds of events · pure fold applyV5Event · serial writes · recovery = load before read"]
|
|
83
83
|
FS["📁 Members/<id>/* · 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 (
|
|
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
|
|
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":"
|
|
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` =
|
|
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) |
|
|
@@ -732,12 +732,12 @@ Added/adjusted on top of all v2 parameters:
|
|
|
732
732
|
|
|
733
733
|
| Parameter | Default | Description |
|
|
734
734
|
|---|---|---|
|
|
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),
|
|
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) — 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
736
|
| `planningHorizon` | 3 | Maximum number of actions in one plan by the planner agent ("the next n times") |
|
|
737
737
|
| `plannerEnabled` | true | false = fully use the built-in heuristic scheduling (planner agent disabled) |
|
|
738
738
|
| `plannerProvider` / `plannerModel` | empty | Planner agent model route (empty = inherit the root agent) |
|
|
739
739
|
| `plannerPersona` | empty | Persona/requirements injected at the start of the planner agent prompt |
|
|
740
|
-
| `planMinIntervalMs` | 30000 | Minimum interval between two planning calls (milliseconds);
|
|
740
|
+
| `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
741
|
| `plannerMaxFails` | 3 | The planner agent reaching this number of consecutive failures → automatic degradation to heuristics |
|
|
742
742
|
| `methodKeepIntervalMs` | 0 | Method Keeper periodic consolidation interval (0 = event-driven) |
|
|
743
743
|
| `methodKeepEvery` | 5 | Trigger one consolidation every N accumulated inventions/new propositions awaiting sedimentation |
|
|
@@ -825,8 +825,8 @@ Common controls: `vibe_v5_configure` (configure first) → `vibe_v5_start` (star
|
|
|
825
825
|
- **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
826
|
- **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
827
|
- **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
|
|
829
|
-
- **Static prompt-surface consistency (persona ↔ tool registry ↔ slash command hint/usage)**: [`audit-persona-surface.test.mjs`](tests/audit-persona-surface.test.mjs) (
|
|
828
|
+
- **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 56` (38 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)
|
|
829
|
+
- **Static prompt-surface consistency (persona ↔ tool registry ↔ slash command hint/usage)**: [`audit-persona-surface.test.mjs`](tests/audit-persona-surface.test.mjs) (196 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"
|
|
830
830
|
- **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
831
|
- **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
832
|
- **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 +840,16 @@ Common controls: `vibe_v5_configure` (configure first) → `vibe_v5_start` (star
|
|
|
840
840
|
- **(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
841
|
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
842
|
- **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
|
|
843
|
+
- 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
844
|
- Problems/propositions with `never` priority are **never scheduled**, and do not block strict termination (they count as voluntarily abstaining).
|
|
845
845
|
- The four preset files are mutually independent and can coexist; only one preset can be selected in a given session at a time.
|
|
846
846
|
|
|
847
847
|
**v3**:
|
|
848
848
|
- **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
|
|
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 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
850
|
- **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
851
|
- **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`
|
|
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` 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
853
|
|
|
854
854
|
**v5**:
|
|
855
855
|
- **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 +857,7 @@ Common controls: `vibe_v5_configure` (configure first) → `vibe_v5_start` (star
|
|
|
857
857
|
- **`≥ 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
858
|
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
859
|
- **The consistency quorum is not "majority rule"**: any single opposing boolean vote blocks a conclusion, and abstention helps neither truth nor falsehood.
|
|
860
|
-
|
|
860
|
+
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
861
|
- **A member whose round never ends will not be forcibly released** (the same boundary as v4): the heartbeat re-arms it every time,
|
|
862
862
|
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
863
|
- **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/<研究所>.v5state.json(加固 JSON 权威源)<br/>
|
|
82
|
+
PROJ["💾 State/<研究所>.v5state.json(加固 JSON 权威源)<br/>12 类事件 · 纯折叠 applyV5Event · 串行写 · 恢复=读前必 load"]
|
|
83
83
|
FS["📁 Members/<id>/* · 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
|
-
|
|
655
|
+
我想让它用强制裁决模式(forced)跑,并发数设成 6。
|
|
656
656
|
```
|
|
657
657
|
|
|
658
|
-
主代理 `vibe_math_set_params {"verdictMode":"
|
|
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` =
|
|
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`(按存活率重算) |
|
|
@@ -733,12 +733,12 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
|
|
|
733
733
|
|
|
734
734
|
| 参数 | 默认 | 说明 |
|
|
735
735
|
|---|---|---|
|
|
736
|
-
| `verdictMode` | `forced` | v3 先做**近共识判定**(全部结果同侧且均值 ≥0.85/≤0.15
|
|
736
|
+
| `verdictMode` | `forced` | v3 先做**近共识判定**(全部结果同侧且均值 ≥0.85/≤0.15 取均值)——这一步先于模式生效,所以 0.9 vs 1 在两种模式下都得到 ≈0.95;否则 `forced` 取各验证者概率的**等权平均**(不再按准确率加权;严格的 1/0 仍以绝对票生效),`flat` 则判 `0.5`(不一致即不确定) |
|
|
737
737
|
| `planningHorizon` | 3 | 规划代理一次计划的最多动作数("接下来 n 次") |
|
|
738
738
|
| `plannerEnabled` | true | false = 完全走内置启发式调度(规划代理禁用) |
|
|
739
739
|
| `plannerProvider` / `plannerModel` | 空 | 规划代理模型路由(空 = 继承根代理) |
|
|
740
740
|
| `plannerPersona` | 空 | 注入规划代理提示词开头的人格/要求 |
|
|
741
|
-
| `planMinIntervalMs` | 30000 |
|
|
741
|
+
| `planMinIntervalMs` | 30000 | 两次规划调用的最小间隔(毫秒);对**每一次**规划调用都生效(含空计划、含"空闲但仍有工作",不再有空闲绕过) |
|
|
742
742
|
| `plannerMaxFails` | 3 | 规划代理连续失败达此值 → 自动降级启发式 |
|
|
743
743
|
| `methodKeepIntervalMs` | 0 | Method Keeper 定时整理间隔(0 = 事件驱动) |
|
|
744
744
|
| `methodKeepEvery` | 5 | 每积累 N 个待沉淀发明/新命题触发一次整理 |
|
|
@@ -826,8 +826,8 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
|
|
|
826
826
|
- **四套 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
827
|
- **四个预设的 persona 原文**:[`prompt-corpus-persona/persona-corpus.md`](prompt-corpus-persona/persona-corpus.md)(主代理实际收到的提示词:有哪些工具、哪些参数、哪些斜杠子命令;由 `audit-persona-surface.test.mjs` 生成,随包发布)
|
|
828
828
|
- **Lean 形式化验证(四架构共用契约)**:[`docs/formal-verification.md`](docs/formal-verification.md)
|
|
829
|
-
- **测试耗时基线与并行跑法**:[`docs/test-timing.md`](docs/test-timing.md)(`node tests/run-tests.mjs`
|
|
830
|
-
- **静态提示词面一致性(persona ↔ 工具注册表 ↔ 斜杠命令 hint/usage)**:[`audit-persona-surface.test.mjs`](tests/audit-persona-surface.test.mjs)(
|
|
829
|
+
- **测试耗时基线与并行跑法**:[`docs/test-timing.md`](docs/test-timing.md)(`node tests/run-tests.mjs` 并行跑**全部套件 + 全部探针**:`TOTAL 56`(38 套件 + 18 探针/变体)≈3.5 min;哪 18 项随包发布、哪些仅仓库见该文档 §1.1;每个 runner 都会打印耗时/加速比供下次选策略)
|
|
830
|
+
- **静态提示词面一致性(persona ↔ 工具注册表 ↔ 斜杠命令 hint/usage)**:[`audit-persona-surface.test.mjs`](tests/audit-persona-surface.test.mjs)(196 条断言,并生成 [`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、实际分支三处必须一致"
|
|
831
831
|
- **全面检查必查清单**:[`AUDIT-CHECKLIST.md`](docs/AUDIT-CHECKLIST.md)(本仓库的强制审计流程;§1.9 专门查"工具参数 schema 收不收得下")
|
|
832
832
|
- **提示词/交互不变式(四套一起,可一键复核)**:[`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
833
|
- **规格 ↔ 代码可追溯(四套一起)**:[`audit-spec-traceability.mjs`](tests/audit-spec-traceability.mjs)(94 条断言)——`实现方案.md`/README 里承诺的工具必须真的注册;四个 Lean 参数必须同时被文档与代码接受
|
|
@@ -841,16 +841,16 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
|
|
|
841
841
|
- **(DSH ≤ 0.1.6 的目录形式)** 安装器带**版本化自动更新**:每次 DSH 启动时对比包版本与 `<presetRoot>/.vibe-math-installed.json` 记录——**版本一变(或无记录的老安装首次运行)就整体替换受管文件,不看它是否被改过**;被替换的手改原文先备份到 `<presetRoot>/.vibe-math-backup/<旧版本>/<preset>/` 并在日志里列出。同一个版本内**不重写任何文件**(重启 DSH 不会改写 preset、也不会扰动它按 mtime 记的生成代际),缺失文件随时补回。想强制全量重装:删除那四个 preset 目录后重启 DSH。
|
|
842
842
|
在 DSH ≥ 0.1.7 上安装器**不写这些目录**(预设由上文「安装」里的组合行提供),启动时只会提示旧副本可安全删除。
|
|
843
843
|
- **在 DSH ≤ 0.1.6 上,这四个目录由安装器负责**:删掉其中任一文件或整个目录,只会在下次启动 DSH 时被补回(这正是上面"强制全量重装"可行的原因)。在 DSH ≥ 0.1.7 上它们不再被读取、也不再被写入,直接删掉即可;想彻底不要本包的预设,就卸载本包(`dsh plugin --profile <你的 profile> remove dsh-vibe-math`)。
|
|
844
|
-
- `flat`
|
|
844
|
+
- `flat` 裁决在辩论不一致时取各验证者概率的**等权平均**(不再直接判 `0.5`;早期把高置信分歧 0.9 vs 1 误判为 0.5 的问题已在 v2/v3 修复);`forced` 按历史准确率+严谨性加权,且准确率只在对象此后获得布尔裁决时计分。
|
|
845
845
|
- `never` 优先级的问题/命题**永不调度**,且不阻塞严格终止(视为主动弃权)。
|
|
846
846
|
- 四个 preset 文件互相独立、可共存;同一会话同时只能选一个预设。
|
|
847
847
|
|
|
848
848
|
**v3**:
|
|
849
849
|
- **软规范而非零规范**:md 知识库只强制对象头部的 4~7 行锚点(`- ID/类型/状态/概率/优先级/依赖/...`)与条目标题行(`### 解法/证明/证伪 N|标题|概率X|状态Y`),供调度器可靠索引;正文完全自由论文式叙述,调度器从不解析正文。手工编辑锚点可能导致索引漂移(调度器会保留上次有效索引并告警)。
|
|
850
|
-
- **规划代理是增强而非必需**:`plannerEnabled=false` 或规划代理连续失败(`plannerMaxFails`)时自动回退 v2 式启发式调度;`planMinIntervalMs`
|
|
850
|
+
- **规划代理是增强而非必需**:`plannerEnabled=false` 或规划代理连续失败(`plannerMaxFails`)时自动回退 v2 式启发式调度;`planMinIntervalMs` 冷却对**每一次**规划调用生效——包括空计划和"空闲但仍有工作"的情形(空闲不再绕过冷却,那正是规划代理每 tick 空转的放大器)。
|
|
851
851
|
- **方法库可信分层**:方法卡的 `可信断言` 只允许链接已进 `Verified/` 的 ID;方法条目的其余内容(含未验证的策略/直觉/启发式)一律视为**经验参考**,不得当定理引用。
|
|
852
852
|
- **项目锁**:同一项目同一时刻只允许一个会话调度(第二个会话启动会提示"被会话 X 占用");锁在暂停/终止/全部解决时自动释放。
|
|
853
|
-
- **近共识裁决**:全部验证器结果同侧且均值 ≥0.85/≤0.15 时取均值(如 0.9 vs 1 → 0.95),否则 `forced`
|
|
853
|
+
- **近共识裁决**:全部验证器结果同侧且均值 ≥0.85/≤0.15 时取均值(如 0.9 vs 1 → 0.95),否则 `forced` 取各票的**等权平均**、`flat` 判 `0.5`——修复了 v2 中"数学上正确但形式有瑕疵"的结论被误判为不确定的问题。
|
|
854
854
|
|
|
855
855
|
**v5**:
|
|
856
856
|
- **框架绝不指派任务**:这是设计上的硬边界,不是尚未实现的功能。任务的产生与分配属于**所内自治**
|
|
@@ -858,7 +858,8 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
|
|
|
858
858
|
- **`≥ m` 一致 ≠ 数学上已证明**:门槛只保证"所内达成了一致判断",不保证结论真的正确。
|
|
859
859
|
求真的纵深靠成员自己的推导与辩论录留痕;未达门槛的对象会**留库附平均概率**,不会被强行判真判假。
|
|
860
860
|
- **一致性门槛不是"少数服从多数"**:任何一张反向布尔票都阻塞定论,弃权既不帮真也不帮假。
|
|
861
|
-
|
|
861
|
+
因此在本口径下(`m = min(quorumCap, 有表决权人数)`)**只要有人投布尔票,门槛就等于"全部布尔票同向"**:
|
|
862
|
+
调低 `quorumCap` 只是把"至少几张布尔票"降到 `m`,**不会让收敛更容易**;要更严格可切 `quorumMode: "all-unanimous"`(它连弃权都不允许)。
|
|
862
863
|
- **一个回合永不结束的成员不会被强行释放**(与 v4 同一边界):心跳每次都会重新武装,
|
|
863
864
|
所以调度器不会永久冻结;需要人工介入时用 `vibe_v5_fire`(临时工)或所办增删编制。
|
|
864
865
|
- **会议与验证严格互斥**:一方进行中,另一方排队/暂存。因此"在会议上当场定论一个对象"会先排队,
|
package/cordis.patch.yml
CHANGED
|
@@ -86,6 +86,9 @@
|
|
|
86
86
|
Key rules to remember when reporting: a problem is "solved" when one of its solutions reaches
|
|
87
87
|
正确概率 = 1; a proposition reaches 布尔估计 = 1/0 when a proof/refutation in its lists reaches
|
|
88
88
|
正确概率 = 1; Propos propositions with 价值/关键性 ≥ promoteValueThreshold auto-promote to qs.json.
|
|
89
|
+
Closure rule (identical across the presets): the 1/0 values above are written ONLY by the scheduler,
|
|
90
|
+
after ≥2 independent verifier agents settle the object (one lone reviewer can never conclude), and
|
|
91
|
+
Verified/ is written by that same scheduler path — an agent's own self-reported 1 is never a conclusion.
|
|
89
92
|
When the user asks about progress, call vibe_math_report and summarize in plain language.
|
|
90
93
|
|
|
91
94
|
Configuration highlights (all tunable via vibe_math_set_params / the settings file):
|
|
@@ -329,7 +332,8 @@
|
|
|
329
332
|
- vibe_math_add_problem {id, description, priority, dependencies?} — add a problem (creates Problems/<id>.md).
|
|
330
333
|
- vibe_math_add_proposition {id, 概述, 概率, 优先级, 价值/关键性, 分类} — add a proposition (Propos/<分类>/<id>.md).
|
|
331
334
|
- 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)
|
|
335
|
+
- vibe_math_start / vibe_math_resume — start / resume the scheduler (resume = continue after checkpoint/restart);
|
|
336
|
+
both accept override=true to take the project lock over from another session (only after you verified that session is gone).
|
|
333
337
|
- vibe_math_status / vibe_math_report — read status / full progress report (report writes Progress_Logs/report.json + Logs/报告.md).
|
|
334
338
|
- vibe_math_pause / vibe_math_abort — pause / abort.
|
|
335
339
|
- vibe_math_set_mode {mode: manual|auto} — switch manual / auto (manual gates: 计划审批 / 裁决 / 方法晋升).
|
|
@@ -342,7 +346,8 @@
|
|
|
342
346
|
- vibe_math_plan {force?} — show queued plan / last plan, or force a planning round.
|
|
343
347
|
- vibe_math_index — rebuild State/index.json from the Markdown knowledge base.
|
|
344
348
|
- vibe_math_method_add / vibe_math_method_list — manually add / list method cards (Methods/ + global).
|
|
345
|
-
- vibe_math_lock_status — project lock occupancy.
|
|
349
|
+
- 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).
|
|
350
|
+
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
351
|
- vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
|
|
347
352
|
- vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
|
|
348
353
|
- vibe_math_list_agents / vibe_math_message_agent / vibe_math_interrupt_agent — inspect / steer / interrupt subagents.
|
|
@@ -350,14 +355,20 @@
|
|
|
350
355
|
verification (execute / archive / list the reuse library). The scheduler's child agents
|
|
351
356
|
use them too; they work in every mode.
|
|
352
357
|
|
|
353
|
-
A /vibe slash command mirrors the main controls (/vibe start|resume|pause|abort|status|report|mode
|
|
358
|
+
A /vibe slash command mirrors the main controls (/vibe start [override]|resume [override]|pause|abort|status|report|mode
|
|
354
359
|
<auto|manual>|setup|save|add <id> <desc>|add-proposition <id> <概述>|list-propositions|methods|index|plan|lock|...).
|
|
355
360
|
Data survives restarts via vibe_math_resume.
|
|
356
361
|
|
|
357
362
|
Key rules when reporting: a problem is "solved" when one of its 解法候选 entries reaches 概率 = 1
|
|
358
363
|
(the scheduler writes Verified/问题/<id>.md); a proposition reaches 已验证·真/假 when a 证明/证伪
|
|
359
|
-
entry reaches 概率 = 1 (Verified/命题/<id>.md)
|
|
360
|
-
|
|
364
|
+
entry reaches 概率 = 1 (Verified/命题/<id>.md).
|
|
365
|
+
Closure rule (identical across the presets): those 概率 = 1 values are written ONLY by the scheduler,
|
|
366
|
+
after ≥2 independent verifier agents settle the object (a lone reviewer can never conclude; see
|
|
367
|
+
minVotes), and Verified/ is written by that same scheduler path — a self-reported 1 is never a
|
|
368
|
+
conclusion. Propos propositions whose 价值/关键性 ≥
|
|
369
|
+
promoteValueThreshold (write that anchor on the proposition card, or report it as lemmas[].价值/关键性 in
|
|
370
|
+
vibe_math_sync_meta — default 0.5 never promotes) and that are still undecided
|
|
371
|
+
auto-promote into Problems/ as "判断下述命题是否成立:<命题>" (verification
|
|
361
372
|
results sync back to the source proposition); a solver-reported sub-question q_sub registers THREE
|
|
362
373
|
objects (q_sub problem + judge problem + p-tmp temporary-assumption proposition) with full 来源与动机.
|
|
363
374
|
|
|
@@ -626,14 +637,24 @@
|
|
|
626
637
|
(execute / archive / list the reuse library). Residents use them too; they work in every mode.
|
|
627
638
|
- vibe_v4_formal_report — human-readable Lean formal-verification mirror (mode, Lean-passed
|
|
628
639
|
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).
|
|
640
|
+
- 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).
|
|
641
|
+
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>...).
|
|
631
642
|
|
|
632
643
|
TRUST RULE: only Verified/ (and Propos/ entries marked 已验证·真/假) are absolutely
|
|
633
644
|
trustworthy; everything else — unverified resident claims, Progress/, Method claims —
|
|
634
645
|
is experiential reference. A proposition / method / theory only reaches Verified/ when
|
|
635
646
|
ALL residents unanimously agree true (or all agree false); otherwise it stays in its
|
|
636
|
-
library with a probability estimate.
|
|
647
|
+
library with a probability estimate. Closure rule (identical across the presets): the framework
|
|
648
|
+
writes the Verified/ card — a resident's own claim never does — and what counts as a vote is
|
|
649
|
+
stated once in the VOTE CONTRACT below.
|
|
650
|
+
|
|
651
|
+
VOTE CONTRACT: a verification vote is a probability of truth in [0,1], but only an EXACT
|
|
652
|
+
1 (absolutely true) and an EXACT 0 (absolutely false) count as a vote. Anything strictly
|
|
653
|
+
between (0.9, 0.95, 0.5 …) is an ABSTENTION carrying that probability estimate: the run
|
|
654
|
+
does NOT conclude, and the group's MEAN probability is written back to the object's card
|
|
655
|
+
so it stays in its library with a probability. The same absoluteness applies to the
|
|
656
|
+
meeting stop-vote: every resident on the roster must answer `voteSolved:true` — one
|
|
657
|
+
abstention keeps the run alive.
|
|
637
658
|
|
|
638
659
|
LEAN FORMAL VERIFICATION (formalVerify, a tunable parameter):
|
|
639
660
|
- 'off' (default, no extra requirement) | 'encourage' (the residents decide by implementation
|
|
@@ -912,8 +933,10 @@
|
|
|
912
933
|
Shared/TaskBoard.md (human view), Shared/Chat/<day>.md,
|
|
913
934
|
Shared/Meetings/<id>.md, Shared/Debates/<target>.md,
|
|
914
935
|
Problems/<id>.md, Verified/<kind>/<id>.md (read-only; m-vote only),
|
|
915
|
-
State/ (
|
|
916
|
-
|
|
936
|
+
State/ (the AUTHORITATIVE state is State/<institute>.v5state.json in this
|
|
937
|
+
directory; it is a hardened JSON file, never a host session log. Everything
|
|
938
|
+
else here and elsewhere in the tree is a human-readable MIRROR — never
|
|
939
|
+
hand-edit any of it).
|
|
917
940
|
|
|
918
941
|
Main controls (recommended flow: configure FIRST, then start):
|
|
919
942
|
- vibe_v5_configure {project?, institute?, problem?, params?} — create/configure the institute WITHOUT starting it.
|
package/docs/AUDIT-CHECKLIST.md
CHANGED
|
@@ -166,8 +166,14 @@ v2/v3/v4/v5 是**同构实现**(同一份契约、四份独立代码,刻意
|
|
|
166
166
|
### 1.9 工具参数 schema:文档写了 ≠ 工具收得下
|
|
167
167
|
|
|
168
168
|
§1.6 查的是"persona 里有没有写",这一节查**工具的参数 schema 收不收得下**。本仓库所有工具 schema 都由
|
|
169
|
-
`objParams` 收口,并以 `additionalProperties:false`
|
|
170
|
-
|
|
169
|
+
`objParams` 收口,并以 `additionalProperties:false` **关闭**。**但"关闭"的强度取决于注册路径**(v3 审计 M5
|
|
170
|
+
的更正,Round B 复核扩大):只有走宿主 `defineTool` 的工具,宿主才会用该 schema 校验实参、把未列出的键
|
|
171
|
+
**直接拒绝**;`tools.register`(裸 `ToolDefinition`)只把 `parameters` 生成给模型的 schema,宿主**从不校验实参**,
|
|
172
|
+
`additionalProperties:false` 在那里只是给模型看的**文档**。**四套预设全部走裸注册**
|
|
173
|
+
(`grep defineTool vibe-math-v{2,3,4,5}.js` → 0 命中;`tools.register` 各 1–3 处),所以"schema 与参数层不一致
|
|
174
|
+
就静默成功(fail open)"对**每一套**都成立,不只是 v3。最典型的反例是 `vibe_math_setup` 公布 `mode`、而
|
|
175
|
+
`vibe_math_set_params` 的 schema 里一度没有它:模型看不到这个键,写给它却仍会被 `sanitizeParams` 收下
|
|
176
|
+
(该键已补进 schema,两条注册路径的键集现在一致)。
|
|
171
177
|
|
|
172
178
|
- [ ] 每个"可调参数"是否同时出现在:**设置工具的参数 schema**、发现面(`vibe_math_setup` 返回的
|
|
173
179
|
`PARAM_SCHEMA` / v4·v5 的 status 参数表)、`<vibe root>/*setting.json` 模板、以及 persona 参数表?
|
|
@@ -190,18 +196,30 @@ provider **直接拒绝**。于是"提示词/规格/状态表都写着这个参
|
|
|
190
196
|
|
|
191
197
|
测试和脚本"在我机器上是绿的"不等于它们能跑。**真实事故(2.3.13 归档时发现)**:5 个测试/脚本把
|
|
192
198
|
本机绝对路径写死在源码里(`D:/wd/vibemath开发/...`、`C:/Users/admin/...`),其中
|
|
193
|
-
`audit-fuzz-helpers.mjs`
|
|
194
|
-
|
|
199
|
+
`audit-fuzz-helpers.mjs` 当时**是随包发布的**——对任何用户都跑不了,而仓库里从来没人发现,
|
|
200
|
+
因为作者机器上它恰好是对的。(那些路径后来都改成由 `import.meta.url` 推导;Round B 复核:`tests/`
|
|
201
|
+
下已经没有任何真实的写死盘符路径,而且 `audit-fuzz-helpers.mjs` **现在也不再随包发布**——
|
|
202
|
+
它不在 `package.json` 的 `files` 里,也不在 `npm pack --dry-run --json` 的清单里。)
|
|
195
203
|
|
|
196
204
|
- [ ] 每个文件路径是否都由 `import.meta.url` / `npm root -g` / 环境变量**推导**出来,
|
|
197
205
|
而不是写死盘符或用户名?(推导不出时应当**报出所有试过的候选路径**,而不是静默跳过。)
|
|
198
206
|
- [ ] 文件被移动/改名后,**引用它的每一处**是否都跟着改?(包括:`package.json` 的 `files`、
|
|
199
207
|
`run-tests.mjs` 这类 runner、守卫里按名字读套件的表、文档里的命令行、README 链接。)
|
|
208
|
+
- [ ] 新增/改名 `tests/` 下的脚本后,确认 **`run-tests.mjs` 真的收集了它**:runner 收集 `tests/` 下
|
|
209
|
+
**所有** `.mjs`(`*.test.mjs` 是套件,其余是探针),只有登记进 `NEEDS_ARGS` 的脚本才会被跳过,
|
|
210
|
+
而那个登记会在**开发检出**(存在 `.git`)里被逐项校验——条目失效就直接报错退出,所以改名不能
|
|
211
|
+
悄悄把一条守卫踢出发布门禁。参数变体(同一脚本跑多次,如 `audit-registration.mjs` 四个预设)走
|
|
212
|
+
`VARIANTS`。
|
|
200
213
|
- [ ] 命令行/相对链接是否需要**从仓库根执行才成立**?写清楚起点(如 `node tests/run-tests.mjs`),
|
|
201
214
|
别留一个照抄就报"找不到文件"的用法行。
|
|
202
215
|
- [ ] **搬动之后必须有不依赖"跑绿了"的证据**:① 每个套件的断言条数与搬动前**逐项相同**;
|
|
203
216
|
② 建一个 `git worktree` 拿改动前的检出,同一套件在两种布局各跑一遍,归一化路径/临时目录/耗时后
|
|
204
217
|
**逐行比对**(`_oneoff/layout-invariance.mjs`);③ 相对链接扫描 0 失效(`_oneoff/scan-links.mjs`)。
|
|
218
|
+
- [ ] 讲"全套件 / 门禁 / 多少次全绿"时,是否区分了**随包发布面**与**仓库**?`package.json` 的 `files`
|
|
219
|
+
只发 `tests/` 的 **18 项**(其中 `.test.mjs` **10** 个),完整门禁(`node tests/run-tests.mjs`,
|
|
220
|
+
Round B 起 **56 项 = 38 套件 + 18 探针/变体**)只在开发检出里成立。两边的清单见
|
|
221
|
+
`docs/test-timing.md` §1.1;发布物里的 runner 会把缺失/跳过项**打印出来**(不会静默少跑),
|
|
222
|
+
所以"安装用户照文档跑得到全套件"这类说法必须避免。
|
|
205
223
|
- [ ] **runner 本身也要跑一遍**:直接跑套件通过 ≠ 并行 runner 通过(2.3.13 就出现过
|
|
206
224
|
"26 个套件直接跑全绿、`run-tests.mjs` 因为按裸文件名 spawn 而全红")。发布门禁必须包含 runner。
|
|
207
225
|
|
|
@@ -353,8 +371,9 @@ provider **直接拒绝**。于是"提示词/规格/状态表都写着这个参
|
|
|
353
371
|
## Upgrade
|
|
354
372
|
```
|
|
355
373
|
|
|
356
|
-
- [ ] 两个 H1 都在;**英文那份的 H1 必须含 `English
|
|
357
|
-
|
|
374
|
+
- [ ] 两个 H1 都在;**英文那份的 H1 必须含 `English`**(人工检查:本仓库**没有任何 CI 工作流**,
|
|
375
|
+
`scripts/` 只有 `build-preset-rows.mjs`,不存在所谓的"发布门禁阶段 1c");
|
|
376
|
+
- [ ] 中文部分 ≥ 150 个汉字(同样人工检查),英文部分不得残留未翻译段落;
|
|
358
377
|
- [ ] 每条变更都回答"**对使用者有什么影响**"——不写内部编号、探针名、断言条数;
|
|
359
378
|
- [ ] 「兼容性」明确回答:四套预设的字节/行为是否变化、参数与工具面是否变化;
|
|
360
379
|
- [ ] 「升级」给出可直接复制的命令(`npm i dsh-vibe-math@latest`;若 profile 里把版本钉死了,
|
|
@@ -73,7 +73,22 @@ DSH 0.1.7 起 agent preset **只**由组合行声明;`$DSH_HOME/.agent-presets
|
|
|
73
73
|
|
|
74
74
|
宿主的 `CommandResult` 联合是 `{kind:'success',text?} | {kind:'error',text}`;四套预设的 `/vibe`、`/v4`、`/v5`
|
|
75
75
|
在**所有失败路径**上都返回 `{kind:'success', text:'{"ok":false,…}'}` → UI 永远显示不出"这条命令被拒绝了"。
|
|
76
|
-
|
|
76
|
+
|
|
77
|
+
**更正(据实收窄):这条修复不是一次"全仓"修复,而是分两批落地的,本节初稿把"打算做的"写成了"已经做完的"。**
|
|
78
|
+
|
|
79
|
+
- **2.4.0(`cc0c220`)只改了 v2 与 v3**(`vibe-math-v2.js` / `vibe-math-v3.js` 的命令 handler)。当时 v4 与 v5 的
|
|
80
|
+
handler 仍然无条件 `return {kind:'success', text:JSON.stringify(r,null,2)}`(各自的"无 session"分支也返回
|
|
81
|
+
`kind:'success'`)——所以"四套都修了"在 2.4.0 这个提交上是不成立的。
|
|
82
|
+
- **v4 与 v5 在 round-A(`8ec5a9c`)才各自补上同一形状**:v4 的命令 handler 改成
|
|
83
|
+
`const failed = !r || r.ok === false || (r.ok === undefined && !!r.error)` → `{kind: failed?'error':'success'}`;
|
|
84
|
+
v5 改成 `const failed = r !== null && typeof r === 'object' && r.ok === false` → 同样三元返回,并把"无 session"
|
|
85
|
+
分支一并改成 `kind:'error'`。判据:`git log -G "kind:\s*'error'" -- vibe-math-v4/vibe-math-v4.js`(及 v5 同)
|
|
86
|
+
**只命中 `8ec5a9c`**;round-C(`4eb3175`)与 round-D(`0dc6ee3`)都没有再碰这两个 handler(前者的 v4 hunk 在
|
|
87
|
+
1354/1854 行,后者的 v5 hunk 止于 4564 行,均在命令 handler 之外)。
|
|
88
|
+
- **仓库内的回归证据是 round-C(`4eb3175`)补进来的**:`tests/host-failure-paths.test.mjs` 在该提交首次入库,
|
|
89
|
+
它断言 `/v4 set` 未知键、`/v4` 未知子命令与 `/v5` 未知子命令都返回 `kind:'error'`。round-D(`0dc6ee3`)只是
|
|
90
|
+
把"本节仍把 `/v4` 的修复说成全仓,需据实收窄"记进了待办,没有改代码。
|
|
91
|
+
- 该联合在 0.1.5 上同样存在,故旧线安全。也就是说:**"四套最终一致"成立,"四套一次修完"不成立**。
|
|
77
92
|
|
|
78
93
|
### G-9 文档、镜像与工具描述与实现不符
|
|
79
94
|
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# dsh-vibe-math 2.5.0 — 发布说明(中文)
|
|
2
|
+
|
|
3
|
+
> 上一版:2.4.1。本版是**深度审计后的修复版本**:四套预设的提示词、工具面、组合声明与数据格式未做破坏性变更,
|
|
4
|
+
> 但修复了多处"看起来能跑、实际目标功能不成立"的缺陷(含三处会丢数据或让运行停摆的问题),并新增多项守卫。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 概览
|
|
9
|
+
|
|
10
|
+
- 本轮对 v2/v3/v4/v5 四套预设 + 安装器 + 全部守卫做了多轮独立审计与交叉证伪(审计结论:**所有宿主接口/工具/命令调用在 DSH 0.2.0-rc.2 上均存在且调用形状正确**;问题集中在目标功能与内部逻辑)。
|
|
11
|
+
- 修复了 **3 处会造成实际损害的问题**:v5 的状态文件会被空研究所覆盖、v2 的验证日志文件名可越出项目目录、v4 的邮箱投递失败会让调度器永久停摆。
|
|
12
|
+
- 还修掉 **v4 的"真实 /compact"从未生效**、**v3 空闲时每 tick 空转派生 planner**、**v3 单票即可写入 `Verified/`**、**v5 同 tick 并发提议会丢提案**等。
|
|
13
|
+
- 在本机 DSH 0.2.0-rc.2 上做了**真实宿主端到端验证**:四个预设正常注册(order 20–23)、零激活警告、组合行线上不再写旧的 `.agent-presets` 目录。
|
|
14
|
+
- 测试与守卫大幅加强:全仓 **38 套件 + 18 探针**全部纳入自动门禁(此前有若干探针未被收集),并修正了一处测试抖动与一处语料非确定性。
|
|
15
|
+
|
|
16
|
+
## 变更
|
|
17
|
+
|
|
18
|
+
### 1. 数据安全与"运行不卡死"
|
|
19
|
+
|
|
20
|
+
- **v5 状态文件不再被覆盖**:状态后端改为**按路径锁存**,读取未成功即**拒绝写入**;对已存在的研究所改为**采纳**而非重置。此前会话里第一次工具调用会锁存默认路径,随后指定研究所的配置会把它覆盖成空研究所。
|
|
21
|
+
- **v2 路径逃逸**:验证日志文件名改用 `safeId` 归一化,`q.id="x/../../../../pwn"` 这类输入不再能把文件写出项目目录。
|
|
22
|
+
- **v4 调度器停摆**:邮箱投递失败的两条路径(立即投递失败、brainstorm 阶段无处重投)都会重排队并在后续 pass 重试,不再出现"心跳已清、永不重试"的静止状态。
|
|
23
|
+
- **v5 队列竞态**:验证队列的追加与取头改为在事件折叠内完成,同一 tick 内两个成员同时提议不再丢提案。
|
|
24
|
+
|
|
25
|
+
### 2. 目标功能真正可达
|
|
26
|
+
|
|
27
|
+
- **v4 的 `/compact`**:按 `subagent/start` 载荷认领活动 Agent,真实压缩调用(`compactNow`)首次真正生效。
|
|
28
|
+
- **v2 的"判断命题"链**:为判断问题补种可验证的解法入口,使"问题 → 判断问题 → 验证 → 收口"主线真正跑通。
|
|
29
|
+
- **v3 的空转**:空闲时不再每个 tick 派生 planner(实测由 41 次降到 13 次,并首次出现正常终止)。
|
|
30
|
+
- **v3 的项目锁**:改为**定时器续租**(此前的续租写在 tick 内,单次慢 tick 就会让别的会话无 override 夺锁)。
|
|
31
|
+
- **v3 的最小票数**:要求达到承诺的验证者数量、且**至少 2 票**才裁决,单票不再能把命题写成"已验证·真"。
|
|
32
|
+
|
|
33
|
+
### 3. 语义与表述对齐(含提示词面)
|
|
34
|
+
|
|
35
|
+
- **v4 验证契约**:人设与工具描述明确"**只有精确的 1 / 0 是绝对真/绝对假**;介于 0 与 1 之间是模型认为的概率,只有全 1 或全 0 才算全体一致,否则取**平均概率**更新布尔估计"(代码分支未改,此前示例与说明不足)。
|
|
36
|
+
- **v5 的 m-vote 表述**:文档/人设/README 改为与计票代码一致——"**至少 m 张布尔票且没有任何一张反对票**,默认名册下退化为全体一致",并删除"比全体一致更易收敛"这一**不实**说法。
|
|
37
|
+
- **四套同级**:v2/v3 改称"经典"、v4/v5 为"实验性",npm 描述、选择器描述、人设文本、v3 设计文档、安装段顺序全部对齐(此前只有 README 改了)。
|
|
38
|
+
- **v2 的侧信道**:推送汇报的消息来源由未声明的 `kind:'plugin'` 改为已声明的 `kind:'user'`;`solver/verifierMaxToolCalls` 改为如实标注为"仅提示、不强制"。
|
|
39
|
+
- **v5 的调用者授权**:`isOffice` 不再把空身份当所办;无法识别身份的成员调用一律拒绝(此前一个幽灵身份可以改优先级、甚至删掉真实任务)。
|
|
40
|
+
- **v5 的工具描述**:补齐会议 `kind` 枚举与 `target`、说明 `hire.term`。
|
|
41
|
+
|
|
42
|
+
### 4. 安装器、声明与守卫
|
|
43
|
+
|
|
44
|
+
- **形态判定改能力差**:旧线上"组合行 registry 包"根本不存在(已用 npm 元数据与包内容证实:0.1.6-alpha.2 无 `@deepseek-ai/dsh-agent-preset`,0.1.7-rc.2 才有),判定改用 `register` 能力,并新增可证伪守卫(把该行改回 `list` 只有新守卫会红)。
|
|
45
|
+
- **声明行补宿主 group 标记**:8 处嵌套 `!!js` 现在以表达式形式保留给 preset 作用域,而不是在声明域被就地求值。
|
|
46
|
+
- **安装器更安全**:preset 文件改**原子写**;删除 preset 前**先备份**用户改动过的文件;**读不出来**的文件不再被无备份删除;状态文件内容不变则跳过写、写失败会告警、`listBundles` 有超时兜底。
|
|
47
|
+
- **守卫扩面**:`run-tests` 现在收集**全部**测试与探针(此前有 2 套红探针被静默漏收),修正了一处测试抖动(v4 会议用例)与一处语料非确定性(v3),并新增安装器/声明/命令失败路径/宿主失败路径等守卫。
|
|
48
|
+
|
|
49
|
+
## 兼容性
|
|
50
|
+
|
|
51
|
+
- **DSH 支撑窗口不变**:`0.1.2-alpha.4 … 0.2.0-rc.2`;组合行(≥0.1.7)与目录(≤0.1.6)两条线都保留,且新增能力差判定后旧线不会再被误判。
|
|
52
|
+
- **数据与目录结构不变**:`State/<研究所>.v5state.json`、项目布局、镜像文件位置均照旧;无需迁移。
|
|
53
|
+
- **提示词**:除"v4 验证契约/闭包规则说明、v5 m-vote 表述、v2/v3/v4 人设补一行一致的闭包规则、v5 工具描述补字段"之外未改动;语料已按当前四套重新生成。
|
|
54
|
+
- **参数默认值**:未变(v2 每个待验证对象最多 `max(2, min(verifierCount, maxParallelThreshold-2))` 个验证者,默认配置下为 2;工具调用上限仍为提示性)。
|
|
55
|
+
|
|
56
|
+
## 升级
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
npm i dsh-vibe-math@latest
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
桌面版在「设置 → 插件」里更新;命令行 profile 用 `dsh plugin --profile <你的 profile> add dsh-vibe-math@latest`,随后重启 DSH。
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
# dsh-vibe-math 2.5.0 — Release Notes (English)
|
|
67
|
+
|
|
68
|
+
> Previous: 2.4.1. This release is the outcome of a deep, independently cross-checked audit: the four
|
|
69
|
+
> presets' prompts, tool surface, composition declarations and data formats have no breaking change, but
|
|
70
|
+
> several defects that "looked like they worked while the intended function did not" are fixed — three
|
|
71
|
+
> of them could lose data or stall a run — and the guard suite is substantially stronger.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Overview
|
|
76
|
+
|
|
77
|
+
- Multiple audit rounds with independent falsification covered the four presets, the installer and every
|
|
78
|
+
guard. Verdict: **every host interface, tool, command and service call exists on DSH 0.2.0-rc.2 with
|
|
79
|
+
the correct call shape**; the defects were in goals and internal logic.
|
|
80
|
+
- Three fixes prevent real damage: v5's state file being overwritten by an empty institute, v2's
|
|
81
|
+
verification-log filename escaping the project directory, and v4's scheduler stalling forever after a
|
|
82
|
+
failed mailbox delivery.
|
|
83
|
+
- Also fixed: v4's "real /compact" never firing, v3 spawning a planner on every idle tick, v3 finalising
|
|
84
|
+
a proposition on a single vote, and v5 losing a proposal when two members proposed in the same tick.
|
|
85
|
+
- Verified on a **real DSH 0.2.0-rc.2 host**: the four presets register (orders 20–23) with zero
|
|
86
|
+
activation warnings, and the row line no longer writes the legacy `.agent-presets` directory.
|
|
87
|
+
- Guards grew from 30 to **38 suites + 18 probes**, all collected by the gate (several probes used to be
|
|
88
|
+
silently skipped); one flaky test and one non-deterministic corpus were fixed.
|
|
89
|
+
|
|
90
|
+
## Changes
|
|
91
|
+
|
|
92
|
+
### 1. Data safety and "no run can stall"
|
|
93
|
+
|
|
94
|
+
- **v5 state file can no longer be overwritten**: the backend latches **per path** and **refuses to
|
|
95
|
+
write** when the read never succeeded; an existing institute is **adopted** instead of reset. The
|
|
96
|
+
first tool call of a session used to latch the default path, after which configuring a named institute
|
|
97
|
+
overwrote it with an empty one.
|
|
98
|
+
- **v2 path escape**: the verification-log filename is normalised with `safeId`, so an id such as
|
|
99
|
+
`x/../../../../pwn` can no longer write outside the project directory.
|
|
100
|
+
- **v4 scheduler stall**: both failed-mailbox paths (immediate delivery rejection, and the brainstorm
|
|
101
|
+
phase where nothing retried) now re-queue and retry on a later pass.
|
|
102
|
+
- **v5 queue race**: queue append and head-take now happen inside the event fold, so two members
|
|
103
|
+
proposing in the same tick can no longer lose a proposal.
|
|
104
|
+
|
|
105
|
+
### 2. The intended function actually happens
|
|
106
|
+
|
|
107
|
+
- **v4 `/compact`**: the live Agent is claimed from the `subagent/start` payload, so the real
|
|
108
|
+
`compactNow` finally fires.
|
|
109
|
+
- **v2's judge-problem chain**: the judge problem now carries a verifiable solution entry, so
|
|
110
|
+
problem → judge problem → verification → closure really runs.
|
|
111
|
+
- **v3 idle spawning**: no planner is spawned on every idle tick any more (measured 41 → 13) and a
|
|
112
|
+
normal termination was observed for the first time.
|
|
113
|
+
- **v3 project lock**: renewal moved to a timer (it used to live inside `tick()`, so one slow tick let
|
|
114
|
+
another session steal the lock without an override).
|
|
115
|
+
- **v3 minimum votes**: the promised verifier count and at least two votes are now required before a
|
|
116
|
+
verdict; a single vote can no longer write `Verified/`.
|
|
117
|
+
|
|
118
|
+
### 3. Semantics and wording aligned (including prompt-facing text)
|
|
119
|
+
|
|
120
|
+
- **v4 verdict contract**: the persona and tool description now state that **only an exact 1 / 0 is
|
|
121
|
+
absolutely true/false**; anything strictly between is the model's probability of truth, only an all-1
|
|
122
|
+
or all-0 set is unanimity, and otherwise the **mean** updates the boolean estimate (the code path is
|
|
123
|
+
unchanged; the example and explanation were insufficient).
|
|
124
|
+
- **v5 m-vote**: docs, persona and README now match the tally — "**at least m boolean votes with no
|
|
125
|
+
opposing vote**, which degenerates to unanimity on the default roster" — and the false claim that it
|
|
126
|
+
"converges more easily than unanimity" is gone.
|
|
127
|
+
- **Four peers**: v2/v3 are "classic", v4/v5 "experimental" — the npm description, picker descriptions,
|
|
128
|
+
persona text, v3's design doc and the install-section order were all brought in line (previously only
|
|
129
|
+
the READMEs).
|
|
130
|
+
- **v2 side channels**: the push report's message source is the declared `kind:'user'`; the
|
|
131
|
+
`solver/verifierMaxToolCalls` settings are now honestly described as advisory.
|
|
132
|
+
- **v5 caller authorisation**: `isOffice` no longer treats an empty identity as the office, and tool
|
|
133
|
+
calls from an unidentifiable caller are refused (a ghost identity could previously change priorities
|
|
134
|
+
and even delete a real task).
|
|
135
|
+
- **v5 tool descriptions**: the meeting `kind` enum plus `target`, and `hire.term`, are now documented.
|
|
136
|
+
|
|
137
|
+
### 4. Installer, declarations and guards
|
|
138
|
+
|
|
139
|
+
- **Mechanism detection by capability**: the row registry package does not exist on the old line
|
|
140
|
+
(proven from npm metadata and package contents: 0.1.6-alpha.2 has no
|
|
141
|
+
`@deepseek-ai/dsh-agent-preset`, 0.1.7-rc.2 adds it), so the decision now tests the `register`
|
|
142
|
+
capability, with a falsifiable guard (reverting that one line turns only the new guard red).
|
|
143
|
+
- **Declaration rows carry the host group marker**: the eight nested `!!js` expressions are preserved
|
|
144
|
+
for the preset scope instead of being evaluated in the declaring realm.
|
|
145
|
+
- **Safer installer**: preset files are written atomically; a user-edited file is backed up before its
|
|
146
|
+
preset is dropped; an unreadable file is no longer deleted without a backup; the state file is
|
|
147
|
+
skipped when unchanged, write failures warn, and `listBundles` has a timeout fallback.
|
|
148
|
+
- **Wider guards**: `run-tests` now collects **every** test and probe (two red probes used to be
|
|
149
|
+
silently skipped), one flaky test (v4 meetings) and one non-deterministic corpus (v3) were fixed, and
|
|
150
|
+
new guards cover the installer, the declaration row, command failure paths and host failure paths.
|
|
151
|
+
|
|
152
|
+
## Compatibility
|
|
153
|
+
|
|
154
|
+
- **Supported DSH window unchanged**: `0.1.2-alpha.4 … 0.2.0-rc.2`; both the composition-row (≥ 0.1.7)
|
|
155
|
+
and directory (≤ 0.1.6) lines are kept, and the capability-based verdict means the old line can no
|
|
156
|
+
longer be misclassified.
|
|
157
|
+
- **No data or layout change**: `State/<institute>.v5state.json`, the project layout and the mirror file
|
|
158
|
+
locations are unchanged; no migration needed.
|
|
159
|
+
- **Prompts**: unchanged except the v4 verdict-contract/clojure-rule wording, the v5 m-vote wording, one
|
|
160
|
+
consistent closure-rule line added to the v2/v3/v4 personas, and the added v5 tool-description fields;
|
|
161
|
+
corpora were regenerated for the current four presets.
|
|
162
|
+
- **Defaults**: unchanged (v2 caps reviewers per target at
|
|
163
|
+
`max(2, min(verifierCount, maxParallelThreshold-2))`, i.e. 2 on the default configuration; the tool-call
|
|
164
|
+
limits remain advisory).
|
|
165
|
+
|
|
166
|
+
## Upgrade
|
|
167
|
+
|
|
168
|
+
```sh
|
|
169
|
+
npm i dsh-vibe-math@latest
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Desktop updates through Settings → Plugins; a CLI profile uses
|
|
173
|
+
`dsh plugin --profile <your profile> add dsh-vibe-math@latest`, then restart DSH.
|