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
@@ -1,38 +1,38 @@
1
1
  /**
2
2
  * Layered .gitignore rules template
3
3
  *
4
- * This template defines the layered strategy for .kiro/ directory:
4
+ * This template defines the layered strategy for .sce/ directory:
5
5
  * - Commit Specs and shared content
6
6
  * - Exclude personal state and temporary files
7
7
  */
8
8
 
9
9
  const LAYERED_RULES_TEMPLATE = `# ========================================
10
- # .kiro/ Directory - Layered Management
10
+ # .sce/ Directory - Layered Management
11
11
  # ========================================
12
12
  # Generated by sce - DO NOT EDIT THIS SECTION
13
13
  # See: docs/team-collaboration-guide.md
14
14
 
15
15
  # Personal state files (DO NOT commit)
16
- .kiro/steering/CURRENT_CONTEXT.md
17
- .kiro/contexts/.active
18
- .kiro/contexts/*/CURRENT_CONTEXT.md
16
+ .sce/steering/CURRENT_CONTEXT.md
17
+ .sce/contexts/.active
18
+ .sce/contexts/*/CURRENT_CONTEXT.md
19
19
 
20
20
  # Environment configuration (DO NOT commit)
21
- .kiro/environments.json
22
- .kiro/env-backups/
21
+ .sce/environments.json
22
+ .sce/env-backups/
23
23
 
24
24
  # Temporary files and backups (DO NOT commit)
25
- .kiro/backups/
26
- .kiro/logs/
27
- .kiro/reports/
25
+ .sce/backups/
26
+ .sce/logs/
27
+ .sce/reports/
28
28
 
29
29
  # Spec artifacts (COMMIT - but exclude temporary files)
30
- .kiro/specs/**/SESSION-*.md
31
- .kiro/specs/**/*-SUMMARY.md
32
- .kiro/specs/**/*-COMPLETE.md
33
- .kiro/specs/**/TEMP-*.md
34
- .kiro/specs/**/WIP-*.md
35
- .kiro/specs/**/MVP-*.md
30
+ .sce/specs/**/SESSION-*.md
31
+ .sce/specs/**/*-SUMMARY.md
32
+ .sce/specs/**/*-COMPLETE.md
33
+ .sce/specs/**/TEMP-*.md
34
+ .sce/specs/**/WIP-*.md
35
+ .sce/specs/**/MVP-*.md
36
36
 
37
37
  # ========================================
38
38
  # End of sce-managed section
@@ -10,7 +10,7 @@ const path = require('path');
10
10
  class ConfigManager {
11
11
  constructor(projectPath) {
12
12
  this.projectPath = projectPath;
13
- this.configPath = path.join(projectPath, '.kiro/config/docs.json');
13
+ this.configPath = path.join(projectPath, '.sce/config/docs.json');
14
14
  this.config = null;
15
15
  }
16
16
 
@@ -30,10 +30,10 @@ class DocReferenceChecker {
30
30
 
31
31
  // Files to check
32
32
  this.filesToCheck = [
33
- '.kiro/specs/SPEC_WORKFLOW_GUIDE.md',
34
- '.kiro/steering/ENVIRONMENT.md',
35
- '.kiro/steering/CURRENT_CONTEXT.md',
36
- '.kiro/README.md',
33
+ '.sce/specs/SPEC_WORKFLOW_GUIDE.md',
34
+ '.sce/steering/ENVIRONMENT.md',
35
+ '.sce/steering/CURRENT_CONTEXT.md',
36
+ '.sce/README.md',
37
37
  'README.md',
38
38
  'package.json'
39
39
  ];
@@ -10,7 +10,7 @@ const path = require('path');
10
10
  class ExecutionLogger {
11
11
  constructor(projectPath) {
12
12
  this.projectPath = projectPath;
13
- this.logDir = path.join(projectPath, '.kiro', 'logs');
13
+ this.logDir = path.join(projectPath, '.sce', 'logs');
14
14
  this.logFile = path.join(this.logDir, 'governance-history.json');
15
15
  this.maxLogSize = 10 * 1024 * 1024; // 10MB
16
16
  this.maxRotatedLogs = 5;
@@ -134,7 +134,7 @@ class FileScanner {
134
134
  * @returns {Promise<string[]>} - Array of Spec directory paths
135
135
  */
136
136
  async findSpecDirectories() {
137
- const specsPath = path.join(this.projectPath, '.kiro/specs');
137
+ const specsPath = path.join(this.projectPath, '.sce/specs');
138
138
 
139
139
  try {
140
140
  const entries = await fs.readdir(specsPath, { withFileTypes: true });
@@ -148,7 +148,7 @@ class FileScanner {
148
148
 
149
149
  return specDirs;
150
150
  } catch (error) {
151
- // If .kiro/specs doesn't exist, return empty array
151
+ // If .sce/specs doesn't exist, return empty array
152
152
  return [];
153
153
  }
154
154
  }
@@ -160,7 +160,7 @@ class FileScanner {
160
160
  * @returns {string} - Spec directory path
161
161
  */
162
162
  getSpecDirectory(specName) {
163
- return path.join(this.projectPath, '.kiro/specs', specName);
163
+ return path.join(this.projectPath, '.sce/specs', specName);
164
164
  }
165
165
 
166
166
  /**
@@ -13,8 +13,8 @@ const {
13
13
  const ADAPTER_TYPE = 'moqui-interactive-adapter';
14
14
  const ADAPTER_VERSION = '1.0.0';
15
15
 
16
- const DEFAULT_EXECUTION_RECORD_OUT = '.kiro/reports/interactive-execution-record.latest.json';
17
- const DEFAULT_EXECUTION_LEDGER_OUT = '.kiro/reports/interactive-execution-ledger.jsonl';
16
+ const DEFAULT_EXECUTION_RECORD_OUT = '.sce/reports/interactive-execution-record.latest.json';
17
+ const DEFAULT_EXECUTION_LEDGER_OUT = '.sce/reports/interactive-execution-ledger.jsonl';
18
18
 
19
19
  const SUPPORTED_ACTION_TYPES = [
20
20
  'analysis_only',
@@ -12,7 +12,7 @@ const TemplateManager = require('./template-manager');
12
12
  class KnowledgeManager {
13
13
  constructor(projectRoot) {
14
14
  this.projectRoot = projectRoot;
15
- this.knowledgePath = path.join(projectRoot, '.kiro', 'knowledge');
15
+ this.knowledgePath = path.join(projectRoot, '.sce', 'knowledge');
16
16
 
17
17
  this.entryManager = new EntryManager(this.knowledgePath);
18
18
  this.indexManager = new IndexManager(this.knowledgePath);
@@ -19,8 +19,8 @@ class LockManager {
19
19
  */
20
20
  constructor(workspaceRoot, machineIdentifier = null) {
21
21
  this.workspaceRoot = workspaceRoot;
22
- this.specsDir = path.join(workspaceRoot, '.kiro', 'specs');
23
- this.configDir = path.join(workspaceRoot, '.kiro', 'config');
22
+ this.specsDir = path.join(workspaceRoot, '.sce', 'specs');
23
+ this.configDir = path.join(workspaceRoot, '.sce', 'config');
24
24
  this.lockFile = new LockFile(this.specsDir);
25
25
  this.machineIdentifier = machineIdentifier || new MachineIdentifier(this.configDir);
26
26
  }
@@ -2,11 +2,11 @@
2
2
  * SteeringFileLock - Protects concurrent writes to Steering files
3
3
  *
4
4
  * Uses file-level locks with exclusive create (`wx`) to serialize writes
5
- * to `.kiro/steering/` files. When lock acquisition fails after retries,
5
+ * to `.sce/steering/` files. When lock acquisition fails after retries,
6
6
  * falls back to writing a pending file for later merge.
7
7
  *
8
- * Lock file path: `.kiro/steering/{filename}.lock`
9
- * Pending file path: `.kiro/steering/{filename}.pending.{agentId}`
8
+ * Lock file path: `.sce/steering/{filename}.lock`
9
+ * Pending file path: `.sce/steering/{filename}.pending.{agentId}`
10
10
  *
11
11
  * Requirements: 5.1, 5.2, 5.3, 5.4
12
12
  */
@@ -26,7 +26,7 @@ class SteeringFileLock {
26
26
  */
27
27
  constructor(workspaceRoot) {
28
28
  this._workspaceRoot = workspaceRoot;
29
- this._steeringDir = path.join(workspaceRoot, '.kiro', 'steering');
29
+ this._steeringDir = path.join(workspaceRoot, '.sce', 'steering');
30
30
  }
31
31
 
32
32
  /**
@@ -139,7 +139,7 @@ class SteeringFileLock {
139
139
 
140
140
  /**
141
141
  * Write content to a pending file as a fallback when lock acquisition fails.
142
- * Pending file path: `.kiro/steering/{filename}.pending.{agentId}`
142
+ * Pending file path: `.sce/steering/{filename}.pending.{agentId}`
143
143
  * Uses atomic write for file integrity (Req 5.3, 5.4).
144
144
  *
145
145
  * @param {string} filename - Steering filename
@@ -4,7 +4,7 @@
4
4
  * Provides per-task locking instead of per-Spec locking, allowing multiple
5
5
  * Agents to work on different tasks within the same Spec concurrently.
6
6
  *
7
- * Lock file path: `.kiro/specs/{specName}/locks/{taskId}.lock`
7
+ * Lock file path: `.sce/specs/{specName}/locks/{taskId}.lock`
8
8
  * (dots in taskId replaced with dashes for filesystem safety)
9
9
  *
10
10
  * In single-Agent mode, delegates to the existing LockManager (Spec-level lock).
@@ -27,7 +27,7 @@ class TaskLockManager {
27
27
  constructor(workspaceRoot, machineIdentifier) {
28
28
  this._workspaceRoot = workspaceRoot;
29
29
  this._machineIdentifier = machineIdentifier;
30
- this._specsDir = path.join(workspaceRoot, '.kiro', 'specs');
30
+ this._specsDir = path.join(workspaceRoot, '.sce', 'specs');
31
31
  this._multiAgentConfig = new MultiAgentConfig(workspaceRoot);
32
32
  this._lockManager = new LockManager(workspaceRoot, machineIdentifier);
33
33
  this._taskClaimer = new TaskClaimer();
@@ -76,7 +76,7 @@ class TaskLockManager {
76
76
  /**
77
77
  * Acquire a task-level lock.
78
78
  *
79
- * In multi-Agent mode: creates `.kiro/specs/{specName}/locks/{taskId}.lock`
79
+ * In multi-Agent mode: creates `.sce/specs/{specName}/locks/{taskId}.lock`
80
80
  * In single-Agent mode: delegates to LockManager.acquireLock(specName)
81
81
  *
82
82
  * @param {string} specName
@@ -11,7 +11,7 @@ const crypto = require('crypto');
11
11
  class AuditLogger {
12
12
  constructor(projectRoot = process.cwd()) {
13
13
  this.projectRoot = projectRoot;
14
- this.auditPath = path.join(projectRoot, '.kiro/audit');
14
+ this.auditPath = path.join(projectRoot, '.sce/audit');
15
15
  }
16
16
 
17
17
  /**
@@ -34,7 +34,7 @@ function generateUUID() {
34
34
  class FeedbackManager {
35
35
  constructor(projectPath) {
36
36
  this.projectPath = projectPath;
37
- this.feedbackDir = path.join(projectPath, '.kiro/feedback');
37
+ this.feedbackDir = path.join(projectPath, '.sce/feedback');
38
38
  this.feedbackFile = path.join(this.feedbackDir, 'feedback.json');
39
39
  }
40
40
 
@@ -28,7 +28,7 @@ class OperationsManager {
28
28
  async createOperationsSpec(projectName, version = '1.0.0', templateName = 'default') {
29
29
  const operationsPath = path.join(
30
30
  this.projectRoot,
31
- '.kiro/specs',
31
+ '.sce/specs',
32
32
  projectName,
33
33
  'operations'
34
34
  );
@@ -77,7 +77,7 @@ class OperationsManager {
77
77
  async loadOperationsSpec(projectName) {
78
78
  const operationsPath = path.join(
79
79
  this.projectRoot,
80
- '.kiro/specs',
80
+ '.sce/specs',
81
81
  projectName,
82
82
  'operations'
83
83
  );
@@ -125,7 +125,7 @@ class OperationsManager {
125
125
  * @returns {Promise<string[]>} Array of project names with operations specs
126
126
  */
127
127
  async listOperationsSpecs() {
128
- const specsPath = path.join(this.projectRoot, '.kiro/specs');
128
+ const specsPath = path.join(this.projectRoot, '.sce/specs');
129
129
 
130
130
  const exists = await fs.pathExists(specsPath);
131
131
  if (!exists) {
@@ -132,7 +132,7 @@ class PermissionManager {
132
132
  async loadPermissionConfig(project) {
133
133
  const configPath = path.join(
134
134
  this.projectRoot,
135
- '.kiro/specs',
135
+ '.sce/specs',
136
136
  project,
137
137
  'operations/permissions.json'
138
138
  );
@@ -158,7 +158,7 @@ class PermissionManager {
158
158
  async savePermissionConfig(project, config) {
159
159
  const configPath = path.join(
160
160
  this.projectRoot,
161
- '.kiro/specs',
161
+ '.sce/specs',
162
162
  project,
163
163
  'operations/permissions.json'
164
164
  );
@@ -11,7 +11,7 @@ const { DocumentType } = require('./models');
11
11
  class TemplateLoader {
12
12
  constructor(templateBasePath = null) {
13
13
  // Default to package template directory
14
- this.templateBasePath = templateBasePath || path.join(__dirname, '../../template/.kiro/templates/operations');
14
+ this.templateBasePath = templateBasePath || path.join(__dirname, '../../template/.sce/templates/operations');
15
15
  }
16
16
 
17
17
  /**
@@ -17,6 +17,8 @@ const fs = require('fs');
17
17
  const path = require('path');
18
18
  const os = require('os');
19
19
 
20
+ const DEFAULT_CODEX_PERMISSION_ARGS = Object.freeze(['--ask-for-approval', 'never']);
21
+
20
22
  class AgentSpawner extends EventEmitter {
21
23
  /**
22
24
  * @param {string} workspaceRoot - Absolute path to the project root
@@ -40,7 +42,7 @@ class AgentSpawner extends EventEmitter {
40
42
  *
41
43
  * 1. Builds the bootstrap prompt via BootstrapPromptBuilder
42
44
  * 2. Registers the agent in AgentRegistry
43
- * 3. Spawns `codex exec --full-auto --json --sandbox danger-full-access "<prompt>"`
45
+ * 3. Spawns `codex exec --full-auto --json --sandbox danger-full-access --ask-for-approval never "<prompt>"`
44
46
  * 4. Sets up stdout/stderr/close handlers and timeout timer
45
47
  *
46
48
  * @param {string} specName - Spec to execute (e.g. "96-00-agent-orchestrator")
@@ -72,12 +74,13 @@ class AgentSpawner extends EventEmitter {
72
74
  });
73
75
 
74
76
  // Assemble command arguments (Req 1.1, 1.3)
77
+ const codexArgs = this._mergeDefaultCodexPermissionArgs(config.codexArgs);
75
78
  const args = [
76
79
  'exec',
77
80
  '--full-auto',
78
81
  '--json',
79
82
  '--sandbox', 'danger-full-access',
80
- ...(config.codexArgs || []),
83
+ ...codexArgs,
81
84
  prompt,
82
85
  ];
83
86
 
@@ -777,6 +780,28 @@ class AgentSpawner extends EventEmitter {
777
780
  return false;
778
781
  }
779
782
  }
783
+
784
+ /**
785
+ * Merge default Codex permission flags into configured codex args.
786
+ * If user explicitly sets ask-for-approval mode, keep user value.
787
+ *
788
+ * @param {string[]|undefined|null} codexArgs
789
+ * @returns {string[]}
790
+ * @private
791
+ */
792
+ _mergeDefaultCodexPermissionArgs(codexArgs) {
793
+ const args = Array.isArray(codexArgs)
794
+ ? codexArgs.map(value => `${value}`)
795
+ : [];
796
+ const hasAskForApproval = args.some((token) =>
797
+ token === '--ask-for-approval'
798
+ || token === '-a'
799
+ || token.startsWith('--ask-for-approval='));
800
+ if (!hasAskForApproval) {
801
+ return [...args, ...DEFAULT_CODEX_PERMISSION_ARGS];
802
+ }
803
+ return args;
804
+ }
780
805
  }
781
806
 
782
807
  module.exports = { AgentSpawner };
@@ -19,6 +19,7 @@ const STEERING_FILES = [
19
19
  'CURRENT_CONTEXT.md',
20
20
  'RULES_GUIDE.md',
21
21
  ];
22
+ const STEERING_DIR = '.sce/steering';
22
23
 
23
24
  class BootstrapPromptBuilder {
24
25
  /**
@@ -46,7 +47,7 @@ class BootstrapPromptBuilder {
46
47
  * @returns {Promise<string>} The assembled prompt
47
48
  */
48
49
  async buildPrompt(specName) {
49
- const specPath = `.kiro/specs/${specName}/`;
50
+ const specPath = `.sce/specs/${specName}/`;
50
51
  const steeringContext = await this._loadSteeringContext();
51
52
  const taskInstructions = this._buildTaskInstructions(specName, specPath);
52
53
  const readmeSummary = await this._loadReadmeSummary();
@@ -78,17 +79,16 @@ class BootstrapPromptBuilder {
78
79
  // ---------------------------------------------------------------------------
79
80
 
80
81
  /**
81
- * Load and concatenate all steering files from `.kiro/steering/`.
82
+ * Load and concatenate all steering files from `.sce/steering/`.
82
83
  * Missing files are silently skipped.
83
84
  * @returns {Promise<string>}
84
85
  * @private
85
86
  */
86
87
  async _loadSteeringContext() {
87
- const steeringDir = path.join(this._workspaceRoot, '.kiro', 'steering');
88
88
  const sections = [];
89
89
 
90
90
  for (const filename of STEERING_FILES) {
91
- const filePath = path.join(steeringDir, filename);
91
+ const filePath = path.join(this._workspaceRoot, STEERING_DIR, filename);
92
92
  try {
93
93
  const content = await fs.readFile(filePath, 'utf8');
94
94
  sections.push(`### ${filename}\n\n${content.trim()}`);
@@ -101,14 +101,14 @@ class BootstrapPromptBuilder {
101
101
  }
102
102
 
103
103
  /**
104
- * Load a short summary from `.kiro/README.md`.
104
+ * Load a short summary from `.sce/README.md`.
105
105
  * Returns the first ~40 lines (up to the first `---` separator after the
106
106
  * opening block) to keep the prompt concise.
107
107
  * @returns {Promise<string>}
108
108
  * @private
109
109
  */
110
110
  async _loadReadmeSummary() {
111
- const readmePath = path.join(this._workspaceRoot, '.kiro', 'README.md');
111
+ const readmePath = path.join(this._workspaceRoot, '.sce', 'README.md');
112
112
  try {
113
113
  const content = await fs.readFile(readmePath, 'utf8');
114
114
  // Take the first meaningful section (up to the capabilities list)
@@ -15,7 +15,7 @@ const { EventEmitter } = require('events');
15
15
  const path = require('path');
16
16
  const fsUtils = require('../utils/fs-utils');
17
17
 
18
- const SPECS_DIR = '.kiro/specs';
18
+ const SPECS_DIR = '.sce/specs';
19
19
  const DEFAULT_RATE_LIMIT_MAX_RETRIES = 8;
20
20
  const DEFAULT_RATE_LIMIT_BACKOFF_BASE_MS = 1500;
21
21
  const DEFAULT_RATE_LIMIT_BACKOFF_MAX_MS = 60000;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Orchestrator Configuration Manager
3
3
  *
4
- * Manages `.kiro/config/orchestrator.json` for the Agent Orchestrator.
4
+ * Manages `.sce/config/orchestrator.json` for the Agent Orchestrator.
5
5
  * When the config file does not exist or contains invalid JSON,
6
6
  * returns a default configuration so that orchestration can proceed
7
7
  * with sensible defaults.
@@ -16,7 +16,7 @@ const fs = require('fs-extra');
16
16
  const fsUtils = require('../utils/fs-utils');
17
17
 
18
18
  const CONFIG_FILENAME = 'orchestrator.json';
19
- const CONFIG_DIR = '.kiro/config';
19
+ const CONFIG_DIR = '.sce/config';
20
20
 
21
21
  /** Known configuration keys — anything else is silently ignored. */
22
22
  const KNOWN_KEYS = new Set([
@@ -28,7 +28,7 @@ class ConfigManager {
28
28
  * @returns {string} Absolute path to the configuration file
29
29
  */
30
30
  getConfigPath() {
31
- return path.join(this.projectRoot, '.kiro', this.configFileName);
31
+ return path.join(this.projectRoot, '.sce', this.configFileName);
32
32
  }
33
33
 
34
34
  /**
@@ -130,7 +130,7 @@ class ConfigManager {
130
130
  const configPath = this.getConfigPath();
131
131
 
132
132
  try {
133
- // Ensure .kiro directory exists
133
+ // Ensure .sce directory exists
134
134
  const kiroDir = path.dirname(configPath);
135
135
  await fs.mkdir(kiroDir, { recursive: true });
136
136
 
@@ -471,7 +471,7 @@ class ConfigManager {
471
471
  _isValidRepoName(name) {
472
472
  // Allow alphanumeric, hyphens, underscores, dots, and names starting with dots (hidden directories)
473
473
  // Must not contain spaces or special characters like @, #, $, etc.
474
- // Examples: "backend", ".github", ".kiro", "my-repo", "repo_name", "repo.name"
474
+ // Examples: "backend", ".github", ".sce", "my-repo", "repo_name", "repo.name"
475
475
  const validPattern = /^\.?[a-zA-Z0-9][a-zA-Z0-9._-]*$/;
476
476
  return validPattern.test(name);
477
477
  }
@@ -31,7 +31,7 @@ class InitHandler {
31
31
  * @returns {Promise<Object>} Initialization result
32
32
  */
33
33
  async execute(options = {}) {
34
- const { yes = false, maxDepth = 3, exclude = ['.kiro'], nested = true } = options;
34
+ const { yes = false, maxDepth = 3, exclude = ['.sce'], nested = true } = options;
35
35
 
36
36
  // Check if configuration already exists
37
37
  const configExists = await this.configManager.configExists();
@@ -29,13 +29,13 @@ class RepoManager {
29
29
  * @param {string} rootPath - Root path to scan
30
30
  * @param {Object} options - Scan options
31
31
  * @param {number} options.maxDepth - Maximum depth to scan (default: 3)
32
- * @param {string[]} options.exclude - Directories to exclude (default: ['.kiro'])
32
+ * @param {string[]} options.exclude - Directories to exclude (default: ['.sce'])
33
33
  * @param {boolean} options.nested - Enable nested repository scanning (default: true)
34
34
  * @returns {Promise<Array<{path: string, name: string, remote: string|null, branch: string, hasRemote: boolean, parent: string|null}>>}
35
35
  */
36
36
  async discoverRepositories(rootPath, options = {}) {
37
37
  const maxDepth = options.maxDepth || 3;
38
- const exclude = options.exclude || ['.kiro'];
38
+ const exclude = options.exclude || ['.sce'];
39
39
  const nested = options.nested !== false; // Default to true
40
40
 
41
41
  const discovered = [];