dsh-vibe-math 2.7.1 → 2.7.3
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 +682 -690
- package/README.md +19 -27
- package/cordis.patch.yml +112 -16
- package/docs/AUDIT-CHECKLIST.md +744 -518
- package/docs/COMPAT-AUDIT-ROUND2.md +35 -9
- package/docs/COMPAT-AUDIT-ROUND3.md +154 -154
- package/docs/final-paper.md +172 -172
- package/docs/formal-verification.md +588 -588
- package/docs/math-computation.md +194 -163
- package/docs/parameter-schema.md +37 -0
- package/docs/release-notes/README.en.md +49 -0
- package/docs/release-notes/README.md +48 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.2.en.md +72 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.2.md +72 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.3.en.md +67 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.3.md +67 -0
- package/docs/release-notes/TEMPLATE.md +126 -0
- package/docs/status-report-fields.md +167 -0
- package/docs/test-timing.md +157 -154
- package/installer.js +27 -17
- package/package.json +55 -3
- package/prompt-corpus-persona/persona-corpus.json +9 -9
- package/prompt-corpus-persona/persona-corpus.md +225 -33
- package/prompt-corpus-v2/formal-verify-v2.json +305 -113
- package/prompt-corpus-v2/formal-verify-v2.md +2399 -279
- package/prompt-corpus-v3/formal-verify-v3.json +134 -110
- package/prompt-corpus-v3/formal-verify-v3.md +409 -141
- package/prompt-corpus-v4/formal-verify-v4.json +18 -18
- package/prompt-corpus-v4/formal-verify-v4.md +49 -44
- package/prompt-corpus-v5/prompt-corpus-v5.json +82 -82
- package/prompt-corpus-v5/prompt-corpus-v5.md +513 -259
- package/scripts/update-doc-counts.mjs +71 -0
- package/tests/audit-artifact-docs.mjs +72 -0
- package/tests/audit-artifact-docs.mutants.mjs +58 -0
- package/tests/audit-installer-assertions.mutants.mjs +63 -0
- package/tests/audit-installer-compat.test.mjs +52 -4
- package/tests/audit-installer-policy.test.mjs +41 -8
- package/tests/audit-math-computation-contract.mjs +107 -9
- package/tests/audit-math-computation-contract.mutants.mjs +106 -0
- package/tests/audit-math-computation-parity.mjs +164 -3
- package/tests/audit-math-computation-sensitivity.mjs +6 -4
- package/tests/audit-package-membership.mjs +57 -0
- package/tests/audit-package-membership.mutants.mjs +28 -0
- package/tests/audit-participant-set-parity.mjs +160 -0
- package/tests/audit-path-discipline.mjs +83 -0
- package/tests/audit-path-discipline.mutants.mjs +51 -0
- package/tests/audit-persona-sensitivity.mjs +14 -0
- package/tests/audit-persona-surface.mutants.mjs +69 -0
- package/tests/audit-persona-surface.test.mjs +63 -22
- package/tests/audit-prompt-duplication.mjs +143 -0
- package/tests/audit-prompt-duplication.mutants.mjs +50 -0
- package/tests/audit-prompt-invariants.mjs +43 -5
- package/tests/audit-readme-bilingual.test.mjs +152 -0
- package/tests/audit-readme-counts.mjs +95 -0
- package/tests/audit-readme-counts.mutants.mjs +52 -0
- package/tests/audit-registration.mjs +78 -0
- package/tests/audit-status-report-fields.mjs +172 -0
- package/tests/audit-status-report-fields.mutants.mjs +64 -0
- package/tests/audit-v3-registration-parity.mjs +156 -0
- package/tests/audit-v5-integrity.mjs +300 -13
- package/tests/audit-v5-lean-abstention.mjs +392 -0
- package/tests/audit-v5-lean-abstention.mutants.mjs +106 -0
- package/tests/audit-v5-prompt-duplication.mjs +88 -0
- package/tests/audit-v5-prompt-duplication.mutants.mjs +34 -0
- package/tests/audit-v5-sensitivity.mjs +15 -8
- package/tests/e2e-identity-a6.mutants.mjs +65 -0
- package/tests/e2e-v5-round2.test.mjs +566 -12
- package/tests/formal-verify-v2.test.mjs +91 -5
- package/tests/formal-verify-v3.mutants.mjs +117 -0
- package/tests/formal-verify-v3.test.mjs +85 -6
- package/tests/formal-verify-v4.mutants.mjs +152 -0
- package/tests/formal-verify-v4.test.mjs +628 -9
- package/tests/formal-verify-v5.test.mjs +68 -9
- package/tests/helpers/doc-counts-format.mjs +41 -0
- package/tests/helpers/math-computation-fake-seam.mjs +4 -0
- package/tests/math-computation-a1.mutants.mjs +72 -0
- package/tests/math-computation-archive-rerun.mutants.mjs +65 -0
- package/tests/math-computation-discovery.mutants.mjs +76 -0
- package/tests/math-computation-shared.test.mjs +396 -2
- package/tests/math-computation-v2.test.mjs +767 -0
- package/tests/math-computation-v3.test.mjs +759 -0
- package/tests/math-computation-v4.mutants.mjs +133 -0
- package/tests/math-computation-v4.test.mjs +739 -0
- package/tests/prompt-v5-integrity.test.mjs +13 -2
- package/tests/run-tests.mjs +139 -9
- package/tests/run-tests.mutants.mjs +70 -0
- package/tests/selfdrive-v5.mjs +53 -1
- package/tests/selfdrive-v5.mutants.mjs +132 -0
- package/tests/v2-fix-probes.mutants.mjs +100 -0
- package/tests/v2-fix-probes.test.mjs +1039 -0
- package/tests/v2-list-agents-and-next-step.mutants.mjs +106 -0
- package/tests/v3-fix-probes.mutants.mjs +95 -0
- package/tests/v3-fix-probes.test.mjs +891 -0
- package/tests/v5-institute-fixes.mutants.mjs +190 -0
- package/vibe-math-v2/agent.cordis.yml +62 -6
- package/vibe-math-v2/math-computation.js +229 -29
- package/vibe-math-v2/math-engines.js +12 -12
- package/vibe-math-v2/vibe-math-v2.js +458 -119
- package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +5 -1
- package/vibe-math-v3/agent.cordis.yml +72 -6
- package/vibe-math-v3/math-computation.js +229 -29
- package/vibe-math-v3/math-engines.js +12 -12
- package/vibe-math-v3/vibe-math-v3.js +482 -139
- package/vibe-math-v4/agent.cordis.yml +44 -8
- package/vibe-math-v4/math-computation.js +229 -29
- package/vibe-math-v4/math-engines.js +12 -12
- package/vibe-math-v4/vibe-math-v4.js +245 -52
- package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +2 -0
- package/vibe-math-v5/agent.cordis.yml +46 -12
- package/vibe-math-v5/math-computation.js +229 -29
- package/vibe-math-v5/math-engines.js +12 -12
- package/vibe-math-v5/vibe-math-v5.js +1307 -243
- package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +1728 -1655
- package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +693 -693
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
- **四套架构的定位、流程与分工** → [架构图](#-架构图v2--v3--v4--v5) · [架构与分工(四套并列)](#-架构与分工四套并列)
|
|
28
28
|
- **新功能:最终论文(收口时自动产出)** → [功能特色](#-功能特色) · [完整契约](docs/final-paper.md)
|
|
29
29
|
- **Lean 形式化验证** → [Lean 形式化验证](#-lean-形式化验证四个架构共用可调开关) · [完整契约](docs/formal-verification.md)
|
|
30
|
+
- **可观测面(`status()` / `report()` 字段与作用域)** → [完整字段表](docs/status-report-fields.md)
|
|
30
31
|
- **目录里都有什么** → [目录结构](#-目录结构)
|
|
31
32
|
- **调参数** → [参数速查表](#-参数速查表)
|
|
32
33
|
- **断点续跑 / 中途干预** → [断点续跑 & 人工干预](#-断点续跑--人工干预两大硬性需求)
|
|
@@ -115,7 +116,7 @@ flowchart TB
|
|
|
115
116
|
|
|
116
117
|
## ✨ 功能特色
|
|
117
118
|
|
|
118
|
-
- **最终论文(四个预设默认开启)**:收口时自动撰写一篇**只整理已有证据**的完整论文,且论文阶段发生在 run 被标记完成**之前**;产物在 `Paper/<id>/{paper.md,paper.tex,paper.pdf,paper.meta.json,paper.log.md}
|
|
119
|
+
- **最终论文(四个预设默认开启)**:收口时自动撰写一篇**只整理已有证据**的完整论文,且论文阶段发生在 run 被标记完成**之前**;产物在 `Paper/<id>/{paper.md,paper.tex,paper.pdf,paper.meta.json,paper.log.md}`(v2/v3 另有 `paper.lock.json`)。参数 `finalPaper`(默认 `true`)/`paperFormat`(默认 `both`)/`paperLanguage`(默认 `zh`)/`paperCompilePdf`(默认 `true`)(v4/v5 另有 `paperEditor`),手动 `/vN paper [lang=] [format=] [editor=] [force]`;PDF 需要宿主上有 LaTeX 引擎(中文优先 `xelatex`),否则仍交付 tex+md。完整契约与用法见 [`docs/final-paper.md`](docs/final-paper.md)。
|
|
119
120
|
- **多代理自动求解**:主代理把问题交给调度器,调度器派发 explorer / solver / verifier(v2/v3)与 **planner(规划代理,v3)**、**method-keeper(方法整理代理,v3)** 等子代理协同求解,**你无需逐节点手操**。
|
|
120
121
|
- **多代理交叉验证**:每个结论交给 ≥3 个「严苛审稿人」**独立审查 → 辩论(交流群)→ 裁决**(v3 默认**近共识裁决**:同侧且均值 ≥0.85/≤0.15 取均值,避免"0.9 vs 1"被误判成 0.5)。
|
|
121
122
|
- **论文式 Markdown 知识库(v3)**:问题清单(含问题间依赖、后生问题产生原因与计划)、研究日志、命题、方法库全部以 md 论文/研究报告式书写与续写(方向重派生时旧方向的日志自动归档保留);**只有 `Verified/` 与验证器判真/假的对象绝对可信**,其余 md(含方法库未验证断言)仅作经验参考。
|
|
@@ -195,16 +196,10 @@ dsh plugin --profile <你的 profile> add github:ChongCyrus/Vibe-Mathematics
|
|
|
195
196
|
|
|
196
197
|
### DSH 版本适配与依赖
|
|
197
198
|
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
|
|
202
|
-
- **常驻数量有宿主上限**:DSH ≥ 0.1.7 对每个根代理的**存活 continuable 子代理**设了上限(`subagent` 行的 `maxActiveSubagents`,默认 8)。v4/v5 会在撞到上限时给出明确提示、把该次派生推迟到下一轮,而不是让启动循环崩在半途。
|
|
203
|
-
> **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 而静默不建目录)。
|
|
204
|
-
- **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`。
|
|
205
|
-
另外声明了 `peerDependencies`(`@deepseek-ai/dsh-base`,并标为 optional):DSH ≥ 0.1.7 会用**宿主自己的版本**去比对插件声明的 peer 范围,不满足时**跳过整个 bundle 并给出明确提示**,而不是挂上一个跑不通的预设。
|
|
206
|
-
- **运行时自检(版本 + 形态 + 能力)**:安装器(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。
|
|
207
|
-
- **升级路径**:DSH 升级后无需重装本包;升级本包用 `dsh plugin --profile <你的 profile> add dsh-vibe-math@latest`(`dsh plugin` 的 `--profile` 是必填项;用 `add` 而不是 `update`,因为 profile 里可能把版本钉成精确值,那时 `update` 不会跨过去),重启 DSH 后(DSH ≤ 0.1.6 的目录形式下)安装器会把四个 preset 的受管文件整体更新到新版本(改过的文件同样被替换,原文先进 `<presetRoot>/.vibe-math-backup/`;DSH ≥ 0.1.7 的 preset 来自组合行,安装器不写任何文件)——见上文「安装」说明。
|
|
199
|
+
- **支持范围**:`0.1.2-alpha.4` … `0.2.0-rc.2`(11 个版本声明为 `compatible`,实测目标 `0.2.0-rc.2`;`engines.node` 为 `^22.19.0 || >=24.0.0`)——逐版本声明、`engines.dsh` 区间与 `peerDependencies` 见 `package.json`(`dsh.compatibility.dshReleases`)。
|
|
200
|
+
- **交付形态**:DSH ≥ 0.1.7 走**组合行声明**(`agentPresets` 服务),DSH ≤ 0.1.6 走 `~/.dsh/.agent-presets/<id>/` 目录 + preset picker——一份 bundle 同时兼容两条线。
|
|
201
|
+
- **硬约束**:v5 研究所状态**只**写 `State/<研究所>.v5state.json`,**绝不**写宿主会话日志——DSH 遇到日志里不认识的事件类型会**拒绝加载整个会话**,会话下次恢复将打不开。
|
|
202
|
+
- **其余细节**(宿主插件行与必需服务、启动自检与能力门槛、常驻数量上限、2026 的三处修复、`dsh.bundle.patch` 约束、升级路径与 `peerDependencies`):见 `docs/COMPAT-AUDIT-ROUND2.md`;升级本包用 `dsh plugin --profile <你的 profile> add dsh-vibe-math@latest`(用 `add` 而非 `update`)。
|
|
208
203
|
|
|
209
204
|
---
|
|
210
205
|
|
|
@@ -349,7 +344,7 @@ v5 的完整架构(成员生命周期、一轮时序、共识状态机、会
|
|
|
349
344
|
| 工具 | 作用 |
|
|
350
345
|
|---|---|
|
|
351
346
|
| `vibe_math_add_problem` | 加题(id/description/priority/dependencies?;v3 生成 `Problems/<id>.md`) |
|
|
352
|
-
| `vibe_math_add_proposition` / `vibe_math_list_propositions`(v2/v3) | 添加 / 列出命题库(id/概述/布尔估计/细类型/价值·关键性;v3 生成 `Propos/<分类>/<id>.md
|
|
347
|
+
| `vibe_math_add_proposition` / `vibe_math_list_propositions`(v2/v3) | 添加 / 列出命题库(id/概述/布尔估计/细类型/价值·关键性;v3 生成 `Propos/<分类>/<id>.md`;**add 只新建**:id 已存在会被拒绝并返回 `PROPOSITION_ID_EXISTS`,绝不覆盖已有卡) |
|
|
353
348
|
| `vibe_math_start` / `vibe_math_resume` | 启动 / 断点恢复调度器 |
|
|
354
349
|
| `vibe_math_pause` / `vibe_math_abort` | 暂停 / 终止(中断所有子代理) |
|
|
355
350
|
| `vibe_math_status` / `vibe_math_report` | 查看状态 / 完整进度报告 |
|
|
@@ -457,7 +452,7 @@ v5 的完整架构(成员生命周期、一轮时序、共识状态机、会
|
|
|
457
452
|
|
|
458
453
|
**Step 6 — 收口时自动产出最终论文(默认开启)**
|
|
459
454
|
|
|
460
|
-
四个预设默认 `finalPaper=true`:论文阶段在各个收口信号命中后、**run 被标记完成之前**启动(v2/v3 由专职「论文撰写」子代理整理已有证据,v4/v5 由团队合写 → 交叉互审 → 定稿代表定稿并取得一致认同)。产物在 `Paper/<id>/{paper.md,paper.tex,paper.pdf,paper.meta.json,paper.log.md}
|
|
455
|
+
四个预设默认 `finalPaper=true`:论文阶段在各个收口信号命中后、**run 被标记完成之前**启动(v2/v3 由专职「论文撰写」子代理整理已有证据,v4/v5 由团队合写 → 交叉互审 → 定稿代表定稿并取得一致认同)。产物在 `Paper/<id>/{paper.md,paper.tex,paper.pdf,paper.meta.json,paper.log.md}`(v2/v3 另有 `paper.lock.json`):`paper.tex` / `paper.pdf` 只在 `paperFormat` 含 tex 且宿主检测到 LaTeX 引擎时产出(中文优先 `xelatex`;没有引擎就只交 md/tex,不阻塞收尾)。手动触发用 `/vibe paper`(v2/v3)、`/v4 paper`、`/v5 paper`,可带 `lang=` / `format=` / `editor=` / `force`;完整契约见 [`docs/final-paper.md`](docs/final-paper.md)。
|
|
461
456
|
|
|
462
457
|
### 🖼️ 实际使用示例(长截图)
|
|
463
458
|
|
|
@@ -507,13 +502,6 @@ v5 的完整架构(成员生命周期、一轮时序、共识状态机、会
|
|
|
507
502
|
| `mathTimeoutMs` | `60000` | 四套 | 单次计算上限(毫秒,最小 1000);超时后主动终止进程 |
|
|
508
503
|
| `mathPackages` | `[]` | 四套 | 默认要求存在的包/工具箱;缺包只报告并给安装计划,**不自动安装** |
|
|
509
504
|
| `mathInstallScope` | `user` | 四套 | 安装作用域;`system` 必须**每次显式指定且不被记住**(多数包管理器没有 system 模板,此时会被拒绝) |
|
|
510
|
-
|
|
511
|
-
> **归档即证据**:每次计算都写出 `Computation/<id>/`,回执含 `scriptPath` 与 `scriptHash`;脚本原件可以打开/编辑,编辑后必须用 `mode:'file'` **重跑**得到新回执——**旧回执不代表修改后的代码**(`scriptChanged` / `scriptChangedDuringRun` 会显式告警)。归档只追加不覆盖,超上限只告警不删除。详见 [`docs/math-computation.md`](docs/math-computation.md) §4.1。
|
|
512
|
-
|
|
513
|
-
> **替代必须声明**:当替代方案改变**精确性或结论强度**(精确解→数值近似、闭式解→采样/求积、改精度/容差/假设、换算法类)时,结论**必须写明**,不得像得到了原本的结果;拿不到精确结果就直说(规则行 `MATH_SUBSTITUTION_RULE_LINE`,已注入四套 persona 与提示词)。
|
|
514
|
-
|
|
515
|
-
> **安装与版本**:`op:'install'` 按**检测到的 python 环境**分派 conda/mamba(`-c conda-forge`)、uv(`uv pip …`)或 pip 回退(歧义时标 `managerAssumed`);R/Octave/Julia **只做用户级**(`system` ⇒ `MATH_REFUSED` + 每引擎理由)。**版本求解交给包管理器**:本工具只按 base name 查存在、把 `pkg==1.2`(conda `pkg=1.2`)原样透传,危险或不认识的写法 ⇒ `unsupported-version-syntax`。详见 [`docs/math-computation.md`](docs/math-computation.md) §5.1–5.3。
|
|
516
|
-
> **引擎发现**:先看 PATH,最后才扫 **DSH 自带运行时**(`<DSH_HOME 或用户主目录>/.dsh/dsh-runtimes/*/dependencies/<engine>/`,树名**通配**);找到就报**真实版本**,**找不到才**给按 OS 的安装指引,且指引针对**你请求的那个引擎**。`op:'probe'` 报的就是请求的引擎;`mathEngineOverride` **只能覆盖 argv 模板、不能指定可执行文件**,所以它不是发现手段(正解是 PATH / DSH 运行时 / `engine:'cli'` + `cli.command`)。`engine:'cli'` 下:包预检按 `cli.command` 的族进行(不可识别则跳过并给 `PACKAGE_PRECHECK_SKIPPED` 警告)、`mode:'code'` 会**自动把归档脚本追加到 argv**(所以真的会跑代码,而不是掉进 REPL)、版本报真实值。详见 [`docs/math-computation.md`](docs/math-computation.md) §5.4。
|
|
517
505
|
| `tickIntervalMs` | 2000 | v2·v3 | 调度器心跳间隔(毫秒) |
|
|
518
506
|
| `activityLogCap` | 100 | v2·v3 | 活动日志保留条数(report 最多显示 30 条) |
|
|
519
507
|
| `maxExplorerRetries` | 3 | v2·v3 | explorer 拆方向失败的重派生上限 |
|
|
@@ -540,8 +528,12 @@ v5 的完整架构(成员生命周期、一轮时序、共识状态机、会
|
|
|
540
528
|
| `paperLatexCommand` | `''` | 四套 | 指定 LaTeX 引擎可执行文件(空 = 按语言自动探测 xelatex→latexmk→pdflatex→lualatex→tectonic) |
|
|
541
529
|
| `paperEditor` | v4 `office`;v5 `academician` | v4·v5 | 定稿代表。v4:`office`(会话根/人类侧,默认)或 `resident:<id>`(该 resident 已离职则降级 office 并在 meta/log 记明);v5:`academician`(默认,无人值守也能完成)或 `office`(仅手动 `/v5 paper editor=office`,须先与全所交流 + 开会) |
|
|
542
530
|
|
|
543
|
-
|
|
544
|
-
|
|
531
|
+
> **归档即证据**:每次计算写 `Computation/<id>/`(回执含 `scriptPath`+`scriptHash`);脚本改后必须用 `mode:'file'` 重跑取新回执(`scriptChanged`/`scriptChangedDuringRun` 会告警,旧回执不代表改后代码);归档只追加不覆盖。详见 [`docs/math-computation.md`](docs/math-computation.md) §4.1。
|
|
532
|
+
|
|
533
|
+
> **替代必须声明**:替代改变精确性或结论强度时必须写明,不得读作原结果;拿不到精确结果就直说(规则行 `MATH_SUBSTITUTION_RULE_LINE`)。
|
|
534
|
+
|
|
535
|
+
- **安装与版本**:`op:'install'` 分派 conda/mamba、uv 或 pip 回退;R/Octave/Julia 默认只做用户级(`system` ⇒ `MATH_REFUSED`);版本求解交给包管理器——只按 base name 查存在,`pkg==1.2` 原样透传,危险/未知写法 ⇒ `unsupported-version-syntax`;引擎发现与 `engine:'cli'` 细节见 [`docs/math-computation.md`](docs/math-computation.md) §5.1–5.4。
|
|
536
|
+
- **Lean 异步**:`leanAsync=true`(默认)编译走后台队列,`lean_run`/`lean_archive{run:true}` 立即返回;**只有** `settled` 且 exit 0、编译期间内容哈希与构建上下文未变的作业才置 `passed` 并写 `Verified/Lean/<id>.lean`,其余停在 `attempted`。
|
|
545
537
|
|
|
546
538
|
### v2(概率驱动 · 经典)专属参数
|
|
547
539
|
|
|
@@ -549,7 +541,7 @@ v2 **没有专属参数**:它的完整参数集就是上表「适用」列含
|
|
|
549
541
|
|
|
550
542
|
#### 最终论文(final paper)
|
|
551
543
|
|
|
552
|
-
四个预设都**默认开启**:收口判定命中后、**在 run 被标记完成之前**进入 paper 阶段。v2 由一名专职「论文撰写」子代理把已定论证据整理成 `Paper
|
|
544
|
+
四个预设都**默认开启**:收口判定命中后、**在 run 被标记完成之前**进入 paper 阶段。v2 由一名专职「论文撰写」子代理把已定论证据整理成 `Paper/<id>/{paper.md,paper.tex,paper.meta.json,paper.log.md,paper.lock.json}`(检测到引擎时才有 `paper.pdf`)。手动:`/vibe paper [lang=zh|en] [format=both|md|tex] [force]`。PDF 需要宿主上有 LaTeX 引擎(中文优先 `xelatex`);没有引擎或编译失败时 tex+md 照常交付,只记日志告警——不阻塞定稿、不覆盖已有 pdf。完整契约见 `docs/final-paper.md`。
|
|
553
545
|
|
|
554
546
|
### v3(论文式 md + 规划代理 + 方法库)专属参数
|
|
555
547
|
|
|
@@ -572,7 +564,7 @@ v3 接受 v2 的**全部**参数(见上表「适用」列含 v3 的行),
|
|
|
572
564
|
|
|
573
565
|
#### 最终论文(final paper)
|
|
574
566
|
|
|
575
|
-
v3 与 v2 同一开关、同一时序(严格收口;**在调度器停止之前**派遣撰写者):专职「论文撰写」子代理产出 `Paper
|
|
567
|
+
v3 与 v2 同一开关、同一时序(严格收口;**在调度器停止之前**派遣撰写者):专职「论文撰写」子代理产出 `Paper/<id>/{paper.md,paper.tex,paper.meta.json,paper.log.md,paper.lock.json}`(检测到引擎时才有 `paper.pdf`)。手动:`/vibe paper [lang=zh|en] [format=both|md|tex] [force]`。无引擎或编译失败仍交付 tex+md、记警告、不阻塞定稿。完整契约见 `docs/final-paper.md`。
|
|
576
568
|
|
|
577
569
|
### v4(常驻自组织 · 实验)专属参数
|
|
578
570
|
|
|
@@ -585,7 +577,7 @@ v3 与 v2 同一开关、同一时序(严格收口;**在调度器停止之
|
|
|
585
577
|
|
|
586
578
|
#### 最终论文(final paper)
|
|
587
579
|
|
|
588
|
-
默认开启;v4 在一致性会议投出「一致停止」票后、**标记完成之前**进入 paper 阶段。团队流程:各 resident 写自己库里的部分 → 合并(去重、统一术语与记号)→ 至少一轮**交叉互审** → 定稿代表按 `paperEditor`(默认 `office`,或 `resident:<id>`)梳理成最终稿 → **全体明确"可交付"**才定稿(有反对则继续迭代,超轮次上限记警告并把分歧写进附录)。手动:`/v4 paper [lang=] [format=] [editor=office|resident:<id>] [force]`。产物 `Paper/<run id>/{paper.md,paper.tex,paper.meta.json,paper.log.md
|
|
580
|
+
默认开启;v4 在一致性会议投出「一致停止」票后、**标记完成之前**进入 paper 阶段。团队流程:各 resident 写自己库里的部分 → 合并(去重、统一术语与记号)→ 至少一轮**交叉互审** → 定稿代表按 `paperEditor`(默认 `office`,或 `resident:<id>`)梳理成最终稿 → **全体明确"可交付"**才定稿(有反对则继续迭代,超轮次上限记警告并把分歧写进附录)。手动:`/v4 paper [lang=] [format=] [editor=office|resident:<id>] [force]`。产物 `Paper/<run id>/{paper.md,paper.tex,paper.meta.json,paper.log.md}`(引擎可用时另有 `paper.pdf`)。**注意:v4 不写 `paper.lock.json`** —— 论文目录的复写串行化在本进程内完成;**共享文件写锁并未实现**,`vibe_v4_claim_write` 会返回 `{ok:true}` 但不保留任何东西(见 `vibe-math-v4.js` 的工具说明)。完整契约见 `docs/final-paper.md`。
|
|
589
581
|
|
|
590
582
|
**v4 专属工具 `vibe_v4_formal_report`(文档补记,round-3)**:把"哪些命题/方法已经得到形式化支撑、支撑强度如何"汇报给常驻团队,是 v4 **团队自治**流程的一部分——居民之间要靠这条汇报对齐"谁能引用哪条已定论结论",因此它**只存在于 v4**(v2/v3 是专职求解/验证子代理架构,其形式化状态由 `vibe_math_lean_*` 与验证日志承载;v5 由院士评审路径 `vibe_v5_propose_verify`/`vibe_v5_verdict` 与 `vibe_v5_status` 承载)。v4 的两处 persona 文本块都要求成员使用它;v4 的 `status`/`report` 也会汇总其输出。
|
|
591
583
|
|
|
@@ -636,7 +628,7 @@ v3 与 v2 同一开关、同一时序(严格收口;**在调度器停止之
|
|
|
636
628
|
- **四个预设的 persona 原文**:[`prompt-corpus-persona/persona-corpus.md`](prompt-corpus-persona/persona-corpus.md)(主代理实际收到的提示词:有哪些工具、哪些参数、哪些斜杠子命令;由 `audit-persona-surface.test.mjs` 生成,随包发布)
|
|
637
629
|
- **Lean 形式化验证(四架构共用契约)**:[`docs/formal-verification.md`](docs/formal-verification.md)
|
|
638
630
|
- **最终论文(四架构共用契约)**:[`docs/final-paper.md`](docs/final-paper.md)(五个参数与 v4/v5 的 `paperEditor`、收口顺序"先论文后完成"、`Paper/<id>/` 产物与 9 节骨架、LaTeX 检测顺序与"先修复后降级"、v4/v5 团队合写流程与 v5 所办咨询规则)
|
|
639
|
-
- **测试耗时基线与并行跑法**:[`docs/test-timing.md`](docs/test-timing.md)(`node tests/run-tests.mjs` 并行跑**全部套件 + 全部探针**:`TOTAL
|
|
631
|
+
- **测试耗时基线与并行跑法**:[`docs/test-timing.md`](docs/test-timing.md)(`node tests/run-tests.mjs` 并行跑**全部套件 + 全部探针**:`TOTAL 101`(44 套件 + 57 探针/变体,**作业计数**(job count),不是文件计数);**这些数字必须派生**:`node tests/run-tests.mjs --counts` 是权威来源(**作业计数**,不是文件计数),并由 [`tests/audit-readme-counts.mjs`](tests/audit-readme-counts.mjs) 校验本页与另两份文档;随包发布的是 `files[]` 里的 65 个 `tests/*.mjs`(17 个套件 + 48 个探针/脚本)(文件计数),其余仅开发检出可见,清单见该文档 §1.1;每个 runner 都会打印耗时/加速比供下次选策略)
|
|
640
632
|
- **静态提示词面一致性(persona ↔ 工具注册表 ↔ 斜杠命令 hint/usage)**:[`audit-persona-surface.test.mjs`](tests/audit-persona-surface.test.mjs)(260 条断言,并生成 [`prompt-corpus-persona/persona-corpus.md`](prompt-corpus-persona/persona-corpus.md) 供人工复核)+ [`audit-persona-sensitivity.mjs`](tests/audit-persona-sensitivity.mjs)(16 条灵敏度探针)——守"注册的工具必须在 persona 里出现 / persona 里的名字必须真的注册 / `prefix` 与 `text` 两块逐行一致 / hint、usage、实际分支三处必须一致"
|
|
641
633
|
- **全面检查必查清单**:[`AUDIT-CHECKLIST.md`](docs/AUDIT-CHECKLIST.md)(本仓库的强制审计流程;§1.9 专门查"工具参数 schema 收不收得下")
|
|
642
634
|
- **提示词/交互不变式(四套一起,可一键复核)**:[`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` 解析"这条解析级判据)
|
|
@@ -674,7 +666,7 @@ v3 与 v2 同一开关、同一时序(严格收口;**在调度器停止之
|
|
|
674
666
|
所以调度器不会永久冻结;需要人工介入时用 `vibe_v5_fire`(临时工)或所办增删编制。
|
|
675
667
|
- **会议与验证严格互斥**:一方进行中,另一方排队/暂存。因此"在会议上当场定论一个对象"会先排队,
|
|
676
668
|
等会议收口后再走完整的表决流程。
|
|
677
|
-
- **`resume`
|
|
669
|
+
- **`resume` 后轮次计数的两种情形**(内存态,仅用于节流与压缩提示;权威进度在成员自己的 `Progress/`):**跨进程重载**(新插件实例 ⇒ 计数器为空)从 **1** 重新计;**同实例重建**(宿主丢了子会话、插件实例还在)**继续**原编号 —— 已有 `轮次 1` 时,重建的提示词读作 **`轮次 2`**。失败/无效的启动**不再抹掉**已有计数(`vibe-math-v5.js:2101-2102` 计算 `(rounds.get(id)||0)+1`,`:2151-2152` 仅在成功后写入)。守卫:`tests/e2e-v5-round2.test.mjs` §[51](`:2278`/`:2311`,断言重建后是 `轮次 2`)。(口径复核于 `167b52d`)
|
|
678
670
|
- **成员章程是入职快照**:升级本包不会改写已在跑的研究所里成员的章程(它们仍用入职时冻结的版本)。
|
|
679
671
|
需要新章程就在新会话里重开一个研究所;状态文件与文件树无需迁移。
|
|
680
672
|
- **安装器行为同 v2**(在 DSH ≤ 0.1.6 的目录形式上:版本一变即整体替换受管文件并先备份原文,`vibe-math-v5` 目录同样受管;
|
package/cordis.patch.yml
CHANGED
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
|
|
85
85
|
- math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
|
|
86
86
|
- 替代必须声明(诚实性):当替代方案改变了**精确性或结论强度**时(精确符号解 → 数值近似、闭式解 → 采样/求积、改了精度/容差/假设、换了算法类),结论里**必须写明**,不得读起来像得到了原本(精确/所要求的)结果;拿不到精确结果就直说。
|
|
87
|
-
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext
|
|
87
|
+
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>,**相对项目根**);**成员的文件工具是按会话 cwd 解析的**,所以读它要用**绝对路径** `receipt.scriptAbs`,或把 `receipt.cwd` 与 `receipt.scriptPath` 拼起来(回执两个字段都有)。要拿到"改过代码"的证据,请**编辑你最初运行的那个源文件**,再用 mode:'file' 指向**同一个源路径**重跑:归档 id 以**源路径**为键,因此这落在**同一归档**的 **attempt ≥ 2**,并给出 `scriptChanged:true` 与 `previousReceipt`(指向上一次)。**指向归档副本本身**(`receipt.scriptAbs` 那个路径)按设计是**另一份新归档**:新 id、attempt 1、没有 `previousReceipt`、`scriptChanged:false`;旧 attempt 绝不会被覆盖,但它**不是**"同一归档的新 attempt"——工具会用 `fileIsArchivedScript` 与 `ARCHIVED_SCRIPT_RERUN` 警告明确说明。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
|
|
88
88
|
|
|
89
89
|
Final paper: strict termination writes Paper/<project>/{paper.md,paper.tex,paper.pdf,paper.meta.json,paper.log.md}
|
|
90
90
|
automatically — a dedicated paper-writing child assembles the solved material (finalPaper=false disables only that
|
|
@@ -103,6 +103,27 @@
|
|
|
103
103
|
Verified/ is written by that same scheduler path — an agent's own self-reported 1 is never a conclusion.
|
|
104
104
|
When the user asks about progress, call vibe_math_report and summarize in plain language.
|
|
105
105
|
|
|
106
|
+
DISCLOSURES (existing behaviour, not rules to follow):
|
|
107
|
+
- DISCLOSURE (existing behaviour): the FINAL PAPER flow can finish without you — when it hits
|
|
108
|
+
its round/token cap the framework force-finalises the paper (`forcedAfterCap`) and reaps an
|
|
109
|
+
in-flight writer that never came back; the activity log says so. You do not lose the paper,
|
|
110
|
+
you lose the chance to keep iterating on it.
|
|
111
|
+
- DISCLOSURE (existing behaviour): switching the mode to `auto` immediately resolves EVERY
|
|
112
|
+
pending decision as auto-decided (the activity log records "auto-resolved N pending
|
|
113
|
+
decision(s)"). Anything you leave pending will not wait for you.
|
|
114
|
+
- DISCLOSURE (existing behaviour): the framework itself pushes a progress update to the office
|
|
115
|
+
(reportMode / reportIntervalMs) — a summary you did not ask for can arrive at a round
|
|
116
|
+
boundary; it is a report, not a new instruction.
|
|
117
|
+
- DISCLOSURE (existing behaviour): the framework can adjust problem/proposition priorities
|
|
118
|
+
itself (priorityAdjust / proposPriorityAdjust) — the activity log records "priorities
|
|
119
|
+
auto-adjusted (…)"; a problem you deprioritised can come back on its own.
|
|
120
|
+
- DISCLOSURE (existing behaviour): when mathMode is `typed`, the shell fallback is refused
|
|
121
|
+
(the math tool returns REFUSED with reason=policy) instead of silently falling back.
|
|
122
|
+
- math_computation policy: mathComputation = off | auto | on (off = the math surface is
|
|
123
|
+
not mentioned in prompts at all); mathMode = typed | typed+shell (typed refuses the shell
|
|
124
|
+
fallback); mathEngines (cli / python / …); mathTimeoutMs; mathPackages + mathInstallScope
|
|
125
|
+
for preflight package installs (missing packages are reported with an install plan only).
|
|
126
|
+
|
|
106
127
|
Configuration highlights (all tunable via vibe_math_set_params / the settings file):
|
|
107
128
|
`knowledgeContext` overrides the shared data-model explanation injected into every child prompt
|
|
108
129
|
(empty = built-in full version); `explorerPersona` / `solverPersona` / `verifierPersona` prepend
|
|
@@ -121,8 +142,15 @@
|
|
|
121
142
|
match the proposition as stated) | 'require' (same, plus a gate: a true/false verdict is
|
|
122
143
|
recorded as 未定论 with reason formal-required until the object is Lean-passed or carries an
|
|
123
144
|
explicit, reasoned blocker record; the scheduler is never wedged by it).
|
|
124
|
-
- Paths
|
|
125
|
-
|
|
145
|
+
- Paths (every path here is resolved against the SESSION WORKING DIRECTORY, i.e. the cwd
|
|
146
|
+
printed at the end of this prompt; the project root is the `Data lives under …`
|
|
147
|
+
directory above):
|
|
148
|
+
institute work file `<project root>/Formal/<id>.lean`;
|
|
149
|
+
archived proof `<project root>/Verified/Lean/<id>.lean`;
|
|
150
|
+
reusable definitions `VibeMath/Formal/Lib/` (workspace-root relative);
|
|
151
|
+
proved lemmas `VibeMath/Formal/Proved/` (workspace-root relative);
|
|
152
|
+
short form `Formal/<id>.lean` (project-root relative) names the SAME file as
|
|
153
|
+
`<project root>/Formal/<id>.lean`.
|
|
126
154
|
- The toolchain knobs leanCommand / leanArgs / leanTimeoutMs / leanAsync / leanInitiative / leanSearchPaths / leanJobsMaxParallel are tunable as well
|
|
127
155
|
(e.g. leanCommand='lake' with leanArgs=['env','lean']); a missing Lean binary is
|
|
128
156
|
reported as LEAN_NOT_FOUND and still lets the code be written and archived.
|
|
@@ -362,6 +390,7 @@
|
|
|
362
390
|
- vibe_math_index — rebuild State/index.json from the Markdown knowledge base.
|
|
363
391
|
- vibe_math_method_add / vibe_math_method_list — manually add / list method cards (Methods/ + global).
|
|
364
392
|
- 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).
|
|
393
|
+
- vibe_math_claim_write / vibe_math_release_write — (member) 写共用 Markdown(含 Progress/<qid>/<dirId>.md)前先取该文件的写锁、写完立刻释放;锁被别的成员持有时报出持有者,不要硬写。
|
|
365
394
|
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.
|
|
366
395
|
- vibe_math_new_project / vibe_math_set_project / vibe_math_list_projects — per-project folders.
|
|
367
396
|
- vibe_math_list_decisions / vibe_math_decide {id, action: approve|reject|override, verdict?} — resolve manual decisions.
|
|
@@ -375,7 +404,7 @@
|
|
|
375
404
|
|
|
376
405
|
- math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
|
|
377
406
|
- 替代必须声明(诚实性):当替代方案改变了**精确性或结论强度**时(精确符号解 → 数值近似、闭式解 → 采样/求积、改了精度/容差/假设、换了算法类),结论里**必须写明**,不得读起来像得到了原本(精确/所要求的)结果;拿不到精确结果就直说。
|
|
378
|
-
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext
|
|
407
|
+
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>,**相对项目根**);**成员的文件工具是按会话 cwd 解析的**,所以读它要用**绝对路径** `receipt.scriptAbs`,或把 `receipt.cwd` 与 `receipt.scriptPath` 拼起来(回执两个字段都有)。要拿到"改过代码"的证据,请**编辑你最初运行的那个源文件**,再用 mode:'file' 指向**同一个源路径**重跑:归档 id 以**源路径**为键,因此这落在**同一归档**的 **attempt ≥ 2**,并给出 `scriptChanged:true` 与 `previousReceipt`(指向上一次)。**指向归档副本本身**(`receipt.scriptAbs` 那个路径)按设计是**另一份新归档**:新 id、attempt 1、没有 `previousReceipt`、`scriptChanged:false`;旧 attempt 绝不会被覆盖,但它**不是**"同一归档的新 attempt"——工具会用 `fileIsArchivedScript` 与 `ARCHIVED_SCRIPT_RERUN` 警告明确说明。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
|
|
379
408
|
|
|
380
409
|
A /vibe slash command mirrors the main controls (/vibe start [override]|resume [override]|pause|abort|status|report|mode
|
|
381
410
|
<auto|manual>|setup|save|template [global|project]|add <id> <desc>|add-proposition <id> <概述>|list-propositions|methods|index|plan|lock|project [list|new <name>|<name>]|decisions|agents|paper [lang=zh|en] [format=both|md|tex] [force]).
|
|
@@ -401,8 +430,15 @@
|
|
|
401
430
|
match the proposition as stated) | 'require' (same, plus a gate: a true/false verdict is
|
|
402
431
|
withheld as 未定论 with reason formal-required until the object is Lean-passed or carries an
|
|
403
432
|
explicit, reasoned blocker record; the scheduler is never wedged by it).
|
|
404
|
-
- Paths
|
|
405
|
-
|
|
433
|
+
- Paths (every path here is resolved against the SESSION WORKING DIRECTORY, i.e. the cwd
|
|
434
|
+
printed at the end of this prompt; the project root is the `Data lives under …`
|
|
435
|
+
directory above):
|
|
436
|
+
institute work file `<project root>/Formal/<id>.lean`;
|
|
437
|
+
archived proof `<project root>/Verified/Lean/<id>.lean`;
|
|
438
|
+
reusable definitions `VibeMath/Formal/Lib/` (workspace-root relative);
|
|
439
|
+
proved lemmas `VibeMath/Formal/Proved/` (workspace-root relative);
|
|
440
|
+
short form `Formal/<id>.lean` (project-root relative) names the SAME file as
|
|
441
|
+
`<project root>/Formal/<id>.lean`.
|
|
406
442
|
- The toolchain knobs leanCommand / leanArgs / leanTimeoutMs / leanAsync / leanInitiative / leanSearchPaths / leanJobsMaxParallel are tunable as well
|
|
407
443
|
(e.g. leanCommand='lake' with leanArgs=['env','lean']); a missing Lean binary is
|
|
408
444
|
reported as LEAN_NOT_FOUND and still lets the code be written and archived.
|
|
@@ -410,6 +446,31 @@
|
|
|
410
446
|
formalization TODO (Formal/TODO.md). The framework never installs Lean and never judges
|
|
411
447
|
fidelity for you.
|
|
412
448
|
When the user asks about progress, call vibe_math_report and summarize in plain language.
|
|
449
|
+
|
|
450
|
+
DISCLOSURES (existing behaviour, not rules to follow):
|
|
451
|
+
- DISCLOSURE (existing behaviour): the FINAL PAPER flow can finish without you — when it hits
|
|
452
|
+
its round/token cap the framework force-finalises the paper (`forcedAfterCap`) and reaps an
|
|
453
|
+
in-flight writer that never came back; the activity log says so. You do not lose the paper,
|
|
454
|
+
you lose the chance to keep iterating on it.
|
|
455
|
+
- DISCLOSURE (existing behaviour): switching the mode to `auto` immediately resolves EVERY
|
|
456
|
+
pending decision as auto-decided (the activity log records "auto-resolved N pending
|
|
457
|
+
decision(s)"). Anything you leave pending will not wait for you.
|
|
458
|
+
- DISCLOSURE (existing behaviour): the framework itself pushes a progress update to the office
|
|
459
|
+
(reportMode / reportIntervalMs) — a summary you did not ask for can arrive at a round
|
|
460
|
+
boundary; it is a report, not a new instruction.
|
|
461
|
+
- DISCLOSURE (existing behaviour): a second session can TAKE OVER the project lock
|
|
462
|
+
(the activity log records "project lock taken over from session …") — another office may
|
|
463
|
+
resume the same project while you are away; the state file stays authoritative and is not
|
|
464
|
+
merged.
|
|
465
|
+
- DISCLOSURE (existing behaviour): the framework can adjust problem/proposition priorities
|
|
466
|
+
itself (priorityAdjust / proposPriorityAdjust) — the activity log records "priorities
|
|
467
|
+
auto-adjusted (…)"; a problem you deprioritised can come back on its own.
|
|
468
|
+
- DISCLOSURE (existing behaviour): when mathMode is `typed`, the shell fallback is refused
|
|
469
|
+
(the math tool returns REFUSED with reason=policy) instead of silently falling back.
|
|
470
|
+
- math_computation policy: mathComputation = off | auto | on (off = the math surface is
|
|
471
|
+
not mentioned in prompts at all); mathMode = typed | typed+shell (typed refuses the shell
|
|
472
|
+
fallback); mathEngines (cli / python / …); mathTimeoutMs; mathPackages + mathInstallScope
|
|
473
|
+
for preflight package installs (missing packages are reported with an install plan only).
|
|
413
474
|
suffix: Your working directory is {{cwd}}.
|
|
414
475
|
- id: agent-instructions
|
|
415
476
|
name: '@deepseek-ai/dsh-agent-instructions'
|
|
@@ -661,8 +722,8 @@
|
|
|
661
722
|
too; they work in every mode.
|
|
662
723
|
- vibe_v4_formal_report — human-readable Lean formal-verification mirror (mode, Lean-passed
|
|
663
724
|
- math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
|
|
664
|
-
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext
|
|
665
|
-
- Archive -> edit -> re-run: for mode:'code' the script original is at the receipt's scriptPath (Computation/<id>/script.<ext
|
|
725
|
+
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>,**相对项目根**);**成员的文件工具是按会话 cwd 解析的**,所以读它要用**绝对路径** `receipt.scriptAbs`,或把 `receipt.cwd` 与 `receipt.scriptPath` 拼起来(回执两个字段都有)。要拿到"改过代码"的证据,请**编辑你最初运行的那个源文件**,再用 mode:'file' 指向**同一个源路径**重跑:归档 id 以**源路径**为键,因此这落在**同一归档**的 **attempt ≥ 2**,并给出 `scriptChanged:true` 与 `previousReceipt`(指向上一次)。**指向归档副本本身**(`receipt.scriptAbs` 那个路径)按设计是**另一份新归档**:新 id、attempt 1、没有 `previousReceipt`、`scriptChanged:false`;旧 attempt 绝不会被覆盖,但它**不是**"同一归档的新 attempt"——工具会用 `fileIsArchivedScript` 与 `ARCHIVED_SCRIPT_RERUN` 警告明确说明。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
|
|
726
|
+
- Archive -> edit -> re-run: for mode:'code' the script original is at the receipt's scriptPath (Computation/<id>/script.<ext>, **relative to the project root**); member file tools resolve paths against the SESSION CWD, so READ it via the ABSOLUTE `receipt.scriptAbs`, or join `receipt.cwd` with `receipt.scriptPath` (both are in the receipt). To produce evidence for EDITED code, edit the SOURCE FILE you originally ran and re-run mode:'file' pointing at THAT SAME PATH: the archive id is keyed by the SOURCE PATH, so this lands on the SAME archive as attempt >= 2, with `scriptChanged:true` and `previousReceipt` pointing at the previous attempt. Pointing mode:'file' at the ARCHIVED COPY itself (the `receipt.scriptAbs` path) is a DIFFERENT archive BY DESIGN - a new id, attempt 1, no `previousReceipt`, `scriptChanged:false`: the earlier attempt is never overwritten, but it is NOT "a new attempt of the same archive", and the tool says so via `fileIsArchivedScript` and the `ARCHIVED_SCRIPT_RERUN` warning. **An old receipt is NOT evidence for edited code** - cite the receipt whose scriptHash matches the current code; the tool warns explicitly via scriptChanged / scriptChangedDuringRun.
|
|
666
727
|
- 替代必须声明(诚实性):当替代方案改变了**精确性或结论强度**时(精确符号解 → 数值近似、闭式解 → 采样/求积、改了精度/容差/假设、换了算法类),结论里**必须写明**,不得读起来像得到了原本(精确/所要求的)结果;拿不到精确结果就直说。
|
|
667
728
|
- Declare substitutions (honesty): when an alternative changes EXACTNESS or conclusion strength (exact symbolic solution -> numerical approximation, closed form -> sampling/quadrature, changed precision/tolerances/assumptions, a different algorithm class), the conclusion MUST say so explicitly and must not read as if the original (exact/requested) result had been obtained; if the exact result is unavailable, say so plainly.
|
|
668
729
|
objects, recorded blockers, formalization TODO, library paths).
|
|
@@ -696,8 +757,15 @@
|
|
|
696
757
|
the proposition as stated) | 'require' (same, plus a gate: a unanimous true/false verdict is
|
|
697
758
|
withheld as 未定论 with reason formal-required until the object is Lean-passed or carries an
|
|
698
759
|
explicit, reasoned blocker record; the run is never wedged by it).
|
|
699
|
-
- Paths
|
|
700
|
-
|
|
760
|
+
- Paths (every path here is resolved against the SESSION WORKING DIRECTORY, i.e. the cwd
|
|
761
|
+
printed at the end of this prompt; the project root is the `Data lives under …`
|
|
762
|
+
directory above):
|
|
763
|
+
institute work file `<project root>/Formal/<id>.lean`;
|
|
764
|
+
archived proof `<project root>/Verified/Lean/<id>.lean`;
|
|
765
|
+
reusable definitions `VibeMath/Formal/Lib/` (workspace-root relative);
|
|
766
|
+
proved lemmas `VibeMath/Formal/Proved/` (workspace-root relative);
|
|
767
|
+
short form `Formal/<id>.lean` (project-root relative) names the SAME file as
|
|
768
|
+
`<project root>/Formal/<id>.lean`.
|
|
701
769
|
- Reuse FIRST: call vibe_v4_lean_lib (and vibe_v4_lean_read for the verbatim text) BEFORE writing a new
|
|
702
770
|
definition; reuse an archived file with `import Formal.Lib.<name>` / `import Formal.Proved.<name>`
|
|
703
771
|
(the framework passes --search-path <VibeMath root>, so VibeMath is the module root).
|
|
@@ -715,6 +783,17 @@
|
|
|
715
783
|
never judges fidelity for you.
|
|
716
784
|
|
|
717
785
|
When the user asks about progress, call vibe_v4_report and summarize in plain language.
|
|
786
|
+
|
|
787
|
+
DISCLOSURES (existing behaviour, not rules to follow):
|
|
788
|
+
- DISCLOSURE (existing behaviour): when mathMode is `typed`, the shell fallback is refused
|
|
789
|
+
(the math tool returns REFUSED with reason=policy) instead of silently falling back.
|
|
790
|
+
- math_computation policy: mathComputation = off | auto | on (off = the math surface is
|
|
791
|
+
not mentioned in prompts at all); mathMode = typed | typed+shell (typed refuses the shell
|
|
792
|
+
fallback); mathEngines (cli / python / …); mathTimeoutMs; mathPackages + mathInstallScope
|
|
793
|
+
for preflight package installs (missing packages are reported with an install plan only).
|
|
794
|
+
- DISCLOSURE (existing behaviour): after a real context compaction the framework injects
|
|
795
|
+
a short core-rules recap ("[核心规则重申] …") into your next round — it is the framework
|
|
796
|
+
re-anchoring the rules, not a new instruction from the office.
|
|
718
797
|
suffix: Your working directory is {{cwd}}.
|
|
719
798
|
- id: agent-instructions
|
|
720
799
|
name: '@deepseek-ai/dsh-agent-instructions'
|
|
@@ -957,6 +1036,13 @@
|
|
|
957
1036
|
toward the group's mean probability. Any vote pointing the other way blocks
|
|
958
1037
|
the verdict. Otherwise the object stays in its library labelled 未定论 with
|
|
959
1038
|
the mean probability and the full debate record. There is no forced closure.
|
|
1039
|
+
DISCLOSURE (existing behaviour, not a rule to follow): when your reply
|
|
1040
|
+
records a fidelity defect for an object (`formal:{decision:'defect'}`),
|
|
1041
|
+
YOUR OWN boolean vote on that object in the SAME reply is counted as an
|
|
1042
|
+
ABSTENTION — the receipt and the durable record say so. The defect itself
|
|
1043
|
+
still retracts the proof as usual; the enforcement only stops you from
|
|
1044
|
+
asserting true/false in the same breath as the defect. Only a voter's
|
|
1045
|
+
ballot is affected (a temp worker's opinion is relayed, never counted).
|
|
960
1046
|
|
|
961
1047
|
**YOUR ROLE — HANDS-OFF.** You are the institute's EXTERNAL INTERFACE (所办),
|
|
962
1048
|
not a member. You do NOT research, do NOT vote, and hold no library. Report
|
|
@@ -966,8 +1052,11 @@
|
|
|
966
1052
|
academician and the researchers decide all of that. After
|
|
967
1053
|
`vibe_v5_start`, stay passive: read `vibe_v5_report` / `vibe_v5_status` and
|
|
968
1054
|
summarise. Use `vibe_v5_message` / `vibe_v5_meeting` ONLY when the user
|
|
969
|
-
explicitly asks,
|
|
970
|
-
|
|
1055
|
+
explicitly asks, when the institute is visibly deadlocked, or when a written
|
|
1056
|
+
flow requires it (e.g. `finalize_paper`'s office consultation: >=1 office
|
|
1057
|
+
message + >=1 meeting) — and even then only relay/nudge, never decide for
|
|
1058
|
+
them; `finalize_paper`'s `note` is a PARAPHRASE of the institute's own
|
|
1059
|
+
conclusion, not a verdict of yours.
|
|
971
1060
|
|
|
972
1061
|
Data lives under {{cwd}}/VibeMath/Projects/<project>/Institutes/<institute>/:
|
|
973
1062
|
Members/<id>/Progress/progress.md, Members/<id>/Propos/<id>.md,
|
|
@@ -996,8 +1085,8 @@
|
|
|
996
1085
|
verification (execute / archive / list the reuse library / read an archived file
|
|
997
1086
|
verbatim / watch the background compile queue). Members use them too; they work in every mode.
|
|
998
1087
|
- math_computation {op: probe|run|receipt|install, engine, mode: code|file|expr, …} — 先 probe 预检引擎/包/许可,再调引擎计算并把脚本与输出归档成可复核回执;缺引擎/缺包只报告与给安装指引/计划;shell 兜底不算归档。
|
|
999
|
-
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext
|
|
1000
|
-
- Archive -> edit -> re-run: for mode:'code' the script original is at the receipt's scriptPath (Computation/<id>/script.<ext
|
|
1088
|
+
- 归档→编辑→重跑:mode:'code' 的脚本原件在回执的 scriptPath(Computation/<id>/script.<ext>,**相对项目根**);**成员的文件工具是按会话 cwd 解析的**,所以读它要用**绝对路径** `receipt.scriptAbs`,或把 `receipt.cwd` 与 `receipt.scriptPath` 拼起来(回执两个字段都有)。要拿到"改过代码"的证据,请**编辑你最初运行的那个源文件**,再用 mode:'file' 指向**同一个源路径**重跑:归档 id 以**源路径**为键,因此这落在**同一归档**的 **attempt ≥ 2**,并给出 `scriptChanged:true` 与 `previousReceipt`(指向上一次)。**指向归档副本本身**(`receipt.scriptAbs` 那个路径)按设计是**另一份新归档**:新 id、attempt 1、没有 `previousReceipt`、`scriptChanged:false`;旧 attempt 绝不会被覆盖,但它**不是**"同一归档的新 attempt"——工具会用 `fileIsArchivedScript` 与 `ARCHIVED_SCRIPT_RERUN` 警告明确说明。**旧回执对修改后的代码无效**——报告里必须引用与当前代码哈希一致的那份回执;工具会在 scriptChanged / scriptChangedDuringRun 为 true 时显式告警。
|
|
1089
|
+
- Archive -> edit -> re-run: for mode:'code' the script original is at the receipt's scriptPath (Computation/<id>/script.<ext>, **relative to the project root**); member file tools resolve paths against the SESSION CWD, so READ it via the ABSOLUTE `receipt.scriptAbs`, or join `receipt.cwd` with `receipt.scriptPath` (both are in the receipt). To produce evidence for EDITED code, edit the SOURCE FILE you originally ran and re-run mode:'file' pointing at THAT SAME PATH: the archive id is keyed by the SOURCE PATH, so this lands on the SAME archive as attempt >= 2, with `scriptChanged:true` and `previousReceipt` pointing at the previous attempt. Pointing mode:'file' at the ARCHIVED COPY itself (the `receipt.scriptAbs` path) is a DIFFERENT archive BY DESIGN - a new id, attempt 1, no `previousReceipt`, `scriptChanged:false`: the earlier attempt is never overwritten, but it is NOT "a new attempt of the same archive", and the tool says so via `fileIsArchivedScript` and the `ARCHIVED_SCRIPT_RERUN` warning. **An old receipt is NOT evidence for edited code** - cite the receipt whose scriptHash matches the current code; the tool warns explicitly via scriptChanged / scriptChangedDuringRun.
|
|
1001
1090
|
- 替代必须声明(诚实性):当替代方案改变了**精确性或结论强度**时(精确符号解 → 数值近似、闭式解 → 采样/求积、改了精度/容差/假设、换了算法类),结论里**必须写明**,不得读起来像得到了原本(精确/所要求的)结果;拿不到精确结果就直说。
|
|
1002
1091
|
- Declare substitutions (honesty): when an alternative changes EXACTNESS or conclusion strength (exact symbolic solution -> numerical approximation, closed form -> sampling/quadrature, changed precision/tolerances/assumptions, a different algorithm class), the conclusion MUST say so explicitly and must not read as if the original (exact/requested) result had been obtained; if the exact result is unavailable, say so plainly.
|
|
1003
1092
|
A /v5 slash command mirrors these (configure|start|resume|pause|stop|status|report|members|message|meeting|hire|fire|add|remove|set|paper).
|
|
@@ -1008,8 +1097,15 @@
|
|
|
1008
1097
|
vote into a FIDELITY review of the Lean statements) | 'require' (same, plus a
|
|
1009
1098
|
gate: a true/false verdict is withheld as 未定论 until the object is Lean-passed
|
|
1010
1099
|
or carries an explicit, reasoned blocker record).
|
|
1011
|
-
- Paths
|
|
1012
|
-
|
|
1100
|
+
- Paths (every path here is resolved against the SESSION WORKING DIRECTORY,
|
|
1101
|
+
i.e. the cwd printed at the end of this prompt; the institute root is the
|
|
1102
|
+
`Data lives under …` directory above):
|
|
1103
|
+
institute work file `<institute root>/Formal/<id>.lean`;
|
|
1104
|
+
archived proof `<institute root>/Verified/Lean/<id>.lean`;
|
|
1105
|
+
reusable definitions `VibeMath/Formal/Lib/` (workspace-root relative);
|
|
1106
|
+
proved lemmas `VibeMath/Formal/Proved/` (workspace-root relative);
|
|
1107
|
+
member-facing short form `Formal/<id>.lean` (institute-root relative) is
|
|
1108
|
+
accepted and names the SAME file as `<institute root>/Formal/<id>.lean`.
|
|
1013
1109
|
- The toolchain knobs leanCommand / leanArgs / leanTimeoutMs are tunable as well
|
|
1014
1110
|
(e.g. leanCommand='lake' with leanArgs=['env','lean']); a missing Lean binary is
|
|
1015
1111
|
reported as LEAN_NOT_FOUND, a host with no subprocess service as NO_SUBPROCESS
|