From 872f742d3edc39d07d8acd0586d33e2cf3c632e1 Mon Sep 17 00:00:00 2001 From: moranzhi Date: Tue, 25 Aug 2026 01:02:23 +0800 Subject: [PATCH] Update docs for gm-first play pipeline and harness chance. Sweep glossary, progressive design, worker-spec/refine prompts, and play-dm-auditor streaming notes. Co-authored-by: Cursor --- docs/briefs/prompt-revision-inventory.md | 4 ++-- docs/design-orchestrator-guide.md | 2 +- docs/play-dm-auditor.md | 8 +++++++- docs/play-presentation-shells.md | 2 +- docs/progressive-data-design.md | 10 +++++----- docs/ui-glossary.md | 6 +++--- docs/world-simulator-modules.md | 2 +- .../world-simulator/modules/refine/prompt.md | 4 ++-- .../world-simulator/modules/worker-spec/prompt.md | 12 ++++++------ .../world-simulator/worker-templates/README.md | 6 +++--- .../world-simulator/worker-templates/chance.yaml | 4 ++-- 11 files changed, 33 insertions(+), 27 deletions(-) diff --git a/docs/briefs/prompt-revision-inventory.md b/docs/briefs/prompt-revision-inventory.md index a59acb7..3477e31 100644 --- a/docs/briefs/prompt-revision-inventory.md +++ b/docs/briefs/prompt-revision-inventory.md @@ -17,7 +17,7 @@ | `modules/context-order/prompt.md` | **骨架已写**(`context-order.v1`) | | `docs/context-fragment-design.md` | **已写**;范例技能已对齐 `context-fragment.v1` | | 程序:片段解析 / 扁平投影序 / `对话.历史` 可投影 | **已落地**(非硬双锚) | -| `orchestrator.md` | **已改**:play 调度 auditor → perspective? → gm → narrator | +| `orchestrator.md` | **已改**:play 调度 gm → perspective? → narrator → auditor | ## 优先级 P1(能力归属 feeds) @@ -56,7 +56,7 @@ ```json // 设计.worker集(世界模拟) { - "play_slots": { "auditor": true, "gm": true, "narrator": true, "perspective": false }, + "play_slots": { "auditor": true, "gm": true, "narrator": true, "perspective": false, "chance": false }, "tables": { "side_effects": [/* 来自变量设计 */] }, "workers": [/* 可空,由程序按槽展开;或覆盖 context/outputs */] } diff --git a/docs/design-orchestrator-guide.md b/docs/design-orchestrator-guide.md index 2aea42f..ac9de98 100644 --- a/docs/design-orchestrator-guide.md +++ b/docs/design-orchestrator-guide.md @@ -198,7 +198,7 @@ | 记忆 / 长线 / 大纲 / 随机分支 / 人设阶段 | **统一用表**(§5):维护 + 显隐 + 副作用插换上下文 | | 信息差玩法 | 分角 worker;极贵,慎用 | | 格式 | 程序拼 | -| 真随机 / 骰子卡组计算 | 固定按需槽 `chance`(程序工具:roll/compare/draw/pick)→ `运行.本轮.机遇`;`play_slots.chance` 开启后由编排器 run_worker;禁止临时造 LLM「骰子演员」 | +| 真随机 / 骰子卡组计算 | 主世界层 harness 批量 `chance` 工具(`requests[]`);`play_slots.chance` 开关;禁止临时造 LLM「骰子演员」;可选保留按需 `chance` worker 供显式 run_worker | | 用户不应知道的信息 | 程序固定注入,不进可见区;非 input 整理 worker | | 输入协议 | 常驻上下文(`()` 元要求、`""` 对白、无包裹=事实等) | diff --git a/docs/play-dm-auditor.md b/docs/play-dm-auditor.md index 9af42a0..62b11e6 100644 --- a/docs/play-dm-auditor.md +++ b/docs/play-dm-auditor.md @@ -63,7 +63,13 @@ DM 出裁决包(含变量变更)→ 旁观只动表/触发生成 → 程序 - 旁观要不要能说「该按某条规则补东西」?→ **要**,就得看见规则目录/格式。 - 旁观要不要会写角色描写?→ **不要**,所以描写长文不必进旁观上下文。 -## 5. 一句话 +## 5. 上下文与思考流(UI 对接) + +主世界层游玩期走 **gm harness**(tool loop):与普通 worker 相同,经 `onThinkingDelta` / `onOutputDelta` 把推理与正文增量推到前端;机遇工具往返也在同一气泡时间线内展示,不另开隐藏通道。 + +转述、旁观仍各是一次 worker 调用,各自独立流式输出;**不要**把旁观维护当成 gm 的 tool。 + +## 6. 一句话 **主世界层断事;转述说话;旁观在回合末对表,改表给下一轮。** 交互上优先「一次裁决 + 延后轻维护」,不优先「来回多轮 LLM 传话」。 diff --git a/docs/play-presentation-shells.md b/docs/play-presentation-shells.md index d240d62..5e5cb2b 100644 --- a/docs/play-presentation-shells.md +++ b/docs/play-presentation-shells.md @@ -1,7 +1,7 @@ # 游玩呈现壳 · 可微调前端模板 > **阶段**:P1 = 定类与契约;**P2** = 程序/样式适配与灌数。 -> 上游:游玩管线 `auditor → gm → narrator`。 +> 上游:游玩管线 `gm → perspective? → narrator → auditor`。 > 创作挂钩:`设计.正文组成` / `设计.监控栏`;终稿 tag 通常 `输出.用户展示`。 > **创作定位:基于固定壳做适配微调,不是从零设计前端。** > 预览:`/shells.html` diff --git a/docs/progressive-data-design.md b/docs/progressive-data-design.md index a6a82aa..7640341 100644 --- a/docs/progressive-data-design.md +++ b/docs/progressive-data-design.md @@ -70,7 +70,7 @@ Progressive 投影 本轮主世界层只看见「当前档」;未 3. 程序:在边沿或回合结算时抽一条 → 写入 `运行.事件流` 或投影 tag;主世界层只演绎已抽中的条目。 4. once / fired:同一事件 id 不重复(除非规则允许)。 -(真随机:启用 `play_slots.chance`,由按需执行单元 `chance` 程序掷骰/抽签/比点,结果在 `运行.本轮.机遇`;主世界层只演绎已出的结果。事件池权重抽签也可走 chance.pick。) +(真随机:主世界层 harness 内调用批量 `chance` 工具(`requests[]` 一次交齐);由 `play_slots.chance` 开关(默认 false 关闭;规格未写 `play_slots` 时 harness 默认开启)。结果可落 `运行.本轮.机遇`;主世界层只演绎已出的结果。旁观 `need_generate` 走程序抽样 → `运行.本轮.旁观.生成抽样`。事件池权重抽签也可走 chance.pick。) ## 4. 哪些需要变量(判定) @@ -94,10 +94,10 @@ Progressive 投影 本轮主世界层只看见「当前档」;未 ```text 用户输入 - → 主世界层(世界推演):读变量 + 已投影 data,交事件/改真值(按规则) - →(可选)叙事转述:把裁决写成用户可见正文 - → 旁观维护(副 LLM):合同+表+本轮裁决;默认空操作(maintain.v1) + → 主世界层(世界推演):读变量 + 已投影 data,交事件/改真值(按规则);可经 harness 批量调 chance 工具 →(可选)角色视角:强信息隔离时出反应建议(默认关,插在主世界层之后) + →(可选)叙事转述:把裁决写成用户可见正文 + → 旁观维护(副 LLM):合同+表+本轮裁决;默认空操作(maintain.v1);改表供下一轮主世界层读取 ``` | 内容 | 给谁 | 不要做成 | @@ -111,7 +111,7 @@ Progressive 投影 本轮主世界层只看见「当前档」;未 用户可见名:`ui-glossary.md`(主世界层、旁观维护、叙事转述…)。作者文档可称 **主世界层 / 旁观维护**,与酒馆「主 GM + auditor」同构;**不要**对用户改称整套系统为「GM 框架」而废弃「执行单元」。 -**维护路径(不是 chance toolcall)**:主世界层输出 settlement.v1 → Runtime 合并 `variable_changes` 进 `变量.当前` → `side_effects` 换投影;旁观维护输出 maintain.v1 → Runtime 按需合并 `table_ops`;chance 只负责骰子/抽签。 +**维护路径(不是 gm 的 chance toolcall)**:主世界层输出 settlement.v1 → Runtime 合并 `variable_changes` 进 `变量.当前` → `side_effects` 换投影;旁观维护输出 maintain.v1 → Runtime 按需合并 `table_ops` / `need_generate` 程序抽样。gm harness 的 `chance` 只负责本回合裁决前的骰子/抽签。 ## 6. 世界模拟器技能落点 diff --git a/docs/ui-glossary.md b/docs/ui-glossary.md index eb9ba33..4b08611 100644 --- a/docs/ui-glossary.md +++ b/docs/ui-glossary.md @@ -125,7 +125,7 @@ | `role-decide` | **角色决策** | | `world-simulator` | **主世界层**(旧称:世界推演) | | `auditor` | **旁观维护**(表/规则检查;默认空操作) | -| `chance` | **机遇裁定**(按需:骰子/抽签/比点;程序工具) | +| `chance` | **机遇裁定**(主世界层 harness 批量工具;非每轮独立 LLM) | | `round-present` | **回合呈现** | 配方选项展示名示例:`world-simulator`(recipe)→ **世界模拟器**;`expand-assistant` → **扩写助手**。 @@ -143,10 +143,10 @@ | **旁观维护** | `auditor` | 副 LLM:表/规则检查与按需补充;默认每轮上场、多数轮空操作;不写真相 | | **主世界层** | `world-simulator` | 读变量与 Progressive 投影、按规则改真值/交事件;多数世界观与查表归这里 | | **叙事转述** | `narrator` | 把裁决写成用户可见正文(若规格拆了呈现) | -| **机遇裁定** | `chance` | 按需程序工具(掷骰/比点/抽签);不进每轮管线;结果 tag `运行.本轮.机遇` | +| **机遇裁定** | `chance` | 主世界层 harness 内批量程序工具(掷骰/比点/抽签);`play_slots.chance` 为 false 时关闭;结果可写入 `运行.本轮.机遇`;非每轮独立上场 | | **角色视角** | `role-decide` | 仅强信息隔离;只出反应建议 | -推荐调度:`auditor → perspective? → gm → narrator`。 +推荐调度:`gm → perspective? → narrator → auditor`。 默认少拆:百科、分档性格、章大纲投影 → 主世界层 + 表副作用,**不要**再拆「世界观执行单元」「性格执行单元」。详见 `docs/progressive-data-design.md` §5。 diff --git a/docs/world-simulator-modules.md b/docs/world-simulator-modules.md index 4c24f3c..d1cf0cf 100644 --- a/docs/world-simulator-modules.md +++ b/docs/world-simulator-modules.md @@ -178,7 +178,7 @@ recipes/world-simulator|expand-assistant/recipe.yaml | 编排器 | 状态 | |------|------| -| 世界模拟器 | 创作链路已写;**play**:`auditor → perspective? → gm → narrator`;settlement/maintain 合并变量已接 | +| 世界模拟器 | 创作链路已写;**play**:`gm → perspective? → narrator → auditor`;gm harness 批量 chance;settlement/maintain 合并变量已接 | | 扩写助手 | 方法论已写;起点:美学纲领与交互范式;勿默认套世界模拟全套 | --- diff --git a/skills/dialogue/world-simulator/modules/refine/prompt.md b/skills/dialogue/world-simulator/modules/refine/prompt.md index 38d2685..41cfaf3 100644 --- a/skills/dialogue/world-simulator/modules/refine/prompt.md +++ b/skills/dialogue/world-simulator/modules/refine/prompt.md @@ -58,8 +58,8 @@ boundary: | 执行顺序: 1. 复述站位、体验内核、禁忌;矛盾处 askUser 1 点。 2. 写入 `play_slots`(世界模拟)或等价写手槽;**workers 只含白名单 ref**: - - world_sim 每轮:auditor / world-simulator / narrator / role-decide(仅 perspective 开时) - - world_sim 按需:chance(仅 chance 开时;`invocation: on_demand`) + - world_sim 每轮(顺序):world-simulator(gm)→ role-decide(仅 perspective 开)→ narrator → auditor + - world_sim 机遇:`play_slots.chance` 开时 gm harness 获批量工具;可另声明 `chance` ref(`invocation: on_demand`)供显式调度 - writing:outline / chapter-writer - 程序也会按 play_slots 展开;你仍应写出与槽一致的 workers[](含 acceptance),便于人读验收。 3. **禁止**自造 ref、禁止添加 variable-update / lore-keeper / 自造骰子 LLM 等。 diff --git a/skills/dialogue/world-simulator/modules/worker-spec/prompt.md b/skills/dialogue/world-simulator/modules/worker-spec/prompt.md index 058a17b..1b4f22b 100644 --- a/skills/dialogue/world-simulator/modules/worker-spec/prompt.md +++ b/skills/dialogue/world-simulator/modules/worker-spec/prompt.md @@ -25,7 +25,7 @@ boundary: | 细化终稿:按本步勾选展开 workers、合并常驻与 tables。 变量设计 / 变量控制上下文:真值与投影,不是推理槽。 旁观维护(auditor):副 LLM,表/规则检查,默认空操作;无长对话史。 - 机遇裁定(chance):按需程序工具槽,不进每轮管线。 + 机遇裁定(chance):`play_slots.chance` 开时主世界层 harness 获批量程序工具;非每轮独立上场。 叙事指南与故事推进:挂到转述槽(推进可兼挂主世界层);世界/机制:挂到主世界层——本步只点名槽。 ``` @@ -55,7 +55,7 @@ boundary: | 固定 ref 白名单: - 世界模拟每轮:`world-simulator`(gm)、`narrator`、`auditor`(回合末)、`role-decide`(perspective,默认关) -- 世界模拟按需:`chance`(机遇裁定,默认关;invocation=on_demand) +- 世界模拟机遇:`play_slots.chance` 控制主世界层 harness 的批量 `chance` 工具(默认 false);非每轮独立 LLM 槽 - 扩写:`outline`、`chapter-writer` - 禁止:`variable-update`、自造 kebab、为世界观/性格再拆槽 @@ -63,7 +63,7 @@ boundary: | 1. 读配方与体验契约,判断路径:世界模拟 vs 写手分段。 2. 默认世界模拟:`auditor: true, gm: true, narrator: true, perspective: false, chance: false`; 调度序 gm → perspective? → narrator → auditor; - 仅信息隔离才开 perspective;需要骰子/抽签/比点等真随机时开 chance。 + 仅信息隔离才开 perspective;需要骰子/抽签/比点等真随机时设 `chance: true`(主世界层 harness 批量工具,不进每轮序)。 3. 写手路径:`outline` + `chapter-writer` 默认都开;用户明确只要正文则可关 outline。 4. 可写简短 `mount_notes`(哪类上游产物挂哪槽),不粘贴长文。 5. 输出 JSON。summary:`游玩拓扑 · 旁观+gm+转述` 或 `游玩拓扑 · gm+转述+机遇` 等。 @@ -115,7 +115,7 @@ boundary: | "生成规则/变量合同/旁观摘要 → auditor(无长对话史)", "叙事指南与故事推进 → narrator(推进兼 gm)", "世界/机制/变量规则 → gm", - "真随机检定 → chance(按需)", + "真随机检定 → play_slots.chance=true(gm harness 批量工具,非每轮 chance worker)", "真值与 side_effects → 细化终稿 tables" ], "开放问题": [] @@ -125,7 +125,7 @@ boundary: | 填写规则: - `path=world_sim` 时必须有 `play_slots`;`writing_slots` 可省略。 - `path=writing` 时必须有 `writing_slots`;`play_slots` 可省略。 -- `auditor` / `chance` 缺省:auditor 视为 true,chance 视为 false;chance 为 true 时不进每轮序,仅可按需调度。 +- `auditor` / `chance` 缺省:auditor 视为 true,chance 视为 false;`chance: true` 时为主世界层开启 harness 机遇工具(仍可声明按需 `chance` ref 供显式 run_worker,但游玩默认不走每轮 chance 演员)。 - 不要输出自造 `actors[]` / 自由 `workers[]`。 - 旧产物若含 `actors[]`:本步应改写为槽位勾选,不再追加自定义 ref。 @@ -144,7 +144,7 @@ boundary: | 好: - play_slots: auditor+gm+narrator,perspective/chance false;mount_notes 一行。 - 有凶手真名不能进 GM:perspective true,并说明只出反应建议。 -- 需要检定/抽签:chance true(按需程序工具)。 +- 需要检定/抽签:`chance: true`(gm harness 批量工具)。 坏: - actors 里发明 affinity-manager、lore-keeper、dice-master(LLM)。 diff --git a/skills/dialogue/world-simulator/worker-templates/README.md b/skills/dialogue/world-simulator/worker-templates/README.md index 3000a12..571910b 100644 --- a/skills/dialogue/world-simulator/worker-templates/README.md +++ b/skills/dialogue/world-simulator/worker-templates/README.md @@ -26,10 +26,10 @@ Runtime 执行时读 Worker 集条目,不直接读本目录。 | 槽 | 默认 ref | 模板 | |----|----------|------| | auditor | `auditor` | `auditor.yaml` — maintain.v1;默认空操作;无长对话史 | -| gm | `world-simulator` | `world-simulator.yaml` — 裁决包 settlement.v1 | +| gm | `world-simulator` | `world-simulator.yaml` — 裁决包 settlement.v1;`play_slots.chance` 开时 harness 批量机遇工具 | | narrator | `narrator` | `narrator.yaml` — 只读裁决包写正文 | | perspective | `role-decide` | `role-decide.yaml` — 可选知密视角 | -| chance(按需) | `chance` | `chance.yaml` — 程序骰子/抽签/比点;不进每轮管线 | +| chance(拓扑开关) | `chance` | `play_slots.chance` 控制 gm harness;可选声明按需 `chance` ref 供显式 run_worker | 变量 / Progressive:**不是**独立 LLM 模板;见 `docs/progressive-data-design.md`(真值 + side_effects)。 Runtime:写入 `运行.本轮.裁决` 时自动合并 `variable_changes` → `变量.当前`;写入 `运行.本轮.旁观` 时按需合并 `table_ops`。 @@ -38,7 +38,7 @@ Runtime:写入 `运行.本轮.裁决` 时自动合并 `variable_changes` → ` | 文件 | 说明 | |------|------| -| `chance.yaml` | 机遇裁定(按需程序工具) | +| `chance.yaml` | 机遇裁定(按需 run_worker 或 gm harness 共用程序实现) | | `round-present.yaml` | 结构化回合陈述(可选) | | `opening-generator.yaml` | 开局生成器(创作末尾) | | `outline.yaml` / `chapter-writer.yaml` | 扩写路径固定槽 | diff --git a/skills/dialogue/world-simulator/worker-templates/chance.yaml b/skills/dialogue/world-simulator/worker-templates/chance.yaml index e6bdbc0..98a7992 100644 --- a/skills/dialogue/world-simulator/worker-templates/chance.yaml +++ b/skills/dialogue/world-simulator/worker-templates/chance.yaml @@ -2,8 +2,8 @@ id: chance label: 机遇裁定 role: chance duty: > - 按需程序工具:掷骰、点数比拼、抽签/加权抽取。不进每轮管线;由编排器 - run_worker(workerContext.chance 或黑板 运行.机会请求)调用。禁止模型编造随机。 + 程序随机工具:掷骰、点数比拼、抽签/加权抽取。游玩期默认经主世界层 harness 批量调用 + (play_slots.chance);也可由编排器 run_worker 显式调度本 ref。禁止模型编造随机。 when: 需要真随机或可复核比点时 suggested_context: static: