scene-capability-engine 3.6.64 → 3.6.67
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 +26 -0
- package/README.md +17 -6
- package/README.zh.md +18 -6
- package/bin/scene-capability-engine.js +4 -0
- package/docs/README.md +2 -2
- package/docs/command-reference.md +385 -8
- package/docs/document-governance.md +3 -2
- package/docs/integration-modes.md +62 -478
- package/docs/integration-philosophy.md +56 -263
- package/docs/magicball-cli-invocation-examples.md +1 -0
- package/docs/magicball-project-portfolio-contract.md +125 -4
- package/docs/project-management/README.md +14 -0
- package/docs/project-management/assurance/backup.md +3 -0
- package/docs/project-management/assurance/config.md +3 -0
- package/docs/project-management/assurance/evidence/README.md +3 -0
- package/docs/project-management/assurance/incidents/README.md +3 -0
- package/docs/project-management/assurance/logs.md +3 -0
- package/docs/project-management/assurance/overview.md +3 -0
- package/docs/project-management/assurance/recovery/README.md +3 -0
- package/docs/project-management/assurance/resource.md +3 -0
- package/docs/project-management/assurance/runbooks/README.md +3 -0
- package/docs/project-management/delivery/acceptance/README.md +3 -0
- package/docs/project-management/delivery/acceptance/evidence/README.md +3 -0
- package/docs/project-management/delivery/acceptance/exceptions/README.md +3 -0
- package/docs/project-management/delivery/acceptance/reports/README.md +3 -0
- package/docs/project-management/delivery/documents/changes.md +3 -0
- package/docs/project-management/delivery/documents/issues.md +3 -0
- package/docs/project-management/delivery/documents/overview.md +3 -0
- package/docs/project-management/delivery/documents/planning.md +3 -0
- package/docs/project-management/delivery/documents/requirements.md +3 -0
- package/docs/project-management/delivery/documents/tracking.md +3 -0
- package/docs/project-management/delivery/handoffs/README.md +3 -0
- package/docs/project-management/delivery/handoffs/evidence/README.md +3 -0
- package/docs/project-management/delivery/handoffs/records/README.md +3 -0
- package/docs/project-management/delivery/overview.md +10 -0
- package/docs/project-management/delivery/releases/README.md +3 -0
- package/docs/project-management/delivery/releases/baselines/README.md +3 -0
- package/docs/project-management/delivery/releases/evidence/README.md +3 -0
- package/docs/project-management/delivery/tables/changes.md +3 -0
- package/docs/project-management/delivery/tables/issues.md +3 -0
- package/docs/project-management/delivery/tables/planning.md +3 -0
- package/docs/project-management/delivery/tables/requirements.md +3 -0
- package/docs/project-management/delivery/tables/tracking.md +3 -0
- package/docs/project-management/environment/agent-discovery.md +3 -0
- package/docs/project-management/environment/development.md +3 -0
- package/docs/project-management/environment/overview.md +10 -0
- package/docs/project-management/environment/testing.md +3 -0
- package/docs/project-management/environment/version-alignment.md +3 -0
- package/docs/quick-start-with-ai-tools.md +68 -308
- package/docs/releases/README.md +3 -0
- package/docs/releases/v3.6.65.md +25 -0
- package/docs/releases/v3.6.66.md +23 -0
- package/docs/releases/v3.6.67.md +23 -0
- package/docs/steering-governance.md +64 -2
- package/docs/zh/README.md +2 -2
- package/docs/zh/releases/README.md +3 -0
- package/docs/zh/releases/v3.6.65.md +25 -0
- package/docs/zh/releases/v3.6.66.md +23 -0
- package/docs/zh/releases/v3.6.67.md +23 -0
- package/lib/commands/adopt.js +24 -0
- package/lib/commands/native.js +158 -0
- package/lib/commands/project.js +96 -0
- package/lib/commands/semantic.js +1459 -0
- package/lib/commands/session.js +74 -3
- package/lib/commands/spec-bootstrap.js +10 -1
- package/lib/commands/spec-gate.js +10 -1
- package/lib/commands/spec-pipeline.js +10 -1
- package/lib/commands/studio.js +405 -30
- package/lib/commands/task.js +141 -7
- package/lib/governance/supreme-principles.js +530 -0
- package/lib/problem/problem-evaluator.js +4 -0
- package/lib/project/candidate-inspection-service.js +24 -1
- package/lib/project/portfolio-projection-service.js +315 -5
- package/lib/project/project-channel-output.js +94 -0
- package/lib/project/project-channel-projection.js +181 -0
- package/lib/project/root-onboarding-service.js +107 -7
- package/lib/project/semantic-shared-source-projection.js +150 -0
- package/lib/project/supervision-action-model.js +277 -0
- package/lib/project/supervision-projection-service.js +305 -5
- package/lib/project/target-resolution-service.js +70 -5
- package/lib/project/visibility-policy.js +93 -0
- package/lib/runtime/multi-spec-scene-session.js +8 -1
- package/lib/runtime/project-channel-context-store.js +387 -0
- package/lib/runtime/project-channel-context.js +406 -0
- package/lib/runtime/scene-session-binding.js +46 -0
- package/lib/runtime/session-store.js +186 -0
- package/lib/runtime/steering-contract.js +7 -1
- package/lib/semantic/archive-report.js +283 -0
- package/lib/semantic/archive-routing.js +67 -0
- package/lib/semantic/backflow-report.js +245 -0
- package/lib/semantic/capability-contract.js +30 -0
- package/lib/semantic/delta-export.js +145 -0
- package/lib/semantic/interaction-observer.js +254 -0
- package/lib/semantic/kernel-loader.js +881 -0
- package/lib/semantic/native-runtime.js +359 -0
- package/lib/semantic/progress-ledger.js +433 -0
- package/lib/semantic/replay-evaluator.js +382 -0
- package/lib/semantic/shared-publication.js +592 -0
- package/lib/semantic/shared-source-config.js +183 -0
- package/lib/semantic/shared-source-connect.js +139 -0
- package/lib/semantic/shared-source-discovery.js +98 -0
- package/lib/semantic/shared-sync-export.js +413 -0
- package/lib/semantic/shared-sync-intake.js +592 -0
- package/lib/semantic/shared-sync-merge.js +547 -0
- package/lib/semantic/shared-sync-release.js +463 -0
- package/lib/semantic/supreme-intent-report.js +300 -0
- package/lib/state/sce-state-store.js +1360 -0
- package/lib/steering/context-sync-manager.js +276 -25
- package/lib/studio/spec-intake-governor.js +39 -3
- package/lib/studio/task-envelope.js +35 -2
- package/lib/workspace/takeover-baseline.js +342 -83
- package/package.json +7 -2
- package/scripts/agent-governance-baseline-audit.js +395 -0
- package/scripts/clarification-first-audit.js +9 -9
- package/scripts/deprecated-entry-audit.js +240 -0
- package/scripts/release-doc-version-audit.js +24 -0
- package/scripts/release-posture-report.js +262 -0
- package/template/.sce/README.md +62 -228
- package/template/.sce/config/semantic-shared-sources.json +5 -0
- package/template/.sce/config/supreme-principles-policy.json +105 -0
- package/template/.sce/config/takeover-baseline.json +7 -0
- package/template/.sce/steering/CORE_PRINCIPLES.md +23 -63
- package/template/.sce/steering/CURRENT_CONTEXT.md +4 -0
- package/template/.sce/steering/RULES_GUIDE.md +17 -9
- package/template/README.md +32 -96
|
@@ -1,313 +1,106 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Integration Philosophy
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> SCE governs the project. The host AI runtime is important, but it is not the source of truth.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
**sce 不是替代 AI 工具,而是增强 AI 工具**
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
┌─────────────────────────────────────┐
|
|
13
|
-
│ AI 编码工具 │
|
|
14
|
-
│ (Codex/Claude/Cursor/Windsurf) │
|
|
15
|
-
│ │
|
|
16
|
-
│ 用户主要工作界面 ← 这里写代码 │
|
|
17
|
-
└──────────────┬──────────────────────┘
|
|
18
|
-
│
|
|
19
|
-
│ 读取上下文
|
|
20
|
-
▼
|
|
21
|
-
┌─────────────────────────────────────┐
|
|
22
|
-
│ sce │
|
|
23
|
-
│ │
|
|
24
|
-
│ Spec 管理 + 上下文生成 │
|
|
25
|
-
│ (后台运行,提供结构化信息) │
|
|
26
|
-
└─────────────────────────────────────┘
|
|
27
|
-
```
|
|
7
|
+
## 1. Replaceable Host, Stable Project Model
|
|
28
8
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## 三种集成模式
|
|
32
|
-
|
|
33
|
-
### 模式 1:AI 主动调用 sce(最佳)⭐
|
|
34
|
-
|
|
35
|
-
**适用工具**:Windsurf、Cline、Aider(可执行命令的 AI)
|
|
36
|
-
|
|
37
|
-
**工作流**:
|
|
38
|
-
```
|
|
39
|
-
用户 → AI 工具 → AI 自动执行 sce 命令 → 获取上下文 → 生成代码
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
**示例对话**:
|
|
43
|
-
```
|
|
44
|
-
用户:我要实现用户登录功能
|
|
45
|
-
|
|
46
|
-
AI:好的,让我先查看项目的 Spec
|
|
47
|
-
[自动执行] sce context export 01-00-user-login
|
|
48
|
-
[读取文件] .sce/specs/01-00-user-login/context-export.md
|
|
49
|
-
|
|
50
|
-
我看到设计文档中定义了 AuthController...
|
|
51
|
-
[生成代码]
|
|
52
|
-
|
|
53
|
-
[自动执行] sce task claim 01-00-user-login 1.1
|
|
54
|
-
任务已认领,开始实现...
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
**配置方法**:
|
|
58
|
-
|
|
59
|
-
在 AI 工具的系统提示中添加:
|
|
60
|
-
```markdown
|
|
61
|
-
你可以使用以下 sce 命令来管理项目:
|
|
9
|
+
Codex CLI, Claude Code, Cursor, Kiro, and similar tools may all host SCE-driven work.
|
|
62
10
|
|
|
63
|
-
|
|
64
|
-
- `sce prompt generate <spec-name> <task-id>` - 生成任务提示
|
|
65
|
-
- `sce task claim <spec-name> <task-id>` - 认领任务
|
|
66
|
-
- `sce status` - 查看项目状态
|
|
11
|
+
What should stay stable across them is not the shell. It is the governed model:
|
|
67
12
|
|
|
68
|
-
|
|
69
|
-
|
|
13
|
+
- `project -> channel/session -> scene/spec -> task -> evidence`
|
|
14
|
+
- `Four Teachings + Little Nine` before execution
|
|
15
|
+
- Spec-scoped artifact management
|
|
16
|
+
- SQLite-backed recoverable state
|
|
70
17
|
|
|
71
|
-
|
|
72
|
-
- ✅ 完全自动化
|
|
73
|
-
- ✅ 用户无需手动操作
|
|
74
|
-
- ✅ AI 自动管理 Spec 生命周期
|
|
18
|
+
This prevents the system from collapsing back into "whatever the current chat remembered."
|
|
75
19
|
|
|
76
20
|
---
|
|
77
21
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
**适用工具**:Claude Code、ChatGPT、GitHub Copilot
|
|
81
|
-
|
|
82
|
-
**工作流**:
|
|
83
|
-
```
|
|
84
|
-
用户 → 手动执行 sce 命令 → 复制上下文 → 粘贴到 AI → AI 生成代码
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**示例流程**:
|
|
88
|
-
```bash
|
|
89
|
-
# 1. 用户手动导出
|
|
90
|
-
sce context export 01-00-user-login
|
|
91
|
-
|
|
92
|
-
# 2. 复制内容
|
|
93
|
-
cat .sce/specs/01-00-user-login/context-export.md | pbcopy
|
|
94
|
-
|
|
95
|
-
# 3. 粘贴到 Claude/ChatGPT
|
|
96
|
-
|
|
97
|
-
# 4. 对话
|
|
98
|
-
用户:请实现任务 1.1
|
|
99
|
-
AI:[生成代码]
|
|
100
|
-
|
|
101
|
-
# 5. 手动更新任务状态
|
|
102
|
-
# 编辑 tasks.md: - [x] 1.1 ...
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**改进建议**:
|
|
106
|
-
```bash
|
|
107
|
-
# 添加快捷命令
|
|
108
|
-
sce clip 01-00-user-login # 自动复制到剪贴板
|
|
109
|
-
sce clip 01-00-user-login 1.1 # 只复制任务 1.1 的上下文
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
**优势**:
|
|
113
|
-
- ✅ 适用于所有 AI 工具
|
|
114
|
-
- ✅ 用户完全控制
|
|
22
|
+
## 2. Channel/Session Is the Collaboration Unit
|
|
115
23
|
|
|
116
|
-
|
|
117
|
-
- ❌ 需要手动操作
|
|
118
|
-
- ❌ 步骤较多
|
|
24
|
+
Within one project, multiple collaboration channels may exist in parallel by default.
|
|
119
25
|
|
|
120
|
-
|
|
26
|
+
- a channel/session is user-visible collaboration context
|
|
27
|
+
- a scene is the semantic continuity boundary
|
|
28
|
+
- a focused channel is only the current UI pointer
|
|
29
|
+
- each `project + channel/session` must preserve its own local working state
|
|
121
30
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
**适用场景**:频繁修改 Spec 的项目
|
|
125
|
-
|
|
126
|
-
**工作流**:
|
|
127
|
-
```
|
|
128
|
-
用户修改 Spec → sce 自动检测 → 自动重新导出 → AI 工具自动刷新
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
**配置**:
|
|
132
|
-
```bash
|
|
133
|
-
# 启动 Watch Mode
|
|
134
|
-
sce watch init
|
|
135
|
-
sce watch install auto-export
|
|
136
|
-
sce watch start
|
|
137
|
-
|
|
138
|
-
# 现在修改任何 Spec 文件,都会自动重新导出
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
**Watch 配置示例**:
|
|
142
|
-
```json
|
|
143
|
-
{
|
|
144
|
-
"patterns": [
|
|
145
|
-
".sce/specs/**/requirements.md",
|
|
146
|
-
".sce/specs/**/design.md",
|
|
147
|
-
".sce/specs/**/tasks.md"
|
|
148
|
-
],
|
|
149
|
-
"actions": [
|
|
150
|
-
{
|
|
151
|
-
"name": "auto-export",
|
|
152
|
-
"command": "sce context export ${spec-name}"
|
|
153
|
-
}
|
|
154
|
-
]
|
|
155
|
-
}
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
**优势**:
|
|
159
|
-
- ✅ 完全自动化
|
|
160
|
-
- ✅ Spec 修改立即生效
|
|
31
|
+
SCE should not silently fall back from explicit `project + channel` input to unrelated global guesses.
|
|
161
32
|
|
|
162
33
|
---
|
|
163
34
|
|
|
164
|
-
##
|
|
165
|
-
|
|
166
|
-
### 对于 Windsurf/Cline 用户(推荐)⭐
|
|
167
|
-
|
|
168
|
-
**在 AI 系统提示中添加**:
|
|
169
|
-
|
|
170
|
-
```markdown
|
|
171
|
-
# Spec 管理规则
|
|
172
|
-
|
|
173
|
-
项目使用 sce (Scene Capability Engine) 管理需求和设计。
|
|
174
|
-
|
|
175
|
-
## 工作流程
|
|
176
|
-
|
|
177
|
-
1. **查看 Spec**:实现功能前,先执行 `sce context export <spec-name>` 查看设计
|
|
178
|
-
2. **认领任务**:开始工作前,执行 `sce task claim <spec-name> <task-id>`
|
|
179
|
-
3. **实现代码**:严格按照 Spec 中的设计实现
|
|
180
|
-
4. **更新状态**:完成后,在 tasks.md 中标记任务为完成 `[x]`
|
|
181
|
-
|
|
182
|
-
## 可用命令
|
|
183
|
-
|
|
184
|
-
- `sce status` - 查看项目状态
|
|
185
|
-
- `sce context export <spec-name>` - 导出 Spec 上下文
|
|
186
|
-
- `sce task claim <spec-name> <task-id>` - 认领任务
|
|
187
|
-
- `sce prompt generate <spec-name> <task-id>` - 生成任务提示
|
|
35
|
+
## 3. Specs Own the Work Artifacts
|
|
188
36
|
|
|
189
|
-
|
|
37
|
+
Generated artifacts must live with the work they belong to.
|
|
190
38
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
4. 执行 `sce task claim 01-00-user-login 1.1`
|
|
197
|
-
```
|
|
39
|
+
- debug logs
|
|
40
|
+
- reports
|
|
41
|
+
- test scripts
|
|
42
|
+
- temporary analysis
|
|
43
|
+
- handoff bundles
|
|
198
44
|
|
|
199
|
-
|
|
45
|
+
Default rule:
|
|
200
46
|
|
|
201
|
-
|
|
47
|
+
- if an active Spec exists, write under that Spec subtree
|
|
48
|
+
- if no explicit Spec exists yet, use a governed general Spec
|
|
49
|
+
- temporary documents are removed after the task is complete
|
|
202
50
|
|
|
203
|
-
|
|
204
|
-
# ~/.bashrc 或 ~/.zshrc
|
|
205
|
-
alias sce-clip='sce context export $1 && cat .sce/specs/$1/context-export.md | pbcopy && echo "✅ 已复制到剪贴板"'
|
|
51
|
+
This keeps evidence attached to execution instead of spreading across the repo.
|
|
206
52
|
|
|
207
|
-
|
|
208
|
-
sce-clip 01-00-user-login
|
|
209
|
-
# 然后直接粘贴到 Claude
|
|
210
|
-
```
|
|
53
|
+
---
|
|
211
54
|
|
|
212
|
-
|
|
55
|
+
## 4. Compatibility Is Allowed, But It Is Not the Mainline
|
|
213
56
|
|
|
214
|
-
|
|
57
|
+
`context export` and `prompt generate` remain useful when a host tool cannot execute SCE directly.
|
|
215
58
|
|
|
216
|
-
|
|
217
|
-
```markdown
|
|
218
|
-
# Spec 驱动开发
|
|
59
|
+
But they are compatibility bridges.
|
|
219
60
|
|
|
220
|
-
|
|
61
|
+
They should not redefine the platform as:
|
|
221
62
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
63
|
+
- only an embedded helper
|
|
64
|
+
- only a manual export utility
|
|
65
|
+
- only a prompt-prep layer for other tools
|
|
225
66
|
|
|
226
|
-
|
|
227
|
-
- 设计文档:`.sce/specs/01-00-user-login/design.md`
|
|
228
|
-
- 任务列表:`.sce/specs/01-00-user-login/tasks.md`
|
|
229
|
-
```
|
|
67
|
+
The long-term direction is SCE-native semantic/runtime capability with governed backflow and operator control.
|
|
230
68
|
|
|
231
69
|
---
|
|
232
70
|
|
|
233
|
-
##
|
|
234
|
-
|
|
235
|
-
### 1. MCP (Model Context Protocol) 集成
|
|
236
|
-
|
|
237
|
-
让 AI 工具通过 MCP 直接访问 sce:
|
|
238
|
-
|
|
239
|
-
```javascript
|
|
240
|
-
// AI 工具可以直接调用
|
|
241
|
-
const context = await mcp.call('sce.getContext', '01-00-user-login');
|
|
242
|
-
const tasks = await mcp.call('sce.getTasks', '01-00-user-login');
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
### 2. IDE 插件
|
|
71
|
+
## 5. Debugging Must Converge
|
|
246
72
|
|
|
247
|
-
|
|
248
|
-
- VS Code Extension
|
|
249
|
-
- Cursor Extension
|
|
250
|
-
- JetBrains Plugin
|
|
73
|
+
When localization keeps failing, SCE should not keep guessing.
|
|
251
74
|
|
|
252
|
-
|
|
253
|
-
- 右键菜单:"导出到 AI 工具"
|
|
254
|
-
- 状态栏显示当前 Spec
|
|
255
|
-
- 快捷键快速导出
|
|
75
|
+
Default rule:
|
|
256
76
|
|
|
257
|
-
|
|
77
|
+
- after more than two failed localization rounds, update the errorbook incident
|
|
78
|
+
- add bisection-style debug evidence
|
|
79
|
+
- keep halving the failing scope until the real blocker is isolated
|
|
258
80
|
|
|
259
|
-
|
|
260
|
-
```bash
|
|
261
|
-
sce serve
|
|
262
|
-
# 打开 http://localhost:3000
|
|
263
|
-
# 可视化管理 Spec,一键复制上下文
|
|
264
|
-
```
|
|
81
|
+
This is part of the governance model, not a personal preference.
|
|
265
82
|
|
|
266
83
|
---
|
|
267
84
|
|
|
268
|
-
##
|
|
85
|
+
## 6. Release Messaging Must Match the Real Mainline
|
|
269
86
|
|
|
270
|
-
|
|
87
|
+
If top-level docs still tell users that the old embedded/manual-export model is primary, release messaging has already drifted from implementation reality.
|
|
271
88
|
|
|
272
|
-
|
|
273
|
-
- sce 是**通用工具**,支持所有 AI 工具
|
|
274
|
-
- 做成插件会限制在特定工具
|
|
275
|
-
- CLI 工具更灵活,可以被任何工具调用
|
|
89
|
+
Therefore:
|
|
276
90
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
- 部分工具支持(Cursor、Copilot)
|
|
281
|
-
- 但需要明确的上下文导出更可靠
|
|
282
|
-
- sce 的价值在于**结构化和格式化**上下文
|
|
283
|
-
|
|
284
|
-
### Q: 两套工具确实有点麻烦,有更简单的方案吗?
|
|
285
|
-
|
|
286
|
-
**A**:
|
|
287
|
-
- **短期**:使用 Windsurf/Cline,让 AI 自动调用 sce
|
|
288
|
-
- **中期**:使用快捷脚本(如 `sce-clip`)
|
|
289
|
-
- **长期**:MCP 集成,完全无缝
|
|
91
|
+
- top-level docs must describe the current mainline first
|
|
92
|
+
- compatibility paths can stay, but only as compatibility paths
|
|
93
|
+
- stable/preview/RC posture must be reported explicitly
|
|
290
94
|
|
|
291
95
|
---
|
|
292
96
|
|
|
293
|
-
##
|
|
294
|
-
|
|
295
|
-
**sce 的定位**:
|
|
296
|
-
- ❌ 不是独立的开发工具
|
|
297
|
-
- ❌ 不是 AI 工具的竞争对手
|
|
298
|
-
- ✅ 是 AI 工具的**上下文提供者**
|
|
299
|
-
- ✅ 是项目的**Spec 管理系统**
|
|
97
|
+
## Summary
|
|
300
98
|
|
|
301
|
-
|
|
302
|
-
1. **用 sce 管理 Spec**(需求、设计、任务)
|
|
303
|
-
2. **用 AI 工具写代码**(主要工作界面)
|
|
304
|
-
3. **让 AI 工具调用 sce**(自动化集成)
|
|
99
|
+
SCE is evolving toward an independent semantic and runtime control layer.
|
|
305
100
|
|
|
306
|
-
|
|
307
|
-
- 能执行命令的 AI → 模式 1(AI 主动调用)⭐
|
|
308
|
-
- 不能执行命令的 AI → 模式 2(手动导出)
|
|
309
|
-
- 频繁修改 Spec → 模式 3(Watch Mode)
|
|
101
|
+
Host AI tools remain valuable, but the governed project model, evidence model, and release model must belong to SCE itself.
|
|
310
102
|
|
|
311
103
|
---
|
|
312
104
|
|
|
313
|
-
|
|
105
|
+
**Version**: 3.6.67
|
|
106
|
+
**Last Updated**: 2026-03-29
|
|
@@ -32,6 +32,7 @@ sce project supervision show --project workspace:customer-order-demo --json
|
|
|
32
32
|
|
|
33
33
|
Expected use:
|
|
34
34
|
- build project switcher from engine-owned roster
|
|
35
|
+
- treat `project onboarding import` `publication.visibleInPortfolio=true` as the signal to refresh the roster immediately
|
|
35
36
|
- preflight cross-project free-text routing before assistant/orchestration actions
|
|
36
37
|
- render one project-scoped health summary without replaying raw event streams
|
|
37
38
|
|
|
@@ -50,6 +50,7 @@ Optional caller-context inputs:
|
|
|
50
50
|
```bash
|
|
51
51
|
sce project portfolio show --workspace <workspace-name> --json
|
|
52
52
|
sce project target resolve --request "<text>" --current-project <project-id> --workspace <workspace-name> --device <device-id> --tool-instance-id <tool-id> --json
|
|
53
|
+
sce project supervision show --project <project-id> --channel <channel-id> --json
|
|
53
54
|
```
|
|
54
55
|
|
|
55
56
|
## 1. Project Portfolio Projection
|
|
@@ -89,6 +90,23 @@ interface ProjectPortfolioRecord {
|
|
|
89
90
|
sceneCount?: number
|
|
90
91
|
specCount?: number
|
|
91
92
|
}
|
|
93
|
+
projectChannelContext?: {
|
|
94
|
+
available: boolean
|
|
95
|
+
contextProjectId?: string | null
|
|
96
|
+
canonicalProjectIdMatched?: boolean
|
|
97
|
+
focusedChannelId?: string | null
|
|
98
|
+
channelCount?: number
|
|
99
|
+
storageMode?: 'split' | 'legacy' | 'none' | 'unknown'
|
|
100
|
+
}
|
|
101
|
+
supervisionSignals?: {
|
|
102
|
+
highestSeverity: 'none' | 'low' | 'medium' | 'high' | 'critical'
|
|
103
|
+
actionableCount: number
|
|
104
|
+
archiveMissingCount: number
|
|
105
|
+
backflowBlockedCount: number
|
|
106
|
+
governanceHotspotCount: number
|
|
107
|
+
pendingConnectCount: number
|
|
108
|
+
primaryRecommendedCommand?: string
|
|
109
|
+
}
|
|
92
110
|
partial?: boolean
|
|
93
111
|
partialReasons?: string[]
|
|
94
112
|
}
|
|
@@ -100,6 +118,7 @@ interface ProjectPortfolioRecord {
|
|
|
100
118
|
- Treat `workspaceId` as an optional display/debug field, not the only identity field.
|
|
101
119
|
- Use `activeProjectId` as the current project marker.
|
|
102
120
|
- Render `partial` and `availability` explicitly; do not silently drop degraded or inaccessible records.
|
|
121
|
+
- If `supervisionSignals` is present, use it to rank which project should be entered first instead of inventing a frontend-only pressure model.
|
|
103
122
|
- Do not rebuild roster truth from local UI cache when this payload is available.
|
|
104
123
|
|
|
105
124
|
### Important phase-1 semantics
|
|
@@ -140,12 +159,29 @@ interface ProjectOnboardingImportResult {
|
|
|
140
159
|
generated_at: string
|
|
141
160
|
success: boolean
|
|
142
161
|
preview: LocalProjectCandidateInspection
|
|
162
|
+
publication: {
|
|
163
|
+
status: 'published' | 'pending' | 'not_published'
|
|
164
|
+
visibleInPortfolio: boolean
|
|
165
|
+
rootDir: string | null
|
|
166
|
+
projectId: string | null
|
|
167
|
+
workspaceId: string | null
|
|
168
|
+
publishedAt?: string
|
|
169
|
+
}
|
|
143
170
|
steps: Array<{
|
|
144
|
-
key: 'register' | 'attach' | 'hydrate' | 'activate' | 'scaffold'
|
|
171
|
+
key: 'register' | 'attach' | 'hydrate' | 'publish' | 'activate' | 'scaffold'
|
|
145
172
|
status: 'done' | 'skipped' | 'pending' | 'failed'
|
|
146
173
|
reasonCode?: string
|
|
147
174
|
detail?: string
|
|
148
175
|
}>
|
|
176
|
+
projectChannelContext?: {
|
|
177
|
+
available: boolean
|
|
178
|
+
contextProjectId?: string | null
|
|
179
|
+
canonicalProjectIdMatched?: boolean
|
|
180
|
+
focusedChannelId?: string | null
|
|
181
|
+
channelCount?: number
|
|
182
|
+
storageMode?: 'split' | 'legacy' | 'none' | 'unknown'
|
|
183
|
+
}
|
|
184
|
+
projectChannel?: ProjectChannelBinding
|
|
149
185
|
}
|
|
150
186
|
```
|
|
151
187
|
|
|
@@ -155,6 +191,8 @@ interface ProjectOnboardingImportResult {
|
|
|
155
191
|
- Use `project onboarding import` when the user picks a local root directly; do not fake an app-library item just to enter onboarding.
|
|
156
192
|
- If `kind=workspace-backed`, reuse returned `projectId/workspaceId` directly and avoid synthesizing a second registry identity.
|
|
157
193
|
- If `kind=local-sce-candidate`, present it as a partial local project until onboarding import registers it.
|
|
194
|
+
- Treat `publication.visibleInPortfolio=true` as the engine-owned signal that a follow-up `project portfolio show` refresh should already expose the imported project.
|
|
195
|
+
- If onboarding returns `projectChannelContext`, preserve it as the imported project's initial collaboration snapshot instead of recomputing one in the frontend.
|
|
158
196
|
- Render `reasonCodes` directly in CLI/IDE receipts; do not replace them with frontend-only heuristics.
|
|
159
197
|
|
|
160
198
|
## 2. Target Resolution
|
|
@@ -162,7 +200,7 @@ interface ProjectOnboardingImportResult {
|
|
|
162
200
|
### Command
|
|
163
201
|
|
|
164
202
|
```bash
|
|
165
|
-
sce project target resolve --request "<text>" --current-project <project-id> --json
|
|
203
|
+
sce project target resolve --request "<text>" --current-project <project-id> --channel <channel-id> --json
|
|
166
204
|
```
|
|
167
205
|
|
|
168
206
|
### Contract shape
|
|
@@ -172,10 +210,18 @@ interface ProjectTargetResolution {
|
|
|
172
210
|
resolvedAt: string
|
|
173
211
|
callerContext: {
|
|
174
212
|
currentProjectId?: string
|
|
213
|
+
currentChannelId?: string
|
|
214
|
+
requestedChannelId?: string
|
|
215
|
+
currentChannelContextAvailable?: boolean
|
|
216
|
+
currentChannelStorageMode?: 'split' | 'legacy' | 'none' | 'unknown'
|
|
217
|
+
focusedChannelId?: string
|
|
218
|
+
activeScene?: string
|
|
219
|
+
activeSpecId?: string
|
|
175
220
|
workspaceId?: string
|
|
176
221
|
deviceId?: string
|
|
177
222
|
toolInstanceId?: string
|
|
178
223
|
}
|
|
224
|
+
callerProjectChannel?: ProjectChannelBinding
|
|
179
225
|
status: 'current-project' | 'resolved-other-project' | 'ambiguous' | 'unresolved'
|
|
180
226
|
currentProjectId?: string
|
|
181
227
|
resolvedProjectId?: string
|
|
@@ -196,6 +242,7 @@ interface ProjectTargetResolution {
|
|
|
196
242
|
|
|
197
243
|
- Call `target resolve` before cross-project assistant or orchestration flows when the user request can target another project.
|
|
198
244
|
- Keep caller-submitted `currentProjectId` and engine-resolved `resolvedProjectId` separately.
|
|
245
|
+
- If the frontend is scoped to one collaboration channel, pass `--channel` and preserve returned `callerProjectChannel`.
|
|
199
246
|
- If `status=ambiguous`, show candidate selection UI instead of auto-picking.
|
|
200
247
|
- If `status=unresolved`, preserve the exact request text and returned reason for user clarification.
|
|
201
248
|
- Never treat `--workspace` as permission to switch the globally active workspace in frontend state.
|
|
@@ -214,24 +261,75 @@ sce project supervision show --project <project-id> --json
|
|
|
214
261
|
interface ProjectSupervisionProjection {
|
|
215
262
|
generatedAt: string
|
|
216
263
|
projectId: string
|
|
264
|
+
requestedChannelId?: string
|
|
217
265
|
cursor?: string
|
|
218
266
|
summary: {
|
|
219
267
|
blockedCount: number
|
|
220
268
|
handoffCount: number
|
|
221
269
|
riskCount: number
|
|
270
|
+
infoCount?: number
|
|
271
|
+
governanceHotspotCount?: number
|
|
272
|
+
archiveItemCount?: number
|
|
273
|
+
backflowItemCount?: number
|
|
222
274
|
activeSceneCount?: number
|
|
223
275
|
activeSpecCount?: number
|
|
224
276
|
activeTaskCount?: number
|
|
277
|
+
projectChannelCount?: number
|
|
278
|
+
focusedChannelId?: string
|
|
279
|
+
highestSeverity?: 'none' | 'low' | 'medium' | 'high' | 'critical'
|
|
280
|
+
actionableCount?: number
|
|
281
|
+
criticalCount?: number
|
|
282
|
+
highCount?: number
|
|
283
|
+
mediumCount?: number
|
|
284
|
+
lowCount?: number
|
|
285
|
+
primaryRecommendedCommand?: string
|
|
225
286
|
latestEventAt?: string
|
|
226
287
|
}
|
|
288
|
+
projectChannelContext?: {
|
|
289
|
+
available?: boolean
|
|
290
|
+
contextProjectId?: string | null
|
|
291
|
+
canonicalProjectIdMatched?: boolean
|
|
292
|
+
focusedChannelId?: string | null
|
|
293
|
+
storageMode?: 'split' | 'legacy' | 'none' | 'unknown'
|
|
294
|
+
channels: ProjectChannelSummary[]
|
|
295
|
+
}
|
|
296
|
+
projectChannel?: ProjectChannelBinding
|
|
297
|
+
actionQueue?: ProjectSupervisionAction[]
|
|
227
298
|
items: ProjectSupervisionItem[]
|
|
228
299
|
partial?: boolean
|
|
229
300
|
partialReasons?: string[]
|
|
230
301
|
}
|
|
231
302
|
|
|
303
|
+
interface ProjectChannelSummary {
|
|
304
|
+
channelId: string
|
|
305
|
+
focused: boolean
|
|
306
|
+
activeScene?: string | null
|
|
307
|
+
activeSpecId?: string | null
|
|
308
|
+
activeDoc?: string | null
|
|
309
|
+
activeSessionPath?: string | null
|
|
310
|
+
runState?: string | null
|
|
311
|
+
updatedAt?: string | null
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
interface ProjectChannelBinding {
|
|
315
|
+
project_id?: string | null
|
|
316
|
+
canonical_project_id?: string | null
|
|
317
|
+
context_available?: boolean
|
|
318
|
+
storage_mode?: 'split' | 'legacy' | 'none' | 'unknown'
|
|
319
|
+
requested_channel_id?: string | null
|
|
320
|
+
focused_channel_id?: string | null
|
|
321
|
+
channel_id?: string | null
|
|
322
|
+
active_scene?: string | null
|
|
323
|
+
active_spec_id?: string | null
|
|
324
|
+
active_doc?: string | null
|
|
325
|
+
active_session_path?: string | null
|
|
326
|
+
run_state?: string | null
|
|
327
|
+
updated_at?: string | null
|
|
328
|
+
}
|
|
329
|
+
|
|
232
330
|
interface ProjectSupervisionItem {
|
|
233
331
|
id: string
|
|
234
|
-
kind: 'blocked' | 'handoff' | 'risk' | 'active'
|
|
332
|
+
kind: 'blocked' | 'handoff' | 'risk' | 'active' | 'info' | 'archive' | 'backflow' | 'governance'
|
|
235
333
|
state: string
|
|
236
334
|
reasonCode?: string
|
|
237
335
|
sceneId?: string
|
|
@@ -241,12 +339,35 @@ interface ProjectSupervisionItem {
|
|
|
241
339
|
eventId?: string
|
|
242
340
|
updatedAt: string
|
|
243
341
|
summary: string
|
|
342
|
+
severity?: 'none' | 'low' | 'medium' | 'high' | 'critical'
|
|
343
|
+
blocking_scope?: 'project' | 'channel' | 'scene' | 'spec'
|
|
344
|
+
recommended_action?: string | null
|
|
345
|
+
recommended_command?: string | null
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
interface ProjectSupervisionAction {
|
|
349
|
+
rank: number
|
|
350
|
+
id: string
|
|
351
|
+
kind: ProjectSupervisionItem['kind']
|
|
352
|
+
state: string
|
|
353
|
+
summary: string
|
|
354
|
+
updatedAt?: string
|
|
355
|
+
severity: 'low' | 'medium' | 'high' | 'critical'
|
|
356
|
+
blocking_scope: 'project' | 'channel' | 'scene' | 'spec'
|
|
357
|
+
recommended_action: string
|
|
358
|
+
recommended_command: string
|
|
359
|
+
channelId?: string
|
|
360
|
+
sceneId?: string
|
|
361
|
+
specId?: string
|
|
244
362
|
}
|
|
245
363
|
```
|
|
246
364
|
|
|
247
365
|
### MagicBall rules
|
|
248
366
|
|
|
249
367
|
- Render summary counters directly from `summary`.
|
|
368
|
+
- If the frontend is currently scoped to one collaboration channel, pass `--channel <channel-id>` and consume `projectChannel` as the resolved focus.
|
|
369
|
+
- Treat `focusedChannelId` as UI focus only; do not use it to erase sibling `channels[]`.
|
|
370
|
+
- Treat `actionQueue` as the operator-facing priority list; do not recompute a separate severity ordering unless the backend payload is missing.
|
|
250
371
|
- Use `items[]` for drillback cards or project health detail panels.
|
|
251
372
|
- Preserve `sceneId/specId/requestId/eventId` for navigation and audit views.
|
|
252
373
|
- Treat `cursor` as an opaque polling checkpoint only.
|
|
@@ -256,7 +377,7 @@ interface ProjectSupervisionItem {
|
|
|
256
377
|
|
|
257
378
|
1. Load `sce project portfolio show --json` when entering the multi-project shell.
|
|
258
379
|
2. When the user selects a local root manually, preflight it with `sce project candidate inspect --root <path> --json`.
|
|
259
|
-
3. If the root is not yet portfolio-backed, import it through `sce project onboarding import --root <path> --json
|
|
380
|
+
3. If the root is not yet portfolio-backed, import it through `sce project onboarding import --root <path> --json`, then trust `publication` plus a fresh portfolio refresh instead of keeping a shadow imported-project registry.
|
|
260
381
|
4. Store `activeProjectId` and render a project switcher from `projects[]`.
|
|
261
382
|
5. When the user enters a cross-project free-text request, preflight with `sce project target resolve --json`.
|
|
262
383
|
6. After project selection or successful resolution, load `sce project supervision show --project <project-id> --json`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 项目管理目录
|
|
2
|
+
|
|
3
|
+
这棵目录是 IDE 工程模式下的人类阅读与审查入口。
|
|
4
|
+
|
|
5
|
+
- `delivery/`: 交付推进
|
|
6
|
+
- `environment/`: 应用环境监管
|
|
7
|
+
- `assurance/`: 运行保障
|
|
8
|
+
|
|
9
|
+
约束:
|
|
10
|
+
|
|
11
|
+
1. 结构化真相仍以 `.sce/pm/**` 和 SCE API 为准。
|
|
12
|
+
2. `docs/project-management/**` 负责稳定目录结构、说明文档和人工审查入口。
|
|
13
|
+
3. 新项目接入工程模式后,应自动补齐这棵目录。
|
|
14
|
+
4. 模板统一放在 `.sce/templates/project-management/`。
|