scene-capability-engine 3.0.1 → 3.0.2

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 (170) hide show
  1. package/CHANGELOG.md +233 -233
  2. package/LICENSE +2 -2
  3. package/README.md +8 -11
  4. package/README.zh.md +7 -10
  5. package/bin/kse.js +1 -1
  6. package/bin/sce.js +1 -1
  7. package/bin/sco.js +1 -1
  8. package/docs/331-poc-adaptation-roadmap.md +25 -25
  9. package/docs/331-poc-dual-track-integration-guide.md +26 -26
  10. package/docs/331-poc-weekly-delivery-checklist.md +8 -8
  11. package/docs/OFFLINE_INSTALL.md +10 -10
  12. package/docs/README.md +24 -24
  13. package/docs/adopt-migration-guide.md +51 -51
  14. package/docs/adoption-guide.md +56 -56
  15. package/docs/agent-hooks-analysis.md +52 -52
  16. package/docs/architecture.md +6 -6
  17. package/docs/articles/ai-driven-development-philosophy-and-practice-review.md +4 -4
  18. package/docs/articles/ai-driven-development-philosophy-and-practice.en.md +9 -9
  19. package/docs/articles/ai-driven-development-philosophy-and-practice.md +10 -10
  20. package/docs/autonomous-control-guide.md +89 -89
  21. package/docs/command-reference.md +11 -11
  22. package/docs/community.md +4 -4
  23. package/docs/cross-tool-guide.md +47 -47
  24. package/docs/developer-guide.md +5 -5
  25. package/docs/document-governance.md +91 -91
  26. package/docs/environment-management-guide.md +53 -53
  27. package/docs/examples/add-export-command/design.md +2 -2
  28. package/docs/examples/add-export-command/requirements.md +5 -5
  29. package/docs/examples/add-export-command/tasks.md +2 -2
  30. package/docs/faq.md +69 -69
  31. package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.json +9 -9
  32. package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.md +3 -3
  33. package/docs/integration-modes.md +60 -60
  34. package/docs/integration-philosophy.md +48 -48
  35. package/docs/knowledge-management-guide.md +21 -21
  36. package/docs/manual-workflows-guide.md +20 -20
  37. package/docs/moqui-capability-matrix.md +22 -22
  38. package/docs/moqui-template-core-library-playbook.md +20 -20
  39. package/docs/multi-agent-coordination-guide.md +19 -19
  40. package/docs/multi-repo-management-guide.md +93 -93
  41. package/docs/quick-start-with-ai-tools.md +36 -36
  42. package/docs/quick-start.md +16 -16
  43. package/docs/release-checklist.md +7 -7
  44. package/docs/releases/v1.46.2-validation.md +1 -1
  45. package/docs/releases/v1.46.2.md +10 -10
  46. package/docs/scene-runtime-guide.md +42 -42
  47. package/docs/spec-collaboration-guide.md +43 -43
  48. package/docs/spec-locking-guide.md +26 -26
  49. package/docs/spec-numbering-guide.md +6 -6
  50. package/docs/spec-workflow.md +25 -25
  51. package/docs/steering-strategy-guide.md +36 -36
  52. package/docs/team-collaboration-guide.md +23 -23
  53. package/docs/testing-strategy.md +2 -2
  54. package/docs/tools/claude-guide.md +26 -26
  55. package/docs/tools/cursor-guide.md +31 -31
  56. package/docs/tools/generic-guide.md +22 -22
  57. package/docs/tools/kiro-guide.md +43 -43
  58. package/docs/tools/vscode-guide.md +18 -18
  59. package/docs/tools/windsurf-guide.md +50 -50
  60. package/docs/troubleshooting.md +116 -116
  61. package/docs/upgrade-guide.md +49 -49
  62. package/docs/value-observability-guide.md +6 -6
  63. package/docs/zh/README.md +22 -22
  64. package/docs/zh/quick-start.md +34 -34
  65. package/docs/zh/release-checklist.md +6 -6
  66. package/docs/zh/releases/v1.46.2-validation.md +1 -1
  67. package/docs/zh/releases/v1.46.2.md +9 -9
  68. package/docs/zh/spec-numbering-guide.md +6 -6
  69. package/docs/zh/tools/claude-guide.md +14 -14
  70. package/docs/zh/tools/cursor-guide.md +18 -18
  71. package/docs/zh/tools/generic-guide.md +40 -40
  72. package/docs/zh/tools/kiro-guide.md +50 -50
  73. package/docs/zh/tools/vscode-guide.md +20 -20
  74. package/docs/zh/tools/windsurf-guide.md +49 -49
  75. package/docs/zh/value-observability-guide.md +6 -6
  76. package/docs//344/272/244/344/273/230/346/270/205/345/215/225.md +4 -4
  77. package/lib/adoption/adoption-logger.js +1 -1
  78. package/lib/adoption/adoption-strategy.js +3 -3
  79. package/lib/adoption/detection-engine.js +1 -1
  80. package/lib/adoption/error-formatter.js +17 -17
  81. package/lib/adoption/progress-reporter.js +2 -2
  82. package/lib/adoption/smart-orchestrator.js +2 -2
  83. package/lib/adoption/strategy-selector.js +2 -2
  84. package/lib/adoption/summary-generator.js +3 -3
  85. package/lib/auto/autonomous-engine.js +2 -2
  86. package/lib/auto/close-loop-runner.js +9 -9
  87. package/lib/backup/backup-system.js +2 -2
  88. package/lib/collab/collab-manager.js +2 -2
  89. package/lib/commands/adopt.js +16 -16
  90. package/lib/commands/auto.js +93 -93
  91. package/lib/commands/collab.js +8 -8
  92. package/lib/commands/docs.js +26 -26
  93. package/lib/commands/doctor.js +2 -2
  94. package/lib/commands/env.js +14 -14
  95. package/lib/commands/knowledge.js +13 -13
  96. package/lib/commands/lock.js +6 -6
  97. package/lib/commands/ops.js +19 -19
  98. package/lib/commands/orchestrate.js +5 -5
  99. package/lib/commands/prompt.js +3 -3
  100. package/lib/commands/rollback.js +4 -4
  101. package/lib/commands/scene.js +29 -29
  102. package/lib/commands/spec-bootstrap.js +1 -1
  103. package/lib/commands/spec-gate.js +1 -1
  104. package/lib/commands/spec-pipeline.js +1 -1
  105. package/lib/commands/task.js +1 -1
  106. package/lib/commands/templates.js +27 -27
  107. package/lib/commands/upgrade.js +8 -8
  108. package/lib/commands/value.js +4 -4
  109. package/lib/commands/watch.js +9 -9
  110. package/lib/commands/workflows.js +5 -5
  111. package/lib/commands/workspace-multi.js +17 -17
  112. package/lib/commands/workspace.js +5 -5
  113. package/lib/context/context-exporter.js +1 -1
  114. package/lib/context/prompt-generator.js +1 -1
  115. package/lib/data/moqui-capability-lexicon.json +1 -1
  116. package/lib/environment/environment-manager.js +1 -1
  117. package/lib/gitignore/gitignore-detector.js +4 -4
  118. package/lib/gitignore/gitignore-integration.js +2 -2
  119. package/lib/gitignore/gitignore-transformer.js +3 -3
  120. package/lib/gitignore/layered-rules-template.js +2 -2
  121. package/lib/governance/diagnostic-engine.js +4 -4
  122. package/lib/governance/doc-reference-checker.js +1 -1
  123. package/lib/governance/hooks-manager.js +5 -5
  124. package/lib/governance/reporter.js +1 -1
  125. package/lib/knowledge/knowledge-manager.js +6 -6
  126. package/lib/orchestrator/agent-spawner.js +1 -1
  127. package/lib/orchestrator/bootstrap-prompt-builder.js +2 -2
  128. package/lib/repo/config-manager.js +2 -2
  129. package/lib/repo/handlers/init-handler.js +3 -3
  130. package/lib/scene-runtime/audit-emitter.js +2 -2
  131. package/lib/scene-runtime/binding-plugin-loader.js +1 -1
  132. package/lib/scene-runtime/moqui-adapter.js +2 -2
  133. package/lib/scene-runtime/moqui-extractor.js +3 -3
  134. package/lib/scene-runtime/scene-loader.js +3 -3
  135. package/lib/scene-runtime/scene-template-linter.js +1 -1
  136. package/lib/scene-runtime/templates/scene-template-erp-query-v0.1.yaml +1 -1
  137. package/lib/scene-runtime/templates/scene-template-hybrid-shadow-v0.1.yaml +1 -1
  138. package/lib/spec/multi-spec-orchestrate.js +1 -1
  139. package/lib/spec-gate/rules/default-rules.js +1 -1
  140. package/lib/steering/adoption-config.js +1 -1
  141. package/lib/steering/compliance-auto-fixer.js +1 -1
  142. package/lib/steering/compliance-cache.js +3 -3
  143. package/lib/steering/compliance-error-reporter.js +1 -1
  144. package/lib/steering/index.js +1 -1
  145. package/lib/steering/steering-manager.js +7 -7
  146. package/lib/task/task-claimer.js +2 -1
  147. package/lib/templates/metadata-collector.js +6 -6
  148. package/lib/templates/template-creator.js +2 -2
  149. package/lib/templates/template-exporter.js +12 -12
  150. package/lib/upgrade/migration-engine.js +4 -4
  151. package/lib/utils/tool-detector.js +25 -25
  152. package/lib/utils/validation.js +3 -3
  153. package/lib/version/version-checker.js +13 -13
  154. package/lib/version/version-manager.js +7 -7
  155. package/lib/watch/presets.js +4 -4
  156. package/lib/workspace/multi/path-utils.js +1 -1
  157. package/lib/workspace/multi/workspace-context-resolver.js +9 -9
  158. package/lib/workspace/multi/workspace-registry.js +2 -2
  159. package/lib/workspace/multi/workspace-state-manager.js +1 -1
  160. package/lib/workspace/multi/workspace.js +1 -1
  161. package/lib/workspace/workspace-sync.js +1 -1
  162. package/locales/en.json +1 -1
  163. package/locales/zh.json +1 -1
  164. package/package.json +3 -5
  165. package/template/.kiro/README.md +40 -40
  166. package/template/.kiro/specs/SPEC_WORKFLOW_GUIDE.md +3 -3
  167. package/template/.kiro/steering/CORE_PRINCIPLES.md +3 -3
  168. package/template/.kiro/steering/ENVIRONMENT.md +2 -2
  169. package/template/README.md +3 -3
  170. /package/bin/{kiro-spec-engine.js → scene-capability-engine.js} +0 -0
@@ -1,4 +1,4 @@
1
- const path = require('path');
1
+ const path = require('path');
2
2
  const zlib = require('zlib');
3
3
  const crypto = require('crypto');
4
4
  const { spawnSync } = require('child_process');
@@ -50,7 +50,7 @@ const SCENE_ROUTE_POLICY_DIFF_KEYS = [
50
50
  'mode_bias.commit.critical',
51
51
  'max_alternatives'
52
52
  ];
53
- const SCENE_PACKAGE_API_VERSION = 'kse.scene.package/v0.1';
53
+ const SCENE_PACKAGE_API_VERSION = 'sce.scene.package/v0.1';
54
54
  const SCENE_PACKAGE_KINDS = new Set([
55
55
  'scene-template',
56
56
  'scene-instance',
@@ -59,14 +59,14 @@ const SCENE_PACKAGE_KINDS = new Set([
59
59
  'scene-policy-profile'
60
60
  ]);
61
61
  const SCENE_PACKAGE_RISK_LEVELS = new Set(['low', 'medium', 'high', 'critical']);
62
- const SCENE_PACKAGE_TEMPLATE_API_VERSION = 'kse.scene.template/v0.1';
62
+ const SCENE_PACKAGE_TEMPLATE_API_VERSION = 'sce.scene.template/v0.1';
63
63
  const SCENE_PACKAGE_TEMPLATE_DEFAULT_DIR = '.kiro/templates/scene-packages';
64
64
  const SCENE_MOQUI_BASELINE_DEFAULT_MATCH = '(moqui|erp)';
65
65
  const SCENE_MOQUI_BASELINE_DEFAULT_MIN_SCORE = 70;
66
66
  const SCENE_MOQUI_BASELINE_DEFAULT_MIN_VALID_RATE = 100;
67
67
  const SCENE_PACKAGE_BATCH_DEFAULT_ONTOLOGY_MIN_AVERAGE_SCORE = 70;
68
68
  const SCENE_PACKAGE_BATCH_DEFAULT_ONTOLOGY_MIN_VALID_RATE = 100;
69
- const SCENE_PACKAGE_GATE_API_VERSION = 'kse.scene.package-gate/v0.1';
69
+ const SCENE_PACKAGE_GATE_API_VERSION = 'sce.scene.package-gate/v0.1';
70
70
  const SCENE_PACKAGE_GATE_TEMPLATE_PROFILES = new Set(['baseline', 'three-layer']);
71
71
  const SCENE_PACKAGE_KIND_LAYER_MAP = Object.freeze({
72
72
  'scene-capability': 'l1-capability',
@@ -376,7 +376,7 @@ function registerSceneCommands(program) {
376
376
  .option('-s, --spec <spec-name>', 'Target spec name under .kiro/specs')
377
377
  .option('-o, --out <path>', 'Output path (relative; defaults by context)')
378
378
  .option('--kind <kind>', 'Package kind (scene-template|scene-instance|scene-capability|scene-domain-profile|scene-policy-profile)', 'scene-template')
379
- .option('--group <group>', 'Package group', 'kse.scene')
379
+ .option('--group <group>', 'Package group', 'sce.scene')
380
380
  .option('--name <name>', 'Package name (defaults from spec/out)')
381
381
  .option('--pkg-version <version>', 'Package semantic version', '0.1.0')
382
382
  .option('--force', 'Overwrite existing package contract file')
@@ -1190,7 +1190,7 @@ function normalizeScenePackageTemplateOptions(options = {}) {
1190
1190
  spec: hasSpec ? String(options.spec).trim() : undefined,
1191
1191
  out: options.out ? String(options.out).trim() : (hasSpec ? 'custom/scene-package.json' : '.kiro/templates/scene-package.json'),
1192
1192
  kind: options.kind ? String(options.kind).trim().toLowerCase() : 'scene-template',
1193
- group: options.group ? String(options.group).trim() : 'kse.scene',
1193
+ group: options.group ? String(options.group).trim() : 'sce.scene',
1194
1194
  name: options.name ? String(options.name).trim() : undefined,
1195
1195
  version: (options.pkgVersion || options.version) ? String(options.pkgVersion || options.version).trim() : '0.1.0',
1196
1196
  force: options.force === true,
@@ -1949,7 +1949,7 @@ function buildDoctorSuggestions(report, sceneManifest) {
1949
1949
  suggestions.push(createDoctorSuggestion(
1950
1950
  'plan-invalid',
1951
1951
  'Fix scene bindings and idempotency fields',
1952
- 'Run `kse scene validate` and ensure side-effect bindings have idempotency key.',
1952
+ 'Run `sce scene validate` and ensure side-effect bindings have idempotency key.',
1953
1953
  'high'
1954
1954
  ));
1955
1955
  }
@@ -2035,7 +2035,7 @@ function buildDoctorSuggestions(report, sceneManifest) {
2035
2035
  suggestions.push(createDoctorSuggestion(
2036
2036
  'adapter-readiness',
2037
2037
  'Fix adapter readiness checks',
2038
- `Repair adapter check "${check.name}" and rerun \`kse scene doctor --check-adapter\`.`,
2038
+ `Repair adapter check "${check.name}" and rerun \`sce scene doctor --check-adapter\`.`,
2039
2039
  domain === 'erp' ? 'medium' : 'high'
2040
2040
  ));
2041
2041
  }
@@ -2081,8 +2081,8 @@ function buildDoctorSuggestions(report, sceneManifest) {
2081
2081
  'ready-to-run',
2082
2082
  'Scene is healthy for next execution step',
2083
2083
  report.mode === 'commit'
2084
- ? 'Proceed with `kse scene run --mode commit` under normal approval flow.'
2085
- : 'Proceed with `kse scene run --mode dry_run` to capture execution evidence.',
2084
+ ? 'Proceed with `sce scene run --mode commit` under normal approval flow.'
2085
+ : 'Proceed with `sce scene run --mode dry_run` to capture execution evidence.',
2086
2086
  'low'
2087
2087
  ));
2088
2088
  }
@@ -3400,8 +3400,8 @@ function collectSceneRoutePolicyDiff(baselinePolicy = {}, candidatePolicy = {})
3400
3400
 
3401
3401
  function buildSceneRoutePolicyRolloutCommands(targetPolicyPath, candidatePolicyPath, rollbackPolicyPath) {
3402
3402
  return {
3403
- verify_candidate_route: `kse scene route --query routing --mode dry_run --route-policy ${candidatePolicyPath}`,
3404
- verify_target_route: `kse scene route --query routing --mode dry_run --route-policy ${targetPolicyPath}`,
3403
+ verify_candidate_route: `sce scene route --query routing --mode dry_run --route-policy ${candidatePolicyPath}`,
3404
+ verify_target_route: `sce scene route --query routing --mode dry_run --route-policy ${targetPolicyPath}`,
3405
3405
  apply: `Replace ${targetPolicyPath} with ${candidatePolicyPath} after verification.`,
3406
3406
  rollback: `Replace ${targetPolicyPath} with ${rollbackPolicyPath} if regression appears.`
3407
3407
  };
@@ -3497,7 +3497,7 @@ function buildScenePackagePublishTemplateManifest(packageContract = {}, context
3497
3497
  published_at: context.publishedAt || new Date().toISOString()
3498
3498
  },
3499
3499
  compatibility: {
3500
- scene_api_version: String(compatibility.scene_api_version || '').trim() || 'kse.scene/v0.2'
3500
+ scene_api_version: String(compatibility.scene_api_version || '').trim() || 'sce.scene/v0.2'
3501
3501
  },
3502
3502
  parameters: Array.isArray(packageContract.parameters)
3503
3503
  ? JSON.parse(JSON.stringify(packageContract.parameters))
@@ -3518,7 +3518,7 @@ function buildScenePackagePublishTemplateManifest(packageContract = {}, context
3518
3518
  function createScenePackageTemplate(options = {}) {
3519
3519
  const packageName = deriveScenePackageName(options);
3520
3520
  const kind = SCENE_PACKAGE_KINDS.has(options.kind) ? options.kind : 'scene-template';
3521
- const group = options.group || 'kse.scene';
3521
+ const group = options.group || 'sce.scene';
3522
3522
  const version = options.version || '0.1.0';
3523
3523
 
3524
3524
  return {
@@ -3532,7 +3532,7 @@ function createScenePackageTemplate(options = {}) {
3532
3532
  },
3533
3533
  compatibility: {
3534
3534
  kse_version: '>=1.24.0',
3535
- scene_api_version: 'kse.scene/v0.2',
3535
+ scene_api_version: 'sce.scene/v0.2',
3536
3536
  moqui_model_version: '3.x',
3537
3537
  adapter_api_version: 'v1'
3538
3538
  },
@@ -3955,7 +3955,7 @@ function buildScenePackageGateRemediationPlan(evaluation = {}) {
3955
3955
  priority: 'medium',
3956
3956
  title: `Add at least one ${layer} template package`,
3957
3957
  recommendation: `Create and publish a ${kind} package to satisfy ${layer} coverage.`,
3958
- command_hint: `kse scene package-template --kind ${kind} --spec <spec-name> && kse scene package-publish --spec <spec-name>`
3958
+ command_hint: `sce scene package-template --kind ${kind} --spec <spec-name> && sce scene package-publish --spec <spec-name>`
3959
3959
  }, checkId);
3960
3960
  continue;
3961
3961
  }
@@ -3970,7 +3970,7 @@ function buildScenePackageGateRemediationPlan(evaluation = {}) {
3970
3970
  priority: 'high',
3971
3971
  title: `Increase valid template count by at least ${gap || 1}`,
3972
3972
  recommendation: 'Promote additional template packages via package-publish until gate threshold is met.',
3973
- command_hint: 'kse scene package-registry --template-dir .kiro/templates/scene-packages --json'
3973
+ command_hint: 'sce scene package-registry --template-dir .kiro/templates/scene-packages --json'
3974
3974
  }, checkId);
3975
3975
  continue;
3976
3976
  }
@@ -3981,7 +3981,7 @@ function buildScenePackageGateRemediationPlan(evaluation = {}) {
3981
3981
  priority: 'high',
3982
3982
  title: 'Reduce invalid template count to gate threshold',
3983
3983
  recommendation: 'Repair or deprecate invalid templates and rerun registry validation.',
3984
- command_hint: 'kse scene package-registry --template-dir .kiro/templates/scene-packages --strict --json'
3984
+ command_hint: 'sce scene package-registry --template-dir .kiro/templates/scene-packages --strict --json'
3985
3985
  }, checkId);
3986
3986
  continue;
3987
3987
  }
@@ -3992,7 +3992,7 @@ function buildScenePackageGateRemediationPlan(evaluation = {}) {
3992
3992
  priority: 'high',
3993
3993
  title: 'Eliminate unknown-layer template classifications',
3994
3994
  recommendation: 'Align package kind declarations with supported scene layers and republish.',
3995
- command_hint: 'kse scene package-template --kind <scene-capability|scene-domain-profile|scene-template> --spec <spec-name>'
3995
+ command_hint: 'sce scene package-template --kind <scene-capability|scene-domain-profile|scene-template> --spec <spec-name>'
3996
3996
  }, checkId);
3997
3997
  continue;
3998
3998
  }
@@ -4002,7 +4002,7 @@ function buildScenePackageGateRemediationPlan(evaluation = {}) {
4002
4002
  priority: 'medium',
4003
4003
  title: `Resolve gate check ${checkId || 'unknown'}`,
4004
4004
  recommendation: 'Inspect gate details and apply corrective template actions.',
4005
- command_hint: 'kse scene package-gate --registry <path> --policy <path> --json'
4005
+ command_hint: 'sce scene package-gate --registry <path> --policy <path> --json'
4006
4006
  }, checkId);
4007
4007
  }
4008
4008
 
@@ -4168,7 +4168,7 @@ function buildScenePackageTemplateId(packageContract = {}, explicitTemplateId) {
4168
4168
  }
4169
4169
 
4170
4170
  const metadata = isPlainObject(packageContract.metadata) ? packageContract.metadata : {};
4171
- const group = sanitizeScenePackageName(metadata.group || 'kse.scene') || 'kse.scene';
4171
+ const group = sanitizeScenePackageName(metadata.group || 'sce.scene') || 'sce.scene';
4172
4172
  const name = sanitizeScenePackageName(metadata.name || 'scene-template') || 'scene-template';
4173
4173
  const version = sanitizeScenePackageName(metadata.version || '0.1.0') || '0.1.0';
4174
4174
 
@@ -4268,7 +4268,7 @@ function buildScenePackageInstantiateManifest(manifestContent, valueMap, targetS
4268
4268
  if (!manifestContent) {
4269
4269
  const fallbackRef = sanitizeScenePackageName(String(targetSpec || '').replace(/^\d{2}-\d{2}-/, '')) || 'scene-instance';
4270
4270
  return [
4271
- 'apiVersion: kse.scene/v0.2',
4271
+ 'apiVersion: sce.scene/v0.2',
4272
4272
  'kind: scene',
4273
4273
  'metadata:',
4274
4274
  ` obj_id: scene.erp.${fallbackRef}`,
@@ -5019,9 +5019,9 @@ function buildSceneRouteCommands(entry, options) {
5019
5019
  const runMode = options.mode || 'dry_run';
5020
5020
 
5021
5021
  return {
5022
- validate: `kse scene validate --spec ${entry.spec} --spec-manifest ${entry.manifest_path}`,
5023
- doctor: `kse scene doctor --spec ${entry.spec} --spec-manifest ${entry.manifest_path} --mode ${runMode}`,
5024
- run: `kse scene run --spec ${entry.spec} --spec-manifest ${entry.manifest_path} --mode ${runMode}`
5022
+ validate: `sce scene validate --spec ${entry.spec} --spec-manifest ${entry.manifest_path}`,
5023
+ doctor: `sce scene doctor --spec ${entry.spec} --spec-manifest ${entry.manifest_path} --mode ${runMode}`,
5024
+ run: `sce scene run --spec ${entry.spec} --spec-manifest ${entry.manifest_path} --mode ${runMode}`
5025
5025
  };
5026
5026
  }
5027
5027
 
@@ -5934,7 +5934,7 @@ function buildScenePackageGateRemediationRunbook(payload = {}) {
5934
5934
  const priority = normalizeTaskPriority(action.priority, 'medium');
5935
5935
  const title = String(action.title || '').trim() || 'Execute remediation action';
5936
5936
  const recommendation = String(action.recommendation || '').trim() || 'Review gate diagnostics and apply corrective action.';
5937
- const commandHint = String(action.command_hint || '').trim() || 'kse scene package-gate --registry <path> --policy <path> --json';
5937
+ const commandHint = String(action.command_hint || '').trim() || 'sce scene package-gate --registry <path> --policy <path> --json';
5938
5938
  const sourceChecks = Array.isArray(action.source_check_ids)
5939
5939
  ? action.source_check_ids.map((checkId) => String(checkId || '').trim()).filter((checkId) => checkId.length > 0)
5940
5940
  : [];
@@ -11753,7 +11753,7 @@ async function loadRegistryIndex(registryRoot, fileSystem) {
11753
11753
 
11754
11754
  const exists = await pathExists(indexPath);
11755
11755
  if (!exists) {
11756
- return { apiVersion: 'kse.scene.registry/v0.1', packages: {} };
11756
+ return { apiVersion: 'sce.scene.registry/v0.1', packages: {} };
11757
11757
  }
11758
11758
 
11759
11759
  let index;
@@ -12254,7 +12254,7 @@ async function runSceneInstallCommand(rawOptions = {}, dependencies = {}) {
12254
12254
  const fileNames = files.map(f => f.relativePath);
12255
12255
 
12256
12256
  // 9. Build coordinate
12257
- const coordinate = `kse.scene/${options.name}@${version}`;
12257
+ const coordinate = `sce.scene/${options.name}@${version}`;
12258
12258
 
12259
12259
  // 10. Dry-run: build payload without writing, print, return
12260
12260
  if (options.dryRun) {
@@ -12548,7 +12548,7 @@ async function runSceneUnpublishCommand(rawOptions = {}, dependencies = {}) {
12548
12548
  const newLatest = pkgEntry ? (pkgEntry.latest || null) : null;
12549
12549
 
12550
12550
  // 7. Build coordinate
12551
- const coordinate = `kse.scene/${options.name}@${options.version}`;
12551
+ const coordinate = `sce.scene/${options.name}@${options.version}`;
12552
12552
 
12553
12553
  // 8. Build payload
12554
12554
  const payload = {
@@ -117,7 +117,7 @@ async function runSpecBootstrap(options = {}, dependencies = {}) {
117
117
  function registerSpecBootstrapCommand(program) {
118
118
  program
119
119
  .command('spec-bootstrap')
120
- .description('Bootstrap requirements/design/tasks draft (use: kse spec bootstrap)')
120
+ .description('Bootstrap requirements/design/tasks draft (use: sce spec bootstrap)')
121
121
  .option('--name <spec-name>', 'Spec name to generate')
122
122
  .option('--spec <name>', 'Alias of --name')
123
123
  .option('--specs <names>', 'Comma-separated Spec identifiers (multi-spec defaults to orchestrate mode)')
@@ -92,7 +92,7 @@ async function generateSpecGatePolicyTemplate(options = {}, dependencies = {}) {
92
92
  function registerSpecGateCommand(program) {
93
93
  const specGate = program
94
94
  .command('spec-gate')
95
- .description('Run standardized Spec gate checks (use: kse spec gate)');
95
+ .description('Run standardized Spec gate checks (use: sce spec gate)');
96
96
 
97
97
  specGate
98
98
  .command('run')
@@ -104,7 +104,7 @@ async function runSpecPipeline(options = {}, dependencies = {}) {
104
104
  function registerSpecPipelineCommand(program) {
105
105
  const pipeline = program
106
106
  .command('spec-pipeline')
107
- .description('Run Spec workflow pipeline (use: kse spec pipeline run)');
107
+ .description('Run Spec workflow pipeline (use: sce spec pipeline run)');
108
108
 
109
109
  pipeline
110
110
  .command('run')
@@ -185,7 +185,7 @@ async function listClaimedTasks(specName, options = {}) {
185
185
  } else {
186
186
  console.log(chalk.gray('Please specify a spec name'));
187
187
  console.log();
188
- console.log('Usage: ' + chalk.cyan('kse task list <spec-name>'));
188
+ console.log('Usage: ' + chalk.cyan('sce task list <spec-name>'));
189
189
  }
190
190
  } catch (error) {
191
191
  console.log(chalk.red('❌ Error:'), error.message);
@@ -26,7 +26,7 @@ function displayTemplateList(templates, options = {}) {
26
26
  if (source || category) {
27
27
  console.log(chalk.gray('Try removing filters or updating templates'));
28
28
  } else {
29
- console.log(chalk.gray('Run'), chalk.cyan('kse templates update'), chalk.gray('to download templates'));
29
+ console.log(chalk.gray('Run'), chalk.cyan('sce templates update'), chalk.gray('to download templates'));
30
30
  }
31
31
 
32
32
  return;
@@ -136,7 +136,7 @@ function displayTemplateDetails(template) {
136
136
 
137
137
  console.log();
138
138
  console.log(chalk.blue('Usage:'));
139
- console.log(` ${chalk.cyan(`kse spec create my-feature --template ${template.id}`)}`);
139
+ console.log(` ${chalk.cyan(`sce spec create my-feature --template ${template.id}`)}`);
140
140
  console.log();
141
141
  }
142
142
 
@@ -285,8 +285,8 @@ async function updateTemplates(options = {}) {
285
285
 
286
286
  console.log();
287
287
  console.log(chalk.blue('💡 Next steps:'));
288
- console.log(` ${chalk.cyan('kse templates list')} - View all templates`);
289
- console.log(` ${chalk.cyan('kse templates search <keyword>')} - Search templates`);
288
+ console.log(` ${chalk.cyan('sce templates list')} - View all templates`);
289
+ console.log(` ${chalk.cyan('sce templates search <keyword>')} - Search templates`);
290
290
 
291
291
  } catch (error) {
292
292
  console.log();
@@ -322,8 +322,8 @@ async function addSource(name, gitUrl) {
322
322
  console.log(chalk.green('✅ Source added successfully!'));
323
323
  console.log();
324
324
  console.log(chalk.blue('💡 Next steps:'));
325
- console.log(` ${chalk.cyan('kse templates update --source ' + name)} - Download templates from this source`);
326
- console.log(` ${chalk.cyan('kse templates list --source ' + name)} - View templates from this source`);
325
+ console.log(` ${chalk.cyan('sce templates update --source ' + name)} - Download templates from this source`);
326
+ console.log(` ${chalk.cyan('sce templates list --source ' + name)} - View templates from this source`);
327
327
 
328
328
  } catch (error) {
329
329
  console.log();
@@ -358,7 +358,7 @@ async function removeSource(name) {
358
358
  console.log(chalk.green('✅ Source removed successfully!'));
359
359
  console.log();
360
360
  console.log(chalk.gray('Note: Cached templates from this source are still available'));
361
- console.log(chalk.gray('Run'), chalk.cyan('kse templates cache --clear --source ' + name), chalk.gray('to remove them'));
361
+ console.log(chalk.gray('Run'), chalk.cyan('sce templates cache --clear --source ' + name), chalk.gray('to remove them'));
362
362
 
363
363
  } catch (error) {
364
364
  console.log();
@@ -392,7 +392,7 @@ async function listSources() {
392
392
  if (sources.length === 0) {
393
393
  console.log(chalk.yellow('No template sources configured'));
394
394
  console.log();
395
- console.log(chalk.gray('Add a source:'), chalk.cyan('kse templates add-source <name> <git-url>'));
395
+ console.log(chalk.gray('Add a source:'), chalk.cyan('sce templates add-source <name> <git-url>'));
396
396
  return;
397
397
  }
398
398
 
@@ -421,9 +421,9 @@ async function listSources() {
421
421
  });
422
422
 
423
423
  console.log(chalk.blue('💡 Commands:'));
424
- console.log(` ${chalk.cyan('kse templates update')} - Update all sources`);
425
- console.log(` ${chalk.cyan('kse templates add-source <name> <url>')} - Add custom source`);
426
- console.log(` ${chalk.cyan('kse templates remove-source <name>')} - Remove source`);
424
+ console.log(` ${chalk.cyan('sce templates update')} - Update all sources`);
425
+ console.log(` ${chalk.cyan('sce templates add-source <name> <url>')} - Add custom source`);
426
+ console.log(` ${chalk.cyan('sce templates remove-source <name>')} - Remove source`);
427
427
 
428
428
  } catch (error) {
429
429
  console.log();
@@ -469,7 +469,7 @@ async function cacheCommand(options = {}) {
469
469
 
470
470
  console.log(chalk.green('✅ Cache cleared successfully!'));
471
471
  console.log();
472
- console.log(chalk.gray('Run'), chalk.cyan('kse templates update'), chalk.gray('to re-download templates'));
472
+ console.log(chalk.gray('Run'), chalk.cyan('sce templates update'), chalk.gray('to re-download templates'));
473
473
 
474
474
  } else {
475
475
  // Show cache status
@@ -478,7 +478,7 @@ async function cacheCommand(options = {}) {
478
478
  if (!status || Object.keys(status.sources || {}).length === 0) {
479
479
  console.log(chalk.yellow('Cache is empty'));
480
480
  console.log();
481
- console.log(chalk.gray('Run'), chalk.cyan('kse templates update'), chalk.gray('to download templates'));
481
+ console.log(chalk.gray('Run'), chalk.cyan('sce templates update'), chalk.gray('to download templates'));
482
482
  return;
483
483
  }
484
484
 
@@ -504,9 +504,9 @@ async function cacheCommand(options = {}) {
504
504
  }
505
505
 
506
506
  console.log(chalk.blue('💡 Commands:'));
507
- console.log(` ${chalk.cyan('kse templates cache --clear')} - Clear all cache`);
508
- console.log(` ${chalk.cyan('kse templates cache --clear --source <name>')} - Clear specific source`);
509
- console.log(` ${chalk.cyan('kse templates update')} - Update cached templates`);
507
+ console.log(` ${chalk.cyan('sce templates cache --clear')} - Clear all cache`);
508
+ console.log(` ${chalk.cyan('sce templates cache --clear --source <name>')} - Clear specific source`);
509
+ console.log(` ${chalk.cyan('sce templates update')} - Update cached templates`);
510
510
  }
511
511
 
512
512
  } catch (error) {
@@ -559,24 +559,24 @@ async function displayGuide() {
559
559
 
560
560
  console.log(chalk.blue.bold('Quick Start:'));
561
561
  console.log();
562
- console.log(`1. ${chalk.cyan('kse templates list')} - Browse available templates`);
563
- console.log(`2. ${chalk.cyan('kse templates show <template-id>')} - View template details`);
564
- console.log(`3. ${chalk.cyan('kse spec create my-feature --template <template-id>')} - Create spec from template`);
562
+ console.log(`1. ${chalk.cyan('sce templates list')} - Browse available templates`);
563
+ console.log(`2. ${chalk.cyan('sce templates show <template-id>')} - View template details`);
564
+ console.log(`3. ${chalk.cyan('sce spec create my-feature --template <template-id>')} - Create spec from template`);
565
565
  console.log();
566
566
 
567
567
  console.log(chalk.blue.bold('Common Commands:'));
568
568
  console.log();
569
- console.log(` ${chalk.cyan('kse templates list')} - List all templates`);
570
- console.log(` ${chalk.cyan('kse templates search <keyword>')} - Search templates`);
571
- console.log(` ${chalk.cyan('kse templates update')} - Update template library`);
572
- console.log(` ${chalk.cyan('kse templates sources')} - Manage template sources`);
573
- console.log(` ${chalk.cyan('kse templates cache')} - View cache status`);
569
+ console.log(` ${chalk.cyan('sce templates list')} - List all templates`);
570
+ console.log(` ${chalk.cyan('sce templates search <keyword>')} - Search templates`);
571
+ console.log(` ${chalk.cyan('sce templates update')} - Update template library`);
572
+ console.log(` ${chalk.cyan('sce templates sources')} - Manage template sources`);
573
+ console.log(` ${chalk.cyan('sce templates cache')} - View cache status`);
574
574
  console.log();
575
575
 
576
576
  console.log(chalk.blue.bold('Custom Sources:'));
577
577
  console.log();
578
578
  console.log('You can add your own template repositories:');
579
- console.log(` ${chalk.cyan('kse templates add-source my-templates https://github.com/user/templates.git')}`);
579
+ console.log(` ${chalk.cyan('sce templates add-source my-templates https://github.com/user/templates.git')}`);
580
580
  console.log();
581
581
 
582
582
  console.log(chalk.blue.bold('Documentation:'));
@@ -605,9 +605,9 @@ async function createFromSpec(options = {}) {
605
605
  if (!spec) {
606
606
  console.log(chalk.red('❌ Error: Spec identifier is required'));
607
607
  console.log();
608
- console.log(chalk.gray('Usage:'), chalk.cyan('kse templates create-from-spec --spec <identifier>'));
608
+ console.log(chalk.gray('Usage:'), chalk.cyan('sce templates create-from-spec --spec <identifier>'));
609
609
  console.log();
610
- console.log(chalk.gray('Example:'), chalk.cyan('kse templates create-from-spec --spec 22-00'));
610
+ console.log(chalk.gray('Example:'), chalk.cyan('sce templates create-from-spec --spec 22-00'));
611
611
  process.exit(1);
612
612
  }
613
613
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Upgrade Command
3
3
  *
4
- * Upgrades project to a newer version of kiro-spec-engine.
4
+ * Upgrades project to a newer version of scene-capability-engine.
5
5
  * Handles incremental upgrades and migration scripts.
6
6
  */
7
7
 
@@ -18,14 +18,14 @@ const BackupSystem = require('../backup/backup-system');
18
18
  * @param {Object} options - Command options
19
19
  * @param {boolean} options.auto - Skip confirmations
20
20
  * @param {boolean} options.dryRun - Show upgrade plan without making changes
21
- * @param {string} options.to - Target version (default: current kse version)
21
+ * @param {string} options.to - Target version (default: current sce version)
22
22
  * @returns {Promise<void>}
23
23
  */
24
24
  async function upgradeCommand(options = {}) {
25
25
  const { auto = false, dryRun = false, to: targetVersion = null } = options;
26
26
  const projectPath = process.cwd();
27
27
 
28
- console.log(chalk.red('🔥') + ' Kiro Spec Engine - Project Upgrade');
28
+ console.log(chalk.red('🔥') + ' Scene Capability Engine - Project Upgrade');
29
29
  console.log();
30
30
 
31
31
  try {
@@ -40,12 +40,12 @@ async function upgradeCommand(options = {}) {
40
40
  if (!currentVersionInfo) {
41
41
  console.log(chalk.red('❌ No version.json found'));
42
42
  console.log();
43
- console.log(chalk.yellow('This project may not be initialized with kse.'));
44
- console.log(chalk.gray('Run'), chalk.cyan('kse adopt'), chalk.gray('to adopt this project first.'));
43
+ console.log(chalk.yellow('This project may not be initialized with sce.'));
44
+ console.log(chalk.gray('Run'), chalk.cyan('sce adopt'), chalk.gray('to adopt this project first.'));
45
45
  return;
46
46
  }
47
47
 
48
- const currentVersion = currentVersionInfo['kse-version'];
48
+ const currentVersion = currentVersionInfo['sce-version'];
49
49
  const targetVer = targetVersion || packageJson.version;
50
50
 
51
51
  console.log(` Current version: ${chalk.cyan(currentVersion)}`);
@@ -203,7 +203,7 @@ async function upgradeCommand(options = {}) {
203
203
 
204
204
  console.log();
205
205
  console.log(chalk.blue('📦 Backup:'), backup.id);
206
- console.log(chalk.gray(' Run'), chalk.cyan('kse rollback'), chalk.gray('if you encounter issues'));
206
+ console.log(chalk.gray(' Run'), chalk.cyan('sce rollback'), chalk.gray('if you encounter issues'));
207
207
 
208
208
  console.log();
209
209
  console.log(chalk.red('🔥') + ' Upgrade complete!');
@@ -214,7 +214,7 @@ async function upgradeCommand(options = {}) {
214
214
 
215
215
  console.log();
216
216
  console.log(chalk.blue('📦 Backup available:'), backup.id);
217
- console.log(chalk.gray(' Run'), chalk.cyan('kse rollback'), chalk.gray('to restore'));
217
+ console.log(chalk.gray(' Run'), chalk.cyan('sce rollback'), chalk.gray('to restore'));
218
218
 
219
219
  process.exit(1);
220
220
  }
@@ -167,7 +167,7 @@ function createSampleMetricsInput(period) {
167
167
  cycle_reduction_rate: 0.34,
168
168
  manual_takeover_rate: 0.16
169
169
  },
170
- notes: 'sample metrics input generated by kse value metrics sample'
170
+ notes: 'sample metrics input generated by sce value metrics sample'
171
171
  };
172
172
  }
173
173
 
@@ -202,7 +202,7 @@ async function runValueMetricsSnapshot(options = {}, dependencies = {}) {
202
202
  const projectPath = dependencies.projectPath || process.cwd();
203
203
 
204
204
  if (!options.input) {
205
- throw new Error('--input <path> is required for snapshot generation. Tip: run "kse value metrics sample --out ./kpi-input.json" first.');
205
+ throw new Error('--input <path> is required for snapshot generation. Tip: run "sce value metrics sample --out ./kpi-input.json" first.');
206
206
  }
207
207
 
208
208
  const loader = dependencies.metricContractLoader || new MetricContractLoader(projectPath);
@@ -308,7 +308,7 @@ async function runValueMetricsBaseline(options = {}, dependencies = {}) {
308
308
  } else {
309
309
  const allSnapshots = sortSnapshotsByPeriod(await loadHistorySnapshots(historyDir));
310
310
  if (allSnapshots.length === 0) {
311
- throw new Error('--input is required when history directory has no snapshots. Tip: run "kse value metrics sample --out ./kpi-input.json" and then "kse value metrics snapshot --input ./kpi-input.json".');
311
+ throw new Error('--input is required when history directory has no snapshots. Tip: run "sce value metrics sample --out ./kpi-input.json" and then "sce value metrics snapshot --input ./kpi-input.json".');
312
312
  }
313
313
 
314
314
  const fromHistory = parsePositiveInteger(options.fromHistory, Math.min(3, allSnapshots.length));
@@ -383,7 +383,7 @@ async function runValueMetricsTrend(options = {}, dependencies = {}) {
383
383
  const allSnapshots = sortSnapshotsByPeriod(await loadHistorySnapshots(historyDir));
384
384
 
385
385
  if (allSnapshots.length < 2) {
386
- throw new Error('At least 2 snapshots are required to calculate trends. Tip: generate snapshots first with "kse value metrics snapshot --input ./kpi-input.json".');
386
+ throw new Error('At least 2 snapshots are required to calculate trends. Tip: generate snapshots first with "sce value metrics snapshot --input ./kpi-input.json".');
387
387
  }
388
388
 
389
389
  const window = parsePositiveInteger(options.window, allSnapshots.length);
@@ -55,9 +55,9 @@ async function startWatch(options = {}) {
55
55
  console.log(` ${chalk.cyan(actionCount)} action(s)`);
56
56
  console.log();
57
57
  console.log('Commands:');
58
- console.log(` ${chalk.cyan('kse watch status')} - Check status`);
59
- console.log(` ${chalk.cyan('kse watch logs')} - View logs`);
60
- console.log(` ${chalk.cyan('kse watch stop')} - Stop watch mode`);
58
+ console.log(` ${chalk.cyan('sce watch status')} - Check status`);
59
+ console.log(` ${chalk.cyan('sce watch logs')} - View logs`);
60
+ console.log(` ${chalk.cyan('sce watch stop')} - Stop watch mode`);
61
61
  console.log();
62
62
  console.log(chalk.gray('Press Ctrl+C to stop'));
63
63
 
@@ -156,13 +156,13 @@ async function statusWatch(options = {}) {
156
156
  // Error count
157
157
  if (status.errorCount > 0) {
158
158
  console.log(chalk.yellow(`⚠️ ${status.errorCount} error(s) occurred`));
159
- console.log(`Run ${chalk.cyan('kse watch logs')} to view details`);
159
+ console.log(`Run ${chalk.cyan('sce watch logs')} to view details`);
160
160
  console.log();
161
161
  }
162
162
  } else {
163
163
  console.log(chalk.gray('Watch mode is not running'));
164
164
  console.log();
165
- console.log(`Run ${chalk.cyan('kse watch start')} to start`);
165
+ console.log(`Run ${chalk.cyan('sce watch start')} to start`);
166
166
  }
167
167
  } catch (error) {
168
168
  console.log(chalk.red('❌ Error:'), error.message);
@@ -436,7 +436,7 @@ async function initWatch(options = {}) {
436
436
  ],
437
437
  actions: {
438
438
  '**/tasks.md': {
439
- command: 'kse workspace sync',
439
+ command: 'sce workspace sync',
440
440
  debounce: 2000,
441
441
  description: 'Sync workspace when tasks are updated'
442
442
  }
@@ -474,7 +474,7 @@ async function initWatch(options = {}) {
474
474
  console.log();
475
475
  console.log('Next steps:');
476
476
  console.log(` 1. Edit config: ${chalk.cyan(configPath)}`);
477
- console.log(` 2. Start watch: ${chalk.cyan('kse watch start')}`);
477
+ console.log(` 2. Start watch: ${chalk.cyan('sce watch start')}`);
478
478
  } catch (error) {
479
479
  console.log(chalk.red('❌ Error:'), error.message);
480
480
  if (process.env.NODE_ENV !== 'test') {
@@ -537,7 +537,7 @@ async function listPresetsWatch(options = {}) {
537
537
  }
538
538
 
539
539
  console.log('Install a preset:');
540
- console.log(` ${chalk.cyan('kse watch install <preset-name>')}`);
540
+ console.log(` ${chalk.cyan('sce watch install <preset-name>')}`);
541
541
  }
542
542
 
543
543
  /**
@@ -658,7 +658,7 @@ async function installPresetWatch(presetName, options = {}) {
658
658
  }
659
659
  console.log();
660
660
  console.log('Next steps:');
661
- console.log(` ${chalk.cyan('kse watch start')} - Start watch mode`);
661
+ console.log(` ${chalk.cyan('sce watch start')} - Start watch mode`);
662
662
  } catch (error) {
663
663
  console.log(chalk.red('❌ Error:'), error.message);
664
664
  if (process.env.NODE_ENV !== 'test') {
@@ -71,8 +71,8 @@ async function listWorkflows() {
71
71
  console.log();
72
72
  });
73
73
 
74
- console.log(chalk.gray('Run'), chalk.cyan('kse workflows show <workflow-id>'), chalk.gray('to view details'));
75
- console.log(chalk.gray('Run'), chalk.cyan('kse workflows guide'), chalk.gray('to open full guide'));
74
+ console.log(chalk.gray('Run'), chalk.cyan('sce workflows show <workflow-id>'), chalk.gray('to view details'));
75
+ console.log(chalk.gray('Run'), chalk.cyan('sce workflows guide'), chalk.gray('to open full guide'));
76
76
  }
77
77
 
78
78
  /**
@@ -180,7 +180,7 @@ async function trackCompletion(workflowId) {
180
180
  if (nextWorkflows.length > 0) {
181
181
  nextWorkflows.forEach(nextId => {
182
182
  const next = WORKFLOWS[nextId];
183
- console.log(chalk.cyan(` kse workflows show ${nextId}`), chalk.gray(`- ${next.name}`));
183
+ console.log(chalk.cyan(` sce workflows show ${nextId}`), chalk.gray(`- ${next.name}`));
184
184
  });
185
185
  } else {
186
186
  console.log(chalk.gray(' Continue with your work!'));
@@ -203,7 +203,7 @@ async function workflowsCommand(action = 'list', workflowId = null) {
203
203
  case 'show':
204
204
  if (!workflowId) {
205
205
  console.log(chalk.red('❌ Workflow ID required'));
206
- console.log(chalk.gray('Usage:'), chalk.cyan('kse workflows show <workflow-id>'));
206
+ console.log(chalk.gray('Usage:'), chalk.cyan('sce workflows show <workflow-id>'));
207
207
  return;
208
208
  }
209
209
  await showWorkflow(workflowId);
@@ -216,7 +216,7 @@ async function workflowsCommand(action = 'list', workflowId = null) {
216
216
  case 'complete':
217
217
  if (!workflowId) {
218
218
  console.log(chalk.red('❌ Workflow ID required'));
219
- console.log(chalk.gray('Usage:'), chalk.cyan('kse workflows complete <workflow-id>'));
219
+ console.log(chalk.gray('Usage:'), chalk.cyan('sce workflows complete <workflow-id>'));
220
220
  return;
221
221
  }
222
222
  await trackCompletion(workflowId);