scene-capability-engine 3.3.4 → 3.3.10

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 (252) hide show
  1. package/CHANGELOG.md +151 -78
  2. package/README.md +6 -6
  3. package/README.zh.md +6 -6
  4. package/bin/scene-capability-engine.js +129 -7
  5. package/docs/331-poc-adaptation-roadmap.md +3 -3
  6. package/docs/331-poc-dual-track-integration-guide.md +8 -8
  7. package/docs/331-poc-weekly-delivery-checklist.md +6 -6
  8. package/docs/README.md +6 -0
  9. package/docs/adopt-migration-guide.md +13 -13
  10. package/docs/adoption-guide.md +28 -28
  11. package/docs/agent-hooks-analysis.md +10 -10
  12. package/docs/agent-runtime/agent-result-summary-contract.schema.json +50 -0
  13. package/docs/agent-runtime/agent-result-summary.sample.json +11 -0
  14. package/docs/agent-runtime/capability-mapping-report.sample.json +42 -0
  15. package/docs/agent-runtime/capability-mapping-report.schema.json +136 -0
  16. package/docs/agent-runtime/failure-taxonomy-baseline.json +99 -0
  17. package/docs/agent-runtime/multi-agent-coordination-policy-baseline.json +38 -0
  18. package/docs/agent-runtime/strategy-routing-policy-baseline.json +24 -0
  19. package/docs/agent-runtime/symbol-evidence.sample.json +34 -0
  20. package/docs/agent-runtime/symbol-evidence.schema.json +128 -0
  21. package/docs/architecture.md +13 -13
  22. package/docs/articles/ai-driven-development-philosophy-and-practice.en.md +3 -3
  23. package/docs/articles/ai-driven-development-philosophy-and-practice.md +3 -3
  24. package/docs/autonomous-control-guide.md +35 -35
  25. package/docs/command-reference.md +254 -151
  26. package/docs/cross-tool-guide.md +7 -7
  27. package/docs/developer-guide.md +8 -8
  28. package/docs/document-governance.md +15 -15
  29. package/docs/environment-management-guide.md +6 -6
  30. package/docs/examples/add-export-command/design.md +1 -1
  31. package/docs/faq.md +13 -13
  32. package/docs/handoff-profile-integration-guide.md +3 -3
  33. package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.json +7 -7
  34. package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.md +1 -1
  35. package/docs/integration-modes.md +12 -12
  36. package/docs/integration-philosophy.md +11 -11
  37. package/docs/interactive-customization/331-poc-sce-integration-checklist.md +24 -24
  38. package/docs/interactive-customization/README.md +43 -43
  39. package/docs/interactive-customization/business-mode-policy-baseline.json +33 -0
  40. package/docs/interactive-customization/dual-ui-mode-integration-guide.md +1 -1
  41. package/docs/interactive-customization/moqui-adapter-interface.md +2 -2
  42. package/docs/interactive-customization/moqui-copilot-integration-guide.md +1 -1
  43. package/docs/interactive-customization/moqui-interactive-template-playbook.md +4 -4
  44. package/docs/interactive-customization/phase-acceptance-evidence.md +2 -2
  45. package/docs/knowledge-management-guide.md +6 -6
  46. package/docs/manual-workflows-guide.md +4 -4
  47. package/docs/moqui-capability-matrix.md +3 -3
  48. package/docs/moqui-standard-rebuild-guide.md +8 -8
  49. package/docs/moqui-template-core-library-playbook.md +27 -27
  50. package/docs/multi-agent-coordination-guide.md +19 -19
  51. package/docs/multi-repo-management-guide.md +17 -17
  52. package/docs/quick-start-with-ai-tools.md +7 -7
  53. package/docs/quick-start.md +2 -2
  54. package/docs/release-checklist.md +4 -4
  55. package/docs/sce-business-mode-map.md +103 -0
  56. package/docs/sce-capability-matrix-e2e-example.md +94 -0
  57. package/docs/sce-capability-matrix-roadmap.md +48 -0
  58. package/docs/security-governance-default-baseline.md +12 -12
  59. package/docs/spec-collaboration-guide.md +3 -3
  60. package/docs/spec-locking-guide.md +2 -2
  61. package/docs/spec-workflow.md +3 -3
  62. package/docs/starter-kit/README.md +4 -4
  63. package/docs/starter-kit/handoff-manifest.starter.json +2 -2
  64. package/docs/starter-kit/release.workflow.sample.yml +1 -1
  65. package/docs/steering-strategy-guide.md +15 -15
  66. package/docs/team-collaboration-guide.md +69 -69
  67. package/docs/testing-strategy.md +2 -2
  68. package/docs/tools/claude-guide.md +14 -4
  69. package/docs/tools/cursor-guide.md +14 -14
  70. package/docs/tools/generic-guide.md +9 -9
  71. package/docs/tools/kiro-guide.md +4 -4
  72. package/docs/tools/vscode-guide.md +13 -13
  73. package/docs/tools/windsurf-guide.md +6 -6
  74. package/docs/troubleshooting.md +22 -22
  75. package/docs/upgrade-guide.md +8 -8
  76. package/docs/value-observability-guide.md +3 -3
  77. package/docs/zh/README.md +15 -0
  78. package/docs/zh/quick-start.md +15 -15
  79. package/docs/zh/release-checklist.md +3 -3
  80. package/docs/zh/tools/claude-guide.md +16 -6
  81. package/docs/zh/tools/cursor-guide.md +11 -11
  82. package/docs/zh/tools/generic-guide.md +13 -13
  83. package/docs/zh/tools/kiro-guide.md +2 -2
  84. package/docs/zh/tools/vscode-guide.md +11 -11
  85. package/docs/zh/tools/windsurf-guide.md +11 -11
  86. package/docs/zh/value-observability-guide.md +3 -3
  87. package/lib/adoption/adoption-logger.js +1 -1
  88. package/lib/adoption/adoption-strategy.js +28 -28
  89. package/lib/adoption/backup-manager.js +3 -3
  90. package/lib/adoption/conflict-resolver.js +2 -2
  91. package/lib/adoption/detection-engine.js +8 -8
  92. package/lib/adoption/error-formatter.js +4 -4
  93. package/lib/adoption/file-classifier.js +6 -6
  94. package/lib/adoption/progress-reporter.js +1 -1
  95. package/lib/adoption/smart-orchestrator.js +10 -10
  96. package/lib/adoption/strategy-selector.js +6 -6
  97. package/lib/adoption/summary-generator.js +1 -1
  98. package/lib/adoption/template-sync.js +8 -8
  99. package/lib/auto/autonomous-engine.js +7 -7
  100. package/lib/auto/checkpoint-manager.js +1 -1
  101. package/lib/auto/close-loop-runner.js +12 -12
  102. package/lib/auto/error-recovery-manager.js +1 -1
  103. package/lib/auto/goal-decomposer.js +1 -1
  104. package/lib/auto/moqui-recovery-sequence.js +2 -2
  105. package/lib/auto/progress-tracker.js +1 -1
  106. package/lib/auto/state-manager.js +1 -1
  107. package/lib/backup/backup-system.js +10 -10
  108. package/lib/backup/selective-backup.js +4 -4
  109. package/lib/collab/agent-registry.js +2 -2
  110. package/lib/collab/contract-manager.js +1 -1
  111. package/lib/collab/coordinator.js +2 -2
  112. package/lib/collab/dependency-manager.js +1 -1
  113. package/lib/collab/integration-manager.js +1 -1
  114. package/lib/collab/metadata-manager.js +1 -1
  115. package/lib/collab/multi-agent-config.js +2 -2
  116. package/lib/collab/spec-lifecycle-manager.js +2 -2
  117. package/lib/collab/visualizer.js +1 -1
  118. package/lib/commands/adopt.js +6 -6
  119. package/lib/commands/auto.js +56 -56
  120. package/lib/commands/collab.js +2 -2
  121. package/lib/commands/docs.js +3 -3
  122. package/lib/commands/doctor.js +1 -1
  123. package/lib/commands/knowledge.js +2 -2
  124. package/lib/commands/lock.js +1 -1
  125. package/lib/commands/ops.js +1 -1
  126. package/lib/commands/orchestrate.js +3 -3
  127. package/lib/commands/rollback.js +1 -1
  128. package/lib/commands/scene.js +135 -93
  129. package/lib/commands/session.js +139 -0
  130. package/lib/commands/spec-bootstrap.js +1 -1
  131. package/lib/commands/spec-gate.js +2 -2
  132. package/lib/commands/spec-pipeline.js +1 -1
  133. package/lib/commands/status.js +4 -4
  134. package/lib/commands/steering.js +119 -0
  135. package/lib/commands/value.js +1 -1
  136. package/lib/commands/watch.js +9 -9
  137. package/lib/commands/workspace-multi.js +1 -1
  138. package/lib/context/context-exporter.js +5 -7
  139. package/lib/context/prompt-generator.js +2 -2
  140. package/lib/environment/backup-system.js +1 -1
  141. package/lib/environment/environment-manager.js +2 -2
  142. package/lib/gitignore/gitignore-backup.js +3 -3
  143. package/lib/gitignore/gitignore-detector.js +13 -13
  144. package/lib/gitignore/gitignore-integration.js +3 -3
  145. package/lib/gitignore/gitignore-transformer.js +4 -4
  146. package/lib/gitignore/layered-rules-template.js +16 -16
  147. package/lib/governance/config-manager.js +1 -1
  148. package/lib/governance/doc-reference-checker.js +4 -4
  149. package/lib/governance/execution-logger.js +1 -1
  150. package/lib/governance/file-scanner.js +3 -3
  151. package/lib/interactive-customization/moqui-interactive-adapter.js +2 -2
  152. package/lib/knowledge/knowledge-manager.js +1 -1
  153. package/lib/lock/lock-manager.js +2 -2
  154. package/lib/lock/steering-file-lock.js +5 -5
  155. package/lib/lock/task-lock-manager.js +3 -3
  156. package/lib/operations/audit-logger.js +1 -1
  157. package/lib/operations/feedback-manager.js +1 -1
  158. package/lib/operations/operations-manager.js +3 -3
  159. package/lib/operations/permission-manager.js +2 -2
  160. package/lib/operations/template-loader.js +1 -1
  161. package/lib/orchestrator/agent-spawner.js +180 -2
  162. package/lib/orchestrator/bootstrap-prompt-builder.js +9 -6
  163. package/lib/orchestrator/orchestration-engine.js +346 -2
  164. package/lib/orchestrator/orchestrator-config.js +2 -2
  165. package/lib/repo/config-manager.js +3 -3
  166. package/lib/repo/handlers/init-handler.js +1 -1
  167. package/lib/repo/repo-manager.js +2 -2
  168. package/lib/runtime/business-mode-resolver.js +240 -0
  169. package/lib/runtime/session-store.js +207 -0
  170. package/lib/runtime/steering-contract.js +338 -0
  171. package/lib/scene-runtime/audit-emitter.js +1 -1
  172. package/lib/scene-runtime/binding-plugin-loader.js +3 -3
  173. package/lib/scene-runtime/eval-bridge.js +1 -1
  174. package/lib/scene-runtime/index.js +1 -1
  175. package/lib/scene-runtime/moqui-extractor.js +1 -1
  176. package/lib/scene-runtime/plan-compiler.js +1 -1
  177. package/lib/scene-runtime/policy-gate.js +1 -1
  178. package/lib/scene-runtime/runtime-executor.js +1 -1
  179. package/lib/scene-runtime/scene-loader.js +1 -1
  180. package/lib/spec/bootstrap/context-collector.js +1 -1
  181. package/lib/spec/pipeline/stage-adapters.js +3 -3
  182. package/lib/spec/pipeline/state-store.js +1 -1
  183. package/lib/spec-gate/policy/policy-loader.js +1 -1
  184. package/lib/spec-gate/rules/default-rules.js +6 -6
  185. package/lib/steering/adoption-config.js +1 -1
  186. package/lib/steering/compliance-error-reporter.js +3 -3
  187. package/lib/steering/context-sync-manager.js +2 -2
  188. package/lib/steering/index.js +1 -1
  189. package/lib/steering/spec-steering.js +2 -2
  190. package/lib/steering/steering-compliance-checker.js +1 -1
  191. package/lib/steering/steering-loader.js +4 -5
  192. package/lib/steering/steering-manager.js +4 -4
  193. package/lib/task/task-claimer.js +5 -5
  194. package/lib/task/task-status-store.js +2 -2
  195. package/lib/templates/content-generalizer.js +1 -1
  196. package/lib/templates/spec-reader.js +2 -2
  197. package/lib/templates/template-creator.js +1 -1
  198. package/lib/templates/template-exporter.js +3 -3
  199. package/lib/templates/template-manager.js +1 -1
  200. package/lib/upgrade/migration-engine.js +3 -3
  201. package/lib/upgrade/migrations/1.0.0-to-1.1.0.js +1 -1
  202. package/lib/utils/file-diff.js +6 -6
  203. package/lib/utils/tool-detector.js +10 -10
  204. package/lib/utils/validation.js +5 -5
  205. package/lib/value/metric-contract-loader.js +1 -1
  206. package/lib/version/version-manager.js +1 -1
  207. package/lib/watch/execution-logger.js +1 -1
  208. package/lib/watch/presets.js +8 -8
  209. package/lib/watch/watch-manager.js +2 -2
  210. package/lib/workspace/legacy-kiro-migrator.js +275 -0
  211. package/lib/workspace/multi/workspace-context-resolver.js +2 -2
  212. package/lib/workspace/multi/workspace-registry.js +2 -2
  213. package/lib/workspace/multi/workspace-state-manager.js +3 -3
  214. package/lib/workspace/workspace-manager.js +1 -1
  215. package/lib/workspace/workspace-sync.js +2 -2
  216. package/locales/en.json +4 -4
  217. package/locales/zh.json +4 -4
  218. package/package.json +12 -9
  219. package/template/{.kiro → .sce}/README.md +15 -15
  220. package/template/{.kiro → .sce}/hooks/check-spec-on-create.kiro.hook +2 -2
  221. package/template/{.kiro → .sce}/steering/CORE_PRINCIPLES.md +4 -4
  222. package/template/{.kiro → .sce}/steering/CURRENT_CONTEXT.md +1 -1
  223. package/template/{.kiro → .sce}/steering/ENVIRONMENT.md +3 -3
  224. package/template/{.kiro → .sce}/tools/backup_manager.py +3 -3
  225. package/template/{.kiro → .sce}/tools/configuration_manager.py +1 -1
  226. package/template/README.md +12 -12
  227. /package/template/{.kiro → .sce}/hooks/run-tests-on-save.kiro.hook +0 -0
  228. /package/template/{.kiro → .sce}/hooks/sync-tasks-on-edit.kiro.hook +0 -0
  229. /package/template/{.kiro → .sce}/specs/SPEC_WORKFLOW_GUIDE.md +0 -0
  230. /package/template/{.kiro → .sce}/steering/RULES_GUIDE.md +0 -0
  231. /package/template/{.kiro → .sce}/templates/operations/default/change-impact.md +0 -0
  232. /package/template/{.kiro → .sce}/templates/operations/default/deployment.md +0 -0
  233. /package/template/{.kiro → .sce}/templates/operations/default/feedback-response.md +0 -0
  234. /package/template/{.kiro → .sce}/templates/operations/default/migration-plan.md +0 -0
  235. /package/template/{.kiro → .sce}/templates/operations/default/monitoring.md +0 -0
  236. /package/template/{.kiro → .sce}/templates/operations/default/operations.md +0 -0
  237. /package/template/{.kiro → .sce}/templates/operations/default/rollback.md +0 -0
  238. /package/template/{.kiro → .sce}/templates/operations/default/tools.yaml +0 -0
  239. /package/template/{.kiro → .sce}/templates/operations/default/troubleshooting.md +0 -0
  240. /package/template/{.kiro → .sce}/tools/document_evaluator.py +0 -0
  241. /package/template/{.kiro → .sce}/tools/enhancement_logger.py +0 -0
  242. /package/template/{.kiro → .sce}/tools/error_handler.py +0 -0
  243. /package/template/{.kiro → .sce}/tools/improvement_identifier.py +0 -0
  244. /package/template/{.kiro → .sce}/tools/modification_applicator.py +0 -0
  245. /package/template/{.kiro → .sce}/tools/quality_gate_enforcer.py +0 -0
  246. /package/template/{.kiro → .sce}/tools/quality_scorer.py +0 -0
  247. /package/template/{.kiro → .sce}/tools/report_generator.py +0 -0
  248. /package/template/{.kiro → .sce}/tools/ultrawork_enhancer.py +0 -0
  249. /package/template/{.kiro → .sce}/tools/ultrawork_enhancer_refactored.py +0 -0
  250. /package/template/{.kiro → .sce}/tools/ultrawork_enhancer_v2.py +0 -0
  251. /package/template/{.kiro → .sce}/tools/ultrawork_enhancer_v3.py +0 -0
  252. /package/template/{.kiro → .sce}/tools/workflow_quality_gate.py +0 -0
@@ -17,8 +17,8 @@ sce repo init
17
17
  This command:
18
18
  - Scans your project directory for Git repositories
19
19
  - Extracts remote URLs and current branches
20
- - Creates `.kiro/project-repos.json` configuration file
21
- - Excludes the `.kiro` directory from scanning
20
+ - Creates `.sce/project-repos.json` configuration file
21
+ - Excludes the `.sce` directory from scanning
22
22
 
23
23
  **Example output:**
24
24
  ```
@@ -28,7 +28,7 @@ Found 3 repositories:
28
28
  ✓ backend (develop) - https://github.com/user/backend.git
29
29
  ✓ shared (main) - https://github.com/user/shared.git
30
30
 
31
- Configuration saved to .kiro/project-repos.json
31
+ Configuration saved to .sce/project-repos.json
32
32
  ```
33
33
 
34
34
  ### 2. Check Repository Status
@@ -110,7 +110,7 @@ Overall Health: 2 healthy, 1 unhealthy
110
110
 
111
111
  ## Configuration File Format
112
112
 
113
- The configuration is stored in `.kiro/project-repos.json`:
113
+ The configuration is stored in `.sce/project-repos.json`:
114
114
 
115
115
  ```json
116
116
  {
@@ -197,7 +197,7 @@ Paths can be specified as:
197
197
 
198
198
  ### Overview
199
199
 
200
- Starting with v1.21.0, you can manually create and edit the `.kiro/project-repos.json` configuration file without relying solely on `sce repo init`. This is useful for:
200
+ Starting with v1.21.0, you can manually create and edit the `.sce/project-repos.json` configuration file without relying solely on `sce repo init`. This is useful for:
201
201
 
202
202
  - Curating a specific list of repositories
203
203
  - Removing false positives from auto-scan
@@ -307,12 +307,12 @@ When you manually create or edit the configuration, `sce` validates:
307
307
  **Step 1: Create the directory structure**
308
308
 
309
309
  ```bash
310
- mkdir -p .kiro
310
+ mkdir -p .sce
311
311
  ```
312
312
 
313
313
  **Step 2: Create the configuration file**
314
314
 
315
- Create `.kiro/project-repos.json` with your repositories:
315
+ Create `.sce/project-repos.json` with your repositories:
316
316
 
317
317
  ```json
318
318
  {
@@ -691,7 +691,7 @@ Error: Circular parent reference detected: repo-a -> repo-b -> repo-a
691
691
  ```
692
692
 
693
693
  **Solution:**
694
- 1. Open `.kiro/project-repos.json`
694
+ 1. Open `.sce/project-repos.json`
695
695
  2. Check the `parent` fields
696
696
  3. Remove or fix the circular reference
697
697
  4. Run `sce repo health` to verify
@@ -724,7 +724,7 @@ To migrate an existing configuration to use nested scanning:
724
724
 
725
725
  ```bash
726
726
  # Backup existing configuration
727
- cp .kiro/project-repos.json .kiro/project-repos.json.backup
727
+ cp .sce/project-repos.json .sce/project-repos.json.backup
728
728
 
729
729
  # Re-initialize with nested scanning
730
730
  sce repo init --nested -y
@@ -754,7 +754,7 @@ sce repo init [options]
754
754
 
755
755
  **Behavior:**
756
756
  - Scans project directory recursively for Git repositories
757
- - Excludes `.kiro` directory and common build directories (node_modules, build, dist, etc.)
757
+ - Excludes `.sce` directory and common build directories (node_modules, build, dist, etc.)
758
758
  - Extracts remote URL from `origin` remote (or first available remote)
759
759
  - Detects current branch
760
760
  - Prompts for confirmation if configuration already exists
@@ -970,7 +970,7 @@ sce repo exec "git push"
970
970
 
971
971
  ## Manual Configuration
972
972
 
973
- You can manually edit `.kiro/project-repos.json` to:
973
+ You can manually edit `.sce/project-repos.json` to:
974
974
 
975
975
  ### Add a Repository
976
976
 
@@ -1081,7 +1081,7 @@ If you're using a version prior to v1.20.5, the scanner may incorrectly identify
1081
1081
 
1082
1082
  **Error:**
1083
1083
  ```
1084
- Error: Configuration file not found at .kiro/project-repos.json
1084
+ Error: Configuration file not found at .sce/project-repos.json
1085
1085
  ```
1086
1086
 
1087
1087
  **Solution:**
@@ -1095,7 +1095,7 @@ Error: Repository path does not exist: packages/frontend
1095
1095
  ```
1096
1096
 
1097
1097
  **Solution:**
1098
- 1. Verify the path in `.kiro/project-repos.json`
1098
+ 1. Verify the path in `.sce/project-repos.json`
1099
1099
  2. Ensure the repository is cloned
1100
1100
  3. Update the path if the repository moved
1101
1101
 
@@ -1122,7 +1122,7 @@ Error: Configuration validation failed:
1122
1122
  ```
1123
1123
 
1124
1124
  **Solution:**
1125
- 1. Open `.kiro/project-repos.json`
1125
+ 1. Open `.sce/project-repos.json`
1126
1126
  2. Fix validation errors
1127
1127
  3. Ensure all required fields are present
1128
1128
  4. Remove duplicate names
@@ -1157,10 +1157,10 @@ Error: Permission denied accessing repository: frontend
1157
1157
 
1158
1158
  ### 1. Keep Configuration in Version Control
1159
1159
 
1160
- Add `.kiro/project-repos.json` to your main repository:
1160
+ Add `.sce/project-repos.json` to your main repository:
1161
1161
 
1162
1162
  ```bash
1163
- git add .kiro/project-repos.json
1163
+ git add .sce/project-repos.json
1164
1164
  git commit -m "docs: add multi-repo configuration"
1165
1165
  ```
1166
1166
 
@@ -1299,7 +1299,7 @@ Validate configuration before committing:
1299
1299
  ```bash
1300
1300
  # Add to pre-commit hook
1301
1301
  #!/bin/bash
1302
- if [ -f .kiro/project-repos.json ]; then
1302
+ if [ -f .sce/project-repos.json ]; then
1303
1303
  sce repo health || exit 1
1304
1304
  fi
1305
1305
  ```
@@ -90,7 +90,7 @@ cd your-project
90
90
  sce adopt
91
91
  ```
92
92
 
93
- 这会在项目中创建 `.kiro/` 目录。
93
+ 这会在项目中创建 `.sce/` 目录。
94
94
 
95
95
  ### 步骤 3:创建你的第一个 Spec
96
96
 
@@ -99,9 +99,9 @@ sce spec bootstrap --name 01-00-user-login --non-interactive
99
99
  ```
100
100
 
101
101
  然后编辑生成的文件:
102
- - `.kiro/specs/01-00-user-login/requirements.md` - 写需求
103
- - `.kiro/specs/01-00-user-login/design.md` - 写设计
104
- - `.kiro/specs/01-00-user-login/tasks.md` - 列任务
102
+ - `.sce/specs/01-00-user-login/requirements.md` - 写需求
103
+ - `.sce/specs/01-00-user-login/design.md` - 写设计
104
+ - `.sce/specs/01-00-user-login/tasks.md` - 列任务
105
105
 
106
106
  ### 步骤 4:导出上下文
107
107
 
@@ -109,7 +109,7 @@ sce spec bootstrap --name 01-00-user-login --non-interactive
109
109
  sce context export 01-00-user-login
110
110
  ```
111
111
 
112
- 这会生成:`.kiro/specs/01-00-user-login/context-export.md`
112
+ 这会生成:`.sce/specs/01-00-user-login/context-export.md`
113
113
 
114
114
  ### 步骤 5:使用 AI 工具
115
115
 
@@ -136,7 +136,7 @@ sce context export 01-00-user-login
136
136
  1. 在代码文件中添加注释:
137
137
  ```javascript
138
138
  // Task 1.1: Implement user login
139
- // See: .kiro/specs/01-00-user-login/design.md
139
+ // See: .sce/specs/01-00-user-login/design.md
140
140
  ```
141
141
 
142
142
  2. Copilot 会根据 Spec 文件生成代码
@@ -302,7 +302,7 @@ sce context export 01-00-user-login --steering --steering-files=CORE_PRINCIPLES.
302
302
 
303
303
  ### 1. 使用 Steering Rules 控制 AI 行为
304
304
 
305
- 创建 `.kiro/steering/CODING_STANDARDS.md`:
305
+ 创建 `.sce/steering/CODING_STANDARDS.md`:
306
306
 
307
307
  ```markdown
308
308
  # 编码规范
@@ -38,7 +38,7 @@ cd your-project
38
38
  sce adopt
39
39
  ```
40
40
 
41
- This creates `.kiro/` directory with:
41
+ This creates `.sce/` directory with:
42
42
  - `README.md` - Project development guide
43
43
  - `steering/` - Development rules
44
44
  - `specs/` - Where Specs will live
@@ -50,7 +50,7 @@ This creates `.kiro/` directory with:
50
50
  **In your AI tool (Cursor, Claude, Windsurf, etc.), say:**
51
51
 
52
52
  ```
53
- Please read .kiro/README.md to understand how this project works.
53
+ Please read .sce/README.md to understand how this project works.
54
54
  ```
55
55
 
56
56
  **Your AI will learn:**
@@ -32,7 +32,7 @@ node bin/scene-capability-engine.js value metrics --help
32
32
  sce value metrics sample --out ./kpi-input.json --json
33
33
  sce value metrics snapshot --input ./kpi-input.json --json
34
34
  node scripts/release-ops-weekly-summary.js --json
35
- node scripts/release-risk-remediation-bundle.js --gate-report .kiro/reports/release-evidence/release-gate.json --json
35
+ node scripts/release-risk-remediation-bundle.js --gate-report .sce/reports/release-evidence/release-gate.json --json
36
36
  ```
37
37
 
38
38
  Expected:
@@ -146,10 +146,10 @@ Ensure:
146
146
  - Optional release-asset 0-byte guard (enabled in workflow by default):
147
147
  - `scripts/release-asset-nonempty-normalize.js` auto-fills placeholder content for optional assets such as `.lines` and `.jsonl` before GitHub Release upload.
148
148
  - Local dry-run example:
149
- - `node scripts/release-asset-nonempty-normalize.js --file .kiro/reports/release-evidence/matrix-remediation-vX.Y.Z.lines --kind lines --note "no matrix remediation items for this release" --dry-run --json`
149
+ - `node scripts/release-asset-nonempty-normalize.js --file .sce/reports/release-evidence/matrix-remediation-vX.Y.Z.lines --kind lines --note "no matrix remediation items for this release" --dry-run --json`
150
150
  - Local normalize example:
151
- - `node scripts/release-asset-nonempty-normalize.js --file .kiro/reports/release-evidence/interactive-matrix-signals-vX.Y.Z.jsonl --kind jsonl --event interactive-matrix-signals --note "No interactive matrix signals collected for this release." --json`
151
+ - `node scripts/release-asset-nonempty-normalize.js --file .sce/reports/release-evidence/interactive-matrix-signals-vX.Y.Z.jsonl --kind jsonl --event interactive-matrix-signals --note "No interactive matrix signals collected for this release." --json`
152
152
  - Optional local dry-run for gate history index artifact:
153
- - `sce auto handoff gate-index --dir .kiro/reports/release-evidence --out .kiro/reports/release-evidence/release-gate-history.json --json`
153
+ - `sce auto handoff gate-index --dir .sce/reports/release-evidence --out .sce/reports/release-evidence/release-gate-history.json --json`
154
154
 
155
155
  Then proceed with your release workflow (tag, push, npm publish, GitHub release).
@@ -0,0 +1,103 @@
1
+ # SCE Business Mode Map
2
+
3
+ This guide defines how SCE should run as the default capability control plane after being integrated into an application system.
4
+
5
+ ## 1. Scope
6
+
7
+ - Applies to integrated business systems that expose UI + AI assistant capabilities.
8
+ - SCE is the default orchestrator for all AI-driven tasks in the host system.
9
+ - Every request is routed by mode, risk, and authorization state before execution.
10
+
11
+ ## 2. Three Operating Modes
12
+
13
+ | Mode | Primary Goal | Typical Actor | Default Execution | Mutating Change Policy | Required Evidence |
14
+ | --- | --- | --- | --- | --- | --- |
15
+ | `user-mode` | Complete business tasks safely | End user | `suggestion` | Block direct apply by default | intent, summary, guidance |
16
+ | `ops-mode` | Maintain system health and fix runtime issues | Operations / support | `suggestion` + guarded `apply` | Allow apply after runtime + authorization + approval gates | plan, work-order, ledger, gate signals |
17
+ | `dev-mode` | Deliver new features and structural changes | Developer / product engineer | `suggestion` + staged `apply` | Require branch-level review and release gates | spec deltas, test evidence, release evidence |
18
+
19
+ ## 3. Default Takeover Principle
20
+
21
+ After SCE integration is enabled:
22
+
23
+ 1. All AI intents must enter SCE first.
24
+ 2. SCE decides route: answer only, generate patch, repair, or rollback.
25
+ 3. Any mutating action must pass governance gates before apply.
26
+ 4. Every apply/rollback must write auditable artifacts.
27
+
28
+ ## 4. Runtime Flow (Default)
29
+
30
+ 1. `intent intake`: capture goal + page/context payload.
31
+ 2. `mode classification`: resolve `user-mode` / `ops-mode` / `dev-mode`.
32
+ 3. `strategy routing`: choose answer-only, patch, repair loop, or rollback.
33
+ 4. `symbol-level evidence`: locate affected files/symbols and build plan.
34
+ 5. `gated execution`: runtime policy + authorization tier + approval gate.
35
+ 6. `execution + audit`: execute or block, then emit summary and evidence.
36
+
37
+ ## 5. Mode Playbooks
38
+
39
+ ### 5.1 user-mode (business usage UI)
40
+
41
+ - UI profile: business-user.
42
+ - Default policy: advice and guided actions only.
43
+ - Apply behavior: denied unless elevated to ops/dev flow explicitly.
44
+ - Recommended command pattern:
45
+
46
+ ```bash
47
+ sce scene interactive-flow \
48
+ --goal "<business-goal>" \
49
+ --ui-mode user-app \
50
+ --dialogue-profile business-user \
51
+ --execution-mode suggestion \
52
+ --json
53
+ ```
54
+
55
+ ### 5.2 ops-mode (maintenance console)
56
+
57
+ - UI profile: system-maintainer.
58
+ - Default policy: allow guarded apply for low/medium risk fixes.
59
+ - Required gates: runtime policy, authorization tier, approval workflow.
60
+ - Recommended command pattern:
61
+
62
+ ```bash
63
+ sce scene interactive-flow \
64
+ --goal "<ops-goal>" \
65
+ --ui-mode ops-console \
66
+ --dialogue-profile system-maintainer \
67
+ --execution-mode apply \
68
+ --runtime-environment staging \
69
+ --auto-execute-low-risk \
70
+ --json
71
+ ```
72
+
73
+ ### 5.3 dev-mode (feature and restructuring)
74
+
75
+ - UI profile: system-maintainer or engineering profile.
76
+ - Default policy: spec-first planning + controlled implementation.
77
+ - Required gates: spec completeness, tests, release preflight evidence.
78
+ - Recommended command pattern:
79
+
80
+ ```bash
81
+ sce auto close-loop-batch <manifest.json> \
82
+ --format json \
83
+ --batch-retry-until-complete \
84
+ --json
85
+ ```
86
+
87
+ ## 6. Security and Authorization Baseline
88
+
89
+ - Password authorization is mandatory for mutating apply mode.
90
+ - Runtime `non-allow` decisions must block unattended apply.
91
+ - Weekly governance gates are mandatory before release.
92
+ - Legacy steering migration must be manually approved before non-migration commands can proceed.
93
+
94
+ See also: `docs/security-governance-default-baseline.md`
95
+
96
+ ## 7. Integration Checklist
97
+
98
+ 1. Map UI surfaces to one of the three modes.
99
+ 2. Wire the AI assistant to call SCE as first-hop router.
100
+ 3. Enable required gate artifacts and audit logs.
101
+ 4. Run weekly governance and release gates.
102
+ 5. Keep capability matrix and ontology mapping updated per release.
103
+
@@ -0,0 +1,94 @@
1
+ # SCE Capability Matrix E2E Example
2
+
3
+ This example shows one complete execution chain:
4
+
5
+ `input -> strategy decision -> symbol evidence -> failure attribution -> capability mapping -> multi-agent summary merge`
6
+
7
+ ## 1) Input and Strategy Decision
8
+
9
+ ```bash
10
+ node scripts/auto-strategy-router.js \
11
+ --input '{"goal_type":"bugfix","requires_write":true,"test_failures":1,"changed_files":1}' \
12
+ --policy-file docs/agent-runtime/strategy-routing-policy-baseline.json \
13
+ --json
14
+ ```
15
+
16
+ Expected decision: `code_fix` with reasons and next actions.
17
+
18
+ ## 2) Symbol Evidence Gate
19
+
20
+ ```bash
21
+ node scripts/symbol-evidence-locate.js \
22
+ --workspace . \
23
+ --query "approve order" \
24
+ --strict \
25
+ --json
26
+ ```
27
+
28
+ Expected:
29
+ - reliable evidence => `fallback_action=allow_write`
30
+ - no reliable evidence => `fallback_action=block_high_risk_write` and exit code `2`
31
+
32
+ ## 3) Failure Attribution and Bounded Repair
33
+
34
+ ```bash
35
+ node scripts/failure-attribution-repair.js \
36
+ --error "Cannot find module @acme/order-core" \
37
+ --attempted-passes 0 \
38
+ --max-repair-passes 1 \
39
+ --tests "npm run test -- order-service" \
40
+ --json
41
+ ```
42
+
43
+ Expected:
44
+ - classification into `Failure_Taxonomy`
45
+ - at most one `run_repair_pass`
46
+ - terminal stop summary when budget is exhausted or category is non-repairable
47
+
48
+ ## 4) Capability Mapping (Template + Ontology)
49
+
50
+ Prepare `mapping-input.json`:
51
+
52
+ ```json
53
+ {
54
+ "changes": [
55
+ { "type": "entity", "name": "Order" },
56
+ { "type": "business_rule", "name": "credit-check" }
57
+ ],
58
+ "templates": [
59
+ { "id": "scene-moqui-order-core", "capabilities": ["entity:order"] }
60
+ ],
61
+ "ontology": {
62
+ "entities": [{ "name": "Order" }],
63
+ "business_rules": []
64
+ }
65
+ }
66
+ ```
67
+
68
+ Run report:
69
+
70
+ ```bash
71
+ node scripts/capability-mapping-report.js \
72
+ --input-file mapping-input.json \
73
+ --json
74
+ ```
75
+
76
+ Expected:
77
+ - `mapping_report[]`
78
+ - `missing_capabilities[]`
79
+ - `recommended_templates[]`
80
+ - `ontology_gaps[]`
81
+
82
+ ## 5) Multi-Agent Merge Summary Contract
83
+
84
+ During `sce orchestrate run`, sub-agent completion is validated against:
85
+
86
+ - `docs/agent-runtime/agent-result-summary-contract.schema.json`
87
+ - `docs/agent-runtime/multi-agent-coordination-policy-baseline.json`
88
+
89
+ If `require_result_summary=true`, merge is blocked when:
90
+ - summary is missing/invalid
91
+ - `tests_passed < tests_run` (when enabled)
92
+ - unresolved conflict issues are reported (when enabled)
93
+
94
+ This enforces summary-driven, auditable merge decisions.
@@ -0,0 +1,48 @@
1
+ # SCE Capability Matrix Roadmap
2
+
3
+ This roadmap consolidates the next capability uplift priorities for SCE and maps each item to concrete deliverables.
4
+
5
+ ## Priority Matrix
6
+
7
+ | Capability | Current State | Gap | Next Deliverables |
8
+ | --- | --- | --- | --- |
9
+ | Task decomposition and strategy selection | `auto close-loop`, `orchestrate`, release gates already exist | Missing explicit machine-readable strategy router for `answer_only/code_change/rollback` | `scripts/auto-strategy-router.js` + baseline policy + command-reference integration |
10
+ | Code retrieval and symbol-level localization | `rg`-style file search is common; orchestration has status tracking | Missing unified symbol locator contract and ranked evidence payload | add `symbol-locate` utility + evidence schema + tests |
11
+ | Failure attribution and self-repair | retry/backoff and recovery loops already exist in multiple flows | Missing normalized root-cause taxonomy and bounded second-pass repair contract | add failure taxonomy schema + first/second-pass repair pipeline adapter |
12
+ | Scene template and ontology mapping | strong scene + ontology stack exists (`scene lint/score/ontology`) | Missing cross-project mapping report from runtime changes to ontology/template assets | add mapping report generator and remediation queue sync |
13
+ | Multi-agent coordination strategy | orchestrator + rate-limit adaptive controls already online | Missing explicit primary/sub-agent role policy and merge-summary contract | baseline policy + required result-summary validation in orchestration path |
14
+
15
+ ## Current Baseline Artifacts (This Iteration)
16
+
17
+ - `scripts/auto-strategy-router.js`
18
+ - `scripts/symbol-evidence-locate.js`
19
+ - `scripts/failure-attribution-repair.js`
20
+ - `scripts/capability-mapping-report.js`
21
+ - `docs/agent-runtime/strategy-routing-policy-baseline.json`
22
+ - `docs/agent-runtime/symbol-evidence.schema.json`
23
+ - `docs/agent-runtime/failure-taxonomy-baseline.json`
24
+ - `docs/agent-runtime/capability-mapping-report.schema.json`
25
+ - `docs/agent-runtime/agent-result-summary-contract.schema.json`
26
+ - `docs/agent-runtime/multi-agent-coordination-policy-baseline.json`
27
+ - `docs/sce-capability-matrix-e2e-example.md`
28
+
29
+ ## Execution Plan
30
+
31
+ 1. Phase 1: Strategy and safety routing
32
+ - ship strategy router and policy file integration in autonomous entrypoints.
33
+ 2. Phase 2: Symbol evidence pipeline
34
+ - provide deterministic `query -> symbols -> evidence` payload for repair and explanation flows.
35
+ 3. Phase 3: Failure attribution and bounded self-repair
36
+ - classify failures, apply one focused patch pass, rerun scoped tests, stop on bounded retries.
37
+ 4. Phase 4: Scene/Ontology cross-project mapping
38
+ - generate actionable mapping deltas from project changes to reusable scene assets.
39
+ 5. Phase 5: Multi-agent merge governance
40
+ - enforce result summary contract and role-based decision merge.
41
+
42
+ ## Success Criteria
43
+
44
+ - Strategy router decision accuracy >= 90% on curated regression fixture set.
45
+ - Symbol localization response includes at least one valid evidence hit for >= 95% supported queries.
46
+ - Self-repair flow reduces unresolved test failures by >= 30% in bounded second-pass runs.
47
+ - Scene/Ontology mapping report generated for every release candidate.
48
+ - Multi-agent runs produce complete role-tagged result summary payloads for 100% completed sub-agents.
@@ -33,17 +33,17 @@ This baseline is the default operating policy for SCE-driven delivery, including
33
33
 
34
34
  ## 4. Mandatory Audit Artifacts
35
35
 
36
- - `.kiro/reports/release-evidence/handoff-runs.json`
37
- - `.kiro/reports/release-evidence/release-gate-history.json`
38
- - `.kiro/reports/release-evidence/governance-snapshot-<tag>.json`
39
- - `.kiro/reports/release-evidence/weekly-ops-summary-<tag>.json`
40
- - `.kiro/reports/interactive-governance-report.json`
41
- - `.kiro/reports/interactive-dialogue-authorization-signals.jsonl`
42
- - `.kiro/reports/interactive-runtime-signals.jsonl`
43
- - `.kiro/reports/interactive-authorization-tier-signals.jsonl`
44
- - `.kiro/reports/interactive-dialogue-governance.json`
45
- - `.kiro/reports/interactive-execution-ledger.jsonl`
46
- - `.kiro/reports/interactive-approval-events.jsonl`
36
+ - `.sce/reports/release-evidence/handoff-runs.json`
37
+ - `.sce/reports/release-evidence/release-gate-history.json`
38
+ - `.sce/reports/release-evidence/governance-snapshot-<tag>.json`
39
+ - `.sce/reports/release-evidence/weekly-ops-summary-<tag>.json`
40
+ - `.sce/reports/interactive-governance-report.json`
41
+ - `.sce/reports/interactive-dialogue-authorization-signals.jsonl`
42
+ - `.sce/reports/interactive-runtime-signals.jsonl`
43
+ - `.sce/reports/interactive-authorization-tier-signals.jsonl`
44
+ - `.sce/reports/interactive-dialogue-governance.json`
45
+ - `.sce/reports/interactive-execution-ledger.jsonl`
46
+ - `.sce/reports/interactive-approval-events.jsonl`
47
47
 
48
48
  ## 5. Weekly Control Loop
49
49
 
@@ -51,7 +51,7 @@ This baseline is the default operating policy for SCE-driven delivery, including
51
51
  node scripts/interactive-governance-report.js --period weekly --fail-on-alert --json
52
52
  node scripts/release-ops-weekly-summary.js --json
53
53
  node scripts/release-weekly-ops-gate.js
54
- node scripts/release-risk-remediation-bundle.js --gate-report .kiro/reports/release-evidence/release-gate.json --json
54
+ node scripts/release-risk-remediation-bundle.js --gate-report .sce/reports/release-evidence/release-gate.json --json
55
55
  node scripts/release-asset-integrity-check.js
56
56
  ```
57
57
 
@@ -71,7 +71,7 @@ sce collab assign session-manager SCE-3
71
71
 
72
72
  ### 4. Define Interface Contracts
73
73
 
74
- Create an interface contract for a Spec (in `.kiro/specs/{spec-name}/interfaces/`):
74
+ Create an interface contract for a Spec (in `.sce/specs/{spec-name}/interfaces/`):
75
75
 
76
76
  ```json
77
77
  {
@@ -306,7 +306,7 @@ When you need to make breaking changes to an interface:
306
306
 
307
307
  ### Custom Integration Tests
308
308
 
309
- Create integration tests in `.kiro/specs/{master-spec}/integration-tests/`:
309
+ Create integration tests in `.sce/specs/{master-spec}/integration-tests/`:
310
310
 
311
311
  ```javascript
312
312
  module.exports = {
@@ -332,7 +332,7 @@ module.exports = {
332
332
 
333
333
  ## Metadata File Format
334
334
 
335
- Collaboration metadata is stored in `.kiro/specs/{spec-name}/collaboration.json`:
335
+ Collaboration metadata is stored in `.sce/specs/{spec-name}/collaboration.json`:
336
336
 
337
337
  ```json
338
338
  {
@@ -174,7 +174,7 @@ sce lock acquire quick-fix --timeout 2 # 2 hours
174
174
 
175
175
  ### Machine ID Storage
176
176
 
177
- Machine IDs are stored in `.kiro/config/machine-id.json` and are automatically generated on first use.
177
+ Machine IDs are stored in `.sce/config/machine-id.json` and are automatically generated on first use.
178
178
 
179
179
  ## Troubleshooting
180
180
 
@@ -202,7 +202,7 @@ Consider adding this to your CI/CD pipeline or team workflow.
202
202
 
203
203
  ## File Format
204
204
 
205
- Lock files are stored as `.kiro/specs/<spec-name>/.lock` with JSON format:
205
+ Lock files are stored as `.sce/specs/<spec-name>/.lock` with JSON format:
206
206
 
207
207
  ```json
208
208
  {
@@ -254,7 +254,7 @@ Response: { ... }
254
254
  sce spec bootstrap --name 01-00-user-login --non-interactive
255
255
  ```
256
256
 
257
- **2. Write Requirements** (`.kiro/specs/01-00-user-login/requirements.md`):
257
+ **2. Write Requirements** (`.sce/specs/01-00-user-login/requirements.md`):
258
258
  ```markdown
259
259
  # User Login
260
260
 
@@ -266,7 +266,7 @@ sce spec bootstrap --name 01-00-user-login --non-interactive
266
266
  - WHEN user enters invalid credentials THEN they see an error
267
267
  ```
268
268
 
269
- **3. Write Design** (`.kiro/specs/01-00-user-login/design.md`):
269
+ **3. Write Design** (`.sce/specs/01-00-user-login/design.md`):
270
270
  ```markdown
271
271
  # User Login - Design
272
272
 
@@ -281,7 +281,7 @@ Response: { token } or { error }
281
281
  - UserRepository - database access
282
282
  ```
283
283
 
284
- **4. Write Tasks** (`.kiro/specs/01-00-user-login/tasks.md`):
284
+ **4. Write Tasks** (`.sce/specs/01-00-user-login/tasks.md`):
285
285
  ```markdown
286
286
  - [ ] 1.1 Create AuthController
287
287
  - [ ] 1.2 Create AuthService
@@ -44,7 +44,7 @@ node scripts/release-ops-weekly-summary.js --json
44
44
 
45
45
  ## Default Evidence Set
46
46
 
47
- - `.kiro/reports/release-evidence/handoff-runs.json`
48
- - `.kiro/reports/release-evidence/release-gate-history.json`
49
- - `.kiro/reports/release-evidence/governance-snapshot-<tag>.json`
50
- - `.kiro/reports/release-evidence/weekly-ops-summary-<tag>.json`
47
+ - `.sce/reports/release-evidence/handoff-runs.json`
48
+ - `.sce/reports/release-evidence/release-gate-history.json`
49
+ - `.sce/reports/release-evidence/governance-snapshot-<tag>.json`
50
+ - `.sce/reports/release-evidence/weekly-ops-summary-<tag>.json`
@@ -5,8 +5,8 @@
5
5
  {
6
6
  "id": "60-10-example-capability-spec",
7
7
  "status": "completed",
8
- "scene_package": ".kiro/specs/60-10-example-capability-spec/custom/scene-package.json",
9
- "scene_manifest": ".kiro/specs/60-10-example-capability-spec/custom/scene.yaml"
8
+ "scene_package": ".sce/specs/60-10-example-capability-spec/custom/scene-package.json",
9
+ "scene_manifest": ".sce/specs/60-10-example-capability-spec/custom/scene.yaml"
10
10
  }
11
11
  ],
12
12
  "templates": [
@@ -25,7 +25,7 @@ jobs:
25
25
  run: |
26
26
  set -euo pipefail
27
27
  TAG="${GITHUB_REF_NAME}"
28
- NOTES_DIR=".kiro/reports/release-evidence"
28
+ NOTES_DIR=".sce/reports/release-evidence"
29
29
  mkdir -p "${NOTES_DIR}"
30
30
 
31
31
  node scripts/release-ops-weekly-summary.js \