scene-capability-engine 3.3.5 → 3.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +130 -78
- package/README.md +6 -6
- package/README.zh.md +6 -6
- package/bin/scene-capability-engine.js +129 -7
- package/docs/331-poc-adaptation-roadmap.md +3 -3
- package/docs/331-poc-dual-track-integration-guide.md +8 -8
- package/docs/331-poc-weekly-delivery-checklist.md +6 -6
- package/docs/README.md +4 -0
- package/docs/adopt-migration-guide.md +13 -13
- package/docs/adoption-guide.md +28 -28
- package/docs/agent-hooks-analysis.md +10 -10
- package/docs/architecture.md +13 -13
- package/docs/articles/ai-driven-development-philosophy-and-practice.en.md +3 -3
- package/docs/articles/ai-driven-development-philosophy-and-practice.md +3 -3
- package/docs/autonomous-control-guide.md +35 -35
- package/docs/command-reference.md +192 -153
- package/docs/cross-tool-guide.md +7 -7
- package/docs/developer-guide.md +8 -8
- package/docs/document-governance.md +15 -15
- package/docs/environment-management-guide.md +6 -6
- package/docs/examples/add-export-command/design.md +1 -1
- package/docs/faq.md +13 -13
- package/docs/handoff-profile-integration-guide.md +3 -3
- package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.json +7 -7
- package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.md +1 -1
- package/docs/integration-modes.md +12 -12
- package/docs/integration-philosophy.md +11 -11
- package/docs/interactive-customization/331-poc-sce-integration-checklist.md +24 -24
- package/docs/interactive-customization/README.md +43 -43
- package/docs/interactive-customization/business-mode-policy-baseline.json +33 -0
- package/docs/interactive-customization/dual-ui-mode-integration-guide.md +1 -1
- package/docs/interactive-customization/moqui-adapter-interface.md +2 -2
- package/docs/interactive-customization/moqui-copilot-integration-guide.md +1 -1
- package/docs/interactive-customization/moqui-interactive-template-playbook.md +4 -4
- package/docs/interactive-customization/phase-acceptance-evidence.md +2 -2
- package/docs/knowledge-management-guide.md +6 -6
- package/docs/manual-workflows-guide.md +4 -4
- package/docs/moqui-capability-matrix.md +3 -3
- package/docs/moqui-standard-rebuild-guide.md +8 -8
- package/docs/moqui-template-core-library-playbook.md +27 -27
- package/docs/multi-agent-coordination-guide.md +19 -19
- package/docs/multi-repo-management-guide.md +17 -17
- package/docs/quick-start-with-ai-tools.md +7 -7
- package/docs/quick-start.md +2 -2
- package/docs/release-checklist.md +4 -4
- package/docs/sce-business-mode-map.md +103 -0
- package/docs/security-governance-default-baseline.md +12 -12
- package/docs/spec-collaboration-guide.md +3 -3
- package/docs/spec-locking-guide.md +2 -2
- package/docs/spec-workflow.md +3 -3
- package/docs/starter-kit/README.md +4 -4
- package/docs/starter-kit/handoff-manifest.starter.json +2 -2
- package/docs/starter-kit/release.workflow.sample.yml +1 -1
- package/docs/steering-strategy-guide.md +15 -15
- package/docs/team-collaboration-guide.md +69 -69
- package/docs/testing-strategy.md +2 -2
- package/docs/tools/claude-guide.md +14 -4
- package/docs/tools/cursor-guide.md +14 -14
- package/docs/tools/generic-guide.md +9 -9
- package/docs/tools/kiro-guide.md +4 -4
- package/docs/tools/vscode-guide.md +13 -13
- package/docs/tools/windsurf-guide.md +6 -6
- package/docs/troubleshooting.md +22 -22
- package/docs/upgrade-guide.md +8 -8
- package/docs/value-observability-guide.md +3 -3
- package/docs/zh/README.md +6 -0
- package/docs/zh/quick-start.md +15 -15
- package/docs/zh/release-checklist.md +3 -3
- package/docs/zh/tools/claude-guide.md +16 -6
- package/docs/zh/tools/cursor-guide.md +11 -11
- package/docs/zh/tools/generic-guide.md +13 -13
- package/docs/zh/tools/kiro-guide.md +2 -2
- package/docs/zh/tools/vscode-guide.md +11 -11
- package/docs/zh/tools/windsurf-guide.md +11 -11
- package/docs/zh/value-observability-guide.md +3 -3
- package/lib/adoption/adoption-logger.js +1 -1
- package/lib/adoption/adoption-strategy.js +28 -28
- package/lib/adoption/backup-manager.js +3 -3
- package/lib/adoption/conflict-resolver.js +2 -2
- package/lib/adoption/detection-engine.js +8 -8
- package/lib/adoption/error-formatter.js +4 -4
- package/lib/adoption/file-classifier.js +6 -6
- package/lib/adoption/progress-reporter.js +1 -1
- package/lib/adoption/smart-orchestrator.js +10 -10
- package/lib/adoption/strategy-selector.js +6 -6
- package/lib/adoption/summary-generator.js +1 -1
- package/lib/adoption/template-sync.js +8 -8
- package/lib/auto/autonomous-engine.js +7 -7
- package/lib/auto/checkpoint-manager.js +1 -1
- package/lib/auto/close-loop-runner.js +12 -12
- package/lib/auto/error-recovery-manager.js +1 -1
- package/lib/auto/goal-decomposer.js +1 -1
- package/lib/auto/moqui-recovery-sequence.js +2 -2
- package/lib/auto/progress-tracker.js +1 -1
- package/lib/auto/state-manager.js +1 -1
- package/lib/backup/backup-system.js +10 -10
- package/lib/backup/selective-backup.js +4 -4
- package/lib/collab/agent-registry.js +2 -2
- package/lib/collab/contract-manager.js +1 -1
- package/lib/collab/coordinator.js +2 -2
- package/lib/collab/dependency-manager.js +1 -1
- package/lib/collab/integration-manager.js +1 -1
- package/lib/collab/metadata-manager.js +1 -1
- package/lib/collab/multi-agent-config.js +2 -2
- package/lib/collab/spec-lifecycle-manager.js +2 -2
- package/lib/collab/visualizer.js +1 -1
- package/lib/commands/adopt.js +6 -6
- package/lib/commands/auto.js +56 -56
- package/lib/commands/collab.js +2 -2
- package/lib/commands/docs.js +3 -3
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/knowledge.js +2 -2
- package/lib/commands/lock.js +1 -1
- package/lib/commands/ops.js +1 -1
- package/lib/commands/orchestrate.js +3 -3
- package/lib/commands/rollback.js +1 -1
- package/lib/commands/scene.js +135 -93
- package/lib/commands/session.js +139 -0
- package/lib/commands/spec-bootstrap.js +1 -1
- package/lib/commands/spec-gate.js +2 -2
- package/lib/commands/spec-pipeline.js +1 -1
- package/lib/commands/status.js +4 -4
- package/lib/commands/steering.js +119 -0
- package/lib/commands/value.js +1 -1
- package/lib/commands/watch.js +9 -9
- package/lib/commands/workspace-multi.js +1 -1
- package/lib/context/context-exporter.js +5 -7
- package/lib/context/prompt-generator.js +2 -2
- package/lib/environment/backup-system.js +1 -1
- package/lib/environment/environment-manager.js +2 -2
- package/lib/gitignore/gitignore-backup.js +3 -3
- package/lib/gitignore/gitignore-detector.js +13 -13
- package/lib/gitignore/gitignore-integration.js +3 -3
- package/lib/gitignore/gitignore-transformer.js +4 -4
- package/lib/gitignore/layered-rules-template.js +16 -16
- package/lib/governance/config-manager.js +1 -1
- package/lib/governance/doc-reference-checker.js +4 -4
- package/lib/governance/execution-logger.js +1 -1
- package/lib/governance/file-scanner.js +3 -3
- package/lib/interactive-customization/moqui-interactive-adapter.js +2 -2
- package/lib/knowledge/knowledge-manager.js +1 -1
- package/lib/lock/lock-manager.js +2 -2
- package/lib/lock/steering-file-lock.js +5 -5
- package/lib/lock/task-lock-manager.js +3 -3
- package/lib/operations/audit-logger.js +1 -1
- package/lib/operations/feedback-manager.js +1 -1
- package/lib/operations/operations-manager.js +3 -3
- package/lib/operations/permission-manager.js +2 -2
- package/lib/operations/template-loader.js +1 -1
- package/lib/orchestrator/agent-spawner.js +27 -2
- package/lib/orchestrator/bootstrap-prompt-builder.js +6 -6
- package/lib/orchestrator/orchestration-engine.js +1 -1
- package/lib/orchestrator/orchestrator-config.js +2 -2
- package/lib/repo/config-manager.js +3 -3
- package/lib/repo/handlers/init-handler.js +1 -1
- package/lib/repo/repo-manager.js +2 -2
- package/lib/runtime/business-mode-resolver.js +240 -0
- package/lib/runtime/session-store.js +207 -0
- package/lib/runtime/steering-contract.js +338 -0
- package/lib/scene-runtime/audit-emitter.js +1 -1
- package/lib/scene-runtime/binding-plugin-loader.js +3 -3
- package/lib/scene-runtime/eval-bridge.js +1 -1
- package/lib/scene-runtime/index.js +1 -1
- package/lib/scene-runtime/moqui-extractor.js +1 -1
- package/lib/scene-runtime/plan-compiler.js +1 -1
- package/lib/scene-runtime/policy-gate.js +1 -1
- package/lib/scene-runtime/runtime-executor.js +1 -1
- package/lib/scene-runtime/scene-loader.js +1 -1
- package/lib/spec/bootstrap/context-collector.js +1 -1
- package/lib/spec/pipeline/stage-adapters.js +3 -3
- package/lib/spec/pipeline/state-store.js +1 -1
- package/lib/spec-gate/policy/policy-loader.js +1 -1
- package/lib/spec-gate/rules/default-rules.js +6 -6
- package/lib/steering/adoption-config.js +1 -1
- package/lib/steering/compliance-error-reporter.js +3 -3
- package/lib/steering/context-sync-manager.js +2 -2
- package/lib/steering/index.js +1 -1
- package/lib/steering/spec-steering.js +2 -2
- package/lib/steering/steering-compliance-checker.js +1 -1
- package/lib/steering/steering-loader.js +4 -5
- package/lib/steering/steering-manager.js +4 -4
- package/lib/task/task-claimer.js +5 -5
- package/lib/task/task-status-store.js +2 -2
- package/lib/templates/content-generalizer.js +1 -1
- package/lib/templates/spec-reader.js +2 -2
- package/lib/templates/template-creator.js +1 -1
- package/lib/templates/template-exporter.js +3 -3
- package/lib/templates/template-manager.js +1 -1
- package/lib/upgrade/migration-engine.js +3 -3
- package/lib/upgrade/migrations/1.0.0-to-1.1.0.js +1 -1
- package/lib/utils/file-diff.js +6 -6
- package/lib/utils/tool-detector.js +10 -10
- package/lib/utils/validation.js +5 -5
- package/lib/value/metric-contract-loader.js +1 -1
- package/lib/version/version-manager.js +1 -1
- package/lib/watch/execution-logger.js +1 -1
- package/lib/watch/presets.js +8 -8
- package/lib/watch/watch-manager.js +2 -2
- package/lib/workspace/legacy-kiro-migrator.js +275 -0
- package/lib/workspace/multi/workspace-context-resolver.js +2 -2
- package/lib/workspace/multi/workspace-registry.js +2 -2
- package/lib/workspace/multi/workspace-state-manager.js +3 -3
- package/lib/workspace/workspace-manager.js +1 -1
- package/lib/workspace/workspace-sync.js +2 -2
- package/locales/en.json +4 -4
- package/locales/zh.json +4 -4
- package/package.json +9 -9
- package/template/{.kiro → .sce}/README.md +15 -15
- package/template/{.kiro → .sce}/hooks/check-spec-on-create.kiro.hook +2 -2
- package/template/{.kiro → .sce}/steering/CORE_PRINCIPLES.md +4 -4
- package/template/{.kiro → .sce}/steering/CURRENT_CONTEXT.md +1 -1
- package/template/{.kiro → .sce}/steering/ENVIRONMENT.md +3 -3
- package/template/{.kiro → .sce}/tools/backup_manager.py +3 -3
- package/template/{.kiro → .sce}/tools/configuration_manager.py +1 -1
- package/template/README.md +12 -12
- /package/template/{.kiro → .sce}/hooks/run-tests-on-save.kiro.hook +0 -0
- /package/template/{.kiro → .sce}/hooks/sync-tasks-on-edit.kiro.hook +0 -0
- /package/template/{.kiro → .sce}/specs/SPEC_WORKFLOW_GUIDE.md +0 -0
- /package/template/{.kiro → .sce}/steering/RULES_GUIDE.md +0 -0
- /package/template/{.kiro → .sce}/templates/operations/default/change-impact.md +0 -0
- /package/template/{.kiro → .sce}/templates/operations/default/deployment.md +0 -0
- /package/template/{.kiro → .sce}/templates/operations/default/feedback-response.md +0 -0
- /package/template/{.kiro → .sce}/templates/operations/default/migration-plan.md +0 -0
- /package/template/{.kiro → .sce}/templates/operations/default/monitoring.md +0 -0
- /package/template/{.kiro → .sce}/templates/operations/default/operations.md +0 -0
- /package/template/{.kiro → .sce}/templates/operations/default/rollback.md +0 -0
- /package/template/{.kiro → .sce}/templates/operations/default/tools.yaml +0 -0
- /package/template/{.kiro → .sce}/templates/operations/default/troubleshooting.md +0 -0
- /package/template/{.kiro → .sce}/tools/document_evaluator.py +0 -0
- /package/template/{.kiro → .sce}/tools/enhancement_logger.py +0 -0
- /package/template/{.kiro → .sce}/tools/error_handler.py +0 -0
- /package/template/{.kiro → .sce}/tools/improvement_identifier.py +0 -0
- /package/template/{.kiro → .sce}/tools/modification_applicator.py +0 -0
- /package/template/{.kiro → .sce}/tools/quality_gate_enforcer.py +0 -0
- /package/template/{.kiro → .sce}/tools/quality_scorer.py +0 -0
- /package/template/{.kiro → .sce}/tools/report_generator.py +0 -0
- /package/template/{.kiro → .sce}/tools/ultrawork_enhancer.py +0 -0
- /package/template/{.kiro → .sce}/tools/ultrawork_enhancer_refactored.py +0 -0
- /package/template/{.kiro → .sce}/tools/ultrawork_enhancer_v2.py +0 -0
- /package/template/{.kiro → .sce}/tools/ultrawork_enhancer_v3.py +0 -0
- /package/template/{.kiro → .sce}/tools/workflow_quality_gate.py +0 -0
|
@@ -88,7 +88,7 @@ sce spec bootstrap --name 01-00-my-feature --non-interactive
|
|
|
88
88
|
sce context export 01-00-my-feature
|
|
89
89
|
|
|
90
90
|
# 复制到剪贴板
|
|
91
|
-
cat .
|
|
91
|
+
cat .sce/specs/01-00-my-feature/context-export.md | pbcopy
|
|
92
92
|
|
|
93
93
|
# 粘贴到 AI 工具并请求实现
|
|
94
94
|
```
|
|
@@ -110,8 +110,8 @@ cat .kiro/specs/01-00-my-feature/context-export.md | pbcopy
|
|
|
110
110
|
sce watch start
|
|
111
111
|
|
|
112
112
|
# 配置自动导出
|
|
113
|
-
sce watch add --pattern ".
|
|
114
|
-
sce watch add --pattern ".
|
|
113
|
+
sce watch add --pattern ".sce/specs/*/requirements.md" --action "sce context export {spec}"
|
|
114
|
+
sce watch add --pattern ".sce/specs/*/design.md" --action "sce context export {spec}"
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
**使用:**
|
|
@@ -217,7 +217,7 @@ Spec 包括:
|
|
|
217
217
|
/**
|
|
218
218
|
* Task 1.1: 设置项目依赖
|
|
219
219
|
*
|
|
220
|
-
* Spec: .
|
|
220
|
+
* Spec: .sce/specs/01-00-my-feature/
|
|
221
221
|
* Requirements: FR-1, FR-2, NFR-1
|
|
222
222
|
* Design: 参见 design.md 中的 ComponentName
|
|
223
223
|
*
|
|
@@ -231,10 +231,10 @@ Spec 包括:
|
|
|
231
231
|
**命令模板:**
|
|
232
232
|
```bash
|
|
233
233
|
# 使用 Aider
|
|
234
|
-
aider --message "使用 .
|
|
234
|
+
aider --message "使用 .sce/specs/01-00-my-feature/ 中的 spec 实现任务 1.1"
|
|
235
235
|
|
|
236
236
|
# 使用 Cline
|
|
237
|
-
cline "检查 .
|
|
237
|
+
cline "检查 .sce/specs/01-00-my-feature/ 并实现任务 1.1"
|
|
238
238
|
```
|
|
239
239
|
|
|
240
240
|
---
|
|
@@ -299,7 +299,7 @@ sce spec bootstrap --name 01-00-user-login --non-interactive
|
|
|
299
299
|
sce context export 01-00-user-login
|
|
300
300
|
|
|
301
301
|
# 3. 复制到剪贴板
|
|
302
|
-
cat .
|
|
302
|
+
cat .sce/specs/01-00-user-login/context-export.md | pbcopy
|
|
303
303
|
|
|
304
304
|
# 4. 在 Claude 中:
|
|
305
305
|
# - 粘贴上下文
|
|
@@ -360,7 +360,7 @@ sce spec bootstrap --name 01-00-user-login --non-interactive
|
|
|
360
360
|
# 3. 添加 Spec 引用注释
|
|
361
361
|
/**
|
|
362
362
|
* Task 1.1: 设置项目依赖
|
|
363
|
-
* Spec: .
|
|
363
|
+
* Spec: .sce/specs/01-00-user-login/
|
|
364
364
|
* Design: 参见 design.md 中的 AuthController
|
|
365
365
|
*/
|
|
366
366
|
|
|
@@ -435,7 +435,7 @@ sce context export $SPEC
|
|
|
435
435
|
sce prompt generate $SPEC $TASK
|
|
436
436
|
|
|
437
437
|
# 复制到剪贴板
|
|
438
|
-
cat .
|
|
438
|
+
cat .sce/specs/$SPEC/context-export.md | pbcopy
|
|
439
439
|
|
|
440
440
|
echo "✅ 上下文已复制到剪贴板"
|
|
441
441
|
echo "现在粘贴到你的 AI 工具并请求实现"
|
|
@@ -445,7 +445,7 @@ echo "现在粘贴到你的 AI 工具并请求实现"
|
|
|
445
445
|
|
|
446
446
|
为 AI 行为添加项目特定规则:
|
|
447
447
|
```bash
|
|
448
|
-
# 编辑 .
|
|
448
|
+
# 编辑 .sce/steering/CORE_PRINCIPLES.md
|
|
449
449
|
# 添加你的编码标准、约定等
|
|
450
450
|
|
|
451
451
|
# 使用 steering 导出
|
|
@@ -457,13 +457,13 @@ sce context export 01-00-my-feature --steering
|
|
|
457
457
|
为常见模式创建 Spec 模板:
|
|
458
458
|
```bash
|
|
459
459
|
# 创建模板目录
|
|
460
|
-
mkdir .
|
|
460
|
+
mkdir .sce/templates
|
|
461
461
|
|
|
462
462
|
# 创建模板 Spec
|
|
463
|
-
cp -r .
|
|
463
|
+
cp -r .sce/specs/01-00-user-login .sce/templates/api-feature-template
|
|
464
464
|
|
|
465
465
|
# 对于新功能,从模板复制
|
|
466
|
-
cp -r .
|
|
466
|
+
cp -r .sce/templates/api-feature-template .sce/specs/02-00-new-feature
|
|
467
467
|
```
|
|
468
468
|
|
|
469
469
|
---
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
**模式:** 原生集成
|
|
34
34
|
|
|
35
35
|
**工作原理:**
|
|
36
|
-
1. SCE 自动检测 `.
|
|
36
|
+
1. SCE 自动检测 `.sce/` 目录
|
|
37
37
|
2. SCE 的 AI 始终可以访问你的 Spec
|
|
38
38
|
3. 无需手动导出或粘贴
|
|
39
39
|
4. SCE 自动更新任务状态
|
|
@@ -301,7 +301,7 @@ SCE 的 AI 始终知道你的 Spec:
|
|
|
301
301
|
|
|
302
302
|
**解决方案:**
|
|
303
303
|
1. 确保你已运行 `sce adopt`
|
|
304
|
-
2. 检查 `.
|
|
304
|
+
2. 检查 `.sce/specs/` 目录是否存在
|
|
305
305
|
3. 刷新 Spec 浏览器(右键 → 刷新)
|
|
306
306
|
|
|
307
307
|
### 问题:AI 不读取我的 Spec
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"prefix": "sce-ref",
|
|
89
89
|
"body": [
|
|
90
90
|
"// Task ${1:1.1}: ${2:Task description}",
|
|
91
|
-
"// Spec: .
|
|
91
|
+
"// Spec: .sce/specs/${3:spec-name}/",
|
|
92
92
|
"// Design: See ${4:ComponentName} in design.md",
|
|
93
93
|
"// Requirements: ${5:FR-1, FR-2}",
|
|
94
94
|
"//"
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"/**",
|
|
102
102
|
" * Task ${1:1.1}: ${2:Task description}",
|
|
103
103
|
" * ",
|
|
104
|
-
" * Spec: .
|
|
104
|
+
" * Spec: .sce/specs/${3:spec-name}/",
|
|
105
105
|
" * Requirements: ${4:FR-1}",
|
|
106
106
|
" * Design: ${5:ComponentName} in design.md",
|
|
107
107
|
" * ",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
/**
|
|
132
132
|
* Task 1.1: 设置项目依赖
|
|
133
133
|
*
|
|
134
|
-
* Spec: .
|
|
134
|
+
* Spec: .sce/specs/01-00-user-login/
|
|
135
135
|
* Requirements: FR-1, FR-2, NFR-1
|
|
136
136
|
* Design: AuthController in design.md
|
|
137
137
|
*
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
|
|
163
163
|
2. **引用你的 Spec:**
|
|
164
164
|
```
|
|
165
|
-
我正在实现 .
|
|
165
|
+
我正在实现 .sce/specs/01-00-user-login/ 中的用户登录功能。
|
|
166
166
|
|
|
167
167
|
请阅读:
|
|
168
168
|
- requirements.md
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
2. **按 Tab** - 片段展开为:
|
|
194
194
|
```javascript
|
|
195
195
|
// Task 1.1: Task description
|
|
196
|
-
// Spec: .
|
|
196
|
+
// Spec: .sce/specs/spec-name/
|
|
197
197
|
// Design: See ComponentName in design.md
|
|
198
198
|
// Requirements: FR-1, FR-2
|
|
199
199
|
//
|
|
@@ -242,7 +242,7 @@ sce-ref [Tab]
|
|
|
242
242
|
|
|
243
243
|
在每个文件顶部添加 Spec 引用:
|
|
244
244
|
```javascript
|
|
245
|
-
// Spec: .
|
|
245
|
+
// Spec: .sce/specs/01-00-user-login/
|
|
246
246
|
// Task: 1.1 - 设置项目依赖
|
|
247
247
|
```
|
|
248
248
|
|
|
@@ -292,7 +292,7 @@ Copilot 读取注释。要具体:
|
|
|
292
292
|
/**
|
|
293
293
|
* AuthController - 处理认证请求
|
|
294
294
|
*
|
|
295
|
-
* Spec: .
|
|
295
|
+
* Spec: .sce/specs/01-00-user-login/
|
|
296
296
|
* Task: 3.1 - 实现 AuthController
|
|
297
297
|
* Design: 参见 design.md 中的 AuthController
|
|
298
298
|
* Requirements: FR-1, FR-2, NFR-1
|
|
@@ -338,7 +338,7 @@ async authenticate(email, password) {
|
|
|
338
338
|
/**
|
|
339
339
|
* AuthService 测试
|
|
340
340
|
*
|
|
341
|
-
* Spec: .
|
|
341
|
+
* Spec: .sce/specs/01-00-user-login/
|
|
342
342
|
* Task: 4.1 - 编写全面的测试
|
|
343
343
|
*
|
|
344
344
|
* 测试场景:
|
|
@@ -369,7 +369,7 @@ describe('AuthService', () => {
|
|
|
369
369
|
|
|
370
370
|
**解决方案:**
|
|
371
371
|
1. 添加更多上下文到注释
|
|
372
|
-
2. 引用 Spec 文件:`// Spec: .
|
|
372
|
+
2. 引用 Spec 文件:`// Spec: .sce/specs/...`
|
|
373
373
|
3. 要具体:"实现 design.md 中的确切 AuthController"
|
|
374
374
|
|
|
375
375
|
### 问题:Copilot 看不到我的 Spec 文件
|
|
@@ -378,7 +378,7 @@ describe('AuthService', () => {
|
|
|
378
378
|
1. 确保 Spec 文件在工作区中
|
|
379
379
|
2. 在 VS Code 中打开 Spec 文件
|
|
380
380
|
3. 在注释中使用相对路径
|
|
381
|
-
4. 检查 `.gitignore` 是否排除了 `.
|
|
381
|
+
4. 检查 `.gitignore` 是否排除了 `.sce/`
|
|
382
382
|
|
|
383
383
|
---
|
|
384
384
|
|
|
@@ -408,7 +408,7 @@ Copilot 使用所有打开文件的上下文。
|
|
|
408
408
|
/**
|
|
409
409
|
* [ComponentName] - [Description]
|
|
410
410
|
*
|
|
411
|
-
* Spec: .
|
|
411
|
+
* Spec: .sce/specs/[spec-name]/
|
|
412
412
|
* Task: [task-id] - [task-description]
|
|
413
413
|
* Design: See [ComponentName] in design.md
|
|
414
414
|
* Requirements: [requirements]
|
|
@@ -106,7 +106,7 @@ sce watch start
|
|
|
106
106
|
|
|
107
107
|
2. **读取上下文:**
|
|
108
108
|
```
|
|
109
|
-
请读取 .
|
|
109
|
+
请读取 .sce/specs/01-00-user-login/context-export.md
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
3. **实现任务:**
|
|
@@ -117,7 +117,7 @@ sce watch start
|
|
|
117
117
|
|
|
118
118
|
4. **更新任务状态:**
|
|
119
119
|
```
|
|
120
|
-
请在 .
|
|
120
|
+
请在 .sce/specs/01-00-user-login/tasks.md 中将任务 1.1 标记为完成
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
### 方法 3:Watch 模式 + 自动更新
|
|
@@ -133,8 +133,8 @@ sce watch start
|
|
|
133
133
|
|
|
134
134
|
2. **配置 Watch 模式以在更改时导出:**
|
|
135
135
|
```bash
|
|
136
|
-
sce watch add --pattern ".
|
|
137
|
-
sce watch add --pattern ".
|
|
136
|
+
sce watch add --pattern ".sce/specs/*/requirements.md" --action "sce context export {spec}"
|
|
137
|
+
sce watch add --pattern ".sce/specs/*/design.md" --action "sce context export {spec}"
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
3. **现在,当你更新 Spec 文件时:**
|
|
@@ -237,7 +237,7 @@ Windsurf 可以实现多个任务:
|
|
|
237
237
|
### 实现新功能
|
|
238
238
|
|
|
239
239
|
```
|
|
240
|
-
使用 sce 检查 .
|
|
240
|
+
使用 sce 检查 .sce/specs/01-00-user-login/ 中的 spec 并实现任务 1.1:"设置项目依赖"。
|
|
241
241
|
|
|
242
242
|
严格遵循 design.md 中的架构。
|
|
243
243
|
完成后在 tasks.md 中标记任务为完成。
|
|
@@ -277,13 +277,13 @@ Windsurf 可以实现多个任务:
|
|
|
277
277
|
|
|
278
278
|
```bash
|
|
279
279
|
# 监视 requirements.md 更改
|
|
280
|
-
sce watch add --pattern ".
|
|
280
|
+
sce watch add --pattern ".sce/specs/*/requirements.md" --action "sce context export {spec}"
|
|
281
281
|
|
|
282
282
|
# 监视 design.md 更改
|
|
283
|
-
sce watch add --pattern ".
|
|
283
|
+
sce watch add --pattern ".sce/specs/*/design.md" --action "sce context export {spec}"
|
|
284
284
|
|
|
285
285
|
# 监视 tasks.md 更改
|
|
286
|
-
sce watch add --pattern ".
|
|
286
|
+
sce watch add --pattern ".sce/specs/*/tasks.md" --action "sce context export {spec}"
|
|
287
287
|
```
|
|
288
288
|
|
|
289
289
|
### 高级 Watch 配置
|
|
@@ -292,10 +292,10 @@ sce watch add --pattern ".kiro/specs/*/tasks.md" --action "sce context export {s
|
|
|
292
292
|
|
|
293
293
|
```bash
|
|
294
294
|
# 在任务更新时运行测试
|
|
295
|
-
sce watch add --pattern ".
|
|
295
|
+
sce watch add --pattern ".sce/specs/*/tasks.md" --action "npm test"
|
|
296
296
|
|
|
297
297
|
# 在设计更改时运行 linter
|
|
298
|
-
sce watch add --pattern ".
|
|
298
|
+
sce watch add --pattern ".sce/specs/*/design.md" --action "npm run lint"
|
|
299
299
|
```
|
|
300
300
|
|
|
301
301
|
### 检查 Watch 状态
|
|
@@ -349,7 +349,7 @@ sce watch stop
|
|
|
349
349
|
2. 在提示中明确:"严格遵循 design.md"
|
|
350
350
|
3. 要求 Windsurf 先读取设计:
|
|
351
351
|
```
|
|
352
|
-
首先读取 .
|
|
352
|
+
首先读取 .sce/specs/01-00-user-login/design.md
|
|
353
353
|
然后实现任务 1.1
|
|
354
354
|
```
|
|
355
355
|
|
|
@@ -65,8 +65,8 @@ sce value metrics trend --window 6 --json
|
|
|
65
65
|
"triggered_metrics": [
|
|
66
66
|
"manual_takeover_rate"
|
|
67
67
|
],
|
|
68
|
-
"snapshot_path": ".
|
|
69
|
-
"gate_summary_path": ".
|
|
68
|
+
"snapshot_path": ".sce/specs/114-00-kpi-automation-and-observability/custom/weekly-metrics/2026-W10.json",
|
|
69
|
+
"gate_summary_path": ".sce/specs/114-00-kpi-automation-and-observability/custom/weekly-metrics/gate-summary.2026-W10.day-60.json",
|
|
70
70
|
"contract_path": "metric-definition.yaml"
|
|
71
71
|
}
|
|
72
72
|
```
|
|
@@ -96,7 +96,7 @@ sce value metrics trend --window 6 --json
|
|
|
96
96
|
"target_passed": true
|
|
97
97
|
}
|
|
98
98
|
],
|
|
99
|
-
"trend_path": ".
|
|
99
|
+
"trend_path": ".sce/specs/114-00-kpi-automation-and-observability/custom/weekly-metrics/trend.latest.json"
|
|
100
100
|
}
|
|
101
101
|
```
|
|
102
102
|
|
|
@@ -86,7 +86,7 @@ class AdoptionLogger {
|
|
|
86
86
|
|
|
87
87
|
try {
|
|
88
88
|
// Create logs directory if it doesn't exist
|
|
89
|
-
const logsDir = path.join(projectPath, '.
|
|
89
|
+
const logsDir = path.join(projectPath, '.sce', 'logs');
|
|
90
90
|
if (!fs.existsSync(logsDir)) {
|
|
91
91
|
fs.mkdirSync(logsDir, { recursive: true });
|
|
92
92
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Adoption Strategy
|
|
3
3
|
*
|
|
4
4
|
* Implements different adoption strategies based on project state:
|
|
5
|
-
* - Fresh: Create complete .
|
|
6
|
-
* - Partial: Add missing components to existing .
|
|
7
|
-
* - Full: Upgrade existing complete .
|
|
5
|
+
* - Fresh: Create complete .sce/ structure from scratch
|
|
6
|
+
* - Partial: Add missing components to existing .sce/
|
|
7
|
+
* - Full: Upgrade existing complete .sce/ to current version
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
const path = require('path');
|
|
@@ -25,17 +25,17 @@ const VersionManager = require('../version/version-manager');
|
|
|
25
25
|
class AdoptionStrategy {
|
|
26
26
|
constructor() {
|
|
27
27
|
this.versionManager = new VersionManager();
|
|
28
|
-
this.
|
|
28
|
+
this.sceDir = '.sce';
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* Gets the path to .
|
|
32
|
+
* Gets the path to .sce/ directory
|
|
33
33
|
*
|
|
34
34
|
* @param {string} projectPath - Absolute path to project root
|
|
35
35
|
* @returns {string}
|
|
36
36
|
*/
|
|
37
37
|
getKiroPath(projectPath) {
|
|
38
|
-
return path.join(projectPath, this.
|
|
38
|
+
return path.join(projectPath, this.sceDir);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -45,8 +45,8 @@ class AdoptionStrategy {
|
|
|
45
45
|
* @returns {string}
|
|
46
46
|
*/
|
|
47
47
|
getTemplatePath() {
|
|
48
|
-
// Template is at template/.
|
|
49
|
-
return path.join(__dirname, '../../template/.
|
|
48
|
+
// Template is at template/.sce/ in the package
|
|
49
|
+
return path.join(__dirname, '../../template/.sce');
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/**
|
|
@@ -65,7 +65,7 @@ class AdoptionStrategy {
|
|
|
65
65
|
/**
|
|
66
66
|
* Creates initial directory structure
|
|
67
67
|
*
|
|
68
|
-
* @param {string} kiroPath - Path to .
|
|
68
|
+
* @param {string} kiroPath - Path to .sce/ directory
|
|
69
69
|
* @returns {Promise<void>}
|
|
70
70
|
*/
|
|
71
71
|
async createDirectoryStructure(kiroPath) {
|
|
@@ -112,9 +112,9 @@ class AdoptionStrategy {
|
|
|
112
112
|
'steering/CURRENT_CONTEXT.md',
|
|
113
113
|
'steering/RULES_GUIDE.md',
|
|
114
114
|
'specs/SPEC_WORKFLOW_GUIDE.md',
|
|
115
|
-
'hooks/sync-tasks-on-edit.
|
|
116
|
-
'hooks/check-spec-on-create.
|
|
117
|
-
'hooks/run-tests-on-save.
|
|
115
|
+
'hooks/sync-tasks-on-edit.sce.hook',
|
|
116
|
+
'hooks/check-spec-on-create.sce.hook',
|
|
117
|
+
'hooks/run-tests-on-save.sce.hook'
|
|
118
118
|
];
|
|
119
119
|
|
|
120
120
|
for (const file of templateFiles) {
|
|
@@ -177,7 +177,7 @@ class AdoptionStrategy {
|
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
179
|
* Fresh Adoption Strategy
|
|
180
|
-
* Creates complete .
|
|
180
|
+
* Creates complete .sce/ structure from scratch
|
|
181
181
|
*/
|
|
182
182
|
class FreshAdoption extends AdoptionStrategy {
|
|
183
183
|
/**
|
|
@@ -200,17 +200,17 @@ class FreshAdoption extends AdoptionStrategy {
|
|
|
200
200
|
try {
|
|
201
201
|
const kiroPath = this.getKiroPath(projectPath);
|
|
202
202
|
|
|
203
|
-
// Check if .
|
|
203
|
+
// Check if .sce/ already exists
|
|
204
204
|
const kiroExists = await pathExists(kiroPath);
|
|
205
205
|
if (kiroExists) {
|
|
206
|
-
throw new Error('.
|
|
206
|
+
throw new Error('.sce/ directory already exists - use partial or full adoption');
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
if (dryRun) {
|
|
210
210
|
return {
|
|
211
211
|
success: true,
|
|
212
212
|
mode: 'fresh',
|
|
213
|
-
filesCreated: ['(dry-run) .
|
|
213
|
+
filesCreated: ['(dry-run) .sce/ structure would be created'],
|
|
214
214
|
filesUpdated: [],
|
|
215
215
|
filesSkipped: [],
|
|
216
216
|
backupId: null,
|
|
@@ -221,12 +221,12 @@ class FreshAdoption extends AdoptionStrategy {
|
|
|
221
221
|
|
|
222
222
|
// Create directory structure
|
|
223
223
|
await this.createDirectoryStructure(kiroPath);
|
|
224
|
-
filesCreated.push('.
|
|
225
|
-
filesCreated.push('.
|
|
226
|
-
filesCreated.push('.
|
|
227
|
-
filesCreated.push('.
|
|
228
|
-
filesCreated.push('.
|
|
229
|
-
filesCreated.push('.
|
|
224
|
+
filesCreated.push('.sce/');
|
|
225
|
+
filesCreated.push('.sce/specs/');
|
|
226
|
+
filesCreated.push('.sce/steering/');
|
|
227
|
+
filesCreated.push('.sce/tools/');
|
|
228
|
+
filesCreated.push('.sce/backups/');
|
|
229
|
+
filesCreated.push('.sce/hooks/');
|
|
230
230
|
|
|
231
231
|
// Copy template files
|
|
232
232
|
const copyResult = await this.copyTemplateFiles(projectPath, { overwrite: false });
|
|
@@ -267,7 +267,7 @@ class FreshAdoption extends AdoptionStrategy {
|
|
|
267
267
|
|
|
268
268
|
/**
|
|
269
269
|
* Partial Adoption Strategy
|
|
270
|
-
* Adds missing components to existing .
|
|
270
|
+
* Adds missing components to existing .sce/
|
|
271
271
|
*/
|
|
272
272
|
class PartialAdoption extends AdoptionStrategy {
|
|
273
273
|
/**
|
|
@@ -290,10 +290,10 @@ class PartialAdoption extends AdoptionStrategy {
|
|
|
290
290
|
try {
|
|
291
291
|
const kiroPath = this.getKiroPath(projectPath);
|
|
292
292
|
|
|
293
|
-
// Check if .
|
|
293
|
+
// Check if .sce/ exists
|
|
294
294
|
const kiroExists = await pathExists(kiroPath);
|
|
295
295
|
if (!kiroExists) {
|
|
296
|
-
throw new Error('.
|
|
296
|
+
throw new Error('.sce/ directory does not exist - use fresh adoption');
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
// Check if version.json exists
|
|
@@ -399,7 +399,7 @@ class PartialAdoption extends AdoptionStrategy {
|
|
|
399
399
|
|
|
400
400
|
/**
|
|
401
401
|
* Full Adoption Strategy
|
|
402
|
-
* Upgrades existing complete .
|
|
402
|
+
* Upgrades existing complete .sce/ to current version
|
|
403
403
|
*/
|
|
404
404
|
class FullAdoption extends AdoptionStrategy {
|
|
405
405
|
/**
|
|
@@ -422,10 +422,10 @@ class FullAdoption extends AdoptionStrategy {
|
|
|
422
422
|
try {
|
|
423
423
|
const kiroPath = this.getKiroPath(projectPath);
|
|
424
424
|
|
|
425
|
-
// Check if .
|
|
425
|
+
// Check if .sce/ exists
|
|
426
426
|
const kiroExists = await pathExists(kiroPath);
|
|
427
427
|
if (!kiroExists) {
|
|
428
|
-
throw new Error('.
|
|
428
|
+
throw new Error('.sce/ directory does not exist - use fresh adoption');
|
|
429
429
|
}
|
|
430
430
|
|
|
431
431
|
// Read existing version
|
|
@@ -32,7 +32,7 @@ class BackupManager {
|
|
|
32
32
|
* If backup creation or validation fails, the adoption process MUST be aborted.
|
|
33
33
|
*
|
|
34
34
|
* @param {string} projectPath - Absolute path to project root
|
|
35
|
-
* @param {string[]} filesToModify - Relative paths of files to backup (from .
|
|
35
|
+
* @param {string[]} filesToModify - Relative paths of files to backup (from .sce/)
|
|
36
36
|
* @param {Object} options - Backup options
|
|
37
37
|
* @param {string} options.type - Backup type (default: 'adopt-smart')
|
|
38
38
|
* @param {boolean} options.validateContent - Validate file content hashes (default: true)
|
|
@@ -259,7 +259,7 @@ class BackupManager {
|
|
|
259
259
|
const filesDir = path.join(backupPath, 'files');
|
|
260
260
|
|
|
261
261
|
for (const filePath of files) {
|
|
262
|
-
const originalFilePath = path.join(originalPath, '.
|
|
262
|
+
const originalFilePath = path.join(originalPath, '.sce', filePath);
|
|
263
263
|
const backupFilePath = path.join(filesDir, filePath);
|
|
264
264
|
|
|
265
265
|
// Check if original file still exists
|
|
@@ -348,7 +348,7 @@ class BackupManager {
|
|
|
348
348
|
* @returns {Promise<BackupInfo>}
|
|
349
349
|
*/
|
|
350
350
|
async getBackupInfo(projectPath, backupId) {
|
|
351
|
-
const backupPath = path.join(projectPath, '.
|
|
351
|
+
const backupPath = path.join(projectPath, '.sce', 'backups', backupId);
|
|
352
352
|
|
|
353
353
|
// Check if backup exists
|
|
354
354
|
const exists = await fs.pathExists(backupPath);
|
|
@@ -323,8 +323,8 @@ class ConflictResolver {
|
|
|
323
323
|
|
|
324
324
|
if (action === 'view-diff') {
|
|
325
325
|
// Show diff
|
|
326
|
-
const existingPath = path.join(projectPath, '.
|
|
327
|
-
const templatePath = conflict.templatePath || path.join(projectPath, 'template', '.
|
|
326
|
+
const existingPath = path.join(projectPath, '.sce', conflict.path);
|
|
327
|
+
const templatePath = conflict.templatePath || path.join(projectPath, 'template', '.sce', conflict.path);
|
|
328
328
|
|
|
329
329
|
try {
|
|
330
330
|
await this.diffViewer.showDiff(existingPath, templatePath);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Detection Engine
|
|
3
3
|
*
|
|
4
4
|
* Analyzes project structure and determines the appropriate adoption strategy.
|
|
5
|
-
* Detects project type, existing .
|
|
5
|
+
* Detects project type, existing .sce/ components, and potential conflicts.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const path = require('path');
|
|
@@ -15,7 +15,7 @@ const SteeringManager = require('../steering/steering-manager');
|
|
|
15
15
|
|
|
16
16
|
class DetectionEngine {
|
|
17
17
|
constructor() {
|
|
18
|
-
this.
|
|
18
|
+
this.sceDir = '.sce';
|
|
19
19
|
this.versionFile = 'version.json';
|
|
20
20
|
this.specsDir = 'specs';
|
|
21
21
|
this.steeringDir = 'steering';
|
|
@@ -31,7 +31,7 @@ class DetectionEngine {
|
|
|
31
31
|
*/
|
|
32
32
|
async analyze(projectPath) {
|
|
33
33
|
try {
|
|
34
|
-
const kiroPath = path.join(projectPath, this.
|
|
34
|
+
const kiroPath = path.join(projectPath, this.sceDir);
|
|
35
35
|
const hasKiroDir = await pathExists(kiroPath);
|
|
36
36
|
|
|
37
37
|
let hasVersionFile = false;
|
|
@@ -98,17 +98,17 @@ class DetectionEngine {
|
|
|
98
98
|
* @returns {AdoptionMode} - 'fresh', 'partial', or 'full'
|
|
99
99
|
*/
|
|
100
100
|
determineStrategy(result) {
|
|
101
|
-
// Fresh adoption: no .
|
|
101
|
+
// Fresh adoption: no .sce/ directory
|
|
102
102
|
if (!result.hasKiroDir) {
|
|
103
103
|
return 'fresh';
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
// Partial adoption: .
|
|
106
|
+
// Partial adoption: .sce/ exists but no version.json
|
|
107
107
|
if (!result.hasVersionFile) {
|
|
108
108
|
return 'partial';
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
// Full adoption: complete .
|
|
111
|
+
// Full adoption: complete .sce/ with version.json
|
|
112
112
|
return 'full';
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -152,7 +152,7 @@ class DetectionEngine {
|
|
|
152
152
|
const conflicts = [];
|
|
153
153
|
|
|
154
154
|
try {
|
|
155
|
-
const kiroPath = path.join(projectPath, this.
|
|
155
|
+
const kiroPath = path.join(projectPath, this.sceDir);
|
|
156
156
|
|
|
157
157
|
// Define template files that might conflict
|
|
158
158
|
const templateFiles = [
|
|
@@ -243,7 +243,7 @@ class DetectionEngine {
|
|
|
243
243
|
|
|
244
244
|
lines.push('Project Analysis:');
|
|
245
245
|
lines.push(` Project Type: ${result.projectType}`);
|
|
246
|
-
lines.push(` .
|
|
246
|
+
lines.push(` .sce/ Directory: ${result.hasKiroDir ? 'Yes' : 'No'}`);
|
|
247
247
|
|
|
248
248
|
if (result.hasKiroDir) {
|
|
249
249
|
lines.push(` version.json: ${result.hasVersionFile ? 'Yes' : 'No'}`);
|
|
@@ -130,7 +130,7 @@ class ErrorFormatter {
|
|
|
130
130
|
problem: 'Unable to create backup of existing files before making changes',
|
|
131
131
|
causes: [
|
|
132
132
|
'Insufficient disk space',
|
|
133
|
-
'Permission denied for .
|
|
133
|
+
'Permission denied for .sce/backups/ directory',
|
|
134
134
|
'File system error or corruption',
|
|
135
135
|
'Another process is accessing the files'
|
|
136
136
|
],
|
|
@@ -157,7 +157,7 @@ class ErrorFormatter {
|
|
|
157
157
|
'Run with appropriate permissions if needed',
|
|
158
158
|
'Make sure you have write access to the project directory',
|
|
159
159
|
'Check if files are marked as read-only',
|
|
160
|
-
'Try: chmod -R u+w .
|
|
160
|
+
'Try: chmod -R u+w .sce/ (on Unix-like systems)'
|
|
161
161
|
]
|
|
162
162
|
},
|
|
163
163
|
|
|
@@ -189,7 +189,7 @@ class ErrorFormatter {
|
|
|
189
189
|
],
|
|
190
190
|
solutions: [
|
|
191
191
|
'Verify the project path is correct',
|
|
192
|
-
'Check if files exist: ls -la .
|
|
192
|
+
'Check if files exist: ls -la .sce/ (Unix) or dir .sce (Windows)',
|
|
193
193
|
'Ensure file names are valid for your operating system',
|
|
194
194
|
'Try running file system check/repair tools',
|
|
195
195
|
'If problem persists, run: sce doctor'
|
|
@@ -258,7 +258,7 @@ class ErrorFormatter {
|
|
|
258
258
|
'Configuration values are out of range'
|
|
259
259
|
],
|
|
260
260
|
solutions: [
|
|
261
|
-
'Check configuration file: .
|
|
261
|
+
'Check configuration file: .sce/adoption-config.json',
|
|
262
262
|
'Restore default configuration: sce config reset',
|
|
263
263
|
'Validate configuration: sce config validate',
|
|
264
264
|
'Refer to documentation for valid configuration options'
|
|
@@ -36,7 +36,7 @@ const ResolutionAction = {
|
|
|
36
36
|
*/
|
|
37
37
|
class FileClassifier {
|
|
38
38
|
constructor() {
|
|
39
|
-
// Template file patterns (relative to .
|
|
39
|
+
// Template file patterns (relative to .sce/)
|
|
40
40
|
this.templatePatterns = [
|
|
41
41
|
'steering/CORE_PRINCIPLES.md',
|
|
42
42
|
'steering/ENVIRONMENT.md',
|
|
@@ -82,7 +82,7 @@ class FileClassifier {
|
|
|
82
82
|
/**
|
|
83
83
|
* Classify a file based on its path
|
|
84
84
|
*
|
|
85
|
-
* @param {string} filePath - File path relative to .
|
|
85
|
+
* @param {string} filePath - File path relative to .sce/
|
|
86
86
|
* @returns {string} FileCategory
|
|
87
87
|
*/
|
|
88
88
|
classifyFile(filePath) {
|
|
@@ -121,7 +121,7 @@ class FileClassifier {
|
|
|
121
121
|
/**
|
|
122
122
|
* Get resolution rule for a file
|
|
123
123
|
*
|
|
124
|
-
* @param {string} filePath - File path relative to .
|
|
124
|
+
* @param {string} filePath - File path relative to .sce/
|
|
125
125
|
* @returns {Object} Resolution rule
|
|
126
126
|
*/
|
|
127
127
|
getResolutionRule(filePath) {
|
|
@@ -283,9 +283,9 @@ class FileClassifier {
|
|
|
283
283
|
// Convert backslashes to forward slashes
|
|
284
284
|
let normalized = filePath.replace(/\\/g, '/');
|
|
285
285
|
|
|
286
|
-
// Remove leading .
|
|
287
|
-
if (normalized.startsWith('.
|
|
288
|
-
normalized = normalized.substring(
|
|
286
|
+
// Remove leading .sce/ if present
|
|
287
|
+
if (normalized.startsWith('.sce/')) {
|
|
288
|
+
normalized = normalized.substring('.sce/'.length);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
// Remove leading slash
|
|
@@ -317,7 +317,7 @@ class ProgressReporter {
|
|
|
317
317
|
console.log(' Actions:');
|
|
318
318
|
|
|
319
319
|
if (plan.requiresBackup) {
|
|
320
|
-
console.log(' - Backup existing files → .
|
|
320
|
+
console.log(' - Backup existing files → .sce/backups/adopt-{timestamp}/');
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
if (plan.changes.created.length > 0) {
|