dsh-vibe-math 2.3.16 → 2.4.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 +49 -46
- package/README.md +48 -45
- package/cordis.patch.yml +1123 -10
- package/docs/AUDIT-CHECKLIST.md +45 -0
- package/docs/COMPAT-AUDIT-ROUND2.md +3 -0
- package/docs/COMPAT-AUDIT-ROUND3.md +139 -0
- package/docs/generate_framework_diagram_v5.mjs +27 -27
- package/docs/release-notes/RELEASE-NOTES-2.4.0.md +172 -0
- package/docs/test-timing.md +2 -1
- package/installer.js +89 -21
- package/package.json +33 -9
- package/preset-declaration.js +62 -0
- package/prompt-corpus-v5/prompt-corpus-v5.json +7 -7
- package/prompt-corpus-v5/prompt-corpus-v5.md +8 -129
- package/scripts/build-preset-rows.mjs +146 -0
- package/tests/audit-installer-compat.test.mjs +9 -3
- package/tests/audit-preset-rows.test.mjs +185 -0
- package/tests/audit-v5-integrity.mjs +49 -3
- package/tests/e2e-v5-round2.test.mjs +137 -67
- package/tests/formal-verify-v5.test.mjs +43 -35
- package/tests/prompt-v5-integrity.test.mjs +49 -47
- package/tests/selfdrive-v5.mjs +42 -55
- package/vibe-math-v2/vibe-math-v2.js +6 -2
- package/vibe-math-v3/vibe-math-v3.js +6 -2
- package/vibe-math-v4/vibe-math-v4.js +191 -13
- package/vibe-math-v5/agent.cordis.yml +8 -8
- package/vibe-math-v5/preset.yml +1 -1
- package/vibe-math-v5/vibe-math-v5.js +215 -91
- package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +56 -44
- package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +24 -22
- package//347/244/272/344/276/213/345/233/276//346/241/206/346/236/266/345/233/276-v5-en.svg +14 -14
- package//347/244/272/344/276/213/345/233/276//346/241/206/346/236/266/345/233/276-v5.svg +14 -14
package/README.en.md
CHANGED
|
@@ -14,7 +14,7 @@ English | [中文](README.md)
|
|
|
14
14
|
> - **`vibe-math-v2` (probability-driven · JSON data layer) ✅ Recommended**: `qs.json` problem list + `Propos/` proposition library + probability-driven scheduling + code heuristic scheduling;
|
|
15
15
|
> - **`vibe-math-v3` (third generation · paper-style md + planner agent + method library) ✅ Recommended**: all knowledge is stored and extended in **Markdown paper/research-report form** (`Problems/` problem list + dependencies + source motivation, `Progress/` research log, `Propos/` proposition library, `Methods/` general theory invention library, `Verified/` absolutely trustworthy); before scheduling, the **planner agent** autonomously draws up a plan for the next N steps; theories/frameworks/tools/methods/ideas invented during solving are distilled by the **Method Keeper** into a reusable method system (as in inventing group theory or functional analysis).
|
|
16
16
|
> - **`vibe-math-v4` (fourth generation · resident self-organizing collaborative research) 🧪 Experimental**: a group of **persistent resident subagents** **leave messages for one another + hold meetings**, and autonomously decide all task arrangements (no central scheduler); each accumulates its own progress/proposition/method/subproblem libraries and consults the others; verification is written to `Verified/` **only when all residents agree (true or false)**, otherwise it remains in the library with a probability attached; when the context reaches a threshold it automatically `/compact`s; it stops only when all agree that the original problem has been solved.
|
|
17
|
-
> - **`vibe-math-v5` (fifth generation · institute system) 🧪 Experimental · Latest**: upgrades the residents into an **institute** — **academicians** (leaders / the organizing and coordinating center, responsible for decomposition and **assignment**, setting priorities, chairing meetings, and supervising progress) + **resident researchers** (with voting rights, able to autonomously hire/fire their own temp workers) + **temp workers** (no voting rights); it has a **public charter**, **group chat and meetings**, a **compare-and-set task board**, and **real firing**; a boolean agreement of **≥ m votes** is required to write to `Verified/` (opposing votes block, abstentions are not counted, and if the threshold is not met it remains in the library with an average probability attached); state is
|
|
17
|
+
> - **`vibe-math-v5` (fifth generation · institute system) 🧪 Experimental · Latest**: upgrades the residents into an **institute** — **academicians** (leaders / the organizing and coordinating center, responsible for decomposition and **assignment**, setting priorities, chairing meetings, and supervising progress) + **resident researchers** (with voting rights, able to autonomously hire/fire their own temp workers) + **temp workers** (no voting rights); it has a **public charter**, **group chat and meetings**, a **compare-and-set task board**, and **real firing**; a boolean agreement of **≥ m votes** is required to write to `Verified/` (opposing votes block, abstentions are not counted, and if the threshold is not met it remains in the library with an average probability attached); state is written to the **hardened JSON file** `State/<institute>.v5state.json` under the institute directory (serial writes, a mandatory load before read) — **never into the host session log** — at zero token cost.
|
|
18
18
|
|
|
19
19
|
After installing this plugin package (or manually copying the presets), **four** agent presets appear in DSH's preset selector.
|
|
20
20
|
|
|
@@ -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["💾
|
|
82
|
+
PROJ["💾 State/<institute>.v5state.json (hardened JSON, authoritative)<br/>11 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
|
|
@@ -141,16 +141,17 @@ Voting has two stages: first [independent initial assessment] (mutually invisibl
|
|
|
141
141
|
|
|
142
142
|
#### State and Persistence
|
|
143
143
|
|
|
144
|
-
Institute state
|
|
145
|
-
|
|
144
|
+
Institute state is written **only** to the **hardened JSON file** `State/<institute>.v5state.json` under the institute directory: the framework's only side effect is to hand 11 kinds of events to
|
|
145
|
+
`applyV5Event`, which purely folds them into a state, and then to write that whole snapshot **serially to disk** (one serialization chain per file). Therefore
|
|
146
146
|
|
|
147
147
|
- **Zero token cost**: these events **do not enter the model context** and do not consume members' conversation budget;
|
|
148
|
-
- **Recovery takes the same code path**: both cross-process restarts and resume after an in-process abort are covered by
|
|
148
|
+
- **Recovery takes the same code path**: both cross-process restarts and resume after an in-process abort are covered by the "mandatory load before read", which is the same code either way;
|
|
149
149
|
- the whole class of problems caused by v4's direct writes to `State/*.json` — "corrupted silent overwrite / concurrent lost writes / stale cross-process snapshots" — is eliminated by construction.
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
debate records, roster mirror, task board mirror)
|
|
151
|
+
**v5 no longer writes institute events into the host session log**: DSH's session persistence **refuses to load an entire session** whose log carries an event type it does not know
|
|
152
|
+
(unless the writer marked it `ignorable: true`, and `Session.append` cannot set that field) — which would make **your own session unopenable on the next resume**.
|
|
153
|
+
Everything except the state file (member output libraries, group chat, meeting minutes, debate records, roster mirror, task board mirror) is a **human-readable artifact**,
|
|
154
|
+
and breaking it by hand does not damage the institute.
|
|
154
155
|
|
|
155
156
|
#### How the Prompt Is Composed
|
|
156
157
|
|
|
@@ -184,7 +185,7 @@ and **only one message is delivered per prompt**.
|
|
|
184
185
|
│ ├─ TaskBoard.md # task board mirror
|
|
185
186
|
│ └─ State-of-institute.md # snapshot of members' judgment on "whether it is solved"
|
|
186
187
|
├─ Verified/<type>/<id>.md # conclusion (read-only; only this can be treated as established)
|
|
187
|
-
└─ State/README.md # explains that "the
|
|
188
|
+
└─ State/README.md # explains that "the files here are mirrors — do not hand-edit them"
|
|
188
189
|
```
|
|
189
190
|
|
|
190
191
|
#### Tool Surface
|
|
@@ -200,7 +201,7 @@ and **only one message is delivered per prompt**.
|
|
|
200
201
|
- **There is a leader**: v4 has no central scheduling and everything emerges from discussion; v5 has an academician responsible for organization and assignment **inside the institute**
|
|
201
202
|
(**the framework still never assigns** —— the assigner is the academician, who is likewise bound by the m votes).
|
|
202
203
|
- **The truth gate changes from "all-unanimous" to "≥ m unanimous"** (switchable back to the v4 standard).
|
|
203
|
-
- **State is stored in the
|
|
204
|
+
- **State is stored in the hardened JSON file** `State/<institute>.v5state.json` under the institute directory (serial writes, a mandatory load before read): recovery is simply that load-before-read (see above).
|
|
204
205
|
- **Three classes of positions + hireable temp workers**: the roster is mutable, and hiring/firing are real reversible operations.
|
|
205
206
|
- **No npm experimental package is introduced**: v5 is a single `.js` file within the preset, with zero dependencies.
|
|
206
207
|
- **Meetings and verification are strictly mutually exclusive** (queued in both directions).
|
|
@@ -231,9 +232,9 @@ See [the v5 specification](vibe-math-v5/实现方案.md) (written specification)
|
|
|
231
232
|
- **Persistent self-organization (v4)**: at the start, N **persistent resident subagents** are created, after which **all task arrangements are decided by those subagents themselves through leaving messages for each other + holding meetings** (the framework only provides the message bus/meetings/task board, and never assigns tasks).
|
|
232
233
|
- **Institute system (v5)**: on top of v4's self-organization, it introduces the **organizational form of a real research institute** — the **academician** (leader) is responsible for decomposition, **assignment**, prioritization, chairing meetings, and supervising progress; **resident researchers** have voting rights and can **autonomously hire/fire their own temp workers**; **temp workers** have no voting rights; all organizational actions are performed by **members of the institute**, and the framework still only acts as the medium. See the [Vibe Math V5](#vibe-math-v5-institute-system--experimental--latest) section above for details.
|
|
233
234
|
- **Adjustable quorum (v5)**: for an object to enter `Verified/`, **≥ m = min(`quorumCap`, number of enrolled voters)** voters must cast a **consistent boolean vote** (all `1` or all `0`); **an opposing vote blocks**, and **abstentions do not count as votes but do count toward the average probability**; if the threshold is not reached, the object is **kept in the library with the average probability and the complete debate record**, without forcing an adjudication.
|
|
234
|
-
- **Zero-token-cost state persistence (v5)**: the institute state is
|
|
235
|
+
- **Zero-token-cost state persistence (v5)**: the institute state is written to the **hardened JSON file under the institute directory** (`State/<institute>.v5state.json`) and does not enter the model context; cross-process and same-process recovery go through the same code path (a mandatory load before read).
|
|
235
236
|
- **Genuinely reversible roster (v5)**: hiring creates a resident child session; firing cancels in-flight turns, releases the child session, reclaims its tasks, and discards undelivered mail; a codename is never reused.
|
|
236
|
-
- **Human-readable mirror (v4/v5)**: the roster table, task board, meeting minutes, debate records, and closing records are all written to disk as Markdown and are readable by humans at any time; but **the authoritative state is not in these files** (in v5 it is
|
|
237
|
+
- **Human-readable mirror (v4/v5)**: the roster table, task board, meeting minutes, debate records, and closing records are all written to disk as Markdown and are readable by humans at any time; but **the authoritative state is not in these files** (in v5 it is `State/<institute>.v5state.json`), so manually corrupting them will not break the institute.
|
|
237
238
|
|
|
238
239
|
---
|
|
239
240
|
|
|
@@ -340,44 +341,44 @@ Two installation methods, choose either one (they can also coexist):
|
|
|
340
341
|
|
|
341
342
|
### Method A: one-click install as a plugin package (recommended, installs all four presets at once)
|
|
342
343
|
|
|
344
|
+
On the desktop app, install `dsh-vibe-math` from **Settings → Plugins**; on the command line, use a profile:
|
|
345
|
+
|
|
343
346
|
```sh
|
|
344
347
|
dsh plugin --profile <your profile> add dsh-vibe-math
|
|
345
348
|
# Or install directly from GitHub:
|
|
346
349
|
dsh plugin --profile <your profile> add github:ChongCyrus/Vibe-Mathematics
|
|
347
350
|
```
|
|
348
351
|
|
|
349
|
-
During installation the plugin automatically writes the four presets into `~/.dsh/.agent-presets/`: `vibe-math-v2/`, `vibe-math-v3/`, `vibe-math-v4/` and `vibe-math-v5/`.
|
|
350
352
|
Then start a new session and pick **Vibe Math V3** (v3, **primary recommendation**), **Vibe Math V2** (v2, **primary recommendation**), **Vibe Math V4** (v4, resident self-organization) or **Vibe Math V5** (v5, institute system) in the preset picker — v2 and v3 are equally primary recommendations, choose according to your actual needs (see "How to choose").
|
|
351
|
-
**
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
**
|
|
353
|
+
**The two DSH generations land in different places, and this package adapts to both**:
|
|
354
|
+
|
|
355
|
+
- **DSH ≥ 0.1.7 (current)**: agent presets are declared as composition rows. This package declares all four presets in `cordis.patch.yml` (each row hands that preset's full plugin list to the host's `agentPresets` service), and **writes nothing into `~/.dsh/.agent-presets/`** — that directory has not been read since 0.1.7.
|
|
356
|
+
- **DSH ≤ 0.1.6**: presets are still directories, and the installer writes the four presets into `~/.dsh/.agent-presets/` (`vibe-math-v2/` … `vibe-math-v5/`); the declaration rows in the same `cordis.patch.yml` register nothing on those versions, so older hosts **do not error** at boot.
|
|
355
357
|
|
|
356
|
-
|
|
358
|
+
**After upgrading the package version, restart DSH: the managed content is replaced wholesale with the new version's bytes — including files you edited by hand.** This is intentional: a preset that is "half old version, half new version" will fail to mount or behave strangely, and you cannot tell from the outside. **The hand edits that get replaced are not lost**: in the directory form the original text is first backed up to `~/.dsh/.agent-presets/.vibe-math-backup/<old version>/<preset>/`, and the file names are listed in the log.
|
|
359
|
+
**If you want to customize a preset, do not edit managed content** — make a copy (the copy action in the preset picker, or declare it under a new id in your own bundle). Note: on current DSH, if you save your own declaration for the **same id**, this package skips registration and logs one line saying so — your declaration wins.
|
|
357
360
|
|
|
358
|
-
|
|
361
|
+
### Method B: manual declaration (customization / secondary development)
|
|
359
362
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
C:\Users\<you>\.dsh\.agent-presets\vibe-math-v3\ ← copy agent.cordis.yml / preset.yml / vibe-math-v3.js from vibe-math-v3/
|
|
363
|
-
C:\Users\<you>\.dsh\.agent-presets\vibe-math-v4\ ← copy agent.cordis.yml / preset.yml / vibe-math-v4.js from vibe-math-v4/
|
|
364
|
-
C:\Users\<you>\.dsh\.agent-presets\vibe-math-v5\ ← copy agent.cordis.yml / preset.yml / vibe-math-v5.js from vibe-math-v5/
|
|
365
|
-
```
|
|
363
|
+
- **DSH ≥ 0.1.7**: put the whole of `vibe-math-vN/agent.cordis.yml` into a declaration row as its `plugins` — either copy the `dsh-vibe-math/preset-declaration` row from this package's `cordis.patch.yml`, or use the host's own `@deepseek-ai/dsh-agent-preset` row; install this bundle into your profile. Full rules: the DSH skill `editing-cordis-compositions`.
|
|
364
|
+
- **DSH ≤ 0.1.6**: copy `agent.cordis.yml` / `preset.yml` / `vibe-math-vN.js` from `vibe-math-vN/` into `~/.dsh/.agent-presets/vibe-math-vN/`.
|
|
366
365
|
|
|
367
|
-
|
|
368
|
-
3. Once the session starts it is ready to use: v2/v3 tools are `vibe_math_*`, v4 is `vibe_v4_*`, v5 is `vibe_v5_*`; typing `/vibe`, `/v4`, `/v5` in the input box gives autocompletion.
|
|
366
|
+
Then start a new session and select **"Vibe Math V2"** / **"Vibe Math V3"** / **"Vibe Math V4"** / **"Vibe Math V5"** in the preset picker; once the session starts it is ready to use: v2/v3 tools are `vibe_math_*`, v4 is `vibe_v4_*`, v5 is `vibe_v5_*`; typing `/vibe`, `/v4`, `/v5` in the input box gives autocompletion.
|
|
369
367
|
|
|
370
|
-
> After
|
|
368
|
+
> After changing a preset definition you must **restart the DSH process** before starting a new session (a preset's standing mount is cached until the process exits).
|
|
371
369
|
|
|
372
370
|
### DSH version adaptation and dependencies
|
|
373
371
|
|
|
374
|
-
- **Form dependencies
|
|
372
|
+
- **Form dependencies (two lines, one bundle covers both)**: the **bundle patch mechanism** (`cordis.patch.yml`; `dsh.bundle.patch` must stay a **string** — 0.1.5/0.1.6 pass that value straight into `path.join`, and an array breaks the profile boot); **DSH ≥ 0.1.7** uses **composition-row declarations** (the `agentPresets` service), **DSH ≤ 0.1.6** uses the `~/.dsh/.agent-presets/<id>/` directory + preset picker.
|
|
375
373
|
- **Host plugin rows**: `agent.cordis.yml` references the `@deepseek-ai/dsh-*` plugin rows provided by the host (persona, agent-instructions, tool-bash/pwsh, tool-fs/fs-search, tool-jobs, skill-filesystem, tool-skill, tool-goal, plan-mode, compaction, subagent/workflow, ask-user, todo, web, etc., about 21 unique package names). Missing rows on the host cause the preset mount to fail (an error is reported when the session starts).
|
|
376
|
-
- **Host service APIs**: the preset plugins consume `subagents` (startContinuable / **sendMessage** (continue/wake; `followup` is only a method of the `Agent` object, **not** a `subagents` service method) / interrupt / drainContinuableChildren (used by v5 for **real dismissal**)), `agents` (get/roots), `tools` (register/restrict), `commands` (register), `fs` (resolve/stat/readText/writeText/listDir), plus the **optional** `subprocess` / `sandboxPolicy` / `compaction
|
|
374
|
+
- **Host service APIs**: the preset plugins consume `subagents` (startContinuable / **sendMessage** (continue/wake; `followup` is only a method of the `Agent` object, **not** a `subagents` service method) / interrupt / drainContinuableChildren (used by v5 for **real dismissal**)), `agents` (get/roots), `tools` (register/restrict), `commands` (register), `fs` (resolve/stat/readText/writeText/listDir), plus the **optional** `subprocess` / `sandboxPolicy` / `compaction`. These API shapes evolve with DSH versions; this project **has checked and adapted to them item by item on `dsh-v0.2.0-rc.2`** (`dsh.testedVersion` in `package.json`), and is aligned with `0.1.5-rc.2` as well. **Note: starting with DSH 0.1.2, `subagents.startContinuable`'s `agentOptions` / `toolFilter` require the host provider to declare the corresponding capability** (both the in-process spawn / fork providers support it; v4/v5's ability to specify member models/routes and tool permissions depends on this).
|
|
375
|
+
- **v5 keeps its institute state only in `State/<institute>.v5state.json`** (hardened JSON, serial writes, a mandatory load before read). v5 **no longer** writes institute events into the host session log: DSH's session persistence **refuses to load an entire session** whose log carries an event type it does not know (unless the writer marked it `ignorable: true`, and `Session.append` cannot set that field) — which would make **your own session unopenable on the next resume**.
|
|
376
|
+
- **Live residents are capped by the host**: DSH ≥ 0.1.7 caps the **live continuable children** of each root agent (the `subagent` row's `maxActiveSubagents`, default 8). v4/v5 report a clear message when they hit the cap and defer that spawn to the next round, instead of letting the start loop crash halfway.
|
|
377
377
|
> **2026 compatibility fix highlights** (see `docs/COMPAT-AUDIT-ROUND2.md` for details): ① `tools.restrict()` **throws on unregistered tool names**, and the filter is applied when a subagent is created, so the permission name table must contain only names actually registered in this deployment — v2/v3 previously hard-coded `web`/`fetch`/`bash` (of which `bash` is `disabled` on Windows), which caused "when you want to tighten permissions, the subagent can never start"; ② v4's real `/compact` previously looked up `agents.get()` in `subagent/end`, but that event fires only after the subagent **has already been removed from the registry**, making it dead code; it now captures the reference in `subagent/start`; ③ optional services are now read **lazily** instead of being snapshotted in `apply()` (otherwise mount order could leave `subprocess` permanently undefined and silently skip directory creation).
|
|
378
|
-
- **DSH STORE compatibility declaration**: `dsh.compatibility.dshReleases` in `package.json` declares `compatible` / `incompatible` / `unknown` item by item for each complete DSH version (currently
|
|
379
|
-
|
|
380
|
-
- **
|
|
378
|
+
- **DSH STORE compatibility declaration**: `dsh.compatibility.dshReleases` in `package.json` declares `compatible` / `incompatible` / `unknown` item by item for each complete DSH version (currently 11 versions from `0.1.2-alpha.4` … `0.2.0-rc.2` are declared `compatible`, with `0.2.0-rc.2` as the tested target); `engines.dsh` is `>=0.1.2-alpha.4 <0.1.3-0 || >=0.1.3-alpha.2 <0.1.5-0 || >=0.1.5-alpha.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-alpha.1 <0.3.0-0`; `engines.node` is `^22.19.0 || >=24.0.0`.
|
|
379
|
+
It also declares `peerDependencies` (`@deepseek-ai/dsh-base`, marked optional): DSH ≥ 0.1.7 compares the plugin's declared peer range against **its own version** and, when it does not match, **skips the whole bundle with a clear message** instead of mounting a preset that cannot run.
|
|
380
|
+
- **Runtime self-check (version + form + capabilities)**: on every start the installer (bundle plugin): **① probes the DSH version in priority order** — the `DSH_VERSION` environment variable → the `pluginManager` service's bundle list (the version of `@deepseek-ai/dsh-base` is the host version, 0.1.7+) → `getDshRuntimeVersion()` exported by `@deepseek-ai/dsh-app-boot` (a public API since 0.2.0) → `@deepseek-ai/dsh/package.json` (global 0.1.x installs), and the log names the **source**; when a detected version is not declared `compatible` in `dshReleases`, a clear notice is given. **② decides the preset form**: whether `@deepseek-ai/dsh-agent-preset` (or its registry) is mounted in the loader entry tree tells it whether this host uses "composition rows" or "directories", which decides whether it syncs `~/.dsh/.agent-presets/` — on the new host it skips that and logs that the old directory can safely be deleted. **③ runs the capability self-check** (the real mount gate): `subagents`/`agents`/`tools`/`commands`/`fs` are **required** (missing means a warning), while `subprocess`/`sandboxPolicy`/`compaction` are **optional** (missing only prompts that "functionality will silently degrade"), plus an `fs.resolve` return-shape check and a subagent `agentOptions`/`toolFilter` capability check. If a preset fails to mount, look first at the self-check warnings in the DSH log.
|
|
381
|
+
- **Upgrade path**: after upgrading DSH there is no need to reinstall this package; to upgrade this package use `dsh plugin --profile <your profile> add dsh-vibe-math@latest` (`dsh plugin`'s `--profile` is mandatory; use `add` rather than `update`, because a profile may pin the version to an exact value, in which case `update` will not cross over), and after restarting DSH the managed content is updated wholly to the new version (on the DSH ≤ 0.1.6 directory form: modified files are likewise replaced, with the original text first going to `<presetRoot>/.vibe-math-backup/`; on DSH ≥ 0.1.7 the presets come from the composition rows instead — see the "Installation" notes above).
|
|
381
382
|
|
|
382
383
|
---
|
|
383
384
|
|
|
@@ -402,7 +403,7 @@ the original text is first backed up to `~/.dsh/.agent-presets/.vibe-math-backup
|
|
|
402
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**;
|
|
403
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);
|
|
404
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
|
-
> - **zero-token-cost state persistence** — the institute state is
|
|
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.
|
|
406
407
|
>
|
|
407
408
|
> **⚠️ `vibe-math-v2` and `vibe-math-v3` are mature primary architectures; `vibe-math-v4` and `vibe-math-v5` are experimental architectures,** all are selectable; the old `vibe-math-v1` has been removed (this package contains only v2/v3/v4/v5).
|
|
408
409
|
|
|
@@ -410,7 +411,7 @@ the original text is first backed up to `~/.dsh/.agent-presets/.vibe-math-backup
|
|
|
410
411
|
|---|---|---|---|---|
|
|
411
412
|
| Positioning | **Primary** (JSON data layer) | **Primary** (third generation) | **Experimental** (fourth generation) | **Experimental** (fifth generation) |
|
|
412
413
|
| Core idea | Probability-driven: `qs.json` problems + `Propos/` proposition library, scheduled by "correctness probability / value" | **Paper-style md knowledge base + planner agent scheduling + general theory invention library** | **Persistent resident subagents self-organizing**: message each other + meetings decide all tasks, no central scheduling | **Institute**: the academician organizes and assigns, members research on their own; a conclusion requires **≥ m boolean-consistent votes**; temp workers can be hired as needed |
|
|
413
|
-
| Data | `qs/qs.json` + `Propos/<category>_Propos.json` + `Reliable/` | `Problems/` + `Progress/` + `Propos/` + `Methods/` (all md, soft-spec anchors + free narration) + `Verified/` | `Problems/` + `Progress|Propos|Methods|Subproblems/<id>/` **owned by resident id** + `Shared/` (meetings/task board/debate) + `Verified/` | Same member-owned layout as v4, plus `Institutes.md` (roster mirror); **the authoritative state is
|
|
414
|
+
| Data | `qs/qs.json` + `Propos/<category>_Propos.json` + `Reliable/` | `Problems/` + `Progress/` + `Propos/` + `Methods/` (all md, soft-spec anchors + free narration) + `Verified/` | `Problems/` + `Progress|Propos|Methods|Subproblems/<id>/` **owned by resident id** + `Shared/` (meetings/task board/debate) + `Verified/` | Same member-owned layout as v4, plus `Institutes.md` (roster mirror); **the authoritative state is `State/<institute>.v5state.json`**, and the other files are only mirrors and workspaces |
|
|
414
415
|
| Roles | explorer → per-direction solver → verifier | **planner (planner agent)** → explorer → per-direction solver → verifier → **method-keeper (method organization agent)** | **N resident researchers** (continuable), no fixed roles | **academician acad** (leader) + **resident researcher r-n** (with voting rights) + **temp worker t-n** (no voting rights, hireable and dismissible) + institute office (does not research and does not vote) |
|
|
415
416
|
| Scheduling | Code heuristics (priority + probability) | **The planner agent produces an N-step plan** (executed after validation, falls back to heuristics on failure) | **No central scheduling**: tasks arise from residents messaging each other / holding meetings (the framework is only a medium and does not assign) | **The framework still does not assign**; the **academician** decomposes/assigns/prioritizes/supervises, and members may object with reasons; the framework only relays, keeps the task board, holds meetings and counts |
|
|
416
417
|
| Closing rule | A solution/proof reaching probability `1` closes it; `never` is never scheduled | Same as v2 (near-consensus adjudication fixes flat misjudgment) | Writes to `Verified/` **only when all residents agree (true or false)**, otherwise leaves it in the library with a probability | Writes to `Verified/` **only when boolean votes ≥ m = min(`quorumCap`, number of voting members) and all are 1 or all are 0**; opposing votes block; abstentions do not count as votes but count toward the average; (can be switched back to the v4 criterion) |
|
|
@@ -449,7 +450,7 @@ The framework = **one main agent (assistant) + one code scheduler + one planner
|
|
|
449
450
|
| Who judges | Each on its own; a conclusion is reached only when all agree | Each on its own; a conclusion is reached only on **≥ m voting members in boolean agreement** |
|
|
450
451
|
| Coordination mechanism | messages + meetings | messages + meetings (strictly mutually exclusive with verification) + **compare-and-set task board** |
|
|
451
452
|
| Roster | resident, can be spawned/closed | **can grow and shrink**: resident researchers are hired with the institute office's approval; temp workers are hired and fired autonomously by academicians/researchers |
|
|
452
|
-
| State | `State/*.json` written directly |
|
|
453
|
+
| State | `State/*.json` written directly | **`State/<institute>.v5state.json` hardened JSON** (zero token cost, serial writes, a mandatory load before read) |
|
|
453
454
|
|
|
454
455
|
For the complete v5 architecture (including member lifecycle, one-round timeline, consensus state machine, meeting flow, scheduling priority, state folding, prompt composition, task board, authority matrix), see [the v5 detail diagrams](vibe-math-v5/架构图.md); for the textual specification see
|
|
455
456
|
[the v5 specification](vibe-math-v5/实现方案.md).
|
|
@@ -525,16 +526,16 @@ For the complete v5 architecture (including member lifecycle, one-round timeline
|
|
|
525
526
|
│ └─ State-of-institute.md # snapshot of members' judgment on "whether it is solved"
|
|
526
527
|
├─ Verified/<type>/<id>.md # conclusions (read-only; only these may be treated as established)
|
|
527
528
|
└─ State/
|
|
528
|
-
├─ README.md # explains "the
|
|
529
|
-
└─ <institute>.v5state.json #
|
|
529
|
+
├─ README.md # explains that "the files here are mirrors — do not hand-edit them"
|
|
530
|
+
└─ <institute>.v5state.json # the authoritative state (hardened JSON, serial writes, a mandatory load before read)
|
|
530
531
|
```
|
|
531
532
|
|
|
532
533
|
> Enabling Lean formal verification adds two more directories: this institute's `Formal/` (working files + index + formalization todos) and `Verified/Lean/`
|
|
533
534
|
> (**archived proofs**), plus the **cross-project** `<VibeMath root>/Formal/{Lib,Proved}/` (reusable definitions and already-proved lemmas) — see
|
|
534
535
|
> the "Lean formal verification" section above.
|
|
535
536
|
|
|
536
|
-
**v5 iron rules**: ① the authoritative state
|
|
537
|
-
|
|
537
|
+
**v5 iron rules**: ① the authoritative state is written only to `State/<institute>.v5state.json` (hardened JSON, serial writes, a mandatory load before read);
|
|
538
|
+
in the table above, every other file is merely a **mirror/workspace**, and breaking it by hand-editing will not destroy the institute;
|
|
538
539
|
② members **write only their own library** (`Members/<own codename>/`), but may read anyone's library;
|
|
539
540
|
③ only `Verified/` and cards marked "verified·true/false" are **absolutely trusted**; everything else (including unverified assertions in `Methods/`) is merely experiential reference,
|
|
540
541
|
and citations must be marked "unverified"; ④ entry into the library must state all three of **degree of value / motivation-purpose plan / own probability estimate**, none may be omitted.
|
|
@@ -773,7 +774,7 @@ Adjustable via `vibe_v4_set` (persisted to `State/settings.json`):
|
|
|
773
774
|
|
|
774
775
|
### v5 (institute system · experimental) defaults
|
|
775
776
|
|
|
776
|
-
Adjustable via `vibe_v5_set` (persisted in the
|
|
777
|
+
Adjustable via `vibe_v5_set` (persisted in the institute state file `State/<institute>.v5state.json`):
|
|
777
778
|
|
|
778
779
|
| Parameter | Default | Description |
|
|
779
780
|
|---|---|---|
|
|
@@ -808,7 +809,7 @@ Common controls: `vibe_v5_configure` (configure first) → `vibe_v5_start` (star
|
|
|
808
809
|
|
|
809
810
|
## 📝 Checkpoint resume & manual intervention (two hard requirements)
|
|
810
811
|
|
|
811
|
-
- **Checkpoint resume**: all state is persisted to disk (v2: `VibeMath_State/*.json`; v3: `State/*.json`; **v5: the
|
|
812
|
+
- **Checkpoint resume**: all state is persisted to disk (v2: `VibeMath_State/*.json`; v3: `State/*.json`; **v5: the hardened JSON `State/<institute>.v5state.json` under the institute directory**), and every subagent is a DSH **continuable persistent session** (the conversation is saved automatically by DSH). After a restart, open a new session → `vibe_math_resume` / `vibe_v4_resume` / `vibe_v5_resume` resumes the run. v2/v3 additionally use a **process epoch** to distinguish "same-process pause → resume" (keeping live subagents running) from "cross-process restart" (cleaning up stale tasks). **v3's md knowledge base is itself a narrative breakpoint** — on resume the agent continues writing from the tail of the research log / problem card / proposition card; **in v5 this role is taken by the state file** — recovery is simply "load before read", cross-process and same-process go through the same code path, and when member sessions are rebuilt they are re-seeded by "reading back your own Progress/" (rather than making them start over).
|
|
812
813
|
- **Intervening mid-run**: `manual` mode suspends decisions at key points (v2: explorer/solver dispatch, verification verdicts; v3: the **plan approval gate** (after the planning agent produces a plan, it waits for your approve/reject), the verification verdict gate, and the **method promotion gate** (project methods → global library)); you can switch back to automatic at any time with `set_mode auto` (which automatically clears all pending decisions); you can `message_agent` / `interrupt_agent` any subagent. **v4/v5 are intervenable by nature**: leave a message for a member at any time (`vibe_v5_message`), convene a meeting, pause the whole institute, add or remove positions — members will see it on their next round.
|
|
813
814
|
- **Progress reporting**: **event-driven** by default — reports are written only when an event such as an agent status update occurs (v2: `Progress_Logs/report.json`; v3: `Progress_Logs/report.json` + `Logs/报告.md`, a paper-style human-readable summary; `reportMode` can be `file`/`push`/`both`, and `push` wakes up resident agents to report proactively via `subagents.sendMessage(root agent, resident subagent, …)` — `followup` is **not** a method of the `subagents` service, it is only a method of the `Agent` object); scheduled automatic reporting (interval in milliseconds) starts only when `reportIntervalMs` is set to >0. **v4/v5 progress reporting is "self-reporting within the institute"**: members write their progress into their own `Progress/`, and state key conclusions in the group chat (in v5 there are also readers of the mirrors `Institutes.md` / `Shared/TaskBoard.md`, the meeting minutes, the debate records, and `Problems/conclusion.md`).
|
|
814
815
|
|
|
@@ -836,8 +837,9 @@ Common controls: `vibe_v5_configure` (configure first) → `vibe_v5_start` (star
|
|
|
836
837
|
## ⚠️ Known limitations (deliberate simplifications)
|
|
837
838
|
|
|
838
839
|
**v2**:
|
|
839
|
-
- 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
|
|
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
|
+
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
|
+
- **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`).
|
|
841
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.
|
|
842
844
|
- Problems/propositions with `never` priority are **never scheduled**, and do not block strict termination (they count as voluntarily abstaining).
|
|
843
845
|
- The four preset files are mutually independent and can coexist; only one preset can be selected in a given session at a time.
|
|
@@ -862,8 +864,9 @@ Common controls: `vibe_v5_configure` (configure first) → `vibe_v5_start` (star
|
|
|
862
864
|
and only after the meeting closes does it go through the full voting procedure.
|
|
863
865
|
- **After `resume`, the round counter restarts from 1** (in-memory state, used only for throttling and compaction hints); the authoritative progress lives in the members' own `Progress/`.
|
|
864
866
|
- **A member's charter is an onboarding snapshot**: upgrading this package will not rewrite the charters of members in an institute that is already running (they keep the version frozen at onboarding).
|
|
865
|
-
If you need a new charter, open a new institute in a new session; the
|
|
866
|
-
- **Installer behavior is the same as v2** (
|
|
867
|
+
If you need a new charter, open a new institute in a new session; the state file and file tree need no migration.
|
|
868
|
+
- **Installer behavior is the same as v2** (on the DSH ≤ 0.1.6 directory form: as soon as the version changes it replaces the managed files wholesale, backing up the originals first, and the `vibe-math-v5` directory is likewise managed;
|
|
869
|
+
on DSH ≥ 0.1.7 the installer writes no preset directory at all — the presets come from the composition rows).
|
|
867
870
|
- **Lean formalization requires a Lean toolchain on the host**: the framework neither bundles nor downloads one; without a toolchain the three Lean tools truthfully return
|
|
868
871
|
`LEAN_NOT_FOUND`, and formalization code can still be written down and archived, but verification cannot be executed.
|
|
869
872
|
- **The gate in `require` mode is "shelving" rather than "deadlock"**: true/false conclusions that lack formalization are recorded as undecided + entered into the formalization to-do,
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
> - **`vibe-math-v2`(概率驱动 · JSON 数据层)✅ 主推**:`qs.json` 问题清单 + `Propos/` 命题库 + 概率驱动调度 + 代码启发式调度;
|
|
15
15
|
> - **`vibe-math-v3`(第三代 · 论文式 md + 规划代理 + 方法库)✅ 主推**:全部知识以 **Markdown 论文/研究报告式** 存储与续写(`Problems/` 问题清单+依赖+来源动机、`Progress/` 研究日志、`Propos/` 命题库、`Methods/` 通用理论发明库、`Verified/` 绝对可信);调度前由**规划代理**自主制定接下来 N 步计划;解决过程中发明的理论/框架/工具/方法/思想由 **Method Keeper** 沉淀为可复用方法体系(如发明群论、泛函分析那样)。
|
|
16
16
|
> - **`vibe-math-v4`(第四代 · 常驻自组织合作研究)🧪 实验性**:一组**持久化常驻子代理**互相**留言 + 开会**,自主决定一切任务安排(无中央调度);各自沉淀进度/命题/方法/子问题库并互相查阅;验证**仅当全体常驻一致(真 或 假)**才写入 `Verified/`,否则留库附概率;上下文达阈值自动 `/compact`;仅当全体一致认为原问题已解决才停止。
|
|
17
|
-
> - **`vibe-math-v5`(第五代 · 研究所体系)🧪 实验性 · 最新**:把常驻升级为一座**研究所**——**院士**(领头人 / 组织与协调中心,负责拆解与**分派**、定优先级、主持会议、督导进度)+ **常驻研究员**(有表决权,可自主雇佣/解雇自己的临时工)+ **临时工**(无表决权);有**公共规章**、**群聊与会议**、**compare-and-set 任务板**、**真实解雇**;**≥ m 票布尔一致**才写入 `Verified
|
|
17
|
+
> - **`vibe-math-v5`(第五代 · 研究所体系)🧪 实验性 · 最新**:把常驻升级为一座**研究所**——**院士**(领头人 / 组织与协调中心,负责拆解与**分派**、定优先级、主持会议、督导进度)+ **常驻研究员**(有表决权,可自主雇佣/解雇自己的临时工)+ **临时工**(无表决权);有**公共规章**、**群聊与会议**、**compare-and-set 任务板**、**真实解雇**;**≥ m 票布尔一致**才写入 `Verified/`(反向票阻塞、弃权不计票、未达门槛留库附平均概率);状态存于研究所目录下的**加固 JSON** `State/<研究所>.v5state.json`(串行写、读前必 load),**不写入宿主会话日志**,零 token 成本。
|
|
18
18
|
|
|
19
19
|
安装本插件包(或手动复制预设)后,DSH 的预设选择器里会出现**四个** agent preset。
|
|
20
20
|
|
|
@@ -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["💾
|
|
82
|
+
PROJ["💾 State/<研究所>.v5state.json(加固 JSON 权威源)<br/>11 类事件 · 纯折叠 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
|
|
@@ -141,16 +141,17 @@ flowchart TB
|
|
|
141
141
|
|
|
142
142
|
#### 状态与持久化
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
研究所状态只写在**研究所目录下的加固 JSON** `State/<研究所>.v5state.json` 里:框架的副作用只是把 11 类事件
|
|
145
|
+
交给 `applyV5Event` 纯折叠成状态,再把整份快照**串行落盘**(每条序列化链只服务一个文件)。因此
|
|
146
146
|
|
|
147
147
|
- **零 token 成本**:这些事件**不进模型上下文**,不占成员的对话预算;
|
|
148
|
-
- **恢复走同一条代码路径**:跨进程重启与同进程 abort 后 resume
|
|
148
|
+
- **恢复走同一条代码路径**:跨进程重启与同进程 abort 后 resume 都靠"读前必 load",两条路径是同一段代码;
|
|
149
149
|
- v4 的 `State/*.json` 直写带来的"损坏静默覆盖 / 并发丢写 / 跨进程陈旧快照"这一整类问题在构造上被消除。
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
**v5 不再把研究所事件写进宿主会话日志**:DSH 的会话持久化遇到日志里不认识的事件类型会**拒绝加载整个会话**
|
|
152
|
+
(除非写入方标记 `ignorable: true`,而 `Session.append` 无法设置该字段),那会让**你自己的会话在下次恢复时打不开**。
|
|
153
|
+
除状态文件之外的文件(成员成果库、群聊、会议纪要、辩论录、编制镜像、任务板镜像)都是**人可读产物**,
|
|
154
|
+
手工改坏不会破坏研究所。
|
|
154
155
|
|
|
155
156
|
#### 提示词是怎么构成的
|
|
156
157
|
|
|
@@ -184,7 +185,7 @@ flowchart TB
|
|
|
184
185
|
│ ├─ TaskBoard.md # 任务板镜像
|
|
185
186
|
│ └─ State-of-institute.md # 成员对"是否已解决"的判断快照
|
|
186
187
|
├─ Verified/<类型>/<id>.md # 定论(只读;只有它能被当作已确立)
|
|
187
|
-
└─ State/README.md # 说明"
|
|
188
|
+
└─ State/README.md # 说明"这里的文件是镜像,请勿手改"
|
|
188
189
|
```
|
|
189
190
|
|
|
190
191
|
#### 工具面
|
|
@@ -200,7 +201,7 @@ flowchart TB
|
|
|
200
201
|
- **有领头人**:v4 无中央调度、一切靠讨论涌现;v5 在**所内**设有院士负责组织与分派
|
|
201
202
|
(**框架仍然绝不指派**——指派者是院士,同样受 m 票约束)。
|
|
202
203
|
- **求真门槛从"全体一致"改为"≥ m 一致"**(可切回 v4 口径)。
|
|
203
|
-
-
|
|
204
|
+
- **状态存于研究所目录下的加固 JSON** `State/<研究所>.v5state.json`(串行写、读前必 load):恢复就是"读之前先 load"(见上)。
|
|
204
205
|
- **三类职位 + 可雇用的临时工**:编制是可变的,雇佣/解雇是真实的可逆操作。
|
|
205
206
|
- **不引入任何 npm 实验包**:v5 是 preset 内的单个 `.js` 文件,零依赖。
|
|
206
207
|
- **会议与验证严格互斥**(双向排队)。
|
|
@@ -231,9 +232,9 @@ flowchart TB
|
|
|
231
232
|
- **常驻自组织(v4)**:起始产生 N 个**持久化常驻子代理**,此后**所有任务安排由它们互相留言 + 开会自行决定**(框架只做消息总线/会议/任务板,绝不分配任务)。
|
|
232
233
|
- **研究所体系(v5)**:在 v4 的自组织之上引入**现实研究所的组织形式**——**院士**(领头人)负责拆解、**分派**、定优先级、主持会议、督导进度;**常驻研究员**有表决权并可**自主雇佣/解雇自己的临时工**;**临时工**无表决权;全部组织动作都由**所内成员**完成,框架仍然只做媒介。详见上方 [Vibe Math V5](#vibe-math-v5研究所体系-实验性--最新) 一节。
|
|
233
234
|
- **可调的一致性门槛(v5)**:对象要进 `Verified/`,需要 **≥ m = min(`quorumCap`, 在册有表决权人数)** 名有表决权者投出**一致的布尔票**(全 `1` 或全 `0`);**反向票阻塞**、**弃权不计票但计入平均概率**;未达门槛则**留库附平均概率与完整辩论录**,不强行裁决。
|
|
234
|
-
- **零 token 成本的状态持久化(v5
|
|
235
|
+
- **零 token 成本的状态持久化(v5)**:研究所状态写在**研究所目录下的加固 JSON** 里(`State/<研究所>.v5state.json`),不进模型上下文;跨进程与同进程恢复走同一条代码路径(读前必 load)。
|
|
235
236
|
- **真实可逆的编制(v5)**:雇佣会创建常驻子会话,解雇会取消在途回合、释放子会话、收回其任务并丢弃未投递邮件;代号永不复用。
|
|
236
|
-
- **人可读镜像(v4/v5)**:编制表、任务板、会议纪要、辩论录、结题记录都以 Markdown 落盘,人随时可读;但**权威状态不在这些文件里**(v5
|
|
237
|
+
- **人可读镜像(v4/v5)**:编制表、任务板、会议纪要、辩论录、结题记录都以 Markdown 落盘,人随时可读;但**权威状态不在这些文件里**(v5 在 `State/<研究所>.v5state.json`),所以手工改坏它们不会破坏研究所。
|
|
237
238
|
|
|
238
239
|
---
|
|
239
240
|
|
|
@@ -340,43 +341,43 @@ Lean 通过只保证"这段代码过了内核",**不保证它说的就是命
|
|
|
340
341
|
|
|
341
342
|
### 方式 A:作为插件包一键安装(推荐,同时装出四个预设)
|
|
342
343
|
|
|
344
|
+
桌面版在「设置 → 插件」里安装 `dsh-vibe-math`;命令行 profile 用:
|
|
345
|
+
|
|
343
346
|
```sh
|
|
344
347
|
dsh plugin --profile <你的 profile> add dsh-vibe-math
|
|
345
348
|
# 或从 GitHub 直装:
|
|
346
349
|
dsh plugin --profile <你的 profile> add github:ChongCyrus/Vibe-Mathematics
|
|
347
350
|
```
|
|
348
351
|
|
|
349
|
-
安装时插件会自动把四个 preset 写入 `~/.dsh/.agent-presets/`:`vibe-math-v2/`、`vibe-math-v3/`、`vibe-math-v4/` 与 `vibe-math-v5/`。
|
|
350
352
|
之后新建会话,预设选择器里选择 **Vibe Math V3**(v3,**主推**)、**Vibe Math V2**(v2,**主推**)、**Vibe Math V4**(v4,常驻自组织)或 **Vibe Math V5**(v5,研究所体系)即可——v2 与 v3 同级主推,按实际需求自选(见「怎么选」)。
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
353
|
+
**两个 DSH 世代的落点不同,本包自动适配**:
|
|
354
|
+
|
|
355
|
+
- **DSH ≥ 0.1.7(当前)**:agent preset 由组合行声明。本包在 `cordis.patch.yml` 里声明四个 preset(每行把该 preset 的完整插件清单交给宿主的 `agentPresets` 服务注册),**不往 `~/.dsh/.agent-presets/` 写任何东西**——该目录自 0.1.7 起不再被读取。
|
|
356
|
+
- **DSH ≤ 0.1.6**:preset 仍是目录形式,安装器把四个 preset 写入 `~/.dsh/.agent-presets/`(`vibe-math-v2/` … `vibe-math-v5/`);同一份 `cordis.patch.yml` 里的声明行在这些版本上什么都不注册,因此旧版启动**不会报错**。
|
|
355
357
|
|
|
356
|
-
|
|
358
|
+
**升级包版本后重启 DSH,受管内容会被整体替换成新版本的字节——包括你手动改过的文件。** 这是有意的:一个"一半旧版、一半新版"的 preset 会挂不上或行为诡异,而你在外面看不出来。**被替换掉的手改内容不会丢**:目录形式下原文会先备份到 `~/.dsh/.agent-presets/.vibe-math-backup/<旧版本>/<preset>/`,文件名会在日志里列出。
|
|
359
|
+
**要自定义 preset 就别改受管内容**——复制一份(预设选择器里的复制动作,或在自己的 bundle 里用新的 id 声明)。注意:在当前 DSH 里你若为**同名 id** 保存了自己的声明,本包会放弃注册并打印一行说明,以你的声明为准。
|
|
357
360
|
|
|
358
|
-
|
|
361
|
+
### 方式 B:手动声明(自定义 / 二次开发)
|
|
359
362
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
C:\Users\<你>\.dsh\.agent-presets\vibe-math-v3\ ← 复制 vibe-math-v3/ 下的 agent.cordis.yml / preset.yml / vibe-math-v3.js
|
|
363
|
-
C:\Users\<你>\.dsh\.agent-presets\vibe-math-v4\ ← 复制 vibe-math-v4/ 下的 agent.cordis.yml / preset.yml / vibe-math-v4.js
|
|
364
|
-
C:\Users\<你>\.dsh\.agent-presets\vibe-math-v5\ ← 复制 vibe-math-v5/ 下的 agent.cordis.yml / preset.yml / vibe-math-v5.js
|
|
365
|
-
```
|
|
363
|
+
- **DSH ≥ 0.1.7**:把 `vibe-math-vN/agent.cordis.yml` 整段作为 `plugins` 放进一个声明行——既可以照抄本包 `cordis.patch.yml` 里的 `dsh-vibe-math/preset-declaration` 行,也可以用宿主自带的 `@deepseek-ai/dsh-agent-preset` 行;把这个 bundle 装进你的 profile 即可。完整规则见 DSH 自带技能 `editing-cordis-compositions`。
|
|
364
|
+
- **DSH ≤ 0.1.6**:把 `vibe-math-vN/` 下的 `agent.cordis.yml` / `preset.yml` / `vibe-math-vN.js` 复制到 `~/.dsh/.agent-presets/vibe-math-vN/`。
|
|
366
365
|
|
|
367
|
-
|
|
368
|
-
3. 会话启动后即可使用:v2/v3 的工具是 `vibe_math_*`、v4 是 `vibe_v4_*`、v5 是 `vibe_v5_*`;输入框键入 `/vibe`、`/v4`、`/v5` 有自动补全。
|
|
366
|
+
新建会话后在 preset 选择器里选 **「Vibe Math V2」** / **「Vibe Math V3」** / **「Vibe Math V4」** / **「Vibe Math V5」**;会话启动后即可使用:v2/v3 的工具是 `vibe_math_*`、v4 是 `vibe_v4_*`、v5 是 `vibe_v5_*`;输入框键入 `/vibe`、`/v4`、`/v5` 有自动补全。
|
|
369
367
|
|
|
370
|
-
>
|
|
368
|
+
> 改过 preset 定义后需**重启 DSH 进程**再开新会话(preset 的 standing mount 会缓存到进程退出)。
|
|
371
369
|
|
|
372
370
|
### DSH 版本适配与依赖
|
|
373
371
|
|
|
374
|
-
-
|
|
372
|
+
- **形态依赖(两条线,本包一份 bundle 全兼容)**:**bundle patch 机制**(`cordis.patch.yml`,`dsh.bundle.patch` 必须是**字符串**——0.1.5/0.1.6 会把该值直接送进 `path.join`,数组会让 profile 起不来);**DSH ≥ 0.1.7** 走 **组合行声明**(`agentPresets` 服务),**DSH ≤ 0.1.6** 走 `~/.dsh/.agent-presets/<id>/` 目录 + preset picker。
|
|
375
373
|
- **宿主插件行**:`agent.cordis.yml` 引用宿主提供的 `@deepseek-ai/dsh-*` 插件行(persona、agent-instructions、tool-bash/pwsh、tool-fs/fs-search、tool-jobs、skill-filesystem、tool-skill、tool-goal、plan-mode、compaction、subagent/workflow、ask-user、todo、web 等,约 21 个唯一包名)。宿主缺行会导致 preset 挂载失败(会话启动时报错)。
|
|
376
|
-
- **宿主服务 API**:预设插件消费 `subagents`(startContinuable / **sendMessage**(续做/唤醒;`followup` 仅为 `Agent` 对象方法、**不是** `subagents` 服务方法)/ interrupt / drainContinuableChildren(v5 用于**真实解雇**))、`agents`(get/roots)、`tools`(register/restrict)、`commands`(register)、`fs`(resolve/stat/readText/writeText/listDir),以及**可选** `subprocess` / `sandboxPolicy` / `compaction
|
|
374
|
+
- **宿主服务 API**:预设插件消费 `subagents`(startContinuable / **sendMessage**(续做/唤醒;`followup` 仅为 `Agent` 对象方法、**不是** `subagents` 服务方法)/ interrupt / drainContinuableChildren(v5 用于**真实解雇**))、`agents`(get/roots)、`tools`(register/restrict)、`commands`(register)、`fs`(resolve/stat/readText/writeText/listDir),以及**可选** `subprocess` / `sandboxPolicy` / `compaction`。这些 API 形状随 DSH 版本演进;本项目**已在 `dsh-v0.2.0-rc.2` 上逐项核对并适配**(`package.json` 的 `dsh.testedVersion`),并同时对齐 `0.1.5-rc.2`。**注意:DSH 0.1.2 起 `subagents.startContinuable` 的 `agentOptions` / `toolFilter` 需要宿主 provider 声明对应 capability**(spawn / fork 进程内 provider 均支持,v4/v5 指定成员模型/路由与工具权限依赖于此)。
|
|
375
|
+
- **v5 的研究所状态只写在 `State/<研究所>.v5state.json`**(加固 JSON、串行写、读前必 load)。v5 **不再**把研究所事件写进宿主会话日志:DSH 的会话持久化遇到日志里不认识的事件类型会**拒绝加载整个会话**(除非写入方标记 `ignorable: true`,而 `Session.append` 无法设置该字段),那会让**你自己的会话在下次恢复时打不开**。
|
|
376
|
+
- **常驻数量有宿主上限**:DSH ≥ 0.1.7 对每个根代理的**存活 continuable 子代理**设了上限(`subagent` 行的 `maxActiveSubagents`,默认 8)。v4/v5 会在撞到上限时给出明确提示、把该次派生推迟到下一轮,而不是让启动循环崩在半途。
|
|
377
377
|
> **2026 兼容性修复要点**(详见 `docs/COMPAT-AUDIT-ROUND2.md`):① `tools.restrict()` 对**未注册的工具名抛错**,而 filter 在建立子代理时应用,故权限名表必须只含本部署真正注册的名字——v2/v3 原先硬编码 `web`/`fetch`/`bash`(其中 `bash` 在 Windows 被 `disabled`)会导致"想收紧权限时子代理永远起不来";② v4 的真实 `/compact` 原先在 `subagent/end` 里查 `agents.get()`,但该事件在子代理**已被移出注册表之后**才触发,属死代码,已改为在 `subagent/start` 捕获引用;③ 可选服务改为**惰性读取**,不再在 `apply()` 快照(否则挂载顺序会让 `subprocess` 永久为 undefined 而静默不建目录)。
|
|
378
|
-
- **DSH STORE 兼容声明**:`package.json` 的 `dsh.compatibility.dshReleases` 对每个完整 DSH 版本逐项声明 `compatible` / `incompatible` / `unknown
|
|
379
|
-
|
|
378
|
+
- **DSH STORE 兼容声明**:`package.json` 的 `dsh.compatibility.dshReleases` 对每个完整 DSH 版本逐项声明 `compatible` / `incompatible` / `unknown`(当前声明 `0.1.2-alpha.4` … `0.2.0-rc.2` 共 11 个版本为 `compatible`,实测目标为 `0.2.0-rc.2`);`engines.dsh` 为 `>=0.1.2-alpha.4 <0.1.3-0 || >=0.1.3-alpha.2 <0.1.5-0 || >=0.1.5-alpha.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-alpha.1 <0.3.0-0`;`engines.node` 为 `^22.19.0 || >=24.0.0`。
|
|
379
|
+
另外声明了 `peerDependencies`(`@deepseek-ai/dsh-base`,并标为 optional):DSH ≥ 0.1.7 会用**宿主自己的版本**去比对插件声明的 peer 范围,不满足时**跳过整个 bundle 并给出明确提示**,而不是挂上一个跑不通的预设。
|
|
380
|
+
- **运行时自检(版本 + 形态 + 能力)**:安装器(bundle 插件)每次启动时:**① 按优先级探测 DSH 版本**——`DSH_VERSION` 环境变量 → `pluginManager` 服务的 bundle 列表(`@deepseek-ai/dsh-base` 的版本即宿主版本,0.1.7+)→ `@deepseek-ai/dsh-app-boot` 导出的 `getDshRuntimeVersion()`(0.2.0+ 的公开 API)→ `@deepseek-ai/dsh/package.json`(全局 0.1.x 安装),日志会写明**来源**;探测到且未被 `dshReleases` 声明为 `compatible` 时给出明确提示。**② 判断 preset 形态**:从 loader 入口树里是否挂了 `@deepseek-ai/dsh-agent-preset`(或其 registry)判断本宿主是"组合行"还是"目录",据此决定是否同步 `~/.dsh/.agent-presets/`——新宿主上会跳过并在日志里说明旧目录可安全删除。**③ 能力自检**(真正的挂载门槛):`subagents`/`agents`/`tools`/`commands`/`fs` 为**必需**(缺失即 warning),`subprocess`/`sandboxPolicy`/`compaction` 为**可选**(缺失只提示"功能会静默降级"),另含 `fs.resolve` 返回形状检测与 subagent `agentOptions`/`toolFilter` capability 检测。preset 挂载失败时先看 DSH 日志里的自检 warning。
|
|
380
381
|
- **升级路径**:DSH 升级后无需重装本包;升级本包用 `dsh plugin --profile <你的 profile> add dsh-vibe-math@latest`(`dsh plugin` 的 `--profile` 是必填项;用 `add` 而不是 `update`,因为 profile 里可能把版本钉成精确值,那时 `update` 不会跨过去),重启 DSH 后安装器会把四个 preset 的受管文件整体更新到新版本(改过的文件同样被替换,原文先进 `<presetRoot>/.vibe-math-backup/`;见上文「安装」说明)。
|
|
381
382
|
|
|
382
383
|
---
|
|
@@ -402,7 +403,7 @@ dsh plugin --profile <你的 profile> add github:ChongCyrus/Vibe-Mathematics
|
|
|
402
403
|
> - **有组织的自组织**——现实研究所那样有**领头人(院士)**负责拆解、分派、定优先级、主持会议、督导进度,但**判断仍归每个人自己**;
|
|
403
404
|
> - **可增减的编制**——常驻研究员 + 可**自主雇佣/解雇**的临时工(临时工无表决权,适合处理核对、试算、资料整理等杂活);
|
|
404
405
|
> - **可调的一致性门槛**——`m = min(quorumCap, 有表决权人数)` 票布尔一致即定论(比"全体一致"更容易收敛,同时**反向票仍然阻塞**,少数派不会被弃权淹没);
|
|
405
|
-
> - **零 token
|
|
406
|
+
> - **零 token 成本的状态持久化**——研究所状态写在研究所目录下的加固 JSON 里,不占成员上下文预算。
|
|
406
407
|
>
|
|
407
408
|
> **⚠️ `vibe-math-v2` 与 `vibe-math-v3` 是成熟主推架构;`vibe-math-v4`、`vibe-math-v5` 是实验性架构,** 均可选择;老 `vibe-math-v1` 已被移除(本包仅含 v2/v3/v4/v5)。
|
|
408
409
|
|
|
@@ -410,7 +411,7 @@ dsh plugin --profile <你的 profile> add github:ChongCyrus/Vibe-Mathematics
|
|
|
410
411
|
|---|---|---|---|---|
|
|
411
412
|
| 定位 | **主推**(JSON 数据层) | **主推**(第三代) | **实验性**(第四代) | **实验性**(第五代) |
|
|
412
413
|
| 核心思想 | 概率驱动:`qs.json` 问题 + `Propos/` 命题库,按「正确概率 / 价值」调度 | **论文式 md 知识库 + 规划代理调度 + 通用理论发明库** | **持久化常驻子代理自组织**:互相留言 + 开会决定一切任务,无中央调度 | **研究所**:院士做组织与分派,成员各自研究;**≥ m 票布尔一致**才定论;临时工可按需雇入 |
|
|
413
|
-
| 数据 | `qs/qs.json` + `Propos/<分类>_Propos.json` + `Reliable/` | `Problems/` + `Progress/` + `Propos/` + `Methods/`(全部 md,软规范锚点 + 自由叙述)+ `Verified/` | `Problems/` + **按常驻 id 归属**的 `Progress|Propos|Methods|Subproblems/<id>/` + `Shared/`(会议/任务板/辩论)+ `Verified/` | 同 v4 的按成员归属布局,另加 `Institutes.md
|
|
414
|
+
| 数据 | `qs/qs.json` + `Propos/<分类>_Propos.json` + `Reliable/` | `Problems/` + `Progress/` + `Propos/` + `Methods/`(全部 md,软规范锚点 + 自由叙述)+ `Verified/` | `Problems/` + **按常驻 id 归属**的 `Progress|Propos|Methods|Subproblems/<id>/` + `Shared/`(会议/任务板/辩论)+ `Verified/` | 同 v4 的按成员归属布局,另加 `Institutes.md`(编制镜像);**权威状态在 `State/<研究所>.v5state.json`**,其余文件只是镜像与工作区 |
|
|
414
415
|
| 角色 | explorer → 逐方向 solver → verifier | **planner(规划代理)** → explorer → 逐方向 solver → verifier → **method-keeper(方法整理代理)** | **N 个常驻研究者**(continuable),无固定角色 | **院士 acad**(领头人)+ **常驻研究员 r-n**(有表决权)+ **临时工 t-n**(无表决权,可雇可解雇)+ 所办(不研究不投票) |
|
|
415
416
|
| 调度方式 | 代码启发式(优先级 + 概率) | **规划代理产出 N 步计划**(校验后执行,失败回退启发式) | **无中央调度**:任务由常驻互相留言/开会(框架只做媒介,不指派) | **框架仍不指派**;由**院士**拆解/分派/定优先级/督导,成员可据理反对;框架只做中继、任务板、会议与计数 |
|
|
416
417
|
| 收口规则 | 解法/证明达概率 `1` 即收口,`never` 永不调度 | 同 v2(近共识裁决修复 flat 误判) | **仅当全体常驻一致(真 或 假)**才写入 `Verified/`,否则留库附概率 | **布尔票 ≥ m = min(`quorumCap`, 有表决权人数) 且全为 1 或全为 0** 才写入 `Verified/`;反向票阻塞;弃权不计票但计入平均;(可切回 v4 口径) |
|
|
@@ -449,7 +450,7 @@ dsh plugin --profile <你的 profile> add github:ChongCyrus/Vibe-Mathematics
|
|
|
449
450
|
| 谁做判断 | 各自;全体一致才定论 | 各自;**≥ m 票布尔一致**才定论 |
|
|
450
451
|
| 协调机制 | 消息 + 会议 | 消息 + 会议(与验证严格互斥)+ **compare-and-set 任务板** |
|
|
451
452
|
| 编制 | 常驻,可增开/关闭 | **可增减**:常驻研究员由所办批准增聘;临时工由院士/研究员自主雇佣解雇 |
|
|
452
|
-
| 状态 | `State/*.json` 直写 |
|
|
453
|
+
| 状态 | `State/*.json` 直写 | **`State/<研究所>.v5state.json` 加固 JSON**(零 token 成本、串行写、读前必 load) |
|
|
453
454
|
|
|
454
455
|
v5 的完整架构(含成员生命周期、一轮时序、共识状态机、会议流程、调度优先级、状态折叠、提示词构成、
|
|
455
456
|
任务板、职权矩阵)见 [`vibe-math-v5/架构图.md`](vibe-math-v5/架构图.md);文字规格见
|
|
@@ -526,16 +527,16 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
|
|
|
526
527
|
│ └─ State-of-institute.md # 成员对"是否已解决"的判断快照
|
|
527
528
|
├─ Verified/<类型>/<id>.md # 定论(只读;只有它能被当作已确立)
|
|
528
529
|
└─ State/
|
|
529
|
-
├─ README.md # 说明"
|
|
530
|
-
└─ <研究所>.v5state.json #
|
|
530
|
+
├─ README.md # 说明"这里的文件是镜像,请勿手改"
|
|
531
|
+
└─ <研究所>.v5state.json # 权威状态(加固 JSON、串行写、读前必 load)
|
|
531
532
|
```
|
|
532
533
|
|
|
533
534
|
> 启用 Lean 形式化验证时另有两个目录:本所 `Formal/`(工作文件 + 索引 + 形式化待办)与 `Verified/Lean/`
|
|
534
535
|
> (**归档证明**),以及**跨项目**的 `<VibeMath根>/Formal/{Lib,Proved}/`(可复用定义与已证引理)——详见
|
|
535
536
|
> 上方「Lean 形式化验证」一节。
|
|
536
537
|
|
|
537
|
-
**v5 铁律**:①
|
|
538
|
-
|
|
538
|
+
**v5 铁律**:① 权威状态只写在 `State/<研究所>.v5state.json`(加固 JSON、串行写、读前必 load)里,
|
|
539
|
+
上表中其余文件都只是**镜像/工作区**,手工改坏不会破坏研究所;
|
|
539
540
|
② 成员**只写自己的库**(`Members/<自己的代号>/`),但可以读任何人的库;
|
|
540
541
|
③ 只有 `Verified/` 与标注"已验证·真/假"的卡片**绝对可信**,其余(含 `Methods/` 里的未验证断言)只是经验参考,
|
|
541
542
|
引用必须注明"未验证";④ 入库必须写明**价值程度 / 动机用途计划 / 自己的概率估计**三项,缺一不可。
|
|
@@ -774,7 +775,7 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
|
|
|
774
775
|
|
|
775
776
|
### v5(研究所体系 · 实验)默认值
|
|
776
777
|
|
|
777
|
-
`vibe_v5_set`
|
|
778
|
+
`vibe_v5_set` 可调(持久化在研究所状态文件 `State/<研究所>.v5state.json` 里):
|
|
778
779
|
|
|
779
780
|
| 参数 | 默认 | 说明 |
|
|
780
781
|
|---|---|---|
|
|
@@ -809,7 +810,7 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
|
|
|
809
810
|
|
|
810
811
|
## 📝 断点续跑 & 人工干预(两大硬性需求)
|
|
811
812
|
|
|
812
|
-
- **断点续跑**:所有状态落盘(v2:`VibeMath_State/*.json`;v3:`State/*.json`;**v5
|
|
813
|
+
- **断点续跑**:所有状态落盘(v2:`VibeMath_State/*.json`;v3:`State/*.json`;**v5:研究所目录下的加固 JSON `State/<研究所>.v5state.json`**),每个子代理都是 DSH 的 **continuable 持久会话**(对话由 DSH 自动保存)。重启后新开会话 → `vibe_math_resume` / `vibe_v4_resume` / `vibe_v5_resume` 即可续跑。v2/v3 额外用**进程纪元**区分"同进程暂停→恢复"(保留存活子代理继续)与"跨进程重启"(清理陈旧任务)。**v3 的 md 知识库本身就是叙事断点**——代理 resume 时从研究日志/问题卡/命题卡尾部续写;**v5 由状态文件承担**——恢复就是"读之前先 load",跨进程与同进程走同一条代码路径,成员会话重建时会以"读回你自己的 Progress/"重新种化(而不是让它们从头再来)。
|
|
813
814
|
- **中途人工干预**:`manual` 模式在关键节点挂起决策(v2:explorer/solver 派发、验证裁决;v3:**计划审批门**(规划代理产出计划后等你 approve/reject)、验证裁决门、**方法晋升门**(项目方法 → 全局库));可随时 `set_mode auto` 切回自动(自动放行所有挂起决策);可对任意子代理 `message_agent` / `interrupt_agent`。**v4/v5 天然可干预**:随时给成员留言(`vibe_v5_message`)、召集会议、暂停全所、增删编制——成员下一轮就会看到。
|
|
814
815
|
- **进度汇报**:默认**事件驱动** —— 只有代理状态更新等事件发生时才会写报告(v2:`Progress_Logs/report.json`;v3:`Progress_Logs/report.json` + `Logs/报告.md` 论文式人读摘要;`reportMode` 可 `file`/`push`/`both`,`push` 通过 `subagents.sendMessage(根代理, 常驻子代理, …)` 唤醒常驻主动汇报——`followup` **不是** `subagents` 服务的方法,它只是 `Agent` 对象方法);只有把 `reportIntervalMs` 设为 >0 才启动定时自动汇报(间隔毫秒)。**v4/v5 的工作汇报是"所内自述"**:成员把进展写进自己的 `Progress/`、把关键结论说进群聊(v5 另有人读镜像 `Institutes.md` / `Shared/TaskBoard.md` / 会议纪要 / 辩论录 / `Problems/conclusion.md`)。
|
|
815
816
|
|
|
@@ -837,8 +838,9 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
|
|
|
837
838
|
## ⚠️ 已知边界(有意简化)
|
|
838
839
|
|
|
839
840
|
**v2**:
|
|
840
|
-
- 安装器带**版本化自动更新**:每次 DSH 启动时对比包版本与 `<presetRoot>/.vibe-math-installed.json` 记录——**版本一变(或无记录的老安装首次运行)就整体替换受管文件,不看它是否被改过**;被替换的手改原文先备份到 `<presetRoot>/.vibe-math-backup/<旧版本>/<preset>/` 并在日志里列出。同一个版本内**不重写任何文件**(重启 DSH 不会改写 preset、也不会扰动它按 mtime
|
|
841
|
-
|
|
841
|
+
- **(DSH ≤ 0.1.6 的目录形式)** 安装器带**版本化自动更新**:每次 DSH 启动时对比包版本与 `<presetRoot>/.vibe-math-installed.json` 记录——**版本一变(或无记录的老安装首次运行)就整体替换受管文件,不看它是否被改过**;被替换的手改原文先备份到 `<presetRoot>/.vibe-math-backup/<旧版本>/<preset>/` 并在日志里列出。同一个版本内**不重写任何文件**(重启 DSH 不会改写 preset、也不会扰动它按 mtime 记的生成代际),缺失文件随时补回。想强制全量重装:删除那四个 preset 目录后重启 DSH。
|
|
842
|
+
在 DSH ≥ 0.1.7 上安装器**不写这些目录**(预设由上文「安装」里的组合行提供),启动时只会提示旧副本可安全删除。
|
|
843
|
+
- **在 DSH ≤ 0.1.6 上,这四个目录由安装器负责**:删掉其中任一文件或整个目录,只会在下次启动 DSH 时被补回(这正是上面"强制全量重装"可行的原因)。在 DSH ≥ 0.1.7 上它们不再被读取、也不再被写入,直接删掉即可;想彻底不要本包的预设,就卸载本包(`dsh plugin --profile <你的 profile> remove dsh-vibe-math`)。
|
|
842
844
|
- `flat` 裁决在辩论不一致时直接判 `0.5`(高置信分歧如 0.9 vs 1 也会被误判 0.5——**v3 已用近共识规则修复**);`forced` 按历史准确率+置信度加权。
|
|
843
845
|
- `never` 优先级的问题/命题**永不调度**,且不阻塞严格终止(视为主动弃权)。
|
|
844
846
|
- 四个 preset 文件互相独立、可共存;同一会话同时只能选一个预设。
|
|
@@ -863,8 +865,9 @@ v5 的完整架构(含成员生命周期、一轮时序、共识状态机、
|
|
|
863
865
|
等会议收口后再走完整的表决流程。
|
|
864
866
|
- **`resume` 后轮次计数从 1 重新计**(内存态,仅用于节流与压缩提示);权威进度在成员自己的 `Progress/`。
|
|
865
867
|
- **成员章程是入职快照**:升级本包不会改写已在跑的研究所里成员的章程(它们仍用入职时冻结的版本)。
|
|
866
|
-
|
|
867
|
-
- **安装器行为同 v2
|
|
868
|
+
需要新章程就在新会话里重开一个研究所;状态文件与文件树无需迁移。
|
|
869
|
+
- **安装器行为同 v2**(在 DSH ≤ 0.1.6 的目录形式上:版本一变即整体替换受管文件并先备份原文,`vibe-math-v5` 目录同样受管;
|
|
870
|
+
DSH ≥ 0.1.7 上安装器不写预设目录,预设由组合行提供)。
|
|
868
871
|
- **Lean 形式化需要宿主上有 Lean 工具链**:框架不内置、不下载;没有工具链时三个 Lean 工具会如实返回
|
|
869
872
|
`LEAN_NOT_FOUND`,形式化代码仍可写下来归档,但无法执行验证。
|
|
870
873
|
- **`require` 模式的门禁是「搁置」而不是「卡死」**:缺形式化的真/假结论会被记为未定论 + 进入形式化待办,
|