cvc_touch/docs/superpowers/plans/2026-11-16-standalone.md
2026-11-16 16:35:22 +08:00

46 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# cvc_touch Implementation Plan
> **For agentic workers:** 使用 superpowers:subagent-driven-development 分工完成迁移与复核。
**Goal:** 在用户指定目录创建移除语音/语料且不依赖 common 包的独立项目。
**Architecture:** 整合 common 共享源码与 UI 应用源码;保留现有接口和非语音业务,全部页面本地加载。
**Tech Stack:** Vue 3、Vite 6、Pinia、Element Plus、pnpm 10。
**Spec:** ../specs/2026-11-16-standalone-design.md
## Global Constraints
- 来源项目保持原样;目标仅为 cvc_touch。
- 用户已确认:只删除语音和语料,其余业务全部保留。
- 不改变后端接口和原权限规则。
## Review Focus
- 混合菜单不能丢失触控或资源中心。
- 移除语音子页后不能留下空菜单目录。
- 公共流程组件不能仍从包导出入口加载。
- 地图、机器人、摄像头与模型资源不得依赖相邻目录。
- 锁文件安装与各环境构建应可独立完成。
### Task 1: 源码整合与本地入口
**Files:** package.json、pnpm-lock.yaml、vite.config.js、vite/plugins/auto-import.js、src/main.js、src/router/index.js、src/router/deviceRoutes.js、src/runtime/config.js、src/views、src/components、public。
**Interfaces:** 产出本地页面、路由及 RuntimeAssignmentsEditor/TaskExecutionLog 组件路径,供现有触控和测试页面导入。
- [x] 从 common 复制 src,从 UI 叠加应用源码和运行配置;排除来源 Git、依赖和旧产物。
- [x] 删除包引用和包桥接配置,将路由及运行组件改为本地导入。
- [x] 独立安装,确认无 common 包依赖。
### Task 2: 语音/语料清理与菜单兼容
**Files:** src/views/vi、src/views/corpusManger、src/views/evaluate/il/speech、src/api/vi、src/api/corpusManger、src/views/flow/config.js、src/store/modules/permission.js、src/router/menuFilter.js、tests/menuFilter.test.mjs、src/views/index.vue。
**Interfaces:** filterAvailableMenus(routes, availableViewPaths) 返回保留原字段且裁剪已移除模块/空目录的菜单树;供 permission store 使用。
- [x] 先编写菜单行为测试并运行,确认因实现缺失失败。
- [x] 移除专属页面/API/资源/节点和首页入口,保留通用硬件与其余业务。
- [x] 实现菜单过滤并运行测试,覆盖混合树、空目录和合法外链。
### Task 3: 验证与说明
**Files:** README.md、docs/superpowers/migration-verification.md。
- [x] 扫描本地导入闭包、包依赖及被删除模块残留;必要时修正迁移路径。
- [x] 运行菜单测试、生产构建、开发构建与启动检查,记录实际结果。
- [x] 独立复核需求与源码边界,修复发现的问题。
- [x] 更新运行说明与迁移验证记录,交付指定目录。
## 执行结论
任务已实施并完成可执行验证;两张无引用语音合成 PNG 因自动审批拒绝删除而保留,详见 migration-verification.md。用户指定目录本身作为隔离目标,来源项目未改动;未创建额外 worktree 或提交。