Files
NianToB/docs/adr/0001-fork-and-layering-strategy.md

35 lines
1.1 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.

# ADR 0001: ClawX Fork 与 YINIAN 分层改造策略
## 状态
Accepted
## 背景
智念桌面端基于 ClawX fork目标用户从开发者切换为酒店前台、运营、店长和 NIANXX 实施人员。ClawX 提供了 Electron 壳、OpenClaw Gateway 生命周期、技能、渠道、Cron 等基础能力,但其产品心智仍是通用开发者工具。
## 决策
v1 阶段采取渐进式改造:
1. 保留 ClawX 根应用结构、构建链路和 Gateway 管理能力。
2. 新增 `packages/*` 作为 YINIAN 平台边界层。
3. 在 Renderer 中逐步从通用 ClawX 页面迁移到酒店运营工作台。
4. 在 Main 中新增 Auth、Config Sync、Skill Manager、Kernel Lifecycle 安全增强。
5. 在 ClawX 上游变更稳定后,再评估是否迁移到 `apps/desktop` 目录结构。
## 后果
好处:
- 第一阶段可快速运行和验证。
- 保留上游同步能力。
- YINIAN 领域边界可以逐步变硬。
代价:
- 初期目录结构不是最终理想形态。
- 一段时间内 ClawX 与 YINIAN 命名会共存。
- 需要 CI 逐步补上依赖方向约束。