scene-capability-engine 3.3.5 → 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 (241) hide show
  1. package/CHANGELOG.md +130 -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 +4 -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/architecture.md +13 -13
  13. package/docs/articles/ai-driven-development-philosophy-and-practice.en.md +3 -3
  14. package/docs/articles/ai-driven-development-philosophy-and-practice.md +3 -3
  15. package/docs/autonomous-control-guide.md +35 -35
  16. package/docs/command-reference.md +192 -153
  17. package/docs/cross-tool-guide.md +7 -7
  18. package/docs/developer-guide.md +8 -8
  19. package/docs/document-governance.md +15 -15
  20. package/docs/environment-management-guide.md +6 -6
  21. package/docs/examples/add-export-command/design.md +1 -1
  22. package/docs/faq.md +13 -13
  23. package/docs/handoff-profile-integration-guide.md +3 -3
  24. package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.json +7 -7
  25. package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.md +1 -1
  26. package/docs/integration-modes.md +12 -12
  27. package/docs/integration-philosophy.md +11 -11
  28. package/docs/interactive-customization/331-poc-sce-integration-checklist.md +24 -24
  29. package/docs/interactive-customization/README.md +43 -43
  30. package/docs/interactive-customization/business-mode-policy-baseline.json +33 -0
  31. package/docs/interactive-customization/dual-ui-mode-integration-guide.md +1 -1
  32. package/docs/interactive-customization/moqui-adapter-interface.md +2 -2
  33. package/docs/interactive-customization/moqui-copilot-integration-guide.md +1 -1
  34. package/docs/interactive-customization/moqui-interactive-template-playbook.md +4 -4
  35. package/docs/interactive-customization/phase-acceptance-evidence.md +2 -2
  36. package/docs/knowledge-management-guide.md +6 -6
  37. package/docs/manual-workflows-guide.md +4 -4
  38. package/docs/moqui-capability-matrix.md +3 -3
  39. package/docs/moqui-standard-rebuild-guide.md +8 -8
  40. package/docs/moqui-template-core-library-playbook.md +27 -27
  41. package/docs/multi-agent-coordination-guide.md +19 -19
  42. package/docs/multi-repo-management-guide.md +17 -17
  43. package/docs/quick-start-with-ai-tools.md +7 -7
  44. package/docs/quick-start.md +2 -2
  45. package/docs/release-checklist.md +4 -4
  46. package/docs/sce-business-mode-map.md +103 -0
  47. package/docs/security-governance-default-baseline.md +12 -12
  48. package/docs/spec-collaboration-guide.md +3 -3
  49. package/docs/spec-locking-guide.md +2 -2
  50. package/docs/spec-workflow.md +3 -3
  51. package/docs/starter-kit/README.md +4 -4
  52. package/docs/starter-kit/handoff-manifest.starter.json +2 -2
  53. package/docs/starter-kit/release.workflow.sample.yml +1 -1
  54. package/docs/steering-strategy-guide.md +15 -15
  55. package/docs/team-collaboration-guide.md +69 -69
  56. package/docs/testing-strategy.md +2 -2
  57. package/docs/tools/claude-guide.md +14 -4
  58. package/docs/tools/cursor-guide.md +14 -14
  59. package/docs/tools/generic-guide.md +9 -9
  60. package/docs/tools/kiro-guide.md +4 -4
  61. package/docs/tools/vscode-guide.md +13 -13
  62. package/docs/tools/windsurf-guide.md +6 -6
  63. package/docs/troubleshooting.md +22 -22
  64. package/docs/upgrade-guide.md +8 -8
  65. package/docs/value-observability-guide.md +3 -3
  66. package/docs/zh/README.md +6 -0
  67. package/docs/zh/quick-start.md +15 -15
  68. package/docs/zh/release-checklist.md +3 -3
  69. package/docs/zh/tools/claude-guide.md +16 -6
  70. package/docs/zh/tools/cursor-guide.md +11 -11
  71. package/docs/zh/tools/generic-guide.md +13 -13
  72. package/docs/zh/tools/kiro-guide.md +2 -2
  73. package/docs/zh/tools/vscode-guide.md +11 -11
  74. package/docs/zh/tools/windsurf-guide.md +11 -11
  75. package/docs/zh/value-observability-guide.md +3 -3
  76. package/lib/adoption/adoption-logger.js +1 -1
  77. package/lib/adoption/adoption-strategy.js +28 -28
  78. package/lib/adoption/backup-manager.js +3 -3
  79. package/lib/adoption/conflict-resolver.js +2 -2
  80. package/lib/adoption/detection-engine.js +8 -8
  81. package/lib/adoption/error-formatter.js +4 -4
  82. package/lib/adoption/file-classifier.js +6 -6
  83. package/lib/adoption/progress-reporter.js +1 -1
  84. package/lib/adoption/smart-orchestrator.js +10 -10
  85. package/lib/adoption/strategy-selector.js +6 -6
  86. package/lib/adoption/summary-generator.js +1 -1
  87. package/lib/adoption/template-sync.js +8 -8
  88. package/lib/auto/autonomous-engine.js +7 -7
  89. package/lib/auto/checkpoint-manager.js +1 -1
  90. package/lib/auto/close-loop-runner.js +12 -12
  91. package/lib/auto/error-recovery-manager.js +1 -1
  92. package/lib/auto/goal-decomposer.js +1 -1
  93. package/lib/auto/moqui-recovery-sequence.js +2 -2
  94. package/lib/auto/progress-tracker.js +1 -1
  95. package/lib/auto/state-manager.js +1 -1
  96. package/lib/backup/backup-system.js +10 -10
  97. package/lib/backup/selective-backup.js +4 -4
  98. package/lib/collab/agent-registry.js +2 -2
  99. package/lib/collab/contract-manager.js +1 -1
  100. package/lib/collab/coordinator.js +2 -2
  101. package/lib/collab/dependency-manager.js +1 -1
  102. package/lib/collab/integration-manager.js +1 -1
  103. package/lib/collab/metadata-manager.js +1 -1
  104. package/lib/collab/multi-agent-config.js +2 -2
  105. package/lib/collab/spec-lifecycle-manager.js +2 -2
  106. package/lib/collab/visualizer.js +1 -1
  107. package/lib/commands/adopt.js +6 -6
  108. package/lib/commands/auto.js +56 -56
  109. package/lib/commands/collab.js +2 -2
  110. package/lib/commands/docs.js +3 -3
  111. package/lib/commands/doctor.js +1 -1
  112. package/lib/commands/knowledge.js +2 -2
  113. package/lib/commands/lock.js +1 -1
  114. package/lib/commands/ops.js +1 -1
  115. package/lib/commands/orchestrate.js +3 -3
  116. package/lib/commands/rollback.js +1 -1
  117. package/lib/commands/scene.js +135 -93
  118. package/lib/commands/session.js +139 -0
  119. package/lib/commands/spec-bootstrap.js +1 -1
  120. package/lib/commands/spec-gate.js +2 -2
  121. package/lib/commands/spec-pipeline.js +1 -1
  122. package/lib/commands/status.js +4 -4
  123. package/lib/commands/steering.js +119 -0
  124. package/lib/commands/value.js +1 -1
  125. package/lib/commands/watch.js +9 -9
  126. package/lib/commands/workspace-multi.js +1 -1
  127. package/lib/context/context-exporter.js +5 -7
  128. package/lib/context/prompt-generator.js +2 -2
  129. package/lib/environment/backup-system.js +1 -1
  130. package/lib/environment/environment-manager.js +2 -2
  131. package/lib/gitignore/gitignore-backup.js +3 -3
  132. package/lib/gitignore/gitignore-detector.js +13 -13
  133. package/lib/gitignore/gitignore-integration.js +3 -3
  134. package/lib/gitignore/gitignore-transformer.js +4 -4
  135. package/lib/gitignore/layered-rules-template.js +16 -16
  136. package/lib/governance/config-manager.js +1 -1
  137. package/lib/governance/doc-reference-checker.js +4 -4
  138. package/lib/governance/execution-logger.js +1 -1
  139. package/lib/governance/file-scanner.js +3 -3
  140. package/lib/interactive-customization/moqui-interactive-adapter.js +2 -2
  141. package/lib/knowledge/knowledge-manager.js +1 -1
  142. package/lib/lock/lock-manager.js +2 -2
  143. package/lib/lock/steering-file-lock.js +5 -5
  144. package/lib/lock/task-lock-manager.js +3 -3
  145. package/lib/operations/audit-logger.js +1 -1
  146. package/lib/operations/feedback-manager.js +1 -1
  147. package/lib/operations/operations-manager.js +3 -3
  148. package/lib/operations/permission-manager.js +2 -2
  149. package/lib/operations/template-loader.js +1 -1
  150. package/lib/orchestrator/agent-spawner.js +27 -2
  151. package/lib/orchestrator/bootstrap-prompt-builder.js +6 -6
  152. package/lib/orchestrator/orchestration-engine.js +1 -1
  153. package/lib/orchestrator/orchestrator-config.js +2 -2
  154. package/lib/repo/config-manager.js +3 -3
  155. package/lib/repo/handlers/init-handler.js +1 -1
  156. package/lib/repo/repo-manager.js +2 -2
  157. package/lib/runtime/business-mode-resolver.js +240 -0
  158. package/lib/runtime/session-store.js +207 -0
  159. package/lib/runtime/steering-contract.js +338 -0
  160. package/lib/scene-runtime/audit-emitter.js +1 -1
  161. package/lib/scene-runtime/binding-plugin-loader.js +3 -3
  162. package/lib/scene-runtime/eval-bridge.js +1 -1
  163. package/lib/scene-runtime/index.js +1 -1
  164. package/lib/scene-runtime/moqui-extractor.js +1 -1
  165. package/lib/scene-runtime/plan-compiler.js +1 -1
  166. package/lib/scene-runtime/policy-gate.js +1 -1
  167. package/lib/scene-runtime/runtime-executor.js +1 -1
  168. package/lib/scene-runtime/scene-loader.js +1 -1
  169. package/lib/spec/bootstrap/context-collector.js +1 -1
  170. package/lib/spec/pipeline/stage-adapters.js +3 -3
  171. package/lib/spec/pipeline/state-store.js +1 -1
  172. package/lib/spec-gate/policy/policy-loader.js +1 -1
  173. package/lib/spec-gate/rules/default-rules.js +6 -6
  174. package/lib/steering/adoption-config.js +1 -1
  175. package/lib/steering/compliance-error-reporter.js +3 -3
  176. package/lib/steering/context-sync-manager.js +2 -2
  177. package/lib/steering/index.js +1 -1
  178. package/lib/steering/spec-steering.js +2 -2
  179. package/lib/steering/steering-compliance-checker.js +1 -1
  180. package/lib/steering/steering-loader.js +4 -5
  181. package/lib/steering/steering-manager.js +4 -4
  182. package/lib/task/task-claimer.js +5 -5
  183. package/lib/task/task-status-store.js +2 -2
  184. package/lib/templates/content-generalizer.js +1 -1
  185. package/lib/templates/spec-reader.js +2 -2
  186. package/lib/templates/template-creator.js +1 -1
  187. package/lib/templates/template-exporter.js +3 -3
  188. package/lib/templates/template-manager.js +1 -1
  189. package/lib/upgrade/migration-engine.js +3 -3
  190. package/lib/upgrade/migrations/1.0.0-to-1.1.0.js +1 -1
  191. package/lib/utils/file-diff.js +6 -6
  192. package/lib/utils/tool-detector.js +10 -10
  193. package/lib/utils/validation.js +5 -5
  194. package/lib/value/metric-contract-loader.js +1 -1
  195. package/lib/version/version-manager.js +1 -1
  196. package/lib/watch/execution-logger.js +1 -1
  197. package/lib/watch/presets.js +8 -8
  198. package/lib/watch/watch-manager.js +2 -2
  199. package/lib/workspace/legacy-kiro-migrator.js +275 -0
  200. package/lib/workspace/multi/workspace-context-resolver.js +2 -2
  201. package/lib/workspace/multi/workspace-registry.js +2 -2
  202. package/lib/workspace/multi/workspace-state-manager.js +3 -3
  203. package/lib/workspace/workspace-manager.js +1 -1
  204. package/lib/workspace/workspace-sync.js +2 -2
  205. package/locales/en.json +4 -4
  206. package/locales/zh.json +4 -4
  207. package/package.json +9 -9
  208. package/template/{.kiro → .sce}/README.md +15 -15
  209. package/template/{.kiro → .sce}/hooks/check-spec-on-create.kiro.hook +2 -2
  210. package/template/{.kiro → .sce}/steering/CORE_PRINCIPLES.md +4 -4
  211. package/template/{.kiro → .sce}/steering/CURRENT_CONTEXT.md +1 -1
  212. package/template/{.kiro → .sce}/steering/ENVIRONMENT.md +3 -3
  213. package/template/{.kiro → .sce}/tools/backup_manager.py +3 -3
  214. package/template/{.kiro → .sce}/tools/configuration_manager.py +1 -1
  215. package/template/README.md +12 -12
  216. /package/template/{.kiro → .sce}/hooks/run-tests-on-save.kiro.hook +0 -0
  217. /package/template/{.kiro → .sce}/hooks/sync-tasks-on-edit.kiro.hook +0 -0
  218. /package/template/{.kiro → .sce}/specs/SPEC_WORKFLOW_GUIDE.md +0 -0
  219. /package/template/{.kiro → .sce}/steering/RULES_GUIDE.md +0 -0
  220. /package/template/{.kiro → .sce}/templates/operations/default/change-impact.md +0 -0
  221. /package/template/{.kiro → .sce}/templates/operations/default/deployment.md +0 -0
  222. /package/template/{.kiro → .sce}/templates/operations/default/feedback-response.md +0 -0
  223. /package/template/{.kiro → .sce}/templates/operations/default/migration-plan.md +0 -0
  224. /package/template/{.kiro → .sce}/templates/operations/default/monitoring.md +0 -0
  225. /package/template/{.kiro → .sce}/templates/operations/default/operations.md +0 -0
  226. /package/template/{.kiro → .sce}/templates/operations/default/rollback.md +0 -0
  227. /package/template/{.kiro → .sce}/templates/operations/default/tools.yaml +0 -0
  228. /package/template/{.kiro → .sce}/templates/operations/default/troubleshooting.md +0 -0
  229. /package/template/{.kiro → .sce}/tools/document_evaluator.py +0 -0
  230. /package/template/{.kiro → .sce}/tools/enhancement_logger.py +0 -0
  231. /package/template/{.kiro → .sce}/tools/error_handler.py +0 -0
  232. /package/template/{.kiro → .sce}/tools/improvement_identifier.py +0 -0
  233. /package/template/{.kiro → .sce}/tools/modification_applicator.py +0 -0
  234. /package/template/{.kiro → .sce}/tools/quality_gate_enforcer.py +0 -0
  235. /package/template/{.kiro → .sce}/tools/quality_scorer.py +0 -0
  236. /package/template/{.kiro → .sce}/tools/report_generator.py +0 -0
  237. /package/template/{.kiro → .sce}/tools/ultrawork_enhancer.py +0 -0
  238. /package/template/{.kiro → .sce}/tools/ultrawork_enhancer_refactored.py +0 -0
  239. /package/template/{.kiro → .sce}/tools/ultrawork_enhancer_v2.py +0 -0
  240. /package/template/{.kiro → .sce}/tools/ultrawork_enhancer_v3.py +0 -0
  241. /package/template/{.kiro → .sce}/tools/workflow_quality_gate.py +0 -0
@@ -295,19 +295,19 @@ class SmartOrchestrator {
295
295
  if (mode === 'fresh') {
296
296
  // Fresh adoption - create everything
297
297
  plan.changes.created = [
298
- '.kiro/',
299
- '.kiro/specs/',
300
- '.kiro/steering/',
301
- '.kiro/tools/',
302
- '.kiro/backups/',
303
- ...templateFiles.map(f => `.kiro/${f}`),
304
- '.kiro/version.json'
298
+ '.sce/',
299
+ '.sce/specs/',
300
+ '.sce/steering/',
301
+ '.sce/tools/',
302
+ '.sce/backups/',
303
+ ...templateFiles.map(f => `.sce/${f}`),
304
+ '.sce/version.json'
305
305
  ];
306
306
  plan.requiresBackup = false;
307
307
 
308
308
  } else if (mode === 'smart-adopt' || mode === 'smart-update') {
309
309
  // Check which template files exist and differ
310
- const kiroPath = path.join(projectPath, '.kiro');
310
+ const kiroPath = path.join(projectPath, '.sce');
311
311
 
312
312
  for (const templateFile of templateFiles) {
313
313
  const filePath = path.join(kiroPath, templateFile);
@@ -316,10 +316,10 @@ class SmartOrchestrator {
316
316
  if (await fs.pathExists(filePath)) {
317
317
  // File exists - will be updated
318
318
  plan.filesToModify.push(templateFile);
319
- plan.changes.updated.push(`.kiro/${templateFile}`);
319
+ plan.changes.updated.push(`.sce/${templateFile}`);
320
320
  } else {
321
321
  // File doesn't exist - will be created
322
- plan.changes.created.push(`.kiro/${templateFile}`);
322
+ plan.changes.created.push(`.sce/${templateFile}`);
323
323
  }
324
324
  }
325
325
 
@@ -19,7 +19,7 @@ const VersionManager = require('../version/version-manager');
19
19
  * Adoption modes
20
20
  */
21
21
  const AdoptionMode = {
22
- FRESH: 'fresh', // No .kiro/ directory - create new
22
+ FRESH: 'fresh', // No .sce/ directory - create new
23
23
  SKIP: 'skip', // Already at latest version - no action
24
24
  SMART_UPDATE: 'smart-update', // Older version - update templates only
25
25
  WARNING: 'warning', // Newer version - warn user
@@ -61,7 +61,7 @@ class StrategySelector {
61
61
  * @returns {Promise<ProjectState>} - Comprehensive project state
62
62
  */
63
63
  async detectProjectState(projectPath) {
64
- const kiroPath = path.join(projectPath, '.kiro');
64
+ const kiroPath = path.join(projectPath, '.sce');
65
65
  const versionPath = path.join(kiroPath, 'version.json');
66
66
  const specsPath = path.join(kiroPath, 'specs');
67
67
  const steeringPath = path.join(kiroPath, 'steering');
@@ -140,12 +140,12 @@ class StrategySelector {
140
140
  * @returns {string} - Adoption mode (one of AdoptionMode values)
141
141
  */
142
142
  selectMode(state) {
143
- // No .kiro/ directory - fresh adoption
143
+ // No .sce/ directory - fresh adoption
144
144
  if (!state.hasKiroDir) {
145
145
  return AdoptionMode.FRESH;
146
146
  }
147
147
 
148
- // Has .kiro/ but no version file or no current version - smart adopt
148
+ // Has .sce/ but no version file or no current version - smart adopt
149
149
  if (!state.hasVersionFile || !state.currentVersion) {
150
150
  return AdoptionMode.SMART_ADOPT;
151
151
  }
@@ -191,11 +191,11 @@ class StrategySelector {
191
191
  */
192
192
  getModeDescription(mode) {
193
193
  const descriptions = {
194
- [AdoptionMode.FRESH]: 'Fresh Adoption - Creating new .kiro/ structure',
194
+ [AdoptionMode.FRESH]: 'Fresh Adoption - Creating new .sce/ structure',
195
195
  [AdoptionMode.SKIP]: 'Already Up-to-Date - No changes needed',
196
196
  [AdoptionMode.SMART_UPDATE]: 'Smart Update - Updating template files to latest version',
197
197
  [AdoptionMode.WARNING]: 'Version Warning - Project version is newer than sce version',
198
- [AdoptionMode.SMART_ADOPT]: 'Smart Adoption - Adopting existing .kiro/ directory'
198
+ [AdoptionMode.SMART_ADOPT]: 'Smart Adoption - Adopting existing .sce/ directory'
199
199
  };
200
200
 
201
201
  return descriptions[mode] || `Unknown mode: ${mode}`;
@@ -393,7 +393,7 @@ class SummaryGenerator {
393
393
  // Mode-specific suggestions
394
394
  switch (mode) {
395
395
  case 'fresh':
396
- steps.push('Review the created .kiro/ structure');
396
+ steps.push('Review the created .sce/ structure');
397
397
  steps.push('Customize CURRENT_CONTEXT.md for your project');
398
398
  steps.push('Start creating your first spec with: sce spec create');
399
399
  break;
@@ -22,7 +22,7 @@ class TemplateSync {
22
22
  constructor() {
23
23
  this.fileClassifier = new FileClassifier();
24
24
 
25
- // Template files to sync (relative to .kiro/)
25
+ // Template files to sync (relative to .sce/)
26
26
  this.templateFiles = [
27
27
  'steering/CORE_PRINCIPLES.md',
28
28
  'steering/ENVIRONMENT.md',
@@ -56,7 +56,7 @@ class TemplateSync {
56
56
  errors: [] // Files that couldn't be compared
57
57
  };
58
58
 
59
- const kiroPath = path.join(projectPath, '.kiro');
59
+ const kiroPath = path.join(projectPath, '.sce');
60
60
 
61
61
  for (const templateFile of this.templateFiles) {
62
62
  try {
@@ -273,7 +273,7 @@ class TemplateSync {
273
273
  /**
274
274
  * Check if a file should be preserved
275
275
  *
276
- * @param {string} filePath - File path relative to .kiro/
276
+ * @param {string} filePath - File path relative to .sce/
277
277
  * @returns {boolean} True if file should be preserved
278
278
  */
279
279
  shouldPreserve(filePath) {
@@ -320,7 +320,7 @@ class TemplateSync {
320
320
 
321
321
  const synced = [];
322
322
  const errors = [];
323
- const kiroPath = path.join(projectPath, '.kiro');
323
+ const kiroPath = path.join(projectPath, '.sce');
324
324
 
325
325
  // Sync missing files
326
326
  for (const missing of report.differences.missing) {
@@ -554,7 +554,7 @@ class TemplateSync {
554
554
  /**
555
555
  * Add template file to sync list
556
556
  *
557
- * @param {string} filePath - File path relative to .kiro/
557
+ * @param {string} filePath - File path relative to .sce/
558
558
  */
559
559
  addTemplateFile(filePath) {
560
560
  const normalized = this.normalizeFilePath(filePath);
@@ -566,7 +566,7 @@ class TemplateSync {
566
566
  /**
567
567
  * Remove template file from sync list
568
568
  *
569
- * @param {string} filePath - File path relative to .kiro/
569
+ * @param {string} filePath - File path relative to .sce/
570
570
  */
571
571
  removeTemplateFile(filePath) {
572
572
  const normalized = this.normalizeFilePath(filePath);
@@ -579,7 +579,7 @@ class TemplateSync {
579
579
  /**
580
580
  * Add file to preserve list
581
581
  *
582
- * @param {string} filePath - File path relative to .kiro/
582
+ * @param {string} filePath - File path relative to .sce/
583
583
  */
584
584
  addPreservedFile(filePath) {
585
585
  const normalized = this.normalizeFilePath(filePath);
@@ -591,7 +591,7 @@ class TemplateSync {
591
591
  /**
592
592
  * Remove file from preserve list
593
593
  *
594
- * @param {string} filePath - File path relative to .kiro/
594
+ * @param {string} filePath - File path relative to .sce/
595
595
  */
596
596
  removePreservedFile(filePath) {
597
597
  const normalized = this.normalizeFilePath(filePath);
@@ -68,10 +68,10 @@ class AutonomousEngine {
68
68
  async verifyCoreCompliance() {
69
69
  const fs = require('fs-extra');
70
70
 
71
- // Check for .kiro directory (接管标志)
72
- const kiroDir = path.join(process.cwd(), '.kiro');
71
+ // Check for .sce directory (接管标志)
72
+ const kiroDir = path.join(process.cwd(), '.sce');
73
73
  if (!await fs.pathExists(kiroDir)) {
74
- throw new Error('CORE_PRINCIPLES violation: .kiro directory not found. Project not adopted by sce.');
74
+ throw new Error('CORE_PRINCIPLES violation: .sce directory not found. Project not adopted by sce.');
75
75
  }
76
76
 
77
77
  // Check for version.json
@@ -159,7 +159,7 @@ class AutonomousEngine {
159
159
  * Execute task queue
160
160
  */
161
161
  async executeTaskQueue() {
162
- const tasksFile = path.join(process.cwd(), '.kiro', 'specs', this.specName, 'tasks.md');
162
+ const tasksFile = path.join(process.cwd(), '.sce', 'specs', this.specName, 'tasks.md');
163
163
  await this.taskQueue.loadTasks(tasksFile);
164
164
 
165
165
  const queueStatus = this.taskQueue.getQueueStatus();
@@ -393,7 +393,7 @@ class AutonomousEngine {
393
393
  await this.progress.updateProgress('requirements', 0);
394
394
 
395
395
  // Check safety for file write
396
- const reqPath = path.join(process.cwd(), '.kiro', 'specs', this.specName, 'requirements.md');
396
+ const reqPath = path.join(process.cwd(), '.sce', 'specs', this.specName, 'requirements.md');
397
397
  const safetyCheck = await this.safety.checkOperation('file-write', { filePath: reqPath });
398
398
 
399
399
  if (!safetyCheck.allowed) {
@@ -420,7 +420,7 @@ class AutonomousEngine {
420
420
  await this.progress.updateProgress('design', 0);
421
421
 
422
422
  // Check safety for file write
423
- const designPath = path.join(process.cwd(), '.kiro', 'specs', this.specName, 'design.md');
423
+ const designPath = path.join(process.cwd(), '.sce', 'specs', this.specName, 'design.md');
424
424
  const safetyCheck = await this.safety.checkOperation('file-write', { filePath: designPath });
425
425
 
426
426
  if (!safetyCheck.allowed) {
@@ -447,7 +447,7 @@ class AutonomousEngine {
447
447
  await this.progress.updateProgress('tasks', 0);
448
448
 
449
449
  // Check safety for file write
450
- const tasksPath = path.join(process.cwd(), '.kiro', 'specs', this.specName, 'tasks.md');
450
+ const tasksPath = path.join(process.cwd(), '.sce', 'specs', this.specName, 'tasks.md');
451
451
  const safetyCheck = await this.safety.checkOperation('file-write', { filePath: tasksPath });
452
452
 
453
453
  if (!safetyCheck.allowed) {
@@ -19,7 +19,7 @@ const CHECKPOINT_TYPES = {
19
19
  class CheckpointManager {
20
20
  constructor(config = {}) {
21
21
  this.config = config;
22
- this.checkpointDir = path.join(process.cwd(), '.kiro', 'auto', 'checkpoints');
22
+ this.checkpointDir = path.join(process.cwd(), '.sce', 'auto', 'checkpoints');
23
23
  this.checkpoints = [];
24
24
  this.maxCheckpoints = 5;
25
25
  }
@@ -9,7 +9,7 @@ const { decomposeGoalToSpecPortfolio } = require('./goal-decomposer');
9
9
  const { getAgentHints } = require('../scene-runtime/scene-ontology');
10
10
 
11
11
  const CLOSE_LOOP_STRATEGY_MEMORY_VERSION = 1;
12
- const CLOSE_LOOP_STRATEGY_MEMORY_FILE = path.join('.kiro', 'auto', 'close-loop-strategy-memory.json');
12
+ const CLOSE_LOOP_STRATEGY_MEMORY_FILE = path.join('.sce', 'auto', 'close-loop-strategy-memory.json');
13
13
  const RISK_LEVEL_ORDER = {
14
14
  low: 1,
15
15
  medium: 2,
@@ -368,7 +368,7 @@ function sanitizeSessionId(value) {
368
368
  }
369
369
 
370
370
  function getCloseLoopSessionDir(projectPath) {
371
- return path.join(projectPath, '.kiro', 'auto', 'close-loop-sessions');
371
+ return path.join(projectPath, '.sce', 'auto', 'close-loop-sessions');
372
372
  }
373
373
 
374
374
  async function resolveCloseLoopSession(projectPath, resumeRef) {
@@ -564,7 +564,7 @@ function resolveAssignmentsFromSession(sessionData, masterSpec, subSpecs) {
564
564
  async function ensureExistingSpecs(projectPath, specNames) {
565
565
  const missing = [];
566
566
  for (const specName of specNames) {
567
- const specPath = path.join(projectPath, '.kiro', 'specs', specName);
567
+ const specPath = path.join(projectPath, '.sce', 'specs', specName);
568
568
  if (!(await fs.pathExists(specPath))) {
569
569
  missing.push(specName);
570
570
  }
@@ -1396,7 +1396,7 @@ function buildRemediationAssignments(existingAssignments, remediationSpecs) {
1396
1396
  }
1397
1397
 
1398
1398
  async function writeSingleSubSpecDocuments(projectPath, goal, subSpec) {
1399
- const subPath = path.join(projectPath, '.kiro', 'specs', subSpec.name);
1399
+ const subPath = path.join(projectPath, '.sce', 'specs', subSpec.name);
1400
1400
  await fs.ensureDir(subPath);
1401
1401
  await fs.writeFile(path.join(subPath, 'requirements.md'), buildSubRequirements(goal, subSpec), 'utf8');
1402
1402
  await fs.writeFile(path.join(subPath, 'design.md'), buildSubDesign(subSpec), 'utf8');
@@ -1421,7 +1421,7 @@ function escapeRegex(value) {
1421
1421
 
1422
1422
  async function ensureSpecDirectoriesAreAvailable(projectPath, specs) {
1423
1423
  for (const spec of specs) {
1424
- const specPath = path.join(projectPath, '.kiro', 'specs', spec.name);
1424
+ const specPath = path.join(projectPath, '.sce', 'specs', spec.name);
1425
1425
  if (await fs.pathExists(specPath)) {
1426
1426
  throw new Error(`Spec already exists: ${spec.name}. Use --prefix to select a new portfolio number.`);
1427
1427
  }
@@ -1429,14 +1429,14 @@ async function ensureSpecDirectoriesAreAvailable(projectPath, specs) {
1429
1429
  }
1430
1430
 
1431
1431
  async function writeSpecDocuments(projectPath, decomposition) {
1432
- const masterPath = path.join(projectPath, '.kiro', 'specs', decomposition.masterSpec.name);
1432
+ const masterPath = path.join(projectPath, '.sce', 'specs', decomposition.masterSpec.name);
1433
1433
  await fs.ensureDir(masterPath);
1434
1434
  await fs.writeFile(path.join(masterPath, 'requirements.md'), buildMasterRequirements(decomposition), 'utf8');
1435
1435
  await fs.writeFile(path.join(masterPath, 'design.md'), buildMasterDesign(decomposition), 'utf8');
1436
1436
  await fs.writeFile(path.join(masterPath, 'tasks.md'), buildMasterTasks(decomposition), 'utf8');
1437
1437
 
1438
1438
  for (const subSpec of decomposition.subSpecs) {
1439
- const subPath = path.join(projectPath, '.kiro', 'specs', subSpec.name);
1439
+ const subPath = path.join(projectPath, '.sce', 'specs', subSpec.name);
1440
1440
  await fs.ensureDir(subPath);
1441
1441
  await fs.writeFile(path.join(subPath, 'requirements.md'), buildSubRequirements(decomposition.goal, subSpec), 'utf8');
1442
1442
  await fs.writeFile(path.join(subPath, 'design.md'), buildSubDesign(subSpec), 'utf8');
@@ -1869,7 +1869,7 @@ async function findMissingSpecDocuments(projectPath, specNames) {
1869
1869
  const missing = [];
1870
1870
 
1871
1871
  for (const specName of specNames) {
1872
- const basePath = path.join(projectPath, '.kiro', 'specs', specName);
1872
+ const basePath = path.join(projectPath, '.sce', 'specs', specName);
1873
1873
  for (const docName of requiredDocs) {
1874
1874
  const filePath = path.join(basePath, docName);
1875
1875
  if (!(await fs.pathExists(filePath))) {
@@ -1885,7 +1885,7 @@ async function findNonCompletedCollaborationSpecs(projectPath, specNames) {
1885
1885
  const notCompleted = [];
1886
1886
 
1887
1887
  for (const specName of specNames) {
1888
- const collabPath = path.join(projectPath, '.kiro', 'specs', specName, 'collaboration.json');
1888
+ const collabPath = path.join(projectPath, '.sce', 'specs', specName, 'collaboration.json');
1889
1889
  if (!(await fs.pathExists(collabPath))) {
1890
1890
  notCompleted.push(`${specName}(missing-collaboration-json)`);
1891
1891
  continue;
@@ -1905,7 +1905,7 @@ async function findSpecsWithOpenTasks(projectPath, specNames) {
1905
1905
  const specsWithOpenTasks = [];
1906
1906
 
1907
1907
  for (const specName of specNames) {
1908
- const tasksPath = path.join(projectPath, '.kiro', 'specs', specName, 'tasks.md');
1908
+ const tasksPath = path.join(projectPath, '.sce', 'specs', specName, 'tasks.md');
1909
1909
  if (!(await fs.pathExists(tasksPath))) {
1910
1910
  specsWithOpenTasks.push(specName);
1911
1911
  continue;
@@ -2239,7 +2239,7 @@ function normalizeDodReportPath(result, options, projectPath) {
2239
2239
 
2240
2240
  return path.join(
2241
2241
  projectPath,
2242
- '.kiro',
2242
+ '.sce',
2243
2243
  'specs',
2244
2244
  result.portfolio.master_spec,
2245
2245
  'custom',
@@ -2404,7 +2404,7 @@ module.exports = {
2404
2404
  };
2405
2405
 
2406
2406
  async function writeAgentSyncPlan(projectPath, masterSpecName, subSpecs, assignments, executionPlanning = null) {
2407
- const customDir = path.join(projectPath, '.kiro', 'specs', masterSpecName, 'custom');
2407
+ const customDir = path.join(projectPath, '.sce', 'specs', masterSpecName, 'custom');
2408
2408
  await fs.ensureDir(customDir);
2409
2409
  const leaseBySpec = executionPlanning && executionPlanning.lease_plan && executionPlanning.lease_plan.lease_by_spec
2410
2410
  ? executionPlanning.lease_plan.lease_by_spec
@@ -20,7 +20,7 @@ class ErrorRecoveryManager {
20
20
  this.recoveryLog = [];
21
21
  this.attemptCounts = new Map(); // error signature -> attempt count
22
22
  this.pauseCallback = null; // Callback to pause execution
23
- this.learningDataPath = path.join(process.cwd(), '.kiro', 'auto', 'learning-data.json');
23
+ this.learningDataPath = path.join(process.cwd(), '.sce', 'auto', 'learning-data.json');
24
24
 
25
25
  // Register default strategies
26
26
  this.registerDefaultStrategies();
@@ -204,7 +204,7 @@ async function resolvePrefix(projectPath, requestedPrefix) {
204
204
  return parsed;
205
205
  }
206
206
 
207
- const specsDir = path.join(projectPath, '.kiro', 'specs');
207
+ const specsDir = path.join(projectPath, '.sce', 'specs');
208
208
  if (!await fs.pathExists(specsDir)) {
209
209
  return 1;
210
210
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const DEFAULT_CLUSTER_GOALS_ARG = '.kiro/auto/matrix-remediation.capability-clusters.json';
4
- const DEFAULT_BASELINE_ARG = '.kiro/reports/release-evidence/moqui-template-baseline.json';
3
+ const DEFAULT_CLUSTER_GOALS_ARG = '.sce/auto/matrix-remediation.capability-clusters.json';
4
+ const DEFAULT_BASELINE_ARG = '.sce/reports/release-evidence/moqui-template-baseline.json';
5
5
  const DEFAULT_CLUSTER_PHASED_ALIAS = 'npm run run:matrix-remediation-clusters-phased -- --json';
6
6
  const DEFAULT_CLUSTER_BATCH_ALIAS = 'npm run run:matrix-remediation-clusters';
7
7
  const DEFAULT_BASELINE_PHASED_ALIAS = 'npm run run:matrix-remediation-from-baseline -- --json';
@@ -25,7 +25,7 @@ class ProgressTracker {
25
25
  this.errorsEncountered = 0;
26
26
  this.errorsResolved = 0;
27
27
  this.taskDurations = new Map(); // taskId -> duration
28
- this.historicalDataPath = path.join(process.cwd(), '.kiro', 'auto', 'historical-data.json');
28
+ this.historicalDataPath = path.join(process.cwd(), '.sce', 'auto', 'historical-data.json');
29
29
  this.historicalData = {
30
30
  taskDurations: {}, // taskType -> [durations]
31
31
  phaseDurations: {}, // phase -> [durations]
@@ -9,7 +9,7 @@ const path = require('path');
9
9
  class StateManager {
10
10
  constructor(specName) {
11
11
  this.specName = specName;
12
- this.stateDir = path.join(process.cwd(), '.kiro', 'auto');
12
+ this.stateDir = path.join(process.cwd(), '.sce', 'auto');
13
13
  this.stateFile = path.join(this.stateDir, `${specName}-state.json`);
14
14
  }
15
15
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Backup System
3
3
  *
4
- * Creates, manages, and restores backups of the .kiro/ directory.
4
+ * Creates, manages, and restores backups of the .sce/ directory.
5
5
  * Provides rollback capability for safe adoption and upgrade operations.
6
6
  */
7
7
 
@@ -31,17 +31,17 @@ class BackupSystem {
31
31
  * @returns {string} - Absolute path to backups directory
32
32
  */
33
33
  getBackupDir(projectPath) {
34
- return path.join(projectPath, '.kiro', this.backupDirName);
34
+ return path.join(projectPath, '.sce', this.backupDirName);
35
35
  }
36
36
 
37
37
  /**
38
- * Gets the path to the .kiro directory
38
+ * Gets the path to the .sce directory
39
39
  *
40
40
  * @param {string} projectPath - Absolute path to project root
41
- * @returns {string} - Absolute path to .kiro directory
41
+ * @returns {string} - Absolute path to .sce directory
42
42
  */
43
43
  getKiroDir(projectPath) {
44
- return path.join(projectPath, '.kiro');
44
+ return path.join(projectPath, '.sce');
45
45
  }
46
46
 
47
47
  /**
@@ -63,7 +63,7 @@ class BackupSystem {
63
63
  }
64
64
 
65
65
  /**
66
- * Creates backup of .kiro/ directory
66
+ * Creates backup of .sce/ directory
67
67
  *
68
68
  * @param {string} projectPath - Absolute path to project root
69
69
  * @param {Object} options - Backup options
@@ -76,10 +76,10 @@ class BackupSystem {
76
76
  try {
77
77
  const kiroDir = this.getKiroDir(projectPath);
78
78
 
79
- // Check if .kiro/ exists
79
+ // Check if .sce/ exists
80
80
  const kiroExists = await pathExists(kiroDir);
81
81
  if (!kiroExists) {
82
- throw new Error('.kiro/ directory does not exist');
82
+ throw new Error('.sce/ directory does not exist');
83
83
  }
84
84
 
85
85
  // Create backups directory if it doesn't exist
@@ -99,7 +99,7 @@ class BackupSystem {
99
99
  // Create backup directory
100
100
  await ensureDirectory(backupPath);
101
101
 
102
- // Copy .kiro/ contents to backup (excluding backups/ itself)
102
+ // Copy .sce/ contents to backup (excluding backups/ itself)
103
103
  const items = await listFiles(kiroDir);
104
104
 
105
105
  for (const item of items) {
@@ -249,7 +249,7 @@ class BackupSystem {
249
249
  const items = await listFiles(backupPath);
250
250
  const itemsToRestore = items.filter(item => item !== 'metadata.json');
251
251
 
252
- // Remove existing .kiro/ contents (except backups/)
252
+ // Remove existing .sce/ contents (except backups/)
253
253
  const existingItems = await listFiles(kiroDir);
254
254
  for (const item of existingItems) {
255
255
  if (item === this.backupDirName) {
@@ -20,14 +20,14 @@ const {
20
20
  */
21
21
  class SelectiveBackup {
22
22
  constructor() {
23
- this.backupDir = '.kiro/backups';
23
+ this.backupDir = '.sce/backups';
24
24
  }
25
25
 
26
26
  /**
27
27
  * Creates a backup of specific files before overwriting
28
28
  *
29
29
  * @param {string} projectPath - Project root path
30
- * @param {string[]} filePaths - Relative paths of files to backup (from .kiro/)
30
+ * @param {string[]} filePaths - Relative paths of files to backup (from .sce/)
31
31
  * @param {Object} options - Backup options
32
32
  * @param {string} options.type - Backup type (default: 'conflict')
33
33
  * @returns {Promise<SelectiveBackupInfo>}
@@ -53,7 +53,7 @@ class SelectiveBackup {
53
53
 
54
54
  // Backup each file
55
55
  for (const filePath of filePaths) {
56
- const sourcePath = path.join(projectPath, '.kiro', filePath);
56
+ const sourcePath = path.join(projectPath, '.sce', filePath);
57
57
  const destPath = path.join(filesBackupPath, filePath);
58
58
 
59
59
  // Check if source file exists
@@ -138,7 +138,7 @@ class SelectiveBackup {
138
138
  for (const filePath of filesToRestore) {
139
139
  try {
140
140
  const sourcePath = path.join(backupPath, 'files', filePath);
141
- const destPath = path.join(projectPath, '.kiro', filePath);
141
+ const destPath = path.join(projectPath, '.sce', filePath);
142
142
 
143
143
  // Check if backup file exists
144
144
  const sourceExists = await pathExists(sourcePath);
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Agent Registry - Manages Agent registration, heartbeat, and lifecycle
3
3
  *
4
- * Stores agent records in `.kiro/config/agent-registry.json`.
4
+ * Stores agent records in `.sce/config/agent-registry.json`.
5
5
  * Uses MachineIdentifier for unique Agent ID generation ({machineId}:{instanceIndex}).
6
6
  * All write operations use atomic writes via fs-utils.
7
7
  *
@@ -13,7 +13,7 @@ const fsUtils = require('../utils/fs-utils');
13
13
  const { MultiAgentConfig } = require('./multi-agent-config');
14
14
 
15
15
  const REGISTRY_FILENAME = 'agent-registry.json';
16
- const CONFIG_DIR = '.kiro/config';
16
+ const CONFIG_DIR = '.sce/config';
17
17
 
18
18
  const EMPTY_REGISTRY = Object.freeze({
19
19
  version: '1.0.0',
@@ -8,7 +8,7 @@ class ContractManager {
8
8
  constructor(workspaceRoot, metadataManager) {
9
9
  this.workspaceRoot = workspaceRoot;
10
10
  this.metadataManager = metadataManager;
11
- this.specsDir = path.join(workspaceRoot, '.kiro', 'specs');
11
+ this.specsDir = path.join(workspaceRoot, '.sce', 'specs');
12
12
  }
13
13
 
14
14
  /**
@@ -24,8 +24,8 @@ const { MultiAgentConfig } = require('./multi-agent-config');
24
24
 
25
25
  const TaskClaimer = require('../task/task-claimer');
26
26
 
27
- const CONFIG_DIR = '.kiro/config';
28
- const SPECS_DIR = '.kiro/specs';
27
+ const CONFIG_DIR = '.sce/config';
28
+ const SPECS_DIR = '.sce/specs';
29
29
  const LOG_FILENAME = 'coordination-log.json';
30
30
 
31
31
  class Coordinator {
@@ -25,7 +25,7 @@ class DependencyManager {
25
25
  nodes.push({
26
26
  id: name,
27
27
  status: metadata.status?.current || 'not-started',
28
- kiroInstance: metadata.assignment?.kiroInstance || null,
28
+ kiroInstance: metadata.assignment?.sceInstance || null,
29
29
  type: metadata.type
30
30
  });
31
31
 
@@ -8,7 +8,7 @@ class IntegrationManager {
8
8
  constructor(workspaceRoot, metadataManager) {
9
9
  this.workspaceRoot = workspaceRoot;
10
10
  this.metadataManager = metadataManager;
11
- this.specsDir = path.join(workspaceRoot, '.kiro', 'specs');
11
+ this.specsDir = path.join(workspaceRoot, '.sce', 'specs');
12
12
  }
13
13
 
14
14
  /**
@@ -8,7 +8,7 @@ const path = require('path');
8
8
  class MetadataManager {
9
9
  constructor(workspaceRoot) {
10
10
  this.workspaceRoot = workspaceRoot;
11
- this.specsDir = path.join(workspaceRoot, '.kiro', 'specs');
11
+ this.specsDir = path.join(workspaceRoot, '.sce', 'specs');
12
12
  }
13
13
 
14
14
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Multi-Agent Configuration Manager
3
3
  *
4
- * Manages `.kiro/config/multi-agent.json` for multi-Agent parallel coordination.
4
+ * Manages `.sce/config/multi-agent.json` for multi-Agent parallel coordination.
5
5
  * When the config file does not exist or is corrupted, returns a default
6
6
  * disabled configuration so that single-Agent mode is completely unaffected.
7
7
  *
@@ -12,7 +12,7 @@ const path = require('path');
12
12
  const fsUtils = require('../utils/fs-utils');
13
13
 
14
14
  const CONFIG_FILENAME = 'multi-agent.json';
15
- const CONFIG_DIR = '.kiro/config';
15
+ const CONFIG_DIR = '.sce/config';
16
16
 
17
17
  /** @type {import('./multi-agent-config').MultiAgentConfigData} */
18
18
  const DEFAULT_CONFIG = Object.freeze({
@@ -2,7 +2,7 @@
2
2
  * SpecLifecycleManager - Manages Spec lifecycle state machine
3
3
  *
4
4
  * Tracks Spec status through: planned → assigned → in-progress → completed → released.
5
- * Persists state to `.kiro/specs/{specName}/lifecycle.json`.
5
+ * Persists state to `.sce/specs/{specName}/lifecycle.json`.
6
6
  * On completion, triggers ContextSyncManager update and AgentRegistry notification.
7
7
  * In single-Agent mode, all operations are no-ops.
8
8
  *
@@ -14,7 +14,7 @@ const fs = require('fs-extra');
14
14
  const fsUtils = require('../utils/fs-utils');
15
15
  const { MultiAgentConfig } = require('./multi-agent-config');
16
16
 
17
- const SPECS_DIR = '.kiro/specs';
17
+ const SPECS_DIR = '.sce/specs';
18
18
 
19
19
  const VALID_TRANSITIONS = {
20
20
  planned: ['assigned'],
@@ -117,7 +117,7 @@ class Visualizer {
117
117
  */
118
118
  _formatNode(node, criticalPath = []) {
119
119
  const symbol = this._getStatusSymbol(node.status);
120
- const assignment = node.kiroInstance ? ` (${node.kiroInstance})` : ' (unassigned)';
120
+ const assignment = node.sceInstance ? ` (${node.sceInstance})` : ' (unassigned)';
121
121
  const critical = criticalPath.includes(node.id) ? ' [CRITICAL]' : '';
122
122
 
123
123
  return `${symbol} ${node.id}${assignment}${critical}`;