scene-capability-engine 3.3.25 → 3.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/README.md +81 -719
- package/README.zh.md +85 -586
- package/bin/scene-capability-engine.js +105 -0
- package/docs/README.md +47 -249
- package/docs/command-reference.md +80 -4
- package/docs/spec-workflow.md +35 -4
- package/docs/zh/README.md +44 -331
- package/lib/adoption/adoption-strategy.js +4 -0
- package/lib/adoption/detection-engine.js +4 -0
- package/lib/adoption/file-classifier.js +5 -1
- package/lib/adoption/smart-orchestrator.js +4 -0
- package/lib/commands/adopt.js +32 -0
- package/lib/commands/errorbook.js +409 -2
- package/lib/commands/session.js +27 -0
- package/lib/commands/spec-domain.js +78 -2
- package/lib/commands/studio.js +283 -12
- package/lib/commands/timeline.js +287 -0
- package/lib/commands/upgrade.js +16 -0
- package/lib/problem/problem-evaluator.js +620 -0
- package/lib/runtime/project-timeline.js +598 -0
- package/lib/spec/domain-modeling.js +217 -1
- package/lib/workspace/takeover-baseline.js +446 -0
- package/package.json +1 -1
- package/template/.sce/config/problem-eval-policy.json +36 -0
- package/template/.sce/config/session-governance.json +8 -0
- package/template/.sce/config/spec-domain-policy.json +6 -0
- package/template/.sce/config/takeover-baseline.json +33 -0
package/docs/spec-workflow.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
**Version**:
|
|
8
|
-
**Last Updated**: 2026-02
|
|
7
|
+
**Version**: 3.3.26
|
|
8
|
+
**Last Updated**: 2026-03-02
|
|
9
9
|
**Audience**: Intermediate
|
|
10
10
|
**Estimated Time**: 10 minutes
|
|
11
11
|
|
|
@@ -86,6 +86,37 @@ graph LR
|
|
|
86
86
|
|
|
87
87
|
---
|
|
88
88
|
|
|
89
|
+
## Stage 0: Scene-Closed-Loop Research (Mandatory)
|
|
90
|
+
|
|
91
|
+
Before implementation, SCE enforces a closed-loop scene research baseline under `.sce/specs/<spec>/custom/`:
|
|
92
|
+
|
|
93
|
+
- `problem-domain-map.md`
|
|
94
|
+
- `scene-spec.md`
|
|
95
|
+
- `problem-domain-chain.json`
|
|
96
|
+
|
|
97
|
+
These artifacts must cover:
|
|
98
|
+
|
|
99
|
+
1. Scene boundary
|
|
100
|
+
2. Entity / relation
|
|
101
|
+
3. Business rule
|
|
102
|
+
4. Decision policy
|
|
103
|
+
5. Execution flow
|
|
104
|
+
6. Failure signals
|
|
105
|
+
7. Debug evidence plan
|
|
106
|
+
8. Verification gates
|
|
107
|
+
|
|
108
|
+
Commands:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
sce spec domain init --spec <spec-id> --scene <scene-id>
|
|
112
|
+
sce spec domain coverage --spec <spec-id> --json
|
|
113
|
+
sce spec domain validate --spec <spec-id> --fail-on-gap --json
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
This is the default way to avoid wrong-direction implementation and to force evidence-based correction loops.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
89
120
|
## Stage 1: Requirements
|
|
90
121
|
|
|
91
122
|
**Purpose:** Define WHAT you're building and WHY
|
|
@@ -514,6 +545,6 @@ sce spec bootstrap --name 02-00-your-feature --non-interactive
|
|
|
514
545
|
|
|
515
546
|
---
|
|
516
547
|
|
|
517
|
-
**Version**:
|
|
518
|
-
**Last Updated**: 2026-02
|
|
548
|
+
**Version**: 3.3.26
|
|
549
|
+
**Last Updated**: 2026-03-02
|
|
519
550
|
|
package/docs/zh/README.md
CHANGED
|
@@ -1,368 +1,81 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SCE 文档总览
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
本页仅保留高价值入口,帮助你快速完成从接入到规模化交付。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
**最后更新**: 2026-02-14
|
|
9
|
-
**语言**: 简体中文
|
|
7
|
+
## 优先入口
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
本文档集合提供了使用 sce 进行 Spec 驱动开发所需的一切。无论你是初学者还是高级用户,你都会在这里找到所需的指导。
|
|
9
|
+
- [快速开始](quick-start.md)
|
|
10
|
+
- [命令参考](../command-reference.md)
|
|
11
|
+
- [常见问题](../faq.md)
|
|
12
|
+
- [故障排除](../troubleshooting.md)
|
|
16
13
|
|
|
17
14
|
---
|
|
18
15
|
|
|
19
|
-
##
|
|
16
|
+
## 交付主路径
|
|
20
17
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- **治理能力内建**:文档治理、锁管理、环境/工作区控制和审计链路。
|
|
18
|
+
- [Spec 工作流](../spec-workflow.md)
|
|
19
|
+
- [自动闭环指南](../autonomous-control-guide.md)
|
|
20
|
+
- [多 Agent 协同指南](../multi-agent-coordination-guide.md)
|
|
21
|
+
- [Spec 协作指南](../spec-collaboration-guide.md)
|
|
22
|
+
- [Spec 锁机制指南](../spec-locking-guide.md)
|
|
27
23
|
|
|
28
24
|
---
|
|
29
25
|
|
|
30
|
-
##
|
|
31
|
-
|
|
32
|
-
从这里开始你的 sce 之旅:
|
|
33
|
-
|
|
34
|
-
### [快速入门指南](quick-start.md)
|
|
35
|
-
**5 分钟教程** - 从安装到第一个 AI 辅助功能实现
|
|
36
|
-
- 安装 sce
|
|
37
|
-
- 创建你的第一个 Spec
|
|
38
|
-
- 导出上下文
|
|
39
|
-
- 使用 AI 工具实现功能
|
|
26
|
+
## 场景化能力与 Moqui
|
|
40
27
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
- 常见误解
|
|
47
|
-
|
|
48
|
-
### [故障排除](troubleshooting.md)
|
|
49
|
-
**问题解决** - 常见问题和解决方案
|
|
50
|
-
- 安装问题
|
|
51
|
-
- 采用问题
|
|
52
|
-
- 命令错误
|
|
53
|
-
- 集成问题
|
|
28
|
+
- [场景运行时指南](../scene-runtime-guide.md)
|
|
29
|
+
- [Moqui 模板核心库 Playbook](../moqui-template-core-library-playbook.md)
|
|
30
|
+
- [Moqui 能力矩阵](../moqui-capability-matrix.md)
|
|
31
|
+
- [Moqui 标准重建指南](../moqui-standard-rebuild-guide.md)
|
|
32
|
+
- [SCE 能力矩阵路线图](../sce-capability-matrix-roadmap.md)
|
|
54
33
|
|
|
55
34
|
---
|
|
56
35
|
|
|
57
|
-
##
|
|
58
|
-
|
|
59
|
-
深入理解 sce 的工作原理:
|
|
60
|
-
|
|
61
|
-
### [Spec 工作流](spec-workflow.md)
|
|
62
|
-
**深入指南** - 理解 Spec 驱动开发
|
|
63
|
-
- 什么是 Spec?
|
|
64
|
-
- Requirements → Design → Tasks 工作流
|
|
65
|
-
- 创建有效 Spec 的最佳实践
|
|
66
|
-
- 示例 Spec 演练
|
|
36
|
+
## 治理、质量与发布
|
|
67
37
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
- 每种模式的优缺点
|
|
74
|
-
|
|
75
|
-
### [命令参考](../command-reference.md)
|
|
76
|
-
**完整命令列表** - 所有 sce 命令及示例
|
|
77
|
-
- 项目设置命令
|
|
78
|
-
- 上下文管理命令
|
|
79
|
-
- 任务管理命令
|
|
80
|
-
- 自动化命令
|
|
38
|
+
- [文档治理](../document-governance.md)
|
|
39
|
+
- [安全治理默认基线](../security-governance-default-baseline.md)
|
|
40
|
+
- [Errorbook 注册表指南](../errorbook-registry.md)
|
|
41
|
+
- [发布检查清单](release-checklist.md)
|
|
42
|
+
- [发布归档](releases/README.md)
|
|
81
43
|
|
|
82
44
|
---
|
|
83
45
|
|
|
84
|
-
##
|
|
85
|
-
|
|
86
|
-
为你的 AI 工具选择集成指南:
|
|
46
|
+
## 平台管理与运维
|
|
87
47
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- 手动导出模式
|
|
93
|
-
- Composer 集成
|
|
94
|
-
- 最佳实践
|
|
95
|
-
|
|
96
|
-
#### [Windsurf 指南](tools/windsurf-guide.md)
|
|
97
|
-
**Windsurf IDE** - 带命令执行的 AI 代理
|
|
98
|
-
- 原生集成
|
|
99
|
-
- Watch 模式
|
|
100
|
-
- 自动化工作流
|
|
101
|
-
|
|
102
|
-
#### [SCE 指南](tools/SCE-guide.md)
|
|
103
|
-
**AI IDE** - 专为 Spec 驱动开发设计
|
|
104
|
-
- 完全原生集成
|
|
105
|
-
- 可视化工具
|
|
106
|
-
- 零配置
|
|
107
|
-
|
|
108
|
-
#### [VS Code + Copilot 指南](tools/vscode-guide.md)
|
|
109
|
-
**VS Code** - 带 GitHub Copilot
|
|
110
|
-
- 内联注释集成
|
|
111
|
-
- Copilot Chat
|
|
112
|
-
- 代码片段
|
|
113
|
-
|
|
114
|
-
### 聊天机器人集成
|
|
115
|
-
|
|
116
|
-
#### [Claude 指南](tools/claude-guide.md)
|
|
117
|
-
**Claude Code** - Anthropic 的 AI 助手
|
|
118
|
-
- 对话式开发
|
|
119
|
-
- 长上下文窗口
|
|
120
|
-
- 示例提示
|
|
121
|
-
|
|
122
|
-
### 通用集成
|
|
123
|
-
|
|
124
|
-
#### [通用 AI 工具指南](tools/generic-guide.md)
|
|
125
|
-
**适用于任何 AI 工具** - 灵活的集成方法
|
|
126
|
-
- 三种集成模式
|
|
127
|
-
- 工具无关工作流
|
|
128
|
-
- 自定义集成
|
|
48
|
+
- [环境管理指南](../environment-management-guide.md)
|
|
49
|
+
- [多仓库管理指南](../multi-repo-management-guide.md)
|
|
50
|
+
- [团队协作指南](../team-collaboration-guide.md)
|
|
51
|
+
- [手动工作流指南](../manual-workflows-guide.md)
|
|
129
52
|
|
|
130
53
|
---
|
|
131
54
|
|
|
132
|
-
##
|
|
133
|
-
|
|
134
|
-
从真实示例中学习:
|
|
55
|
+
## AI 工具集成
|
|
135
56
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
-
|
|
141
|
-
- 详细的 design.md
|
|
142
|
-
- 分步 tasks.md
|
|
143
|
-
|
|
144
|
-
#### [UI 功能示例](examples/add-user-dashboard/)
|
|
145
|
-
**React 仪表板 Spec** - 前端功能
|
|
146
|
-
- 组件层次结构
|
|
147
|
-
- 状态管理设计
|
|
148
|
-
- UI 实现任务
|
|
149
|
-
|
|
150
|
-
#### [CLI 功能示例](examples/add-export-command/)
|
|
151
|
-
**CLI 命令 Spec** - 命令行工具
|
|
152
|
-
- 命令设计
|
|
153
|
-
- 参数处理
|
|
154
|
-
- 测试策略
|
|
57
|
+
- [Cursor 集成](tools/cursor-guide.md)
|
|
58
|
+
- [Claude Code 集成](tools/claude-guide.md)
|
|
59
|
+
- [Windsurf 集成](tools/windsurf-guide.md)
|
|
60
|
+
- [VS Code + Copilot 集成](tools/vscode-guide.md)
|
|
61
|
+
- [通用 AI 工具集成](tools/generic-guide.md)
|
|
155
62
|
|
|
156
63
|
---
|
|
157
64
|
|
|
158
|
-
##
|
|
159
|
-
|
|
160
|
-
对于有经验的用户:
|
|
161
|
-
|
|
162
|
-
### [采用指南](adoption-guide.md)
|
|
163
|
-
**在现有项目中采用 sce** - 迁移策略
|
|
164
|
-
- 评估你的项目
|
|
165
|
-
- 采用策略
|
|
166
|
-
- 迁移现有文档
|
|
167
|
-
|
|
168
|
-
### [场景运行时指南](scene-runtime-guide.md)
|
|
169
|
-
**Scene 功能完整指南** - 模板引擎、质量流水线、Ontology、Moqui ERP 集成
|
|
170
|
-
- 模板变量 Schema 和三层继承
|
|
171
|
-
- Lint 检查和质量评分
|
|
172
|
-
- Ontology 图、Action Abstraction、Data Lineage、Agent Hints
|
|
173
|
-
- Moqui ERP 连接、发现、模板提取
|
|
174
|
-
|
|
175
|
-
### [Moqui Template Core Library Playbook](../moqui-template-core-library-playbook.md)
|
|
176
|
-
**Moqui 能力核心库化执行清单(英文)** - 默认门禁、批处理吸收链路、证据合同
|
|
177
|
-
- 不依赖 331 特参的通用 intake 流程
|
|
178
|
-
- Ontology 与 scene-package 默认门禁
|
|
179
|
-
- remediation 队列回灌闭环
|
|
180
|
-
|
|
181
|
-
### [331-poc 双轨协同对接手册](../331-poc-dual-track-integration-guide.md)
|
|
182
|
-
**331-poc 与 sce 协同执行指南** - 交接契约、接入命令链、主从闭环验收
|
|
183
|
-
- 331 深化成果输入约束
|
|
184
|
-
- sce 侧模板/ontology/gate 验证流程
|
|
185
|
-
- 双仓协同失败回退策略
|
|
186
|
-
|
|
187
|
-
### [331-poc 适配路线图](../331-poc-adaptation-roadmap.md)
|
|
188
|
-
**sce 侧持续适配清单** - 已完成、下一阶段、中期增强与长期目标
|
|
189
|
-
- handoff 自动化命令演进
|
|
190
|
-
- 主从编排与门禁增强
|
|
191
|
-
- 跨轮次回归与发布治理集成
|
|
192
|
-
|
|
193
|
-
### [SCE 能力矩阵路线图](../sce-capability-matrix-roadmap.md)
|
|
194
|
-
**核心能力补齐路线(英文)** - 策略路由、符号证据、自修复、ontology 映射与多 agent 汇总
|
|
195
|
-
- 任务策略决策闭环
|
|
196
|
-
- 失败归因与有界修复
|
|
197
|
-
- 跨项目能力沉淀与协同治理
|
|
198
|
-
|
|
199
|
-
### [SCE 能力矩阵端到端示例](../sce-capability-matrix-e2e-example.md)
|
|
200
|
-
**端到端流程示例(英文)** - 从策略决策到符号证据、失败修复、能力映射和主从摘要合并阻断
|
|
201
|
-
|
|
202
|
-
### [SCE 业务模式能力地图](../sce-business-mode-map.md)
|
|
203
|
-
**三态执行治理(英文)** - 用户态 / 运维态 / 开发态的默认接管、授权门禁与审计要求
|
|
204
|
-
|
|
205
|
-
### [Business Mode Policy Baseline](../interactive-customization/business-mode-policy-baseline.json)
|
|
206
|
-
**三态策略基线(英文 JSON)** - `user-mode / ops-mode / dev-mode` 的可执行预设映射
|
|
207
|
-
|
|
208
|
-
### [Handoff Profile Integration Guide](../handoff-profile-integration-guide.md)
|
|
209
|
-
**外部项目接入规范(英文)** - `default|moqui|enterprise` 三档 handoff profile 契约
|
|
210
|
-
- profile 默认策略与显式参数覆盖规则
|
|
211
|
-
- 外部项目 manifest/evidence 最小要求
|
|
212
|
-
- 从 `moqui` 到 `enterprise` 的分阶段上线建议
|
|
213
|
-
|
|
214
|
-
### [Value 可观测指南](value-observability-guide.md)
|
|
215
|
-
**KPI 量化交付指南** - 快照、基线、趋势、门禁证据
|
|
216
|
-
- 周度 KPI 快照生成
|
|
217
|
-
- baseline 与趋势风险分析
|
|
218
|
-
- Day30/Day60 门禁输入复用
|
|
219
|
-
|
|
220
|
-
### [升级指南](upgrade-guide.md)
|
|
221
|
-
**版本升级** - 保持 sce 最新
|
|
222
|
-
- 升级过程
|
|
223
|
-
- 版本兼容性
|
|
224
|
-
- 迁移指南
|
|
225
|
-
|
|
226
|
-
### [发布检查清单](release-checklist.md)
|
|
227
|
-
**发布前核验流程** - 可重复执行的发版前检查
|
|
228
|
-
- 测试、命令冒烟、打包检查
|
|
229
|
-
- 文档一致性和 Git 准备状态
|
|
230
|
-
|
|
231
|
-
### [安全治理默认基线](../security-governance-default-baseline.md)
|
|
232
|
-
**默认安全控制(英文)** - 上下文脱敏、审批策略、发布审计证据最小集合
|
|
233
|
-
|
|
234
|
-
### [发布即用 Starter Kit](../starter-kit/README.md)
|
|
235
|
-
**外部项目接入脚手架(英文)** - handoff manifest 样例与 release workflow 样例
|
|
65
|
+
## 补充阅读
|
|
236
66
|
|
|
237
|
-
### [发布归档](releases/README.md)
|
|
238
|
-
**历史发布入口** - 集中查看发布说明与验证报告
|
|
239
|
-
- 版本化发布说明
|
|
240
|
-
- 验证证据记录
|
|
241
|
-
|
|
242
|
-
### [发布说明 v1.46.2](releases/v1.46.2.md)
|
|
243
|
-
**本版更新摘要** - 可量化交付与入口文档收敛
|
|
244
|
-
- KPI 可观测命令与首用脚手架
|
|
245
|
-
- 文档入口与离线安装一致性更新
|
|
246
|
-
|
|
247
|
-
### [验证报告 v1.46.2](releases/v1.46.2-validation.md)
|
|
248
|
-
**发布证据记录** - 测试与打包预检结果
|
|
249
|
-
- 命令单测与 CI 结果
|
|
250
|
-
- npm 打包清单健康性
|
|
251
|
-
|
|
252
|
-
### [手动工作流](manual-workflows-guide.md)
|
|
253
|
-
**分步工作流** - 详细过程
|
|
254
|
-
- 创建 Spec 工作流
|
|
255
|
-
- 实现工作流
|
|
256
|
-
- 审查工作流
|
|
257
|
-
|
|
258
|
-
### [开发者指南](developer-guide.md)
|
|
259
|
-
**贡献和扩展 sce** - 对于贡献者
|
|
260
|
-
- 项目结构
|
|
261
|
-
- 开发设置
|
|
262
|
-
- 贡献指南
|
|
263
|
-
|
|
264
|
-
---
|
|
265
|
-
|
|
266
|
-
## 🗺️ 学习路径
|
|
267
|
-
|
|
268
|
-
### 对于初学者
|
|
269
|
-
|
|
270
|
-
1. 从[快速入门指南](quick-start.md)开始
|
|
271
|
-
2. 阅读[Spec 工作流](spec-workflow.md)
|
|
272
|
-
3. 选择你的工具指南:
|
|
273
|
-
- [Cursor](tools/cursor-guide.md)
|
|
274
|
-
- [Claude](tools/claude-guide.md)
|
|
275
|
-
- [Windsurf](tools/windsurf-guide.md)
|
|
276
|
-
- [VS Code](tools/vscode-guide.md)
|
|
277
|
-
4. 查看[示例](examples/add-rest-api/)
|
|
278
|
-
5. 查阅[FAQ](faq.md)和[故障排除](troubleshooting.md)
|
|
279
|
-
|
|
280
|
-
### 对于有经验的用户
|
|
281
|
-
|
|
282
|
-
1. 查看[集成模式](integration-modes.md)
|
|
283
|
-
2. 探索[高级主题](#-高级主题)
|
|
284
|
-
3. 阅读[开发者指南](developer-guide.md)
|
|
285
|
-
4. 贡献到项目
|
|
286
|
-
|
|
287
|
-
### 对于团队
|
|
288
|
-
|
|
289
|
-
1. 阅读[采用指南](adoption-guide.md)
|
|
290
|
-
2. 设置团队约定
|
|
291
|
-
3. 创建共享 Spec 模板
|
|
292
|
-
4. 建立审查流程
|
|
293
|
-
|
|
294
|
-
---
|
|
295
|
-
|
|
296
|
-
## 🔍 按主题查找
|
|
297
|
-
|
|
298
|
-
### 安装和设置
|
|
299
|
-
- [快速入门 - 安装](quick-start.md#步骤-1安装-kse30-秒)
|
|
300
|
-
- [故障排除 - 安装问题](troubleshooting.md)
|
|
301
|
-
- [采用指南](adoption-guide.md)
|
|
302
|
-
|
|
303
|
-
### 创建 Spec
|
|
304
|
-
- [快速入门 - 创建 Spec](quick-start.md#步骤-3创建你的第一个-spec2-分钟)
|
|
305
|
-
- [Spec 工作流](spec-workflow.md)
|
|
306
|
-
- [示例 Spec](examples/add-rest-api/)
|
|
307
|
-
|
|
308
|
-
### AI 工具集成
|
|
309
|
-
- [集成模式](integration-modes.md)
|
|
310
|
-
- [工具专用指南](#-工具专用指南)
|
|
311
|
-
- [通用指南](tools/generic-guide.md)
|
|
312
|
-
|
|
313
|
-
### 任务管理
|
|
314
|
-
- [命令参考 - 任务命令](../command-reference.md)
|
|
315
|
-
- [Spec 工作流 - 任务](spec-workflow.md)
|
|
316
|
-
|
|
317
|
-
### KPI 可观测
|
|
318
|
-
- [命令参考 - Value Metrics](../command-reference.md#value-metrics)
|
|
319
67
|
- [Value 可观测指南](value-observability-guide.md)
|
|
320
|
-
- [
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
- [集成模式 - Watch 模式](integration-modes.md)
|
|
324
|
-
- [Windsurf 指南 - Watch 配置](tools/windsurf-guide.md)
|
|
325
|
-
|
|
326
|
-
---
|
|
327
|
-
|
|
328
|
-
## 📞 获取帮助
|
|
329
|
-
|
|
330
|
-
### 文档
|
|
331
|
-
- 📖 从[快速入门指南](quick-start.md)开始
|
|
332
|
-
- 🤔 查看[常见问题](faq.md)
|
|
333
|
-
- 🔧 查阅[故障排除](troubleshooting.md)
|
|
334
|
-
|
|
335
|
-
### 社区
|
|
336
|
-
- 💬 [GitHub Discussions](https://github.com/heguangyong/scene-capability-engine/discussions)
|
|
337
|
-
- 🐛 [GitHub Issues](https://github.com/heguangyong/scene-capability-engine/issues)
|
|
338
|
-
|
|
339
|
-
---
|
|
340
|
-
|
|
341
|
-
## 🤝 贡献
|
|
342
|
-
|
|
343
|
-
帮助改进文档:
|
|
344
|
-
|
|
345
|
-
- 📝 报告文档问题
|
|
346
|
-
- ✏️ 建议改进
|
|
347
|
-
- 🌍 帮助翻译
|
|
348
|
-
- 📖 分享你的经验
|
|
349
|
-
|
|
350
|
-
查看[贡献指南](../CONTRIBUTING.md)了解详情。
|
|
351
|
-
|
|
352
|
-
---
|
|
353
|
-
|
|
354
|
-
## 📄 许可证
|
|
355
|
-
|
|
356
|
-
本文档根据 MIT 许可证授权。查看[LICENSE](../LICENSE)了解详情。
|
|
68
|
+
- [架构说明](../architecture.md)
|
|
69
|
+
- [开发者指南](../developer-guide.md)
|
|
70
|
+
- [社区入口](../community.md)
|
|
357
71
|
|
|
358
72
|
---
|
|
359
73
|
|
|
360
|
-
|
|
74
|
+
## Language
|
|
361
75
|
|
|
362
|
-
|
|
76
|
+
- [English Docs Hub](../README.md)
|
|
363
77
|
|
|
364
78
|
---
|
|
365
79
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
**语言**: 简体中文
|
|
80
|
+
**版本**:3.3.26
|
|
81
|
+
**最后更新**:2026-03-02
|
|
@@ -115,6 +115,10 @@ class AdoptionStrategy {
|
|
|
115
115
|
'config/studio-security.json',
|
|
116
116
|
'config/orchestrator.json',
|
|
117
117
|
'config/errorbook-registry.json',
|
|
118
|
+
'config/takeover-baseline.json',
|
|
119
|
+
'config/session-governance.json',
|
|
120
|
+
'config/spec-domain-policy.json',
|
|
121
|
+
'config/problem-eval-policy.json',
|
|
118
122
|
'specs/SPEC_WORKFLOW_GUIDE.md',
|
|
119
123
|
'hooks/sync-tasks-on-edit.sce.hook',
|
|
120
124
|
'hooks/check-spec-on-create.sce.hook',
|
|
@@ -164,6 +164,10 @@ class DetectionEngine {
|
|
|
164
164
|
'config/studio-security.json',
|
|
165
165
|
'config/orchestrator.json',
|
|
166
166
|
'config/errorbook-registry.json',
|
|
167
|
+
'config/takeover-baseline.json',
|
|
168
|
+
'config/session-governance.json',
|
|
169
|
+
'config/spec-domain-policy.json',
|
|
170
|
+
'config/problem-eval-policy.json',
|
|
167
171
|
'README.md',
|
|
168
172
|
'ultrawork-application-guide.md',
|
|
169
173
|
'ultrawork-integration-summary.md',
|
|
@@ -65,7 +65,11 @@ class FileClassifier {
|
|
|
65
65
|
'adoption-config.json',
|
|
66
66
|
'config/studio-security.json',
|
|
67
67
|
'config/orchestrator.json',
|
|
68
|
-
'config/errorbook-registry.json'
|
|
68
|
+
'config/errorbook-registry.json',
|
|
69
|
+
'config/takeover-baseline.json',
|
|
70
|
+
'config/session-governance.json',
|
|
71
|
+
'config/spec-domain-policy.json',
|
|
72
|
+
'config/problem-eval-policy.json'
|
|
69
73
|
];
|
|
70
74
|
|
|
71
75
|
// Generated directory patterns
|
|
@@ -285,6 +285,10 @@ class SmartOrchestrator {
|
|
|
285
285
|
'config/studio-security.json',
|
|
286
286
|
'config/orchestrator.json',
|
|
287
287
|
'config/errorbook-registry.json',
|
|
288
|
+
'config/takeover-baseline.json',
|
|
289
|
+
'config/session-governance.json',
|
|
290
|
+
'config/spec-domain-policy.json',
|
|
291
|
+
'config/problem-eval-policy.json',
|
|
288
292
|
'README.md'
|
|
289
293
|
];
|
|
290
294
|
|
package/lib/commands/adopt.js
CHANGED
|
@@ -29,6 +29,7 @@ const ConflictResolver = require('../adoption/conflict-resolver');
|
|
|
29
29
|
const SelectiveBackup = require('../backup/selective-backup');
|
|
30
30
|
const SmartOrchestrator = require('../adoption/smart-orchestrator');
|
|
31
31
|
const { pathExists, ensureDirectory, writeJSON } = require('../utils/fs-utils');
|
|
32
|
+
const { applyTakeoverBaseline } = require('../workspace/takeover-baseline');
|
|
32
33
|
|
|
33
34
|
/**
|
|
34
35
|
* Executes the adopt command
|
|
@@ -137,6 +138,21 @@ async function adoptSmart(projectPath, options) {
|
|
|
137
138
|
|
|
138
139
|
process.exit(1);
|
|
139
140
|
}
|
|
141
|
+
|
|
142
|
+
const packageJson = require('../../package.json');
|
|
143
|
+
const takeoverReport = await applyTakeoverBaseline(projectPath, {
|
|
144
|
+
apply: true,
|
|
145
|
+
writeReport: true,
|
|
146
|
+
sceVersion: packageJson.version
|
|
147
|
+
});
|
|
148
|
+
if (takeoverReport.detected_project && (takeoverReport.summary.created > 0 || takeoverReport.summary.updated > 0)) {
|
|
149
|
+
console.log(chalk.blue('🧭 Takeover baseline aligned with current SCE defaults'));
|
|
150
|
+
console.log(chalk.gray(` created=${takeoverReport.summary.created}, updated=${takeoverReport.summary.updated}`));
|
|
151
|
+
if (takeoverReport.report_file) {
|
|
152
|
+
console.log(chalk.gray(` report: ${takeoverReport.report_file}`));
|
|
153
|
+
}
|
|
154
|
+
console.log();
|
|
155
|
+
}
|
|
140
156
|
|
|
141
157
|
// Summary is already displayed by orchestrator
|
|
142
158
|
|
|
@@ -505,8 +521,24 @@ async function adoptInteractive(projectPath, options) {
|
|
|
505
521
|
|
|
506
522
|
// 11. Report results
|
|
507
523
|
if (result.success) {
|
|
524
|
+
const packageJson = require('../../package.json');
|
|
525
|
+
const takeoverReport = await applyTakeoverBaseline(projectPath, {
|
|
526
|
+
apply: true,
|
|
527
|
+
writeReport: true,
|
|
528
|
+
sceVersion: packageJson.version
|
|
529
|
+
});
|
|
530
|
+
|
|
508
531
|
console.log(chalk.green('✅ Adoption completed successfully!'));
|
|
509
532
|
console.log();
|
|
533
|
+
|
|
534
|
+
if (takeoverReport.detected_project && (takeoverReport.summary.created > 0 || takeoverReport.summary.updated > 0)) {
|
|
535
|
+
console.log(chalk.blue('🧭 Takeover baseline aligned with current SCE defaults'));
|
|
536
|
+
console.log(chalk.gray(` created=${takeoverReport.summary.created}, updated=${takeoverReport.summary.updated}`));
|
|
537
|
+
if (takeoverReport.report_file) {
|
|
538
|
+
console.log(chalk.gray(` report: ${takeoverReport.report_file}`));
|
|
539
|
+
}
|
|
540
|
+
console.log();
|
|
541
|
+
}
|
|
510
542
|
|
|
511
543
|
// Show conflict resolution summary if conflicts were handled
|
|
512
544
|
if (detection.conflicts.length > 0) {
|