scene-capability-engine 3.0.1 → 3.0.3
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 +235 -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 +31 -16
- 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/images/wechat-qr.png +0 -0
- 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 +43 -22
- package/docs/moqui-template-core-library-playbook.md +49 -21
- 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 +1148 -106
- 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 +30 -30
- 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 +258 -2
- 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/orchestrator/orchestration-engine.js +55 -6
- 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
|
@@ -15,7 +15,7 @@ const path = require('path');
|
|
|
15
15
|
*/
|
|
16
16
|
async function detectTool(projectPath) {
|
|
17
17
|
const detections = {
|
|
18
|
-
|
|
18
|
+
SCE: await detectKiroIDE(projectPath),
|
|
19
19
|
vscode: await detectVSCode(projectPath),
|
|
20
20
|
cursor: await detectCursor(projectPath),
|
|
21
21
|
other: null
|
|
@@ -25,9 +25,9 @@ async function detectTool(projectPath) {
|
|
|
25
25
|
let primaryTool = 'unknown';
|
|
26
26
|
let confidence = 'low';
|
|
27
27
|
|
|
28
|
-
if (detections.
|
|
29
|
-
primaryTool = '
|
|
30
|
-
confidence = detections.
|
|
28
|
+
if (detections.SCE.detected) {
|
|
29
|
+
primaryTool = 'SCE';
|
|
30
|
+
confidence = detections.SCE.confidence;
|
|
31
31
|
} else if (detections.cursor.detected && detections.cursor.confidence === 'high') {
|
|
32
32
|
// Only use Cursor if we have high confidence (Cursor-specific indicators)
|
|
33
33
|
primaryTool = 'cursor';
|
|
@@ -53,7 +53,7 @@ async function detectTool(projectPath) {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* Detect
|
|
56
|
+
* Detect AI IDE
|
|
57
57
|
*
|
|
58
58
|
* @param {string} projectPath - Project root path
|
|
59
59
|
* @returns {Promise<Object>} Detection result
|
|
@@ -71,7 +71,7 @@ async function detectKiroIDE(projectPath) {
|
|
|
71
71
|
confidence = 'medium';
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
// Check for
|
|
74
|
+
// Check for SCE-specific files
|
|
75
75
|
const kiroFiles = [
|
|
76
76
|
'.kiro/steering',
|
|
77
77
|
'.kiro/specs',
|
|
@@ -86,9 +86,9 @@ async function detectKiroIDE(projectPath) {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
// Check for environment variables (if running in
|
|
89
|
+
// Check for environment variables (if running in SCE)
|
|
90
90
|
if (process.env.KIRO_IDE === 'true' || process.env.KIRO_VERSION) {
|
|
91
|
-
indicators.push('
|
|
91
|
+
indicators.push('SCE environment variables detected');
|
|
92
92
|
detected = true;
|
|
93
93
|
confidence = 'high';
|
|
94
94
|
}
|
|
@@ -210,18 +210,18 @@ function getRecommendations(primaryTool, detections) {
|
|
|
210
210
|
const recommendations = [];
|
|
211
211
|
|
|
212
212
|
switch (primaryTool) {
|
|
213
|
-
case '
|
|
213
|
+
case 'SCE':
|
|
214
214
|
recommendations.push({
|
|
215
215
|
type: 'native',
|
|
216
|
-
title: 'Use
|
|
217
|
-
description: 'You can use native
|
|
216
|
+
title: 'Use SCE Agent Hooks',
|
|
217
|
+
description: 'You can use native SCE agent hooks for seamless automation',
|
|
218
218
|
action: 'Configure hooks in .kiro/hooks/'
|
|
219
219
|
});
|
|
220
220
|
recommendations.push({
|
|
221
221
|
type: 'optional',
|
|
222
222
|
title: 'Watch Mode Available',
|
|
223
223
|
description: 'Watch mode is also available as a fallback option',
|
|
224
|
-
action: 'Run:
|
|
224
|
+
action: 'Run: sce watch init'
|
|
225
225
|
});
|
|
226
226
|
break;
|
|
227
227
|
|
|
@@ -231,13 +231,13 @@ function getRecommendations(primaryTool, detections) {
|
|
|
231
231
|
type: 'primary',
|
|
232
232
|
title: 'Use Watch Mode',
|
|
233
233
|
description: 'Watch mode provides automated file monitoring for your IDE',
|
|
234
|
-
action: 'Run:
|
|
234
|
+
action: 'Run: sce watch init && sce watch install auto-sync'
|
|
235
235
|
});
|
|
236
236
|
recommendations.push({
|
|
237
237
|
type: 'preset',
|
|
238
238
|
title: 'Install Presets',
|
|
239
239
|
description: 'Pre-configured automation patterns for common workflows',
|
|
240
|
-
action: 'Run:
|
|
240
|
+
action: 'Run: sce watch presets'
|
|
241
241
|
});
|
|
242
242
|
break;
|
|
243
243
|
|
|
@@ -253,7 +253,7 @@ function getRecommendations(primaryTool, detections) {
|
|
|
253
253
|
type: 'watch',
|
|
254
254
|
title: 'Try Watch Mode',
|
|
255
255
|
description: 'Watch mode works with most editors and IDEs',
|
|
256
|
-
action: 'Run:
|
|
256
|
+
action: 'Run: sce watch init'
|
|
257
257
|
});
|
|
258
258
|
break;
|
|
259
259
|
}
|
|
@@ -269,7 +269,7 @@ function getRecommendations(primaryTool, detections) {
|
|
|
269
269
|
*/
|
|
270
270
|
function getAutomationSuggestions(tool) {
|
|
271
271
|
const suggestions = {
|
|
272
|
-
|
|
272
|
+
SCE: [
|
|
273
273
|
'Configure agent hooks for automatic task sync',
|
|
274
274
|
'Set up prompt regeneration on spec changes',
|
|
275
275
|
'Enable context export on task completion'
|
|
@@ -314,13 +314,13 @@ async function generateAutoConfig(detection, projectPath) {
|
|
|
314
314
|
};
|
|
315
315
|
|
|
316
316
|
switch (primaryTool) {
|
|
317
|
-
case '
|
|
317
|
+
case 'SCE':
|
|
318
318
|
config.suggestedPresets = [];
|
|
319
319
|
config.suggestedCommands = [
|
|
320
|
-
'Use native
|
|
321
|
-
'Optional:
|
|
320
|
+
'Use native SCE agent hooks (see .kiro/hooks/)',
|
|
321
|
+
'Optional: sce watch init (for watch mode fallback)'
|
|
322
322
|
];
|
|
323
|
-
config.notes.push('
|
|
323
|
+
config.notes.push('AI IDE detected - native hooks are recommended');
|
|
324
324
|
config.notes.push('Watch mode available as fallback option');
|
|
325
325
|
break;
|
|
326
326
|
|
|
@@ -328,9 +328,9 @@ async function generateAutoConfig(detection, projectPath) {
|
|
|
328
328
|
case 'cursor':
|
|
329
329
|
config.suggestedPresets = ['auto-sync', 'prompt-regen', 'context-export'];
|
|
330
330
|
config.suggestedCommands = [
|
|
331
|
-
'
|
|
332
|
-
'
|
|
333
|
-
'
|
|
331
|
+
'sce watch init',
|
|
332
|
+
'sce watch install auto-sync',
|
|
333
|
+
'sce watch start'
|
|
334
334
|
];
|
|
335
335
|
config.configPath = path.join(projectPath, '.kiro/watch-config.json');
|
|
336
336
|
config.notes.push(`${primaryTool === 'vscode' ? 'VS Code' : 'Cursor'} detected - watch mode recommended`);
|
|
@@ -341,8 +341,8 @@ async function generateAutoConfig(detection, projectPath) {
|
|
|
341
341
|
default:
|
|
342
342
|
config.suggestedPresets = ['auto-sync'];
|
|
343
343
|
config.suggestedCommands = [
|
|
344
|
-
'
|
|
345
|
-
'
|
|
344
|
+
'sce watch init',
|
|
345
|
+
'sce watch install auto-sync',
|
|
346
346
|
'See: docs/cross-tool-guide.md for manual workflows'
|
|
347
347
|
];
|
|
348
348
|
config.notes.push('No specific IDE detected');
|
package/lib/utils/validation.js
CHANGED
|
@@ -124,7 +124,7 @@ async function validateVersionFile(projectPath) {
|
|
|
124
124
|
|
|
125
125
|
// Check required fields
|
|
126
126
|
const requiredFields = [
|
|
127
|
-
'
|
|
127
|
+
'sce-version',
|
|
128
128
|
'template-version',
|
|
129
129
|
'created',
|
|
130
130
|
'last-upgraded',
|
|
@@ -138,8 +138,8 @@ async function validateVersionFile(projectPath) {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
// Validate field types
|
|
141
|
-
if (versionInfo['
|
|
142
|
-
errors.push('
|
|
141
|
+
if (versionInfo['sce-version'] && typeof versionInfo['sce-version'] !== 'string') {
|
|
142
|
+
errors.push('sce-version must be a string');
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
if (versionInfo['template-version'] && typeof versionInfo['template-version'] !== 'string') {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Version Checker
|
|
3
3
|
*
|
|
4
|
-
* Automatically detects version mismatches between project and installed
|
|
4
|
+
* Automatically detects version mismatches between project and installed sce.
|
|
5
5
|
* Displays warnings and upgrade suggestions.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -38,9 +38,9 @@ class VersionChecker {
|
|
|
38
38
|
return { mismatch: false, shouldUpgrade: false };
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
const projectVersion = projectVersionInfo['
|
|
41
|
+
const projectVersion = projectVersionInfo['sce-version'];
|
|
42
42
|
|
|
43
|
-
// Get current
|
|
43
|
+
// Get current sce version
|
|
44
44
|
const packageJson = require('../../package.json');
|
|
45
45
|
const kseVersion = packageJson.version;
|
|
46
46
|
|
|
@@ -67,15 +67,15 @@ class VersionChecker {
|
|
|
67
67
|
* Displays version mismatch warning
|
|
68
68
|
*
|
|
69
69
|
* @param {string} projectVersion - Project version
|
|
70
|
-
* @param {string} kseVersion - Current
|
|
70
|
+
* @param {string} kseVersion - Current sce version
|
|
71
71
|
*/
|
|
72
72
|
displayWarning(projectVersion, kseVersion) {
|
|
73
73
|
console.log();
|
|
74
74
|
console.log(chalk.yellow('⚠️ Version Mismatch Detected'));
|
|
75
|
-
console.log(chalk.gray(' Project initialized with
|
|
76
|
-
console.log(chalk.gray(' Current
|
|
75
|
+
console.log(chalk.gray(' Project initialized with sce'), chalk.cyan(`v${projectVersion}`));
|
|
76
|
+
console.log(chalk.gray(' Current sce version:'), chalk.cyan(`v${kseVersion}`));
|
|
77
77
|
console.log();
|
|
78
|
-
console.log(chalk.blue('💡 Tip:'), chalk.gray('Run'), chalk.cyan('
|
|
78
|
+
console.log(chalk.blue('💡 Tip:'), chalk.gray('Run'), chalk.cyan('sce upgrade'), chalk.gray('to update project templates'));
|
|
79
79
|
console.log(chalk.gray(' Or use'), chalk.cyan('--no-version-check'), chalk.gray('to suppress this warning'));
|
|
80
80
|
console.log();
|
|
81
81
|
}
|
|
@@ -92,8 +92,8 @@ class VersionChecker {
|
|
|
92
92
|
|
|
93
93
|
if (!projectVersionInfo) {
|
|
94
94
|
console.log(chalk.yellow('⚠️ No version information found'));
|
|
95
|
-
console.log(chalk.gray(' This project may not be initialized with
|
|
96
|
-
console.log(chalk.gray(' Run'), chalk.cyan('
|
|
95
|
+
console.log(chalk.gray(' This project may not be initialized with sce'));
|
|
96
|
+
console.log(chalk.gray(' Run'), chalk.cyan('sce adopt'), chalk.gray('to adopt this project'));
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -103,14 +103,14 @@ class VersionChecker {
|
|
|
103
103
|
console.log(chalk.blue('📦 Version Information'));
|
|
104
104
|
console.log();
|
|
105
105
|
console.log(chalk.gray('Project:'));
|
|
106
|
-
console.log(`
|
|
106
|
+
console.log(` sce version: ${chalk.cyan(projectVersionInfo['sce-version'])}`);
|
|
107
107
|
console.log(` Template version: ${chalk.cyan(projectVersionInfo['template-version'])}`);
|
|
108
108
|
console.log(` Created: ${chalk.gray(new Date(projectVersionInfo.created).toLocaleString())}`);
|
|
109
109
|
console.log(` Last upgraded: ${chalk.gray(new Date(projectVersionInfo['last-upgraded']).toLocaleString())}`);
|
|
110
110
|
|
|
111
111
|
console.log();
|
|
112
112
|
console.log(chalk.gray('Installed:'));
|
|
113
|
-
console.log(`
|
|
113
|
+
console.log(` sce version: ${chalk.cyan(kseVersion)}`);
|
|
114
114
|
|
|
115
115
|
if (projectVersionInfo['upgrade-history'].length > 0) {
|
|
116
116
|
console.log();
|
|
@@ -128,13 +128,13 @@ class VersionChecker {
|
|
|
128
128
|
console.log();
|
|
129
129
|
|
|
130
130
|
const needsUpgrade = this.versionManager.needsUpgrade(
|
|
131
|
-
projectVersionInfo['
|
|
131
|
+
projectVersionInfo['sce-version'],
|
|
132
132
|
kseVersion
|
|
133
133
|
);
|
|
134
134
|
|
|
135
135
|
if (needsUpgrade) {
|
|
136
136
|
console.log(chalk.yellow('⚠️ Upgrade available'));
|
|
137
|
-
console.log(chalk.gray(' Run'), chalk.cyan('
|
|
137
|
+
console.log(chalk.gray(' Run'), chalk.cyan('sce upgrade'), chalk.gray('to update to'), chalk.cyan(`v${kseVersion}`));
|
|
138
138
|
} else {
|
|
139
139
|
console.log(chalk.green('✅ Project is up to date'));
|
|
140
140
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Version Manager
|
|
3
3
|
*
|
|
4
4
|
* Manages version tracking, compatibility checking, and upgrade path calculation
|
|
5
|
-
* for the
|
|
5
|
+
* for the scene-capability-engine project adoption and upgrade system.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const path = require('path');
|
|
@@ -88,15 +88,15 @@ class VersionManager {
|
|
|
88
88
|
/**
|
|
89
89
|
* Creates initial version info for a new project
|
|
90
90
|
*
|
|
91
|
-
* @param {string} kseVersion - Current
|
|
92
|
-
* @param {string} templateVersion - Template version (default: same as
|
|
91
|
+
* @param {string} kseVersion - Current sce version
|
|
92
|
+
* @param {string} templateVersion - Template version (default: same as sce)
|
|
93
93
|
* @returns {VersionInfo}
|
|
94
94
|
*/
|
|
95
95
|
createVersionInfo(kseVersion, templateVersion = null) {
|
|
96
96
|
const now = new Date().toISOString();
|
|
97
97
|
|
|
98
98
|
return {
|
|
99
|
-
'
|
|
99
|
+
'sce-version': kseVersion,
|
|
100
100
|
'template-version': templateVersion || kseVersion,
|
|
101
101
|
'created': now,
|
|
102
102
|
'last-upgraded': now,
|
|
@@ -116,7 +116,7 @@ class VersionManager {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
const requiredFields = [
|
|
119
|
-
'
|
|
119
|
+
'sce-version',
|
|
120
120
|
'template-version',
|
|
121
121
|
'created',
|
|
122
122
|
'last-upgraded',
|
|
@@ -141,7 +141,7 @@ class VersionManager {
|
|
|
141
141
|
* Checks if upgrade is needed
|
|
142
142
|
*
|
|
143
143
|
* @param {string} projectVersion - Current project version
|
|
144
|
-
* @param {string} kseVersion - Installed
|
|
144
|
+
* @param {string} kseVersion - Installed sce version
|
|
145
145
|
* @returns {boolean}
|
|
146
146
|
*/
|
|
147
147
|
needsUpgrade(projectVersion, kseVersion) {
|
|
@@ -306,7 +306,7 @@ class VersionManager {
|
|
|
306
306
|
|
|
307
307
|
// Update version and last-upgraded if successful
|
|
308
308
|
if (success) {
|
|
309
|
-
versionInfo['
|
|
309
|
+
versionInfo['sce-version'] = toVersion;
|
|
310
310
|
versionInfo['template-version'] = toVersion;
|
|
311
311
|
versionInfo['last-upgraded'] = entry.date;
|
|
312
312
|
}
|
package/lib/watch/presets.js
CHANGED
|
@@ -14,7 +14,7 @@ const autoSyncPreset = {
|
|
|
14
14
|
patterns: ['**/tasks.md'],
|
|
15
15
|
actions: {
|
|
16
16
|
'**/tasks.md': {
|
|
17
|
-
command: '
|
|
17
|
+
command: 'sce workspace sync',
|
|
18
18
|
debounce: 2000,
|
|
19
19
|
retry: true,
|
|
20
20
|
description: 'Sync workspace when tasks are updated'
|
|
@@ -38,13 +38,13 @@ const promptRegenPreset = {
|
|
|
38
38
|
],
|
|
39
39
|
actions: {
|
|
40
40
|
'**/.kiro/specs/*/requirements.md': {
|
|
41
|
-
command: '
|
|
41
|
+
command: 'sce prompt regenerate ${spec}',
|
|
42
42
|
debounce: 5000,
|
|
43
43
|
retry: true,
|
|
44
44
|
description: 'Regenerate prompts when requirements change'
|
|
45
45
|
},
|
|
46
46
|
'**/.kiro/specs/*/design.md': {
|
|
47
|
-
command: '
|
|
47
|
+
command: 'sce prompt regenerate ${spec}',
|
|
48
48
|
debounce: 5000,
|
|
49
49
|
retry: true,
|
|
50
50
|
description: 'Regenerate prompts when design changes'
|
|
@@ -69,7 +69,7 @@ const contextExportPreset = {
|
|
|
69
69
|
patterns: ['**/.kiro/specs/*/.complete'],
|
|
70
70
|
actions: {
|
|
71
71
|
'**/.kiro/specs/*/.complete': {
|
|
72
|
-
command: '
|
|
72
|
+
command: 'sce context export ${spec}',
|
|
73
73
|
debounce: 1000,
|
|
74
74
|
retry: true,
|
|
75
75
|
description: 'Export context when completion marker is created'
|
|
@@ -87,7 +87,7 @@ class WorkspaceContextResolver {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
* Check if a directory is a valid
|
|
90
|
+
* Check if a directory is a valid sce project directory
|
|
91
91
|
*
|
|
92
92
|
* @param {string} dirPath - Directory path to check
|
|
93
93
|
* @returns {Promise<boolean>} True if directory contains .kiro/ structure
|
|
@@ -174,7 +174,7 @@ class WorkspaceContextResolver {
|
|
|
174
174
|
* Check if current directory should prompt for workspace registration
|
|
175
175
|
*
|
|
176
176
|
* Returns true if:
|
|
177
|
-
* - Current directory is a valid
|
|
177
|
+
* - Current directory is a valid sce project
|
|
178
178
|
* - Current directory is not within any registered workspace
|
|
179
179
|
*
|
|
180
180
|
* @param {string|null} currentDir - Current directory (defaults to process.cwd())
|
|
@@ -183,7 +183,7 @@ class WorkspaceContextResolver {
|
|
|
183
183
|
async shouldPromptForRegistration(currentDir = null) {
|
|
184
184
|
const targetDir = currentDir || process.cwd();
|
|
185
185
|
|
|
186
|
-
// Check if it's a valid
|
|
186
|
+
// Check if it's a valid sce directory
|
|
187
187
|
const isValid = await this.isValidKseDirectory(targetDir);
|
|
188
188
|
if (!isValid) {
|
|
189
189
|
return false;
|
|
@@ -215,23 +215,23 @@ class WorkspaceContextResolver {
|
|
|
215
215
|
if (isValid) {
|
|
216
216
|
throw new Error(
|
|
217
217
|
'No workspace context available.\n' +
|
|
218
|
-
'The current directory is a valid
|
|
219
|
-
'Action Required: Run "
|
|
218
|
+
'The current directory is a valid sce project but not registered as a workspace.\n' +
|
|
219
|
+
'Action Required: Run "sce workspace create <name>" to register this directory.'
|
|
220
220
|
);
|
|
221
221
|
} else {
|
|
222
222
|
const available = await this.getAvailableWorkspaceNames();
|
|
223
223
|
if (available.length > 0) {
|
|
224
224
|
throw new Error(
|
|
225
225
|
'No workspace context available.\n' +
|
|
226
|
-
'The current directory is not a
|
|
227
|
-
`Action Required: Run "
|
|
226
|
+
'The current directory is not a sce project and no active workspace is set.\n' +
|
|
227
|
+
`Action Required: Run "sce workspace switch <name>" or use --workspace parameter.\n` +
|
|
228
228
|
`Available workspaces: ${available.join(', ')}`
|
|
229
229
|
);
|
|
230
230
|
} else {
|
|
231
231
|
throw new Error(
|
|
232
232
|
'No workspace context available.\n' +
|
|
233
|
-
'No workspaces are registered and the current directory is not a
|
|
234
|
-
'Action Required: Run "
|
|
233
|
+
'No workspaces are registered and the current directory is not a sce project.\n' +
|
|
234
|
+
'Action Required: Run "sce workspace create <name>" to register a workspace.'
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
@@ -61,10 +61,10 @@ class WorkspaceRegistry {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* Validate that a path is a valid
|
|
64
|
+
* Validate that a path is a valid sce project directory
|
|
65
65
|
*
|
|
66
66
|
* @param {string} workspacePath - Path to validate
|
|
67
|
-
* @returns {Promise<boolean>} True if valid
|
|
67
|
+
* @returns {Promise<boolean>} True if valid sce project
|
|
68
68
|
*/
|
|
69
69
|
async validateWorkspacePath(workspacePath) {
|
|
70
70
|
const fs = require('fs-extra');
|
|
@@ -297,7 +297,7 @@ class WorkspaceStateManager {
|
|
|
297
297
|
const kiroPath = path.join(workspacePath, '.kiro');
|
|
298
298
|
const kiroExists = await fs.pathExists(kiroPath);
|
|
299
299
|
if (!kiroExists) {
|
|
300
|
-
throw new Error(`Path "${workspacePath}" is not a valid
|
|
300
|
+
throw new Error(`Path "${workspacePath}" is not a valid sce project directory. ` +
|
|
301
301
|
`Ensure it exists and contains a .kiro/ directory.`);
|
|
302
302
|
}
|
|
303
303
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const PathUtils = require('./path-utils');
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Workspace - Data model for a registered
|
|
4
|
+
* Workspace - Data model for a registered sce project workspace
|
|
5
5
|
*
|
|
6
6
|
* Represents a single workspace entry in the workspace registry.
|
|
7
7
|
* Each workspace has a unique name, absolute path, and timestamps.
|
package/locales/en.json
CHANGED
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"malformed_version": "Unable to parse Python version: {version}",
|
|
104
104
|
"error_header": "✗ Python is required for Ultrawork quality enhancement features",
|
|
105
105
|
"install_header": "Installation instructions:",
|
|
106
|
-
"help_footer": "For more help, visit: https://github.com/USERNAME/
|
|
106
|
+
"help_footer": "For more help, visit: https://github.com/USERNAME/scene-capability-engine#python-setup",
|
|
107
107
|
"install": {
|
|
108
108
|
"windows": "Windows:\n1. Download Python from https://www.python.org/downloads/\n2. Run the installer and check 'Add Python to PATH'\n3. Restart your terminal and run: python --version",
|
|
109
109
|
"macos": "macOS:\n1. Install Homebrew if not already installed: /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n2. Install Python: brew install python\n3. Verify installation: python3 --version",
|
package/locales/zh.json
CHANGED
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"malformed_version": "无法解析 Python 版本: {version}",
|
|
104
104
|
"error_header": "✗ Ultrawork 质量增强功能需要 Python",
|
|
105
105
|
"install_header": "安装说明:",
|
|
106
|
-
"help_footer": "获取更多帮助,请访问: https://github.com/USERNAME/
|
|
106
|
+
"help_footer": "获取更多帮助,请访问: https://github.com/USERNAME/scene-capability-engine#python-setup",
|
|
107
107
|
"install": {
|
|
108
108
|
"windows": "Windows:\n1. 从 https://www.python.org/downloads/ 下载 Python\n2. 运行安装程序并勾选 'Add Python to PATH'\n3. 重启终端并运行: python --version",
|
|
109
109
|
"macos": "macOS:\n1. 如果尚未安装 Homebrew,请先安装: /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n2. 安装 Python: brew install python\n3. 验证安装: python3 --version",
|
package/package.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scene-capability-engine",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "SCE (Scene Capability Engine) - A CLI tool and npm package for spec-driven development with AI coding assistants.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"sce": "bin/sce.js",
|
|
8
|
-
"sco": "bin/sco.js"
|
|
9
|
-
"kse": "bin/kse.js",
|
|
10
|
-
"kiro-spec-engine": "bin/kiro-spec-engine.js"
|
|
8
|
+
"sco": "bin/sco.js"
|
|
11
9
|
},
|
|
12
10
|
"files": [
|
|
13
11
|
"bin/",
|
|
@@ -45,7 +43,7 @@
|
|
|
45
43
|
"uninstall-global": "npm uninstall -g scene-capability-engine"
|
|
46
44
|
},
|
|
47
45
|
"keywords": [
|
|
48
|
-
"
|
|
46
|
+
"SCE",
|
|
49
47
|
"spec",
|
|
50
48
|
"spec-driven",
|
|
51
49
|
"engine",
|
package/template/.kiro/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Project Development Guide
|
|
2
2
|
|
|
3
|
-
> **AI Tools: Read this first!** This project follows Spec-driven development methodology powered by
|
|
3
|
+
> **AI Tools: Read this first!** This project follows Spec-driven development methodology powered by sce (Scene Capability Engine).
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -19,46 +19,46 @@ This project uses **Spec-driven development** - a structured approach where:
|
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
## 🚀
|
|
22
|
+
## 🚀 sce Capabilities (v1.45.x)
|
|
23
23
|
|
|
24
|
-
**IMPORTANT**: After installing or updating
|
|
24
|
+
**IMPORTANT**: After installing or updating sce, read this section to understand all available capabilities. Using the right tool for the job ensures efficient, high-quality development.
|
|
25
25
|
|
|
26
26
|
### Core: Spec-Driven Development
|
|
27
|
-
- `
|
|
28
|
-
- `
|
|
29
|
-
- `
|
|
30
|
-
- `
|
|
31
|
-
- `
|
|
32
|
-
- `
|
|
27
|
+
- `sce adopt` — Initialize sce in a project (creates `.kiro/` structure)
|
|
28
|
+
- `sce create-spec <name>` — Create a new Spec (requirements + design + tasks)
|
|
29
|
+
- `sce status` — Show project status and Spec progress
|
|
30
|
+
- `sce workflows` — List available Specs and workflows
|
|
31
|
+
- `sce context export <spec-name>` — Export Spec context for AI consumption
|
|
32
|
+
- `sce prompt generate <spec> <task>` — Generate task-specific prompt
|
|
33
33
|
|
|
34
34
|
### Task Management
|
|
35
|
-
- `
|
|
36
|
-
- `
|
|
35
|
+
- `sce task claim <spec> <task-id>` — Claim a task for execution
|
|
36
|
+
- `sce task list <spec>` — List claimed tasks
|
|
37
37
|
- Task status tracking in `tasks.md`: `[ ]` not started, `[-]` in progress, `[x]` completed
|
|
38
38
|
|
|
39
39
|
### Spec Locking (Multi-User)
|
|
40
|
-
- `
|
|
41
|
-
- `
|
|
42
|
-
- `
|
|
43
|
-
- `
|
|
44
|
-
- `
|
|
40
|
+
- `sce lock acquire <spec>` — Lock a Spec to prevent conflicts
|
|
41
|
+
- `sce lock release <spec>` / `sce unlock <spec>` — Release lock
|
|
42
|
+
- `sce lock status` — Check lock status
|
|
43
|
+
- `sce lock cleanup` — Remove stale locks (24h timeout)
|
|
44
|
+
- `sce lock whoami` — Show machine identifier
|
|
45
45
|
|
|
46
46
|
### Workspace Management
|
|
47
|
-
- `
|
|
47
|
+
- `sce workspace create/list/switch/info/remove` — Manage multiple sce projects
|
|
48
48
|
- Global state: `~/.kse/workspace-state.json`
|
|
49
49
|
|
|
50
50
|
### Environment Configuration
|
|
51
|
-
- `
|
|
51
|
+
- `sce env list/switch/info/register/unregister/rollback/verify/run` — Multi-environment management
|
|
52
52
|
- Automatic backup before each switch, instant rollback support
|
|
53
53
|
|
|
54
54
|
### Multi-Repository Management
|
|
55
|
-
- `
|
|
56
|
-
- `
|
|
57
|
-
- `
|
|
58
|
-
- `
|
|
55
|
+
- `sce repo init [--nested]` — Auto-discover Git repositories
|
|
56
|
+
- `sce repo status [--verbose]` — Status of all repositories
|
|
57
|
+
- `sce repo exec "<command>"` — Execute command across all repos
|
|
58
|
+
- `sce repo health` — Check repository health
|
|
59
59
|
|
|
60
60
|
### Spec-Level Collaboration
|
|
61
|
-
- `
|
|
61
|
+
- `sce collab init/status/assign/verify/integrate/migrate` — Coordinate parallel Spec development
|
|
62
62
|
- Master Spec + Sub-Specs with dependency management
|
|
63
63
|
- Interface contracts for cross-Spec compatibility
|
|
64
64
|
|
|
@@ -86,16 +86,16 @@ Fourth steering layer (L4) and Spec lifecycle coordination for multi-agent scena
|
|
|
86
86
|
- See `docs/multi-agent-coordination-guide.md` for full API reference
|
|
87
87
|
|
|
88
88
|
### Autonomous Control
|
|
89
|
-
- `
|
|
90
|
-
- `
|
|
91
|
-
- `
|
|
89
|
+
- `sce auto create <description>` — Create and execute Spec autonomously
|
|
90
|
+
- `sce auto run <spec>` — Execute existing Spec tasks autonomously
|
|
91
|
+
- `sce auto status/resume/stop/config` — Manage autonomous execution
|
|
92
92
|
- Intelligent error recovery, checkpoint system, learning from history
|
|
93
93
|
|
|
94
94
|
### Agent Orchestrator — Multi-Agent Spec Execution (v1.45.0)
|
|
95
95
|
Automate parallel Spec execution via Codex CLI sub-agents (replaces manual multi-terminal workflow):
|
|
96
|
-
- `
|
|
97
|
-
- `
|
|
98
|
-
- `
|
|
96
|
+
- `sce orchestrate run --specs "spec-a,spec-b,spec-c" --max-parallel 3` — Start multi-agent orchestration
|
|
97
|
+
- `sce orchestrate status` — View orchestration progress (per-Spec status, overall state)
|
|
98
|
+
- `sce orchestrate stop` — Gracefully stop all sub-agents
|
|
99
99
|
- **OrchestratorConfig** (`lib/orchestrator`) — Configuration management (agent backend, parallelism, timeout, retries) via `.kiro/config/orchestrator.json`
|
|
100
100
|
- **BootstrapPromptBuilder** (`lib/orchestrator`) — Builds bootstrap prompts with Spec path, steering context, execution instructions
|
|
101
101
|
- **AgentSpawner** (`lib/orchestrator`) — Process manager for Codex CLI sub-agents with timeout detection, graceful termination (SIGTERM → SIGKILL)
|
|
@@ -105,23 +105,23 @@ Automate parallel Spec execution via Codex CLI sub-agents (replaces manual multi
|
|
|
105
105
|
- 11 correctness properties verified via property-based testing
|
|
106
106
|
|
|
107
107
|
### Scene Runtime (Template Engine + Quality + ERP)
|
|
108
|
-
- **Template Engine**: `
|
|
109
|
-
- **Package Registry**: `
|
|
110
|
-
- **Quality Pipeline**: `
|
|
111
|
-
- **Ontology**: `
|
|
112
|
-
- **Moqui ERP**: `
|
|
113
|
-
- **Registry Ops**: `
|
|
108
|
+
- **Template Engine**: `sce scene template-validate/resolve/render` — Variable schema, multi-file rendering, 3-layer inheritance
|
|
109
|
+
- **Package Registry**: `sce scene publish/unpublish/install/list/search/info/diff/version` — Local package management
|
|
110
|
+
- **Quality Pipeline**: `sce scene lint/score/contribute` — 10-category lint, quality scoring, one-stop publish
|
|
111
|
+
- **Ontology**: `sce scene ontology show/deps/validate/actions/lineage/agent-info` — Semantic relationship graph
|
|
112
|
+
- **Moqui ERP**: `sce scene connect/discover/extract` — ERP integration and template extraction
|
|
113
|
+
- **Registry Ops**: `sce scene deprecate/audit/owner/tag/lock/stats` — Advanced registry management
|
|
114
114
|
|
|
115
115
|
### Document Governance
|
|
116
|
-
- `
|
|
116
|
+
- `sce docs diagnose/cleanup/validate/archive/hooks` — Document lifecycle management
|
|
117
117
|
- Automatic compliance checking and cleanup
|
|
118
118
|
|
|
119
119
|
### DevOps Integration
|
|
120
|
-
- `
|
|
120
|
+
- `sce ops init/validate/audit/takeover/feedback` — Operations Spec management
|
|
121
121
|
- Progressive AI autonomy levels (L1-L5)
|
|
122
122
|
|
|
123
123
|
### Knowledge Management
|
|
124
|
-
- `
|
|
124
|
+
- `sce knowledge init/add/list/search/show/delete/stats` — Personal knowledge base
|
|
125
125
|
|
|
126
126
|
---
|
|
127
127
|
|
|
@@ -235,13 +235,13 @@ A Spec is a complete feature definition with three parts:
|
|
|
235
235
|
| What to work on | `.kiro/specs/{spec-name}/tasks.md` |
|
|
236
236
|
| Project context | `.kiro/steering/CURRENT_CONTEXT.md` |
|
|
237
237
|
| Development rules | `.kiro/steering/CORE_PRINCIPLES.md` |
|
|
238
|
-
| Project status | `
|
|
238
|
+
| Project status | `sce status` |
|
|
239
239
|
| Multi-agent setup | `.kiro/config/multi-agent.json` |
|
|
240
240
|
| Full documentation | `docs/` directory |
|
|
241
241
|
|
|
242
242
|
---
|
|
243
243
|
|
|
244
244
|
**Project Type**: Spec-driven development
|
|
245
|
-
**
|
|
245
|
+
**sce Version**: 1.44.x
|
|
246
246
|
**Last Updated**: 2026-02-12
|
|
247
247
|
**Purpose**: Guide AI tools to work effectively with this project
|