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.
- package/CHANGELOG.md +233 -233
- package/LICENSE +2 -2
- package/README.md +8 -11
- package/README.zh.md +7 -10
- package/bin/kse.js +1 -1
- package/bin/sce.js +1 -1
- package/bin/sco.js +1 -1
- package/docs/331-poc-adaptation-roadmap.md +25 -25
- package/docs/331-poc-dual-track-integration-guide.md +26 -26
- package/docs/331-poc-weekly-delivery-checklist.md +8 -8
- package/docs/OFFLINE_INSTALL.md +10 -10
- package/docs/README.md +24 -24
- package/docs/adopt-migration-guide.md +51 -51
- package/docs/adoption-guide.md +56 -56
- package/docs/agent-hooks-analysis.md +52 -52
- package/docs/architecture.md +6 -6
- package/docs/articles/ai-driven-development-philosophy-and-practice-review.md +4 -4
- package/docs/articles/ai-driven-development-philosophy-and-practice.en.md +9 -9
- package/docs/articles/ai-driven-development-philosophy-and-practice.md +10 -10
- package/docs/autonomous-control-guide.md +89 -89
- package/docs/command-reference.md +11 -11
- package/docs/community.md +4 -4
- package/docs/cross-tool-guide.md +47 -47
- package/docs/developer-guide.md +5 -5
- package/docs/document-governance.md +91 -91
- package/docs/environment-management-guide.md +53 -53
- package/docs/examples/add-export-command/design.md +2 -2
- package/docs/examples/add-export-command/requirements.md +5 -5
- package/docs/examples/add-export-command/tasks.md +2 -2
- package/docs/faq.md +69 -69
- package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.json +9 -9
- package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.md +3 -3
- package/docs/integration-modes.md +60 -60
- package/docs/integration-philosophy.md +48 -48
- package/docs/knowledge-management-guide.md +21 -21
- package/docs/manual-workflows-guide.md +20 -20
- package/docs/moqui-capability-matrix.md +22 -22
- package/docs/moqui-template-core-library-playbook.md +20 -20
- package/docs/multi-agent-coordination-guide.md +19 -19
- package/docs/multi-repo-management-guide.md +93 -93
- package/docs/quick-start-with-ai-tools.md +36 -36
- package/docs/quick-start.md +16 -16
- package/docs/release-checklist.md +7 -7
- package/docs/releases/v1.46.2-validation.md +1 -1
- package/docs/releases/v1.46.2.md +10 -10
- package/docs/scene-runtime-guide.md +42 -42
- package/docs/spec-collaboration-guide.md +43 -43
- package/docs/spec-locking-guide.md +26 -26
- package/docs/spec-numbering-guide.md +6 -6
- package/docs/spec-workflow.md +25 -25
- package/docs/steering-strategy-guide.md +36 -36
- package/docs/team-collaboration-guide.md +23 -23
- package/docs/testing-strategy.md +2 -2
- package/docs/tools/claude-guide.md +26 -26
- package/docs/tools/cursor-guide.md +31 -31
- package/docs/tools/generic-guide.md +22 -22
- package/docs/tools/kiro-guide.md +43 -43
- package/docs/tools/vscode-guide.md +18 -18
- package/docs/tools/windsurf-guide.md +50 -50
- package/docs/troubleshooting.md +116 -116
- package/docs/upgrade-guide.md +49 -49
- package/docs/value-observability-guide.md +6 -6
- package/docs/zh/README.md +22 -22
- package/docs/zh/quick-start.md +34 -34
- package/docs/zh/release-checklist.md +6 -6
- package/docs/zh/releases/v1.46.2-validation.md +1 -1
- package/docs/zh/releases/v1.46.2.md +9 -9
- package/docs/zh/spec-numbering-guide.md +6 -6
- package/docs/zh/tools/claude-guide.md +14 -14
- package/docs/zh/tools/cursor-guide.md +18 -18
- package/docs/zh/tools/generic-guide.md +40 -40
- package/docs/zh/tools/kiro-guide.md +50 -50
- package/docs/zh/tools/vscode-guide.md +20 -20
- package/docs/zh/tools/windsurf-guide.md +49 -49
- package/docs/zh/value-observability-guide.md +6 -6
- package/docs//344/272/244/344/273/230/346/270/205/345/215/225.md +4 -4
- package/lib/adoption/adoption-logger.js +1 -1
- package/lib/adoption/adoption-strategy.js +3 -3
- package/lib/adoption/detection-engine.js +1 -1
- package/lib/adoption/error-formatter.js +17 -17
- package/lib/adoption/progress-reporter.js +2 -2
- package/lib/adoption/smart-orchestrator.js +2 -2
- package/lib/adoption/strategy-selector.js +2 -2
- package/lib/adoption/summary-generator.js +3 -3
- package/lib/auto/autonomous-engine.js +2 -2
- package/lib/auto/close-loop-runner.js +9 -9
- package/lib/backup/backup-system.js +2 -2
- package/lib/collab/collab-manager.js +2 -2
- package/lib/commands/adopt.js +16 -16
- package/lib/commands/auto.js +93 -93
- package/lib/commands/collab.js +8 -8
- package/lib/commands/docs.js +26 -26
- package/lib/commands/doctor.js +2 -2
- package/lib/commands/env.js +14 -14
- package/lib/commands/knowledge.js +13 -13
- package/lib/commands/lock.js +6 -6
- package/lib/commands/ops.js +19 -19
- package/lib/commands/orchestrate.js +5 -5
- package/lib/commands/prompt.js +3 -3
- package/lib/commands/rollback.js +4 -4
- package/lib/commands/scene.js +29 -29
- package/lib/commands/spec-bootstrap.js +1 -1
- package/lib/commands/spec-gate.js +1 -1
- package/lib/commands/spec-pipeline.js +1 -1
- package/lib/commands/task.js +1 -1
- package/lib/commands/templates.js +27 -27
- package/lib/commands/upgrade.js +8 -8
- package/lib/commands/value.js +4 -4
- package/lib/commands/watch.js +9 -9
- package/lib/commands/workflows.js +5 -5
- package/lib/commands/workspace-multi.js +17 -17
- package/lib/commands/workspace.js +5 -5
- package/lib/context/context-exporter.js +1 -1
- package/lib/context/prompt-generator.js +1 -1
- package/lib/data/moqui-capability-lexicon.json +1 -1
- package/lib/environment/environment-manager.js +1 -1
- package/lib/gitignore/gitignore-detector.js +4 -4
- package/lib/gitignore/gitignore-integration.js +2 -2
- package/lib/gitignore/gitignore-transformer.js +3 -3
- package/lib/gitignore/layered-rules-template.js +2 -2
- package/lib/governance/diagnostic-engine.js +4 -4
- package/lib/governance/doc-reference-checker.js +1 -1
- package/lib/governance/hooks-manager.js +5 -5
- package/lib/governance/reporter.js +1 -1
- package/lib/knowledge/knowledge-manager.js +6 -6
- package/lib/orchestrator/agent-spawner.js +1 -1
- package/lib/orchestrator/bootstrap-prompt-builder.js +2 -2
- package/lib/repo/config-manager.js +2 -2
- package/lib/repo/handlers/init-handler.js +3 -3
- package/lib/scene-runtime/audit-emitter.js +2 -2
- package/lib/scene-runtime/binding-plugin-loader.js +1 -1
- package/lib/scene-runtime/moqui-adapter.js +2 -2
- package/lib/scene-runtime/moqui-extractor.js +3 -3
- package/lib/scene-runtime/scene-loader.js +3 -3
- package/lib/scene-runtime/scene-template-linter.js +1 -1
- package/lib/scene-runtime/templates/scene-template-erp-query-v0.1.yaml +1 -1
- package/lib/scene-runtime/templates/scene-template-hybrid-shadow-v0.1.yaml +1 -1
- package/lib/spec/multi-spec-orchestrate.js +1 -1
- package/lib/spec-gate/rules/default-rules.js +1 -1
- package/lib/steering/adoption-config.js +1 -1
- package/lib/steering/compliance-auto-fixer.js +1 -1
- package/lib/steering/compliance-cache.js +3 -3
- package/lib/steering/compliance-error-reporter.js +1 -1
- package/lib/steering/index.js +1 -1
- package/lib/steering/steering-manager.js +7 -7
- package/lib/task/task-claimer.js +2 -1
- package/lib/templates/metadata-collector.js +6 -6
- package/lib/templates/template-creator.js +2 -2
- package/lib/templates/template-exporter.js +12 -12
- package/lib/upgrade/migration-engine.js +4 -4
- package/lib/utils/tool-detector.js +25 -25
- package/lib/utils/validation.js +3 -3
- package/lib/version/version-checker.js +13 -13
- package/lib/version/version-manager.js +7 -7
- package/lib/watch/presets.js +4 -4
- package/lib/workspace/multi/path-utils.js +1 -1
- package/lib/workspace/multi/workspace-context-resolver.js +9 -9
- package/lib/workspace/multi/workspace-registry.js +2 -2
- package/lib/workspace/multi/workspace-state-manager.js +1 -1
- package/lib/workspace/multi/workspace.js +1 -1
- package/lib/workspace/workspace-sync.js +1 -1
- package/locales/en.json +1 -1
- package/locales/zh.json +1 -1
- package/package.json +3 -5
- package/template/.kiro/README.md +40 -40
- package/template/.kiro/specs/SPEC_WORKFLOW_GUIDE.md +3 -3
- package/template/.kiro/steering/CORE_PRINCIPLES.md +3 -3
- package/template/.kiro/steering/ENVIRONMENT.md +2 -2
- package/template/README.md +3 -3
- /package/bin/{kiro-spec-engine.js → scene-capability-engine.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Multi-Workspace Management Commands
|
|
3
3
|
*
|
|
4
|
-
* Implements CLI commands for managing multiple
|
|
4
|
+
* Implements CLI commands for managing multiple sce project workspaces.
|
|
5
5
|
* This is part of Spec 16-00: Multi-Workspace Management.
|
|
6
6
|
*
|
|
7
7
|
* Uses WorkspaceStateManager for atomic operations and single source of truth.
|
|
@@ -15,7 +15,7 @@ const fs = require('fs-extra');
|
|
|
15
15
|
/**
|
|
16
16
|
* Create a new workspace
|
|
17
17
|
*
|
|
18
|
-
* Command:
|
|
18
|
+
* Command: sce workspace create <name> [path]
|
|
19
19
|
*
|
|
20
20
|
* @param {string} name - Workspace name
|
|
21
21
|
* @param {Object} options - Command options
|
|
@@ -46,8 +46,8 @@ async function createWorkspace(name, options = {}) {
|
|
|
46
46
|
console.log(` Created: ${chalk.gray(workspace.createdAt.toLocaleString())}`);
|
|
47
47
|
console.log();
|
|
48
48
|
console.log('Next steps:');
|
|
49
|
-
console.log(` ${chalk.cyan('
|
|
50
|
-
console.log(` ${chalk.cyan('
|
|
49
|
+
console.log(` ${chalk.cyan('sce workspace switch ' + name)} - Set as active workspace`);
|
|
50
|
+
console.log(` ${chalk.cyan('sce workspace list')} - View all workspaces`);
|
|
51
51
|
|
|
52
52
|
} catch (error) {
|
|
53
53
|
console.log(chalk.red('❌ Error:'), error.message);
|
|
@@ -58,7 +58,7 @@ async function createWorkspace(name, options = {}) {
|
|
|
58
58
|
/**
|
|
59
59
|
* List all registered workspaces
|
|
60
60
|
*
|
|
61
|
-
* Command:
|
|
61
|
+
* Command: sce workspace list
|
|
62
62
|
*
|
|
63
63
|
* @param {Object} options - Command options
|
|
64
64
|
* @returns {Promise<void>}
|
|
@@ -78,7 +78,7 @@ async function listWorkspaces(options = {}) {
|
|
|
78
78
|
console.log(chalk.gray('No workspaces registered'));
|
|
79
79
|
console.log();
|
|
80
80
|
console.log('Create your first workspace:');
|
|
81
|
-
console.log(` ${chalk.cyan('
|
|
81
|
+
console.log(` ${chalk.cyan('sce workspace create <name>')}`);
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -104,8 +104,8 @@ async function listWorkspaces(options = {}) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
console.log('Commands:');
|
|
107
|
-
console.log(` ${chalk.cyan('
|
|
108
|
-
console.log(` ${chalk.cyan('
|
|
107
|
+
console.log(` ${chalk.cyan('sce workspace switch <name>')} - Switch to a workspace`);
|
|
108
|
+
console.log(` ${chalk.cyan('sce workspace info <name>')} - View workspace details`);
|
|
109
109
|
|
|
110
110
|
} catch (error) {
|
|
111
111
|
console.log(chalk.red('❌ Error:'), error.message);
|
|
@@ -116,7 +116,7 @@ async function listWorkspaces(options = {}) {
|
|
|
116
116
|
/**
|
|
117
117
|
* Switch to a different workspace
|
|
118
118
|
*
|
|
119
|
-
* Command:
|
|
119
|
+
* Command: sce workspace switch <name>
|
|
120
120
|
*
|
|
121
121
|
* @param {string} name - Workspace name
|
|
122
122
|
* @param {Object} options - Command options
|
|
@@ -140,7 +140,7 @@ async function switchWorkspace(name, options = {}) {
|
|
|
140
140
|
console.log(` Path: ${chalk.gray(workspace.path)}`);
|
|
141
141
|
console.log(` Last accessed: ${chalk.gray(workspace.lastAccessed.toLocaleString())}`);
|
|
142
142
|
console.log();
|
|
143
|
-
console.log('All
|
|
143
|
+
console.log('All sce commands will now use this workspace by default.');
|
|
144
144
|
|
|
145
145
|
} catch (error) {
|
|
146
146
|
console.log(chalk.red('❌ Error:'), error.message);
|
|
@@ -151,7 +151,7 @@ async function switchWorkspace(name, options = {}) {
|
|
|
151
151
|
/**
|
|
152
152
|
* Remove a workspace from the registry
|
|
153
153
|
*
|
|
154
|
-
* Command:
|
|
154
|
+
* Command: sce workspace remove <name>
|
|
155
155
|
*
|
|
156
156
|
* @param {string} name - Workspace name
|
|
157
157
|
* @param {Object} options - Command options
|
|
@@ -191,7 +191,7 @@ async function removeWorkspace(name, options = {}) {
|
|
|
191
191
|
console.log(chalk.yellow(' Files in the workspace directory will NOT be deleted.'));
|
|
192
192
|
console.log();
|
|
193
193
|
console.log('To confirm, run:');
|
|
194
|
-
console.log(` ${chalk.cyan('
|
|
194
|
+
console.log(` ${chalk.cyan('sce workspace remove ' + name + ' --force')}`);
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -210,7 +210,7 @@ async function removeWorkspace(name, options = {}) {
|
|
|
210
210
|
console.log();
|
|
211
211
|
console.log(chalk.yellow('Note: This was your active workspace.'));
|
|
212
212
|
console.log('Set a new active workspace:');
|
|
213
|
-
console.log(` ${chalk.cyan('
|
|
213
|
+
console.log(` ${chalk.cyan('sce workspace switch <name>')}`);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
} catch (error) {
|
|
@@ -222,7 +222,7 @@ async function removeWorkspace(name, options = {}) {
|
|
|
222
222
|
/**
|
|
223
223
|
* Display detailed information about a workspace
|
|
224
224
|
*
|
|
225
|
-
* Command:
|
|
225
|
+
* Command: sce workspace info [name]
|
|
226
226
|
*
|
|
227
227
|
* @param {string|null} name - Workspace name (optional, defaults to active workspace)
|
|
228
228
|
* @param {Object} options - Command options
|
|
@@ -245,10 +245,10 @@ async function infoWorkspace(name = null, options = {}) {
|
|
|
245
245
|
console.log(chalk.yellow('⚠️ No active workspace set'));
|
|
246
246
|
console.log();
|
|
247
247
|
console.log('Set an active workspace:');
|
|
248
|
-
console.log(` ${chalk.cyan('
|
|
248
|
+
console.log(` ${chalk.cyan('sce workspace switch <name>')}`);
|
|
249
249
|
console.log();
|
|
250
250
|
console.log('Or specify a workspace name:');
|
|
251
|
-
console.log(` ${chalk.cyan('
|
|
251
|
+
console.log(` ${chalk.cyan('sce workspace info <name>')}`);
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
254
|
} else {
|
|
@@ -307,7 +307,7 @@ async function infoWorkspace(name = null, options = {}) {
|
|
|
307
307
|
|
|
308
308
|
if (!isActive) {
|
|
309
309
|
console.log('Switch to this workspace:');
|
|
310
|
-
console.log(` ${chalk.cyan('
|
|
310
|
+
console.log(` ${chalk.cyan('sce workspace switch ' + workspace.name)}`);
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
} catch (error) {
|
|
@@ -32,7 +32,7 @@ async function initWorkspace(options = {}) {
|
|
|
32
32
|
console.log(chalk.cyan(' git config --global user.name "Your Name"'));
|
|
33
33
|
console.log();
|
|
34
34
|
console.log('Or specify username manually:');
|
|
35
|
-
console.log(chalk.cyan('
|
|
35
|
+
console.log(chalk.cyan(' sce workspace init --user=yourname'));
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -51,8 +51,8 @@ async function initWorkspace(options = {}) {
|
|
|
51
51
|
console.log(` ${chalk.gray('task-state.json')} - Task tracking`);
|
|
52
52
|
console.log();
|
|
53
53
|
console.log('Next steps:');
|
|
54
|
-
console.log(` ${chalk.cyan('
|
|
55
|
-
console.log(` ${chalk.cyan('
|
|
54
|
+
console.log(` ${chalk.cyan('sce task claim <spec-name> <task-id>')} - Claim a task`);
|
|
55
|
+
console.log(` ${chalk.cyan('sce workspace sync')} - Sync with team`);
|
|
56
56
|
} else {
|
|
57
57
|
console.log(chalk.red('❌ Failed to initialize workspace'));
|
|
58
58
|
console.log();
|
|
@@ -97,7 +97,7 @@ async function syncWorkspace(options = {}) {
|
|
|
97
97
|
if (!workspaceExists) {
|
|
98
98
|
console.log(chalk.yellow('⚠️ Workspace not initialized'));
|
|
99
99
|
console.log();
|
|
100
|
-
console.log('Run ' + chalk.cyan('
|
|
100
|
+
console.log('Run ' + chalk.cyan('sce workspace init') + ' first');
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -158,7 +158,7 @@ async function listWorkspaces(options = {}) {
|
|
|
158
158
|
console.log(chalk.gray('No workspaces found'));
|
|
159
159
|
console.log();
|
|
160
160
|
console.log('This project is in single-user mode.');
|
|
161
|
-
console.log('Run ' + chalk.cyan('
|
|
161
|
+
console.log('Run ' + chalk.cyan('sce workspace init') + ' to enable multi-user mode.');
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -249,7 +249,7 @@ If you encounter issues:
|
|
|
249
249
|
|
|
250
250
|
---
|
|
251
251
|
|
|
252
|
-
**Generated by**:
|
|
252
|
+
**Generated by**: scene-capability-engine
|
|
253
253
|
**Export Format**: Standalone Markdown
|
|
254
254
|
**Compatible with**: Claude Code, Cursor, Codex, and other AI coding assistants`;
|
|
255
255
|
}
|
|
@@ -452,7 +452,7 @@ class PromptGenerator {
|
|
|
452
452
|
'claude-code': 'Use this prompt with Claude Code by copying it into the chat.',
|
|
453
453
|
'cursor': 'Use this prompt with Cursor by pasting it into the composer.',
|
|
454
454
|
'codex': 'Use this prompt with GitHub Copilot by including it in your code comments.',
|
|
455
|
-
'
|
|
455
|
+
'SCE': 'This prompt is optimized for AI IDE with automatic steering loading.'
|
|
456
456
|
};
|
|
457
457
|
|
|
458
458
|
return notes[targetTool] || notes['generic'];
|
|
@@ -109,7 +109,7 @@ class EnvironmentManager {
|
|
|
109
109
|
const registry = await EnvironmentRegistry.load(this.registryPath);
|
|
110
110
|
|
|
111
111
|
if (!registry.active_environment) {
|
|
112
|
-
throw new Error('No active environment. Use "
|
|
112
|
+
throw new Error('No active environment. Use "sce env switch <name>" to activate one.');
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
const env = registry.environments.find(
|
|
@@ -14,7 +14,7 @@ const path = require('path');
|
|
|
14
14
|
* @property {string} type - 'exclusion' | 'negation' | 'comment'
|
|
15
15
|
* @property {number} line - Line number in file
|
|
16
16
|
* @property {boolean} isKiroRelated - Rule relates to .kiro/
|
|
17
|
-
* @property {boolean} isManaged - Rule is in
|
|
17
|
+
* @property {boolean} isManaged - Rule is in sce-managed section
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -131,10 +131,10 @@ class GitignoreDetector {
|
|
|
131
131
|
lines.forEach((line, index) => {
|
|
132
132
|
const trimmed = line.trim();
|
|
133
133
|
|
|
134
|
-
// Track
|
|
135
|
-
if (trimmed.includes('
|
|
134
|
+
// Track sce-managed section
|
|
135
|
+
if (trimmed.includes('sce - DO NOT EDIT THIS SECTION')) {
|
|
136
136
|
inManagedSection = true;
|
|
137
|
-
} else if (trimmed.includes('End of
|
|
137
|
+
} else if (trimmed.includes('End of sce-managed section')) {
|
|
138
138
|
inManagedSection = false;
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -215,7 +215,7 @@ class GitignoreIntegration {
|
|
|
215
215
|
|
|
216
216
|
if (result.backupId) {
|
|
217
217
|
console.log();
|
|
218
|
-
console.log(chalk.gray(' To rollback:'), chalk.cyan(`
|
|
218
|
+
console.log(chalk.gray(' To rollback:'), chalk.cyan(`sce doctor --restore-gitignore ${result.backupId}`));
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
console.log();
|
|
@@ -233,7 +233,7 @@ class GitignoreIntegration {
|
|
|
233
233
|
|
|
234
234
|
if (!result.success) {
|
|
235
235
|
console.log(chalk.yellow('⚠️ .gitignore fix failed:'), result.message);
|
|
236
|
-
console.log(chalk.gray(' Run'), chalk.cyan('
|
|
236
|
+
console.log(chalk.gray(' Run'), chalk.cyan('sce doctor --fix-gitignore'), chalk.gray('to fix manually'));
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
239
|
|
|
@@ -92,11 +92,11 @@ class GitignoreTransformer {
|
|
|
92
92
|
for (const line of lines) {
|
|
93
93
|
const trimmed = line.trim();
|
|
94
94
|
|
|
95
|
-
// Track
|
|
96
|
-
if (trimmed.includes('
|
|
95
|
+
// Track sce-managed section
|
|
96
|
+
if (trimmed.includes('sce - DO NOT EDIT THIS SECTION')) {
|
|
97
97
|
inManagedSection = true;
|
|
98
98
|
continue; // Skip managed section start
|
|
99
|
-
} else if (trimmed.includes('End of
|
|
99
|
+
} else if (trimmed.includes('End of sce-managed section')) {
|
|
100
100
|
inManagedSection = false;
|
|
101
101
|
continue; // Skip managed section end
|
|
102
102
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
const LAYERED_RULES_TEMPLATE = `# ========================================
|
|
10
10
|
# .kiro/ Directory - Layered Management
|
|
11
11
|
# ========================================
|
|
12
|
-
# Generated by
|
|
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)
|
|
@@ -35,7 +35,7 @@ const LAYERED_RULES_TEMPLATE = `# ========================================
|
|
|
35
35
|
.kiro/specs/**/MVP-*.md
|
|
36
36
|
|
|
37
37
|
# ========================================
|
|
38
|
-
# End of
|
|
38
|
+
# End of sce-managed section
|
|
39
39
|
# ========================================
|
|
40
40
|
`;
|
|
41
41
|
|
|
@@ -219,17 +219,17 @@ class DiagnosticEngine {
|
|
|
219
219
|
|
|
220
220
|
// Root violations
|
|
221
221
|
if (summary.byType.root_violation > 0) {
|
|
222
|
-
recommendations.push('Run `
|
|
222
|
+
recommendations.push('Run `sce cleanup` to remove temporary files from root directory');
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
// Temporary documents
|
|
226
226
|
if (summary.byType.temporary_document > 0) {
|
|
227
|
-
recommendations.push('Run `
|
|
227
|
+
recommendations.push('Run `sce cleanup` to remove temporary documents from Spec directories');
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
// Misplaced artifacts
|
|
231
231
|
if (summary.byType.misplaced_artifact > 0) {
|
|
232
|
-
recommendations.push('Run `
|
|
232
|
+
recommendations.push('Run `sce docs archive --spec <spec-name>` to organize artifacts into subdirectories');
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
// Missing required files
|
|
@@ -244,7 +244,7 @@ class DiagnosticEngine {
|
|
|
244
244
|
|
|
245
245
|
// General recommendation
|
|
246
246
|
if (recommendations.length > 0) {
|
|
247
|
-
recommendations.push('Run `
|
|
247
|
+
recommendations.push('Run `sce validate --all` after fixes to confirm compliance');
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
return recommendations;
|
|
@@ -16,8 +16,8 @@ class HooksManager {
|
|
|
16
16
|
this.backupPath = path.join(this.hooksDir, 'pre-commit.backup');
|
|
17
17
|
|
|
18
18
|
// Marker to identify our hook content
|
|
19
|
-
this.hookMarkerStart = '# BEGIN
|
|
20
|
-
this.hookMarkerEnd = '# END
|
|
19
|
+
this.hookMarkerStart = '# BEGIN scene-capability-engine document governance';
|
|
20
|
+
this.hookMarkerEnd = '# END scene-capability-engine document governance';
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -261,9 +261,9 @@ const ValidationEngine = require('./lib/governance/validation-engine');
|
|
|
261
261
|
});
|
|
262
262
|
|
|
263
263
|
console.error('Fix these issues before committing:');
|
|
264
|
-
console.error('
|
|
265
|
-
console.error('
|
|
266
|
-
console.error('
|
|
264
|
+
console.error(' sce doctor --docs # Diagnose issues');
|
|
265
|
+
console.error(' sce cleanup # Remove temporary files');
|
|
266
|
+
console.error(' sce validate --all # Validate structure\\n');
|
|
267
267
|
|
|
268
268
|
process.exit(1);
|
|
269
269
|
}
|
|
@@ -284,7 +284,7 @@ class Reporter {
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
// Recommendations
|
|
287
|
-
console.log(this.chalk.cyan('💡 Run "
|
|
287
|
+
console.log(this.chalk.cyan('💡 Run "sce docs report" to generate a detailed compliance report\n'));
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
/**
|
|
@@ -50,19 +50,19 @@ This directory contains your personal knowledge base for this project.
|
|
|
50
50
|
|
|
51
51
|
\`\`\`bash
|
|
52
52
|
# Add new entry
|
|
53
|
-
|
|
53
|
+
sce knowledge add <type> "<title>"
|
|
54
54
|
|
|
55
55
|
# List all entries
|
|
56
|
-
|
|
56
|
+
sce knowledge list
|
|
57
57
|
|
|
58
58
|
# Search entries
|
|
59
|
-
|
|
59
|
+
sce knowledge search <keyword>
|
|
60
60
|
|
|
61
61
|
# Analyze knowledge base
|
|
62
|
-
|
|
62
|
+
sce knowledge analyze
|
|
63
63
|
|
|
64
64
|
# Integrate knowledge into project
|
|
65
|
-
|
|
65
|
+
sce knowledge integrate <id> --target <destination>
|
|
66
66
|
\`\`\`
|
|
67
67
|
|
|
68
68
|
## Learn More
|
|
@@ -94,7 +94,7 @@ See \`docs/knowledge-management-guide.md\` for complete documentation.
|
|
|
94
94
|
*/
|
|
95
95
|
async addEntry(type, title, options = {}) {
|
|
96
96
|
if (!await this.isInitialized()) {
|
|
97
|
-
throw new Error('Knowledge base not initialized. Run:
|
|
97
|
+
throw new Error('Knowledge base not initialized. Run: sce knowledge init');
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
// Validate type
|
|
@@ -140,7 +140,7 @@ class AgentSpawner extends EventEmitter {
|
|
|
140
140
|
if (useStdinPrompt) {
|
|
141
141
|
// Sanitize agentId for use in filename to avoid Windows invalid path characters.
|
|
142
142
|
const safeAgentId = this._sanitizeWindowsFilenamePart(agentId);
|
|
143
|
-
promptTmpFile = path.join(os.tmpdir(), `
|
|
143
|
+
promptTmpFile = path.join(os.tmpdir(), `sce-prompt-${safeAgentId}-${Date.now()}.txt`);
|
|
144
144
|
fs.writeFileSync(promptTmpFile, stdinPrompt, 'utf-8');
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Bootstrap Prompt Builder
|
|
3
3
|
*
|
|
4
4
|
* Builds the initial prompt injected into each Codex CLI sub-agent so that it
|
|
5
|
-
* has full context about the target Spec,
|
|
5
|
+
* has full context about the target Spec, sce conventions, steering rules, and
|
|
6
6
|
* clear task-execution instructions.
|
|
7
7
|
*
|
|
8
|
-
* Requirements: 2.1 (Spec path), 2.2 (
|
|
8
|
+
* Requirements: 2.1 (Spec path), 2.2 (sce / steering context),
|
|
9
9
|
* 2.3 (task execution instructions), 2.4 (configurable template)
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -58,7 +58,7 @@ class ConfigManager {
|
|
|
58
58
|
// Check if file exists
|
|
59
59
|
if (!(await this.configExists())) {
|
|
60
60
|
throw new ConfigError(
|
|
61
|
-
'Configuration file not found. Run "
|
|
61
|
+
'Configuration file not found. Run "sce repo init" to create it.',
|
|
62
62
|
{ path: configPath }
|
|
63
63
|
);
|
|
64
64
|
}
|
|
@@ -167,7 +167,7 @@ class ConfigManager {
|
|
|
167
167
|
} else if (!this._isSupportedVersion(version)) {
|
|
168
168
|
errors.push(
|
|
169
169
|
`Unsupported configuration version: ${version}. ` +
|
|
170
|
-
'Please upgrade to the latest version of
|
|
170
|
+
'Please upgrade to the latest version of sce.'
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
173
|
|
|
@@ -188,9 +188,9 @@ class InitHandler {
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
console.log('\nNext steps:');
|
|
191
|
-
console.log(' • Run "
|
|
192
|
-
console.log(' • Run "
|
|
193
|
-
console.log(' • Run "
|
|
191
|
+
console.log(' • Run "sce repo status" to view repository status');
|
|
192
|
+
console.log(' • Run "sce repo health" to check repository health');
|
|
193
|
+
console.log(' • Run "sce repo exec <command>" to execute commands across all repos');
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const fs = require('fs-extra');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const crypto = require('crypto');
|
|
4
4
|
|
|
@@ -21,7 +21,7 @@ class AuditEmitter {
|
|
|
21
21
|
scene_ref: payload.scene_ref || payload.sceneRef || null,
|
|
22
22
|
scene_version: payload.scene_version || payload.sceneVersion || null,
|
|
23
23
|
run_mode: payload.run_mode || payload.runMode || null,
|
|
24
|
-
actor: payload.actor || '
|
|
24
|
+
actor: payload.actor || 'sce.scene-runtime',
|
|
25
25
|
payload: payload.payload || payload
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -246,7 +246,7 @@ function parseEntityRef(parts) {
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
/**
|
|
249
|
-
* Map Moqui API response to
|
|
249
|
+
* Map Moqui API response to sce Execution_Result.
|
|
250
250
|
* @param {Object} moquiResponse - { success, data, meta, error }
|
|
251
251
|
* @param {string} handlerId - Handler identifier (e.g., 'moqui.adapter')
|
|
252
252
|
* @param {string} bindingRef - Original binding ref string
|
|
@@ -559,7 +559,7 @@ function createMoquiAdapterHandler(options = {}) {
|
|
|
559
559
|
requestOptions
|
|
560
560
|
);
|
|
561
561
|
|
|
562
|
-
// Map Moqui response to
|
|
562
|
+
// Map Moqui response to sce Execution_Result
|
|
563
563
|
return mapMoquiResponseToResult(moquiResponse, HANDLER_ID, bindingRef);
|
|
564
564
|
},
|
|
565
565
|
|
|
@@ -14,8 +14,8 @@ const HEADER_ITEM_SUFFIXES = [
|
|
|
14
14
|
{ header: 'Master', item: 'Detail' }
|
|
15
15
|
];
|
|
16
16
|
|
|
17
|
-
const SCENE_API_VERSION = '
|
|
18
|
-
const PACKAGE_API_VERSION = '
|
|
17
|
+
const SCENE_API_VERSION = 'sce.scene/v0.2';
|
|
18
|
+
const PACKAGE_API_VERSION = 'sce.scene.package/v0.1';
|
|
19
19
|
|
|
20
20
|
// ─── YAML Serializer ──────────────────────────────────────────────
|
|
21
21
|
|
|
@@ -1636,7 +1636,7 @@ function generatePackageContract(match) {
|
|
|
1636
1636
|
apiVersion: PACKAGE_API_VERSION,
|
|
1637
1637
|
kind: 'scene-template',
|
|
1638
1638
|
metadata: {
|
|
1639
|
-
group: '
|
|
1639
|
+
group: 'sce.scene',
|
|
1640
1640
|
name: packageName,
|
|
1641
1641
|
version: '0.1.0',
|
|
1642
1642
|
summary,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const fs = require('fs-extra');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const yaml = require('js-yaml');
|
|
4
4
|
|
|
@@ -46,8 +46,8 @@ class SceneLoader {
|
|
|
46
46
|
return { valid: false, errors: ['manifest must be an object'] };
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
if (typeof manifest.apiVersion !== 'string' || !manifest.apiVersion.startsWith('
|
|
50
|
-
errors.push('apiVersion must start with
|
|
49
|
+
if (typeof manifest.apiVersion !== 'string' || !manifest.apiVersion.startsWith('sce.scene/')) {
|
|
50
|
+
errors.push('apiVersion must start with sce.scene/');
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
if (manifest.kind !== 'scene') {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// ─── Constants ─────────────────────────────────────────────────────
|
|
4
4
|
|
|
5
5
|
/** Known binding ref prefixes for validation */
|
|
6
|
-
const KNOWN_BINDING_REF_PREFIXES = ['moqui.', 'spec.erp.', '
|
|
6
|
+
const KNOWN_BINDING_REF_PREFIXES = ['moqui.', 'spec.erp.', 'sce.scene.'];
|
|
7
7
|
|
|
8
8
|
/** Valid risk levels for governance checks */
|
|
9
9
|
const VALID_RISK_LEVELS = ['low', 'medium', 'high'];
|
|
@@ -62,7 +62,7 @@ async function runMultiSpecViaOrchestrate(options = {}) {
|
|
|
62
62
|
orchestrate_result: orchestrationResult,
|
|
63
63
|
next_actions: [
|
|
64
64
|
nextActionLabel,
|
|
65
|
-
'Use
|
|
65
|
+
'Use sce orchestrate status to inspect live orchestration state.'
|
|
66
66
|
]
|
|
67
67
|
};
|
|
68
68
|
|
|
@@ -77,7 +77,7 @@ function createDefaultRules(projectPath = process.cwd()) {
|
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
id: 'config_consistency',
|
|
80
|
-
description: 'Verify project-level
|
|
80
|
+
description: 'Verify project-level sce config baseline exists',
|
|
81
81
|
async execute() {
|
|
82
82
|
const kiroDir = path.join(projectPath, '.kiro');
|
|
83
83
|
const configDir = path.join(kiroDir, 'config');
|
|
@@ -94,7 +94,7 @@ class ComplianceAutoFixer {
|
|
|
94
94
|
console.log(chalk.blue('Backup location:'));
|
|
95
95
|
console.log(` ${backupPath}\n`);
|
|
96
96
|
console.log(chalk.blue('To restore from backup:'));
|
|
97
|
-
console.log(`
|
|
97
|
+
console.log(` sce rollback --backup ${path.basename(backupPath)}\n`);
|
|
98
98
|
|
|
99
99
|
return {
|
|
100
100
|
success: true,
|
|
@@ -6,7 +6,7 @@ const os = require('os');
|
|
|
6
6
|
* ComplianceCache - Manages version-based check caching
|
|
7
7
|
*
|
|
8
8
|
* Stores the last successful compliance check version to avoid
|
|
9
|
-
* repeated checks for the same
|
|
9
|
+
* repeated checks for the same sce version.
|
|
10
10
|
*/
|
|
11
11
|
class ComplianceCache {
|
|
12
12
|
/**
|
|
@@ -31,7 +31,7 @@ class ComplianceCache {
|
|
|
31
31
|
/**
|
|
32
32
|
* Check if cache is valid for current version
|
|
33
33
|
*
|
|
34
|
-
* @param {string} currentVersion - Current
|
|
34
|
+
* @param {string} currentVersion - Current sce version
|
|
35
35
|
* @returns {boolean} True if cache is valid
|
|
36
36
|
*/
|
|
37
37
|
isValid(currentVersion) {
|
|
@@ -51,7 +51,7 @@ class ComplianceCache {
|
|
|
51
51
|
/**
|
|
52
52
|
* Update cache with successful check
|
|
53
53
|
*
|
|
54
|
-
* @param {string} version -
|
|
54
|
+
* @param {string} version - sce version
|
|
55
55
|
* @returns {boolean} True if update succeeded
|
|
56
56
|
*/
|
|
57
57
|
update(version) {
|
|
@@ -51,7 +51,7 @@ class ComplianceErrorReporter {
|
|
|
51
51
|
message += ' • Delete temporary files\n';
|
|
52
52
|
|
|
53
53
|
message += '\n' + chalk.gray('To bypass this check (not recommended):') + '\n';
|
|
54
|
-
message += chalk.gray('
|
|
54
|
+
message += chalk.gray(' sce <command> --skip-steering-check') + '\n';
|
|
55
55
|
|
|
56
56
|
return message;
|
|
57
57
|
}
|
package/lib/steering/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const { ContextSyncManager } = require('./context-sync-manager');
|
|
|
14
14
|
* @param {boolean} options.skip - Skip the check entirely
|
|
15
15
|
* @param {boolean} options.force - Force check even if cache is valid
|
|
16
16
|
* @param {string} options.projectPath - Project root path (defaults to cwd)
|
|
17
|
-
* @param {string} options.version - Current
|
|
17
|
+
* @param {string} options.version - Current sce version
|
|
18
18
|
* @returns {boolean} True if compliant or check skipped, false otherwise
|
|
19
19
|
*/
|
|
20
20
|
async function runSteeringComplianceCheck(options = {}) {
|