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
|
@@ -69,7 +69,7 @@ class SteeringManager {
|
|
|
69
69
|
*/
|
|
70
70
|
async promptStrategy(detection) {
|
|
71
71
|
if (!detection.hasExistingSteering) {
|
|
72
|
-
// 没有现有 steering 文件,默认使用
|
|
72
|
+
// 没有现有 steering 文件,默认使用 sce
|
|
73
73
|
return 'use-kse';
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -83,8 +83,8 @@ class SteeringManager {
|
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
console.log('');
|
|
86
|
-
console.log('
|
|
87
|
-
console.log('choose between
|
|
86
|
+
console.log('AI IDE loads all files in .kiro/steering/, which means you must');
|
|
87
|
+
console.log('choose between sce steering rules OR your project\'s existing rules.');
|
|
88
88
|
console.log('');
|
|
89
89
|
|
|
90
90
|
const response = await inquirer.prompt([{
|
|
@@ -93,11 +93,11 @@ class SteeringManager {
|
|
|
93
93
|
message: 'How would you like to proceed?',
|
|
94
94
|
choices: [
|
|
95
95
|
{
|
|
96
|
-
name: 'Use
|
|
96
|
+
name: 'Use sce steering (backup existing files) - Recommended for new sce users',
|
|
97
97
|
value: 'use-kse'
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
|
-
name: 'Keep existing steering (skip
|
|
100
|
+
name: 'Keep existing steering (skip sce steering) - For projects with custom steering rules',
|
|
101
101
|
value: 'use-project'
|
|
102
102
|
}
|
|
103
103
|
]
|
|
@@ -162,7 +162,7 @@ class SteeringManager {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
|
-
* 安装
|
|
165
|
+
* 安装 sce steering 文件
|
|
166
166
|
*
|
|
167
167
|
* @param {string} projectPath - 项目根目录路径
|
|
168
168
|
* @returns {Promise<Object>} 安装结果
|
|
@@ -180,7 +180,7 @@ class SteeringManager {
|
|
|
180
180
|
if (!templateExists) {
|
|
181
181
|
return {
|
|
182
182
|
success: false,
|
|
183
|
-
error: '
|
|
183
|
+
error: 'sce steering template directory not found',
|
|
184
184
|
filesInstalled: 0
|
|
185
185
|
};
|
|
186
186
|
}
|
package/lib/task/task-claimer.js
CHANGED
|
@@ -97,7 +97,8 @@ class TaskClaimer {
|
|
|
97
97
|
return [];
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
// Accept both legacy and current section headers to keep existing specs readable.
|
|
101
|
+
const markerHeaderRegex = /^\s*##\s+(?:(?:sce|kse)\s+)?Status\s+Markers\s*$/i;
|
|
101
102
|
const sectionHeaderRegex = /^\s*##\s+/;
|
|
102
103
|
|
|
103
104
|
const markerLine = lines.findIndex((line) => markerHeaderRegex.test(String(line || '')));
|
|
@@ -50,7 +50,7 @@ class MetadataCollector {
|
|
|
50
50
|
// Version
|
|
51
51
|
metadata.version = await this.promptVersion();
|
|
52
52
|
|
|
53
|
-
//
|
|
53
|
+
// sce version
|
|
54
54
|
metadata.kse_version = await this.promptKseVersion();
|
|
55
55
|
|
|
56
56
|
// Timestamps
|
|
@@ -211,8 +211,8 @@ class MetadataCollector {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
|
-
* Prompts for
|
|
215
|
-
* @returns {Promise<string>}
|
|
214
|
+
* Prompts for sce version
|
|
215
|
+
* @returns {Promise<string>} sce version
|
|
216
216
|
*/
|
|
217
217
|
async promptKseVersion() {
|
|
218
218
|
const currentVersion = this.getCurrentKseVersion();
|
|
@@ -220,7 +220,7 @@ class MetadataCollector {
|
|
|
220
220
|
{
|
|
221
221
|
type: 'input',
|
|
222
222
|
name: 'kseVersion',
|
|
223
|
-
message: 'Minimum
|
|
223
|
+
message: 'Minimum sce version required:',
|
|
224
224
|
default: currentVersion
|
|
225
225
|
}
|
|
226
226
|
]);
|
|
@@ -312,8 +312,8 @@ class MetadataCollector {
|
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
/**
|
|
315
|
-
* Gets current
|
|
316
|
-
* @returns {string}
|
|
315
|
+
* Gets current sce version
|
|
316
|
+
* @returns {string} sce version
|
|
317
317
|
*/
|
|
318
318
|
getCurrentKseVersion() {
|
|
319
319
|
try {
|
|
@@ -135,7 +135,7 @@ class TemplateCreator {
|
|
|
135
135
|
console.log('📖 Next steps:');
|
|
136
136
|
console.log(` 1. Review the template in: ${exportResult.outputDir}`);
|
|
137
137
|
console.log(` 2. Check REVIEW_CHECKLIST.md for items to verify`);
|
|
138
|
-
console.log(` 3. Test the template:
|
|
138
|
+
console.log(` 3. Test the template: sce spec create test --template ${metadata.name}`);
|
|
139
139
|
console.log(` 4. Follow SUBMISSION_GUIDE.md to submit to repository`);
|
|
140
140
|
console.log('');
|
|
141
141
|
|
|
@@ -181,7 +181,7 @@ class TemplateCreator {
|
|
|
181
181
|
// Check for remaining project-specific content (high confidence patterns)
|
|
182
182
|
const projectSpecificPatterns = [
|
|
183
183
|
/\.kiro\/specs\/\d+-\d+-[a-z-]+/g, // Specific spec paths
|
|
184
|
-
/
|
|
184
|
+
/scene-capability-engine/g, // Project name (unless it's the template itself)
|
|
185
185
|
];
|
|
186
186
|
|
|
187
187
|
projectSpecificPatterns.forEach(pattern => {
|
|
@@ -174,7 +174,7 @@ Test your template locally before submitting:
|
|
|
174
174
|
|
|
175
175
|
\`\`\`bash
|
|
176
176
|
# Apply the template to create a new Spec
|
|
177
|
-
|
|
177
|
+
sce spec create test-spec --template ${metadata.name}
|
|
178
178
|
|
|
179
179
|
# Verify the generated Spec is correct
|
|
180
180
|
cd .kiro/specs/test-spec
|
|
@@ -238,7 +238,7 @@ If you have questions about the submission process, please:
|
|
|
238
238
|
- Open an issue in the repository
|
|
239
239
|
- Contact the maintainers
|
|
240
240
|
|
|
241
|
-
Thank you for contributing to the
|
|
241
|
+
Thank you for contributing to the sce template library!
|
|
242
242
|
`;
|
|
243
243
|
}
|
|
244
244
|
|
|
@@ -261,7 +261,7 @@ ${metadata.description}
|
|
|
261
261
|
- **Tags**: ${metadata.tags.join(', ')}
|
|
262
262
|
- **Author**: ${metadata.author}
|
|
263
263
|
- **Version**: ${metadata.version}
|
|
264
|
-
- **Minimum
|
|
264
|
+
- **Minimum SCE Version**: ${metadata.kse_version}
|
|
265
265
|
|
|
266
266
|
## Files Included
|
|
267
267
|
|
|
@@ -273,7 +273,7 @@ ${metadata.description}
|
|
|
273
273
|
|
|
274
274
|
- [ ] Template files include valid YAML frontmatter
|
|
275
275
|
- [ ] All project-specific content replaced with template variables
|
|
276
|
-
- [ ] Template tested locally with \`
|
|
276
|
+
- [ ] Template tested locally with \`sce spec create\`
|
|
277
277
|
- [ ] Template follows naming conventions (kebab-case)
|
|
278
278
|
- [ ] Description is clear and concise
|
|
279
279
|
- [ ] Tags are relevant and searchable
|
|
@@ -284,7 +284,7 @@ ${metadata.description}
|
|
|
284
284
|
Tested locally by applying the template:
|
|
285
285
|
|
|
286
286
|
\`\`\`bash
|
|
287
|
-
|
|
287
|
+
sce spec create test-spec --template ${metadata.name}
|
|
288
288
|
\`\`\`
|
|
289
289
|
|
|
290
290
|
## Additional Notes
|
|
@@ -345,7 +345,7 @@ ${warnings.length > 0 ? `\n### Warnings\n\n${warnings.map(w => `- ⚠️ ${w}`).
|
|
|
345
345
|
|
|
346
346
|
### Testing
|
|
347
347
|
|
|
348
|
-
- [ ] Template applied successfully with \`
|
|
348
|
+
- [ ] Template applied successfully with \`sce spec create\`
|
|
349
349
|
- [ ] Variables replaced correctly in generated Spec
|
|
350
350
|
- [ ] Generated Spec is usable and makes sense
|
|
351
351
|
- [ ] No errors during template application
|
|
@@ -389,19 +389,19 @@ ${metadata.description}
|
|
|
389
389
|
### 1. List Available Templates
|
|
390
390
|
|
|
391
391
|
\`\`\`bash
|
|
392
|
-
|
|
392
|
+
sce templates list
|
|
393
393
|
\`\`\`
|
|
394
394
|
|
|
395
395
|
### 2. View Template Details
|
|
396
396
|
|
|
397
397
|
\`\`\`bash
|
|
398
|
-
|
|
398
|
+
sce templates show ${metadata.category}/${metadata.name}
|
|
399
399
|
\`\`\`
|
|
400
400
|
|
|
401
401
|
### 3. Create a New Spec from This Template
|
|
402
402
|
|
|
403
403
|
\`\`\`bash
|
|
404
|
-
|
|
404
|
+
sce spec create my-new-feature --template ${metadata.category}/${metadata.name}
|
|
405
405
|
\`\`\`
|
|
406
406
|
|
|
407
407
|
This will create a new Spec at \`.kiro/specs/XX-00-my-new-feature/\` with:
|
|
@@ -427,7 +427,7 @@ ${metadata.description}
|
|
|
427
427
|
|
|
428
428
|
## Prerequisites
|
|
429
429
|
|
|
430
|
-
-
|
|
430
|
+
- sce version ${metadata.kse_version} or higher
|
|
431
431
|
- Basic understanding of Spec-driven development
|
|
432
432
|
|
|
433
433
|
## Tags
|
|
@@ -441,7 +441,7 @@ After applying this template, you'll have a complete Spec structure ready to cus
|
|
|
441
441
|
## Questions?
|
|
442
442
|
|
|
443
443
|
If you have questions about using this template:
|
|
444
|
-
- Check the
|
|
444
|
+
- Check the sce documentation
|
|
445
445
|
- Review the generated Spec files
|
|
446
446
|
- Open an issue in the scene-capability-engine-templates repository
|
|
447
447
|
`;
|
|
@@ -492,7 +492,7 @@ If you have questions about using this template:
|
|
|
492
492
|
${validationResult?.valid ? '✅ Template validation passed' : '❌ Template validation failed'}
|
|
493
493
|
|
|
494
494
|
---
|
|
495
|
-
Generated by
|
|
495
|
+
Generated by sce templates create-from-spec
|
|
496
496
|
`;
|
|
497
497
|
|
|
498
498
|
await fs.writeFile(path.join(outputDir, 'creation.log'), log, 'utf-8');
|
|
@@ -92,9 +92,9 @@ class MigrationEngine {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// Verify starting version matches plan
|
|
95
|
-
if (versionInfo['
|
|
95
|
+
if (versionInfo['sce-version'] !== plan.fromVersion) {
|
|
96
96
|
throw new Error(
|
|
97
|
-
`Version mismatch: expected ${plan.fromVersion}, found ${versionInfo['
|
|
97
|
+
`Version mismatch: expected ${plan.fromVersion}, found ${versionInfo['sce-version']}`
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -202,12 +202,12 @@ class MigrationEngine {
|
|
|
202
202
|
warnings.push(gitignoreResult.message);
|
|
203
203
|
} else if (!gitignoreResult.success) {
|
|
204
204
|
warnings.push(`⚠️ .gitignore fix failed: ${gitignoreResult.message}`);
|
|
205
|
-
warnings.push('You can fix this manually with:
|
|
205
|
+
warnings.push('You can fix this manually with: sce doctor --fix-gitignore');
|
|
206
206
|
}
|
|
207
207
|
} catch (gitignoreError) {
|
|
208
208
|
// Don't block upgrade on .gitignore fix failure
|
|
209
209
|
warnings.push(`⚠️ .gitignore check failed: ${gitignoreError.message}`);
|
|
210
|
-
warnings.push('You can fix this manually with:
|
|
210
|
+
warnings.push('You can fix this manually with: sce doctor --fix-gitignore');
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
return {
|
|
@@ -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
|
}
|