删除策划agent v2,与退役功能解耦 (#355)
Project CI / AI game creator shell Rust shard 1/4 (push) Successful in 7m19s
Project CI / AI game creator shell Rust shard 3/4 (push) Successful in 7m35s
Project CI / AI game creator shell Rust shard 4/4 (push) Successful in 7m34s
Project CI / AI game creator shell Rust shard 2/4 (push) Successful in 7m39s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m13s
Project CI / AI game creator shell Rust crates (push) Successful in 3m18s
Project CI / Backend tests (push) Successful in 9m16s
Project CI / Repository checks (push) Successful in 8m11s
Project CI / Native shell tests (push) Successful in 11m56s
Project CI / Frontend tests (push) Successful in 11m49s
Project CI / AI game creator shell web tests (push) Successful in 6m37s
Project CI / AI game creator shell Rust shard 1/4 (push) Successful in 7m19s
Project CI / AI game creator shell Rust shard 3/4 (push) Successful in 7m35s
Project CI / AI game creator shell Rust shard 4/4 (push) Successful in 7m34s
Project CI / AI game creator shell Rust shard 2/4 (push) Successful in 7m39s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m13s
Project CI / AI game creator shell Rust crates (push) Successful in 3m18s
Project CI / Backend tests (push) Successful in 9m16s
Project CI / Repository checks (push) Successful in 8m11s
Project CI / Native shell tests (push) Successful in 11m56s
Project CI / Frontend tests (push) Successful in 11m49s
Project CI / AI game creator shell web tests (push) Successful in 6m37s
Reviewed-on: #355 Co-authored-by: Linghong <ink29535@proton.me> Co-committed-by: Linghong <ink29535@proton.me>
This commit was merged in pull request #355.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
# 策划 Agent 生产迁移与工作区浏览方案
|
||||
|
||||
更新时间:2026-09-10
|
||||
状态:实施中
|
||||
状态:已完成(2026-09-18)
|
||||
|
||||
> 现状说明(2026-09-18):本文记录的迁移已完成,当前策划入口统一使用 Design Agent。旧 Planning V1/V2 会话、专用命令、审批卡和展示适配已删除;文中提到的 V2 文件仅代表迁移时的参考来源,不得作为现行实现、回退路径或测试迁移目标。
|
||||
|
||||
## 1. 目标
|
||||
|
||||
@@ -23,11 +25,11 @@
|
||||
|
||||
生产侧复用 Provider、会话恢复、文件读写、审计和 UI 通信等基建,不复用现有立项策划 Agent 的行为协议。
|
||||
|
||||
原型行为是新的策划 Agent 契约。现有 `Planning V2` 只作为 Provider 调用、持久化和恢复实现的参考来源,不作为行为、提示词、产物或审批契约。
|
||||
原型行为是新的策划 Agent 契约。已退役的 `Planning V2` 仅作为迁移历史中的 Provider 调用、持久化和恢复参考来源,不作为行为、提示词、产物、审批契约或回退路径。
|
||||
|
||||
常驻提示词、阶段提示、速览卡结构说明、工具名称与参数、资源目录和注入映射以迁移时核对的原型文件为基线。迁移不顺便重写提示词,不增加模型输出内容门禁。旧需求文档中已明确舍弃的行为不恢复。
|
||||
|
||||
本方案描述生产迁移目标。当前已接入独立设计会话、自由工具循环、阶段审批命令和工作区浏览命令;生产入口对无旧 Planning V2 会话的策划项目切换到新设计 Agent,已有 V2 会话仍走原链路。旧 Planning V2 专用展示尚未清理。
|
||||
本方案描述已完成的生产迁移。当前入口使用独立设计会话、自由工具循环、阶段审批命令和工作区浏览命令;旧 Planning V2 会话不再继续运行,旧专用展示和命令已删除。历史项目按当前 Design Agent 入口重新开始,不做旧会话转换或旧测试迁移。
|
||||
|
||||
## 3. 复用与丢弃清单
|
||||
|
||||
@@ -66,16 +68,17 @@
|
||||
|
||||
路径穿越、绝对路径、控制目录访问和凭据泄露防护属于安全边界,可以保留;它们不能扩展成限制正常策划创作的业务门禁。
|
||||
|
||||
现有参考入口如下。复用对象是其中的可用函数和通信机制,不是整个模块:
|
||||
当前实现入口如下:
|
||||
|
||||
| 代码入口 | 参考内容与注意点 |
|
||||
| 代码入口 | 职责与边界 |
|
||||
| --- | --- |
|
||||
| `apps/ai-game-creator-shell/src-tauri/src/agent/runtime_protocol/planning_session_v2.rs` | Provider 配置、请求、重试、会话恢复;丢弃问询计数策略、强制工具和输出纠错协议 |
|
||||
| `apps/ai-game-creator-shell/src-tauri/src/agent/runtime_tools/file_ops.rs` | 读写、补丁和删除实现;不可原封不动继承 owner、产物和任务门禁 |
|
||||
| `apps/ai-game-creator-shell/src-tauri/src/agent/design_runtime.rs` | Provider 请求、工具循环、重试、阶段审批与会话恢复 |
|
||||
| `apps/ai-game-creator-shell/src-tauri/src/agent/runtime_protocol/design_session.rs` | 设计会话、阶段状态与待交互请求的持久化 |
|
||||
| `apps/ai-game-creator-shell/src-tauri/src/agent/design_tools.rs` | 固定资源包、工作区文件读写、补丁、删除、搜索与路径安全边界 |
|
||||
| `apps/ai-game-creator-shell/src-tauri/src/project/filesystem.rs` | 路径解析、文件列出和读取、基础写入;内部绝对路径字段不得传给模型 |
|
||||
| `apps/ai-game-creator-shell/src/App.tsx` | Tauri 事件订阅、文件刷新、会话恢复入口;不把旧策划状态投影当作新契约 |
|
||||
| `apps/ai-game-creator-shell/src/features/project-workspace/ProjectWorkspaceChatPane.tsx` | Game Agent 文件列表与读取入口;新的文件浏览应直接打开文件视图,不往聊天中追加文件正文 |
|
||||
| `apps/ai-game-creator-shell/src/features/project-workspace/GddApprovalCard.tsx` | 仅参考现有面板和通用交互样式;不沿用结构化 GDD 展示及三按钮决定模型 |
|
||||
| `apps/ai-game-creator-shell/src/App.tsx` | Design Agent IPC、事件订阅、文件刷新、会话恢复与输入提交 |
|
||||
| `apps/ai-game-creator-shell/src/features/project-workspace/DesignWorkspacePanel.tsx` | 策划工作区文件浏览与正文展示,直接打开文件视图 |
|
||||
| `apps/ai-game-creator-shell/src/features/project-workspace/DesignAgentSurface.tsx` | 消息、reasoning、澄清与阶段审批交互 |
|
||||
|
||||
不为此次迁移先建设通用 Agent 框架。已有函数能够直接使用就直接使用,只有确实需要拆除业务耦合时才做局部拆分。
|
||||
|
||||
@@ -239,6 +242,8 @@ UI 使用“批准”和“继续修改”两个文字按钮,分别配 Lucide
|
||||
|
||||
澄清卡提供独立的选项回答和自由文本回答。点击选项只提交请求身份和所选选项,不携带文本框草稿;Runtime 根据已保存的问题/选项形成明确的回答内容,不只传递“3”之类的序号。用户也可不选择任何选项,直接填写文本并点击“提交回答”,发送请求身份、`optionIndex: null` 和文本正文,Runtime 将其表述为“用户回答”,不将它当作某个选项的补充。新澄清请求出现时清空上一题的文本草稿。不沿用生产旧问题数量上限和固定问答字段。澄清卡待回答状态应可在重启后恢复。
|
||||
|
||||
用户向上滚动查看策划历史时暂停自动跟随;发送新的普通消息后恢复跟随最新消息和回复,仅编辑输入内容不改变历史阅读位置。
|
||||
|
||||
## 8. 用户工作区浏览
|
||||
|
||||
`design_artifacts` 同时是 Agent 工作区和用户查看策划资料的文件区。用户不需要通过聊天请求 Agent 才能看到文件。
|
||||
@@ -307,7 +312,7 @@ UI 使用“批准”和“继续修改”两个文字按钮,分别配 Lucide
|
||||
|
||||
实现落在生产 Rust 会话/工具层与现有 React 策划入口,不随应用再启动 Python 原型进程。保持单一用户入口,不为迁移建设第二套工作台。
|
||||
|
||||
切换前盘点旧 Planning V2 活跃会话和持久化数据。旧结构化 GDD 不能直接推断为新五阶段中的某个阶段,不自动转换或覆盖已有项目。旧会话的继续运行或只读保留方式需在实际盘点后明确,再处理入口退役;这不要求新 Agent 兼容旧 GDD 行为。
|
||||
迁移时不把旧 Planning V2 会话或结构化 GDD 转换为新五阶段状态。旧命令、旧展示和旧测试已删除;当前入口不读取旧 V2 authority,也不要求新 Agent 兼容旧 GDD 行为。
|
||||
|
||||
## 12. 验收标准
|
||||
|
||||
@@ -340,7 +345,7 @@ UI 使用“批准”和“继续修改”两个文字按钮,分别配 Lucide
|
||||
- 外部搜索;
|
||||
- 多个策划身份提示词同时存在;
|
||||
- 多 Agent 协作;
|
||||
- 旧 Fast GDD 展示和 GDD schema 兼容。
|
||||
- 不迁移旧 Fast GDD 展示、V2 schema 或旧测试;新 Design Agent 使用自己的会话和阶段产物测试。
|
||||
|
||||
## 14. 开发调试入口
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# 策划会话 Runtime V2 接入与旧链路退役方案
|
||||
|
||||
- 日期:2026-09-03
|
||||
- 状态:P0 合同冻结、P1 内核、P2 产物闭环、P3 入口/UI 接入、P4 灰度回归验收与 P5 旧链路退役均已完成;本文是新生产实现的目标方案与阶段验收合同
|
||||
- 适用范围:AGC 桌面 App 的“做方案”入口、策划会话、GDD 产物与审批
|
||||
- 状态:**历史方案,已完成并退役**。Runtime V2 及其专用入口、命令、展示和测试已在 2026-09 按四不写原则删除;当前“做方案”统一使用独立 Design Agent。
|
||||
- 适用范围:历史 AGC“做方案”入口、策划会话、GDD 产物与审批设计
|
||||
|
||||
> 本文规定新策划 Agent 的生产接入和旧链路退役方式。P3 开始修改正式 AGC 入口与工作台,但旧 `project-supervisor-plan` / `project-planning` 源码仍保留,直到 P5 完成退役;V2 切换时旧链路直接封存,所有未完成旧会话强制失败,旧 Fast GDD 文档之后只作为历史记录依据。
|
||||
> 本文只用于追溯 Runtime V2 的设计和退役过程,不是现行实现依据。不要恢复 `planning_session_v2`、`planning_policy_v2`、`hydrate_planning_session_v2` 或 V2 专用 UI;当前行为以 Design Agent 生产迁移方案和代码为准。
|
||||
|
||||
## 1. 决策摘要
|
||||
|
||||
|
||||
Reference in New Issue
Block a user