重构世界模拟器为模块化配方架构,完善创作编排、会话运行时与 Web UI,并清理过时技能。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-30 00:39:32 +08:00
parent 2b74c30d36
commit e670a5129c
167 changed files with 22955 additions and 5659 deletions

View File

@@ -1,10 +1,13 @@
# 创作流程指南Creation Playbook
> **文档层级:剧本 / 创作流程概念(非系统架构)。**
> 系统模块与边界见 [`architecture.md`](./architecture.md)。
## 0. 内容在哪
**流程定义在 skill 包里**orchestrator manifest + `workers/*/SKILL.md`)。本文只保留概念。
写新包 → `skill-design-guide.md` → 新建 `skills/.../orchestrator.md`
**设计方法(正推、三大步、表与副作用)****`design-orchestrator-guide.md`**(权威)。
**流程落地**在 skill 包(`orchestrator.md` + `design-intake`)。
写新包 → `skill-design-guide.md`(包格式薄层)→ `skills/.../orchestrator.md`
---
@@ -14,30 +17,52 @@
Orchestrator 包 能力库 + manifest静态
黑板 tag 一次 Session 的实参(动态)
Book 跨 Session过程、资产、游玩
设计.worker集 实例规格JSONaccept 后 = Worker 声明)
```
| 层 | 管什么 |
|----|--------|
| **运行相位** | `idle` / `running` / `waiting_user` — 系统在等什么 |
| **业务 stage** | `design`实例化)→ `play`运行)→ `done` |
| **Agent** | tool loop 内 invoke 哪个 skill |
| **Skill** | 读哪些 tag、写哪些 tag、上下文怎么拼 |
| **业务 stage** | `design`创作)→ `play`游玩)→ `done` |
| **Agent** | tool loop 内 invoke 哪个 worker |
| **声明** | play 可调度哪些 refexecutor 读声明(非题材管道) |
| **Book** | 长期存储,见 `book-storage.md` |
---
## 2. 启动
## 2. 默认包创作流
```text
skill_selection 选 orchestrator 包
intake 启动询问(最小信息)
design stage agent 按需 invoke instantiate skill
declare ready 进入 play
play stage 用户输入 → agent burst → run skill
done 归档 Book
新建作品 → UI 引导 → 用户首句 → 创作单位逐步谈
→ 宜phase:core → 纲领类 fixed:* → worker:* → refine
(非死管道;可穿插,但禁止默认「先写完 worker 再填上下文」)
→ 单位 = 已写出的 fixed:* / resident:* | worker:*(示例话题可问用户,非填空)
→ 单位跑:只写 设计.worker集.草稿;讨论进 messages
→ 用户接受 → 删本单位交互消息,只留产物;草稿保留
→ ……谈完后终稿写 设计.worker集 → 验收后才可进 play
→ (可选)开局 · 开场白 → 用户手动进游玩
→ runworker 按契约从黑板重装acceptance=review 处停、压缩过程 tag
```
`startupCompleted` / `instanceReady`agent 声明 + 程序校验「当前 run_skill清单 可运行」,非固定 prerequisite 打勾
固定上下文 tag 的主收益是 **跨 worker 复用同一份正文**;写下游时仍依赖上游定稿(不能只报 tag 名省掉正文)。能省的是扯皮过程(验收折叠)
不再要求用户选择 skill 包;默认 orchestrator 见 `src/config/default-orchestrator.ts`
方法细节见 **`design-orchestrator-guide.md` §7.2**。不要以「世界模拟器」为默认总形态。
### 进入游玩
- Worker 集 **accepted**(试验期最低门槛)
- **进 play 由用户手动决定**;开局锁定非强制
### 编辑与重 roll
```text
关键节点可存快照
不满意 → 加载 earlier 快照 / 重 roll
play重 roll 替代每轮验收;新输入 = 隐式认可上轮终稿
```
`run-snapshot.md`
---
@@ -45,9 +70,9 @@ done 归档 Book
| | Agent | Runtime |
|--|-------|---------|
| 决定 | invoke 哪个 skill、何时 ask_user/finish | — |
| 拼接上下文 | 只用 read_blackboard 辅助决策 | assembleWorkerContext |
| 写黑板 | 否(边界 tool 驱动 worker 写) | 校验 outputTags 后写入 |
| 决定 | invoke 哪个 worker、何时 ask_user/finish | — |
| 拼接上下文 | 只用 read_blackboard 辅助决策 | 常驻上下文 + 声明拼装 |
| 写黑板 | 否(边界 tool 驱动 worker 写) | 校验后写入;表字段尊重 rev |
Agent **不指定 inputTags**。见 `context-assembly.md`
@@ -55,29 +80,16 @@ Agent **不指定 inputTags**。见 `context-assembly.md`。
## 4. Tool loop burst
每次用户硬事件后agent 进入 `running`,在 **burst 上限内** 多轮 tool碰到边界 tool 或需用户则停。
每次用户硬事件后agent 进入 `running`,在 burst 上限内多轮 tool碰到边界 tool 或需用户则停。
`tool-contracts.md``runtime-state-machine.md`
---
## 5. 角色卡(一种 Book 形态)
```text
创建过程 designTrace + 对话 → CardBookdesign
创建结果 角色卡.确认稿 等 → CardAsset可导入资产
游玩过程 playTrace + runState → PlayBook
游玩存档 PlaySnapshot
```
不拆独立 author/play 包;见 `book-storage.md` §角色卡。
---
## 6. 相关文档
## 5. 相关
| 文档 | 关系 |
|------|------|
| `architecture.md` | 总览 |
| `skill-design-guide.md` | 设计方法 |
| `context-assembly.md` | 上下文拼接 |
| **`design-orchestrator-guide.md`** | ★ 创作设计方法 |
| `skill-design-guide.md` | 包与字段格式 |
| `run-snapshot.md` | 存档 |
| `tag-blackboard.md` | 标签 |