scene-capability-engine 3.6.32 → 3.6.37

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.
Files changed (111) hide show
  1. package/CHANGELOG.md +109 -11
  2. package/README.md +119 -122
  3. package/README.zh.md +123 -121
  4. package/bin/scene-capability-engine.js +12 -1
  5. package/docs/331-poc-adaptation-roadmap.md +3 -3
  6. package/docs/README.md +21 -32
  7. package/docs/auto-refactor-index.md +384 -0
  8. package/docs/command-reference.md +99 -7
  9. package/docs/faq.md +1 -1
  10. package/docs/interactive-customization/331-poc-sce-integration-checklist.md +3 -3
  11. package/docs/interactive-customization/moqui-interactive-template-playbook.md +4 -4
  12. package/docs/interactive-customization/phase-acceptance-evidence.md +2 -2
  13. package/docs/magicball-adaptation-task-checklist-v1.md +385 -0
  14. package/docs/magicball-app-bundle-sqlite-and-command-draft.md +539 -0
  15. package/docs/magicball-capability-iteration-api.md +2 -0
  16. package/docs/magicball-capability-iteration-ui.md +2 -0
  17. package/docs/magicball-capability-library.md +2 -0
  18. package/docs/magicball-cli-invocation-examples.md +336 -0
  19. package/docs/magicball-frontend-state-and-command-mapping.md +244 -0
  20. package/docs/magicball-integration-doc-index.md +137 -0
  21. package/docs/magicball-integration-issue-tracker.md +218 -0
  22. package/docs/magicball-mode-home-and-ontology-empty-state-playbook.md +249 -0
  23. package/docs/magicball-sce-adaptation-guide.md +203 -0
  24. package/docs/magicball-three-mode-alignment-plan.md +551 -0
  25. package/docs/magicball-ui-surface-checklist.md +126 -0
  26. package/docs/magicball-write-auth-adaptation-guide.md +328 -0
  27. package/docs/moqui-standard-rebuild-guide.md +6 -6
  28. package/docs/moqui-template-core-library-playbook.md +1 -1
  29. package/docs/refactor-completion-roadmap.md +116 -0
  30. package/docs/release-checklist.md +50 -27
  31. package/docs/releases/README.md +1 -0
  32. package/docs/releases/v3.6.37.md +22 -0
  33. package/docs/steering-strategy-guide.md +7 -7
  34. package/docs/troubleshooting.md +1 -1
  35. package/docs/zh/README.md +27 -30
  36. package/docs/zh/refactor-completion-roadmap.md +116 -0
  37. package/docs/zh/release-checklist.md +40 -17
  38. package/docs/zh/releases/README.md +1 -0
  39. package/docs/zh/releases/v3.6.37.md +22 -0
  40. package/lib/app/registry-config.js +73 -0
  41. package/lib/app/registry-sync-service.js +228 -0
  42. package/lib/auto/archive-schema-service.js +276 -0
  43. package/lib/auto/archive-summary.js +60 -0
  44. package/lib/auto/batch-goal-input-service.js +543 -0
  45. package/lib/auto/batch-output.js +201 -0
  46. package/lib/auto/batch-summary-storage-service.js +110 -0
  47. package/lib/auto/close-loop-batch-service.js +116 -0
  48. package/lib/auto/close-loop-controller-service.js +287 -0
  49. package/lib/auto/close-loop-program-service.js +283 -0
  50. package/lib/auto/close-loop-recovery-service.js +191 -0
  51. package/lib/auto/close-loop-session-storage-service.js +50 -0
  52. package/lib/auto/controller-lock-service.js +55 -0
  53. package/lib/auto/controller-output.js +32 -0
  54. package/lib/auto/controller-queue-service.js +127 -0
  55. package/lib/auto/controller-session-storage-service.js +105 -0
  56. package/lib/auto/governance-advisory-service.js +208 -0
  57. package/lib/auto/governance-close-loop-service.js +411 -0
  58. package/lib/auto/governance-maintenance-presenter.js +162 -0
  59. package/lib/auto/governance-maintenance-service.js +112 -0
  60. package/lib/auto/governance-session-presenter.js +70 -0
  61. package/lib/auto/governance-session-storage-service.js +198 -0
  62. package/lib/auto/governance-signals.js +139 -0
  63. package/lib/auto/governance-stats-presenter.js +337 -0
  64. package/lib/auto/governance-stats-service.js +115 -0
  65. package/lib/auto/governance-summary.js +703 -0
  66. package/lib/auto/handoff-capability-matrix-service.js +281 -0
  67. package/lib/auto/handoff-evidence-review-service.js +251 -0
  68. package/lib/auto/handoff-release-evidence-service.js +190 -0
  69. package/lib/auto/handoff-release-gate-history-loaders-service.js +502 -0
  70. package/lib/auto/handoff-release-gate-history-service.js +257 -0
  71. package/lib/auto/handoff-reporting-service.js +1407 -0
  72. package/lib/auto/handoff-run-service.js +486 -0
  73. package/lib/auto/handoff-snapshots-service.js +645 -0
  74. package/lib/auto/observability-service.js +132 -0
  75. package/lib/auto/output-writer.js +34 -0
  76. package/lib/auto/program-auto-remediation-service.js +130 -0
  77. package/lib/auto/program-diagnostics.js +138 -0
  78. package/lib/auto/program-governance-helpers.js +306 -0
  79. package/lib/auto/program-governance-loop-service.js +413 -0
  80. package/lib/auto/program-output.js +106 -0
  81. package/lib/auto/program-summary.js +183 -0
  82. package/lib/auto/recovery-memory-service.js +684 -0
  83. package/lib/auto/recovery-selection-service.js +52 -0
  84. package/lib/auto/retention-policy.js +98 -0
  85. package/lib/auto/session-persistence-service.js +106 -0
  86. package/lib/auto/session-presenter.js +105 -0
  87. package/lib/auto/session-prune-service.js +190 -0
  88. package/lib/auto/session-query-service.js +249 -0
  89. package/lib/auto/spec-protection.js +141 -0
  90. package/lib/commands/adopt.js +4 -4
  91. package/lib/commands/app.js +911 -0
  92. package/lib/commands/assurance.js +212 -0
  93. package/lib/commands/auto.js +1093 -11065
  94. package/lib/commands/mode.js +321 -0
  95. package/lib/commands/ontology.js +415 -0
  96. package/lib/commands/pm.js +422 -0
  97. package/lib/ontology/seed-profiles.js +160 -0
  98. package/lib/spec/bootstrap/context-collector.js +1 -1
  99. package/lib/state/sce-state-store.js +3369 -1200
  100. package/lib/steering/adoption-config.js +2 -2
  101. package/lib/steering/compliance-cache.js +2 -2
  102. package/lib/steering/steering-manager.js +4 -4
  103. package/lib/task/task-claimer.js +1 -2
  104. package/lib/workspace/multi/workspace-context-resolver.js +3 -3
  105. package/lib/workspace/multi/workspace-state-manager.js +0 -164
  106. package/lib/workspace/sce-tracking-audit.js +1 -1
  107. package/lib/workspace/takeover-baseline.js +1 -1
  108. package/package.json +1 -1
  109. package/template/.sce/README.md +1 -1
  110. package/template/.sce/steering/CORE_PRINCIPLES.md +1 -1
  111. package/bin/kse.js +0 -3
@@ -0,0 +1,385 @@
1
+ # MagicBall Adaptation Task Checklist v1
2
+
3
+ ## Goal
4
+
5
+ Turn the current SCE capability set into a concrete MagicBall adaptation checklist.
6
+
7
+ This checklist is meant for:
8
+ - frontend implementation
9
+ - integration sequencing
10
+ - joint verification between MagicBall and SCE
11
+
12
+ ## Scope
13
+
14
+ Current checklist covers:
15
+ 1. app selection and mode switching
16
+ 2. application mode adaptation
17
+ 3. ontology mode adaptation
18
+ 4. engineering mode adaptation
19
+ 5. write authorization handling
20
+ 6. demo app verification
21
+
22
+ ## Phase 1: App Entry And Mode Switching
23
+
24
+ ### Task 1.1
25
+ Use `app_key` as the frontend route token.
26
+
27
+ Recommended value:
28
+ - `customer-order-demo`
29
+
30
+ ### Task 1.2
31
+ When an app is selected, request:
32
+ ```bash
33
+ sce app bundle show --app customer-order-demo --json
34
+ ```
35
+
36
+ Use this to cache:
37
+ - `app_id`
38
+ - `app_key`
39
+ - `app_name`
40
+ - `runtime_release_id`
41
+ - `ontology_bundle_id`
42
+ - `engineering_project_id`
43
+ - `default_scene_id`
44
+
45
+ ### Task 1.3
46
+ Replace mode-local reconstruction with mode projection calls.
47
+
48
+ Required commands:
49
+ ```bash
50
+ sce mode application home --app customer-order-demo --json
51
+ sce mode ontology home --app customer-order-demo --json
52
+ sce mode engineering home --app customer-order-demo --json
53
+ ```
54
+
55
+ Done when:
56
+ - all three mode entry pages are driven by these commands
57
+ - frontend no longer reconstructs runtime/ontology/engineering binding itself
58
+ - frontend loads them sequentially in this order: application -> ontology -> engineering -> engineering show
59
+ - frontend does not switch these four reads back to parallel loading until `Issue 001` is explicitly closed in `docs/magicball-integration-issue-tracker.md`
60
+
61
+ ## Phase 2: Application Mode
62
+
63
+ ### Task 2.1
64
+ Render application mode hero from:
65
+ ```bash
66
+ sce mode application home --app customer-order-demo --json
67
+ ```
68
+
69
+ Important fields:
70
+ - `summary.app_name`
71
+ - `summary.runtime_version`
72
+ - `summary.install_status`
73
+ - `summary.release_count`
74
+ - `view_model.current_release`
75
+ - `view_model.entrypoint`
76
+ - `view_model.install_root`
77
+
78
+ ### Task 2.2
79
+ Render release list from:
80
+ ```bash
81
+ sce app runtime releases --app customer-order-demo --json
82
+ ```
83
+
84
+ Expected UI:
85
+ - release table/list
86
+ - active/default release marker
87
+ - runtime version
88
+ - release status
89
+ - entrypoint
90
+
91
+ ### Task 2.3
92
+ Wire install action.
93
+
94
+ Command:
95
+ ```bash
96
+ sce app runtime install --app customer-order-demo --release <release-id> --json
97
+ ```
98
+
99
+ Done when:
100
+ - clicking install executes command
101
+ - result updates local runtime section
102
+ - install root is shown in UI
103
+
104
+ ### Task 2.4
105
+ Wire activate action.
106
+
107
+ Command:
108
+ ```bash
109
+ sce app runtime activate --app customer-order-demo --release <release-id> --json
110
+ ```
111
+
112
+ Done when:
113
+ - active release changes in UI
114
+ - `mode application home` reflects the new active release after refresh
115
+
116
+ ## Phase 3: Ontology Mode
117
+
118
+ ### Task 3.1
119
+ Render ontology home summary from:
120
+ ```bash
121
+ sce mode ontology home --app customer-order-demo --json
122
+ ```
123
+
124
+ Important fields:
125
+ - `summary.ontology_version`
126
+ - `summary.template_version`
127
+ - `summary.triad_status`
128
+ - `summary.publish_readiness`
129
+ - `summary.triad_coverage_percent`
130
+ - `ontology_core_ui`
131
+ - `view_model.triad_summary`
132
+
133
+ ### Task 3.2
134
+ Render ER table from:
135
+ ```bash
136
+ sce ontology er list --json
137
+ ```
138
+
139
+ Use:
140
+ - `items`
141
+ - `view_model.columns`
142
+ - `mb_status`
143
+
144
+ ### Task 3.3
145
+ Render BR table from:
146
+ ```bash
147
+ sce ontology br list --json
148
+ ```
149
+
150
+ ### Task 3.4
151
+ Render DL table from:
152
+ ```bash
153
+ sce ontology dl list --json
154
+ ```
155
+
156
+ ### Task 3.5
157
+ Use triad summary card from:
158
+ ```bash
159
+ sce ontology triad summary --json
160
+ ```
161
+
162
+ Done when:
163
+ - MagicBall no longer calculates triad completeness itself
164
+ - `ontology_core_ui` is used directly for completeness and missing-triad display
165
+ - if ontology is empty, UI reads `starter_seed` guidance from SCE payloads instead of inventing its own suggestion text
166
+
167
+ ### Task 3.6
168
+ Decide fresh-project ontology behavior.
169
+
170
+ Recommended default:
171
+ - `fallback + optional seed apply`
172
+
173
+ Implementation rule:
174
+ - on first empty ontology load, explain that empty state is expected for a fresh/local project
175
+ - read `starter_seed` guidance from `mode ontology home` / `ontology triad summary`
176
+ - show a visible `Initialize starter ontology` action
177
+ - do not auto-apply seed without explicit user intent
178
+
179
+ Alternative options if product policy changes:
180
+ 1. frontend fallback only
181
+ 2. call built-in starter seed
182
+
183
+ Starter seed commands:
184
+ ```bash
185
+ sce ontology seed list --json
186
+ sce ontology seed show --profile customer-order-demo --json
187
+ sce ontology seed apply --profile customer-order-demo --json
188
+ ```
189
+
190
+ Done when:
191
+ - MagicBall picks one default strategy for empty ontology pages
192
+ - fresh project no longer appears as an unexplained blank ontology screen
193
+
194
+ ## Phase 4: Engineering Mode
195
+
196
+ ### Task 4.1
197
+ Render engineering home summary from:
198
+ ```bash
199
+ sce mode engineering home --app customer-order-demo --json
200
+ ```
201
+
202
+ Important fields:
203
+ - `summary.code_version`
204
+ - `summary.current_branch`
205
+ - `summary.requirement_count`
206
+ - `summary.issue_count`
207
+ - `summary.plan_count`
208
+ - `summary.assurance_resource_count`
209
+ - `view_model.delivery_summary`
210
+ - `view_model.assurance_summary`
211
+
212
+ ### Task 4.2
213
+ Render delivery tabs from real SCE data.
214
+
215
+ Commands:
216
+ ```bash
217
+ sce pm requirement list --json
218
+ sce pm tracking board --json
219
+ sce pm planning board --json
220
+ sce pm change list --json
221
+ sce pm issue board --json
222
+ ```
223
+
224
+ Done when:
225
+ - all five delivery tabs read SCE JSON
226
+ - all five tabs use `view_model.columns`
227
+ - fallback markdown becomes empty-state only
228
+
229
+ ### Task 4.3
230
+ Render assurance tabs from real SCE data.
231
+
232
+ Commands:
233
+ ```bash
234
+ sce assurance resource status --json
235
+ sce assurance logs views --json
236
+ sce assurance backup list --json
237
+ sce assurance config switches --json
238
+ ```
239
+
240
+ Done when:
241
+ - all four assurance tabs read SCE JSON
242
+ - table rendering uses `view_model.columns`
243
+ - empty-state fallback remains optional only
244
+
245
+ ### Task 4.4
246
+ Wire engineering workspace flow.
247
+
248
+ Commands:
249
+ ```bash
250
+ sce app engineering show --app customer-order-demo --json
251
+ sce app engineering attach --app customer-order-demo --repo <repo-url> --branch main --json
252
+ sce app engineering hydrate --app customer-order-demo --json
253
+ sce app engineering activate --app customer-order-demo --json
254
+ ```
255
+
256
+ Done when:
257
+ - MagicBall can detect attached/not-attached state
258
+ - MagicBall can trigger attach/hydrate/activate
259
+ - active engineering workspace path is shown in UI
260
+
261
+ ## Phase 5: Write Authorization
262
+
263
+ ### Task 5.1
264
+ Implement shared lease state in frontend.
265
+
266
+ Commands:
267
+ ```bash
268
+ sce auth status --json
269
+ sce auth status --lease <lease-id> --json
270
+ ```
271
+
272
+ ### Task 5.2
273
+ Implement shared auth prompt flow.
274
+
275
+ Command:
276
+ ```bash
277
+ sce auth grant --scope <scope> --reason "<reason>" --json
278
+ ```
279
+
280
+ ### Task 5.3
281
+ Pass `--auth-lease` for all mutating commands.
282
+
283
+ Commands that matter now:
284
+ - `sce app bundle register`
285
+ - `sce app registry configure`
286
+ - `sce app engineering attach`
287
+ - `sce app engineering hydrate`
288
+ - `sce app engineering activate`
289
+ - `sce app runtime install`
290
+ - `sce app runtime activate`
291
+ - `sce pm * upsert`
292
+ - `sce ontology * upsert`
293
+
294
+ ### Task 5.4
295
+ Handle auth failure separately from validation failure.
296
+
297
+ Done when:
298
+ - missing lease opens auth prompt
299
+ - invalid lease forces refresh and retry
300
+ - validation errors stay in-page and do not reopen auth flow
301
+
302
+ ## Phase 6: Demo App Verification
303
+
304
+ ### Task 6.1
305
+ Sync registries locally.
306
+
307
+ Commands:
308
+ ```bash
309
+ sce app registry status --json
310
+ sce app registry sync --json
311
+ ```
312
+
313
+ Done when:
314
+ - `customer-order-demo` appears in app selection
315
+
316
+ ### Task 6.2
317
+ Run full demo path.
318
+
319
+ Verification path:
320
+ 1. select `customer-order-demo`
321
+ 2. load `application home`
322
+ 3. load `ontology home`
323
+ 4. load `engineering home`
324
+ 5. show runtime releases
325
+ 6. show PM delivery tables
326
+ 7. show ontology ER/BR/DL tables
327
+ 8. show assurance tables
328
+
329
+ ### Task 6.3
330
+ Verify mode consistency.
331
+
332
+ Done when:
333
+ - the same app identity maps to all three modes
334
+ - `runtime_release_id`, `ontology_bundle_id`, and `engineering_project_id` stay aligned
335
+
336
+ ## Recommended Priority Order
337
+
338
+ ### Priority A
339
+ - Task 1.1
340
+ - Task 1.2
341
+ - Task 1.3
342
+ - Task 6.1
343
+
344
+ ### Priority B
345
+ - Task 2.1
346
+ - Task 3.1
347
+ - Task 4.1
348
+
349
+ ### Priority C
350
+ - Task 4.2
351
+ - Task 4.3
352
+ - Task 3.2
353
+ - Task 3.3
354
+ - Task 3.4
355
+ - Task 3.5
356
+
357
+ ### Priority D
358
+ - Task 2.2
359
+ - Task 2.3
360
+ - Task 2.4
361
+ - Task 4.4
362
+ - Phase 5 tasks
363
+
364
+ ## Minimum Definition Of Done
365
+
366
+ MagicBall can be considered adapted to the current SCE version when:
367
+
368
+ 1. app selection uses `customer-order-demo`
369
+ 2. all three mode entry pages read `mode * home`
370
+ 3. Engineering Mode delivery tabs read `sce pm *`
371
+ 4. Ontology Mode reads `sce ontology *`
372
+ 5. Assurance tabs read `sce assurance *`
373
+ 6. write actions pass `--auth-lease`
374
+ 7. install / activate / attach / hydrate actions work from the UI
375
+
376
+ ## Practical Conclusion
377
+
378
+ MagicBall should now stop waiting for more foundation work and move into concrete integration.
379
+
380
+ The best immediate implementation order is:
381
+ 1. mode entry integration
382
+ 2. engineering + ontology read-only tables
383
+ 3. runtime release panel
384
+ 4. write authorization flow
385
+ 5. install/activate/attach/hydrate actions