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
|
@@ -17,8 +17,8 @@ sce repo init
|
|
|
17
17
|
This command:
|
|
18
18
|
- Scans your project directory for Git repositories
|
|
19
19
|
- Extracts remote URLs and current branches
|
|
20
|
-
- Creates `.
|
|
21
|
-
- Excludes the `.
|
|
20
|
+
- Creates `.sce/project-repos.json` configuration file
|
|
21
|
+
- Excludes the `.sce` directory from scanning
|
|
22
22
|
|
|
23
23
|
**Example output:**
|
|
24
24
|
```
|
|
@@ -28,7 +28,7 @@ Found 3 repositories:
|
|
|
28
28
|
✓ backend (develop) - https://github.com/user/backend.git
|
|
29
29
|
✓ shared (main) - https://github.com/user/shared.git
|
|
30
30
|
|
|
31
|
-
Configuration saved to .
|
|
31
|
+
Configuration saved to .sce/project-repos.json
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### 2. Check Repository Status
|
|
@@ -110,7 +110,7 @@ Overall Health: 2 healthy, 1 unhealthy
|
|
|
110
110
|
|
|
111
111
|
## Configuration File Format
|
|
112
112
|
|
|
113
|
-
The configuration is stored in `.
|
|
113
|
+
The configuration is stored in `.sce/project-repos.json`:
|
|
114
114
|
|
|
115
115
|
```json
|
|
116
116
|
{
|
|
@@ -197,7 +197,7 @@ Paths can be specified as:
|
|
|
197
197
|
|
|
198
198
|
### Overview
|
|
199
199
|
|
|
200
|
-
Starting with v1.21.0, you can manually create and edit the `.
|
|
200
|
+
Starting with v1.21.0, you can manually create and edit the `.sce/project-repos.json` configuration file without relying solely on `sce repo init`. This is useful for:
|
|
201
201
|
|
|
202
202
|
- Curating a specific list of repositories
|
|
203
203
|
- Removing false positives from auto-scan
|
|
@@ -307,12 +307,12 @@ When you manually create or edit the configuration, `sce` validates:
|
|
|
307
307
|
**Step 1: Create the directory structure**
|
|
308
308
|
|
|
309
309
|
```bash
|
|
310
|
-
mkdir -p .
|
|
310
|
+
mkdir -p .sce
|
|
311
311
|
```
|
|
312
312
|
|
|
313
313
|
**Step 2: Create the configuration file**
|
|
314
314
|
|
|
315
|
-
Create `.
|
|
315
|
+
Create `.sce/project-repos.json` with your repositories:
|
|
316
316
|
|
|
317
317
|
```json
|
|
318
318
|
{
|
|
@@ -691,7 +691,7 @@ Error: Circular parent reference detected: repo-a -> repo-b -> repo-a
|
|
|
691
691
|
```
|
|
692
692
|
|
|
693
693
|
**Solution:**
|
|
694
|
-
1. Open `.
|
|
694
|
+
1. Open `.sce/project-repos.json`
|
|
695
695
|
2. Check the `parent` fields
|
|
696
696
|
3. Remove or fix the circular reference
|
|
697
697
|
4. Run `sce repo health` to verify
|
|
@@ -724,7 +724,7 @@ To migrate an existing configuration to use nested scanning:
|
|
|
724
724
|
|
|
725
725
|
```bash
|
|
726
726
|
# Backup existing configuration
|
|
727
|
-
cp .
|
|
727
|
+
cp .sce/project-repos.json .sce/project-repos.json.backup
|
|
728
728
|
|
|
729
729
|
# Re-initialize with nested scanning
|
|
730
730
|
sce repo init --nested -y
|
|
@@ -754,7 +754,7 @@ sce repo init [options]
|
|
|
754
754
|
|
|
755
755
|
**Behavior:**
|
|
756
756
|
- Scans project directory recursively for Git repositories
|
|
757
|
-
- Excludes `.
|
|
757
|
+
- Excludes `.sce` directory and common build directories (node_modules, build, dist, etc.)
|
|
758
758
|
- Extracts remote URL from `origin` remote (or first available remote)
|
|
759
759
|
- Detects current branch
|
|
760
760
|
- Prompts for confirmation if configuration already exists
|
|
@@ -970,7 +970,7 @@ sce repo exec "git push"
|
|
|
970
970
|
|
|
971
971
|
## Manual Configuration
|
|
972
972
|
|
|
973
|
-
You can manually edit `.
|
|
973
|
+
You can manually edit `.sce/project-repos.json` to:
|
|
974
974
|
|
|
975
975
|
### Add a Repository
|
|
976
976
|
|
|
@@ -1081,7 +1081,7 @@ If you're using a version prior to v1.20.5, the scanner may incorrectly identify
|
|
|
1081
1081
|
|
|
1082
1082
|
**Error:**
|
|
1083
1083
|
```
|
|
1084
|
-
Error: Configuration file not found at .
|
|
1084
|
+
Error: Configuration file not found at .sce/project-repos.json
|
|
1085
1085
|
```
|
|
1086
1086
|
|
|
1087
1087
|
**Solution:**
|
|
@@ -1095,7 +1095,7 @@ Error: Repository path does not exist: packages/frontend
|
|
|
1095
1095
|
```
|
|
1096
1096
|
|
|
1097
1097
|
**Solution:**
|
|
1098
|
-
1. Verify the path in `.
|
|
1098
|
+
1. Verify the path in `.sce/project-repos.json`
|
|
1099
1099
|
2. Ensure the repository is cloned
|
|
1100
1100
|
3. Update the path if the repository moved
|
|
1101
1101
|
|
|
@@ -1122,7 +1122,7 @@ Error: Configuration validation failed:
|
|
|
1122
1122
|
```
|
|
1123
1123
|
|
|
1124
1124
|
**Solution:**
|
|
1125
|
-
1. Open `.
|
|
1125
|
+
1. Open `.sce/project-repos.json`
|
|
1126
1126
|
2. Fix validation errors
|
|
1127
1127
|
3. Ensure all required fields are present
|
|
1128
1128
|
4. Remove duplicate names
|
|
@@ -1157,10 +1157,10 @@ Error: Permission denied accessing repository: frontend
|
|
|
1157
1157
|
|
|
1158
1158
|
### 1. Keep Configuration in Version Control
|
|
1159
1159
|
|
|
1160
|
-
Add `.
|
|
1160
|
+
Add `.sce/project-repos.json` to your main repository:
|
|
1161
1161
|
|
|
1162
1162
|
```bash
|
|
1163
|
-
git add .
|
|
1163
|
+
git add .sce/project-repos.json
|
|
1164
1164
|
git commit -m "docs: add multi-repo configuration"
|
|
1165
1165
|
```
|
|
1166
1166
|
|
|
@@ -1299,7 +1299,7 @@ Validate configuration before committing:
|
|
|
1299
1299
|
```bash
|
|
1300
1300
|
# Add to pre-commit hook
|
|
1301
1301
|
#!/bin/bash
|
|
1302
|
-
if [ -f .
|
|
1302
|
+
if [ -f .sce/project-repos.json ]; then
|
|
1303
1303
|
sce repo health || exit 1
|
|
1304
1304
|
fi
|
|
1305
1305
|
```
|
|
@@ -90,7 +90,7 @@ cd your-project
|
|
|
90
90
|
sce adopt
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
这会在项目中创建 `.
|
|
93
|
+
这会在项目中创建 `.sce/` 目录。
|
|
94
94
|
|
|
95
95
|
### 步骤 3:创建你的第一个 Spec
|
|
96
96
|
|
|
@@ -99,9 +99,9 @@ sce spec bootstrap --name 01-00-user-login --non-interactive
|
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
然后编辑生成的文件:
|
|
102
|
-
- `.
|
|
103
|
-
- `.
|
|
104
|
-
- `.
|
|
102
|
+
- `.sce/specs/01-00-user-login/requirements.md` - 写需求
|
|
103
|
+
- `.sce/specs/01-00-user-login/design.md` - 写设计
|
|
104
|
+
- `.sce/specs/01-00-user-login/tasks.md` - 列任务
|
|
105
105
|
|
|
106
106
|
### 步骤 4:导出上下文
|
|
107
107
|
|
|
@@ -109,7 +109,7 @@ sce spec bootstrap --name 01-00-user-login --non-interactive
|
|
|
109
109
|
sce context export 01-00-user-login
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
这会生成:`.
|
|
112
|
+
这会生成:`.sce/specs/01-00-user-login/context-export.md`
|
|
113
113
|
|
|
114
114
|
### 步骤 5:使用 AI 工具
|
|
115
115
|
|
|
@@ -136,7 +136,7 @@ sce context export 01-00-user-login
|
|
|
136
136
|
1. 在代码文件中添加注释:
|
|
137
137
|
```javascript
|
|
138
138
|
// Task 1.1: Implement user login
|
|
139
|
-
// See: .
|
|
139
|
+
// See: .sce/specs/01-00-user-login/design.md
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
2. Copilot 会根据 Spec 文件生成代码
|
|
@@ -302,7 +302,7 @@ sce context export 01-00-user-login --steering --steering-files=CORE_PRINCIPLES.
|
|
|
302
302
|
|
|
303
303
|
### 1. 使用 Steering Rules 控制 AI 行为
|
|
304
304
|
|
|
305
|
-
创建 `.
|
|
305
|
+
创建 `.sce/steering/CODING_STANDARDS.md`:
|
|
306
306
|
|
|
307
307
|
```markdown
|
|
308
308
|
# 编码规范
|
package/docs/quick-start.md
CHANGED
|
@@ -38,7 +38,7 @@ cd your-project
|
|
|
38
38
|
sce adopt
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
This creates `.
|
|
41
|
+
This creates `.sce/` directory with:
|
|
42
42
|
- `README.md` - Project development guide
|
|
43
43
|
- `steering/` - Development rules
|
|
44
44
|
- `specs/` - Where Specs will live
|
|
@@ -50,7 +50,7 @@ This creates `.kiro/` directory with:
|
|
|
50
50
|
**In your AI tool (Cursor, Claude, Windsurf, etc.), say:**
|
|
51
51
|
|
|
52
52
|
```
|
|
53
|
-
Please read .
|
|
53
|
+
Please read .sce/README.md to understand how this project works.
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
**Your AI will learn:**
|
|
@@ -32,7 +32,7 @@ node bin/scene-capability-engine.js value metrics --help
|
|
|
32
32
|
sce value metrics sample --out ./kpi-input.json --json
|
|
33
33
|
sce value metrics snapshot --input ./kpi-input.json --json
|
|
34
34
|
node scripts/release-ops-weekly-summary.js --json
|
|
35
|
-
node scripts/release-risk-remediation-bundle.js --gate-report .
|
|
35
|
+
node scripts/release-risk-remediation-bundle.js --gate-report .sce/reports/release-evidence/release-gate.json --json
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
Expected:
|
|
@@ -146,10 +146,10 @@ Ensure:
|
|
|
146
146
|
- Optional release-asset 0-byte guard (enabled in workflow by default):
|
|
147
147
|
- `scripts/release-asset-nonempty-normalize.js` auto-fills placeholder content for optional assets such as `.lines` and `.jsonl` before GitHub Release upload.
|
|
148
148
|
- Local dry-run example:
|
|
149
|
-
- `node scripts/release-asset-nonempty-normalize.js --file .
|
|
149
|
+
- `node scripts/release-asset-nonempty-normalize.js --file .sce/reports/release-evidence/matrix-remediation-vX.Y.Z.lines --kind lines --note "no matrix remediation items for this release" --dry-run --json`
|
|
150
150
|
- Local normalize example:
|
|
151
|
-
- `node scripts/release-asset-nonempty-normalize.js --file .
|
|
151
|
+
- `node scripts/release-asset-nonempty-normalize.js --file .sce/reports/release-evidence/interactive-matrix-signals-vX.Y.Z.jsonl --kind jsonl --event interactive-matrix-signals --note "No interactive matrix signals collected for this release." --json`
|
|
152
152
|
- Optional local dry-run for gate history index artifact:
|
|
153
|
-
- `sce auto handoff gate-index --dir .
|
|
153
|
+
- `sce auto handoff gate-index --dir .sce/reports/release-evidence --out .sce/reports/release-evidence/release-gate-history.json --json`
|
|
154
154
|
|
|
155
155
|
Then proceed with your release workflow (tag, push, npm publish, GitHub release).
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# SCE Business Mode Map
|
|
2
|
+
|
|
3
|
+
This guide defines how SCE should run as the default capability control plane after being integrated into an application system.
|
|
4
|
+
|
|
5
|
+
## 1. Scope
|
|
6
|
+
|
|
7
|
+
- Applies to integrated business systems that expose UI + AI assistant capabilities.
|
|
8
|
+
- SCE is the default orchestrator for all AI-driven tasks in the host system.
|
|
9
|
+
- Every request is routed by mode, risk, and authorization state before execution.
|
|
10
|
+
|
|
11
|
+
## 2. Three Operating Modes
|
|
12
|
+
|
|
13
|
+
| Mode | Primary Goal | Typical Actor | Default Execution | Mutating Change Policy | Required Evidence |
|
|
14
|
+
| --- | --- | --- | --- | --- | --- |
|
|
15
|
+
| `user-mode` | Complete business tasks safely | End user | `suggestion` | Block direct apply by default | intent, summary, guidance |
|
|
16
|
+
| `ops-mode` | Maintain system health and fix runtime issues | Operations / support | `suggestion` + guarded `apply` | Allow apply after runtime + authorization + approval gates | plan, work-order, ledger, gate signals |
|
|
17
|
+
| `dev-mode` | Deliver new features and structural changes | Developer / product engineer | `suggestion` + staged `apply` | Require branch-level review and release gates | spec deltas, test evidence, release evidence |
|
|
18
|
+
|
|
19
|
+
## 3. Default Takeover Principle
|
|
20
|
+
|
|
21
|
+
After SCE integration is enabled:
|
|
22
|
+
|
|
23
|
+
1. All AI intents must enter SCE first.
|
|
24
|
+
2. SCE decides route: answer only, generate patch, repair, or rollback.
|
|
25
|
+
3. Any mutating action must pass governance gates before apply.
|
|
26
|
+
4. Every apply/rollback must write auditable artifacts.
|
|
27
|
+
|
|
28
|
+
## 4. Runtime Flow (Default)
|
|
29
|
+
|
|
30
|
+
1. `intent intake`: capture goal + page/context payload.
|
|
31
|
+
2. `mode classification`: resolve `user-mode` / `ops-mode` / `dev-mode`.
|
|
32
|
+
3. `strategy routing`: choose answer-only, patch, repair loop, or rollback.
|
|
33
|
+
4. `symbol-level evidence`: locate affected files/symbols and build plan.
|
|
34
|
+
5. `gated execution`: runtime policy + authorization tier + approval gate.
|
|
35
|
+
6. `execution + audit`: execute or block, then emit summary and evidence.
|
|
36
|
+
|
|
37
|
+
## 5. Mode Playbooks
|
|
38
|
+
|
|
39
|
+
### 5.1 user-mode (business usage UI)
|
|
40
|
+
|
|
41
|
+
- UI profile: business-user.
|
|
42
|
+
- Default policy: advice and guided actions only.
|
|
43
|
+
- Apply behavior: denied unless elevated to ops/dev flow explicitly.
|
|
44
|
+
- Recommended command pattern:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
sce scene interactive-flow \
|
|
48
|
+
--goal "<business-goal>" \
|
|
49
|
+
--ui-mode user-app \
|
|
50
|
+
--dialogue-profile business-user \
|
|
51
|
+
--execution-mode suggestion \
|
|
52
|
+
--json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 5.2 ops-mode (maintenance console)
|
|
56
|
+
|
|
57
|
+
- UI profile: system-maintainer.
|
|
58
|
+
- Default policy: allow guarded apply for low/medium risk fixes.
|
|
59
|
+
- Required gates: runtime policy, authorization tier, approval workflow.
|
|
60
|
+
- Recommended command pattern:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
sce scene interactive-flow \
|
|
64
|
+
--goal "<ops-goal>" \
|
|
65
|
+
--ui-mode ops-console \
|
|
66
|
+
--dialogue-profile system-maintainer \
|
|
67
|
+
--execution-mode apply \
|
|
68
|
+
--runtime-environment staging \
|
|
69
|
+
--auto-execute-low-risk \
|
|
70
|
+
--json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 5.3 dev-mode (feature and restructuring)
|
|
74
|
+
|
|
75
|
+
- UI profile: system-maintainer or engineering profile.
|
|
76
|
+
- Default policy: spec-first planning + controlled implementation.
|
|
77
|
+
- Required gates: spec completeness, tests, release preflight evidence.
|
|
78
|
+
- Recommended command pattern:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
sce auto close-loop-batch <manifest.json> \
|
|
82
|
+
--format json \
|
|
83
|
+
--batch-retry-until-complete \
|
|
84
|
+
--json
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 6. Security and Authorization Baseline
|
|
88
|
+
|
|
89
|
+
- Password authorization is mandatory for mutating apply mode.
|
|
90
|
+
- Runtime `non-allow` decisions must block unattended apply.
|
|
91
|
+
- Weekly governance gates are mandatory before release.
|
|
92
|
+
- Legacy steering migration must be manually approved before non-migration commands can proceed.
|
|
93
|
+
|
|
94
|
+
See also: `docs/security-governance-default-baseline.md`
|
|
95
|
+
|
|
96
|
+
## 7. Integration Checklist
|
|
97
|
+
|
|
98
|
+
1. Map UI surfaces to one of the three modes.
|
|
99
|
+
2. Wire the AI assistant to call SCE as first-hop router.
|
|
100
|
+
3. Enable required gate artifacts and audit logs.
|
|
101
|
+
4. Run weekly governance and release gates.
|
|
102
|
+
5. Keep capability matrix and ontology mapping updated per release.
|
|
103
|
+
|
|
@@ -33,17 +33,17 @@ This baseline is the default operating policy for SCE-driven delivery, including
|
|
|
33
33
|
|
|
34
34
|
## 4. Mandatory Audit Artifacts
|
|
35
35
|
|
|
36
|
-
- `.
|
|
37
|
-
- `.
|
|
38
|
-
- `.
|
|
39
|
-
- `.
|
|
40
|
-
- `.
|
|
41
|
-
- `.
|
|
42
|
-
- `.
|
|
43
|
-
- `.
|
|
44
|
-
- `.
|
|
45
|
-
- `.
|
|
46
|
-
- `.
|
|
36
|
+
- `.sce/reports/release-evidence/handoff-runs.json`
|
|
37
|
+
- `.sce/reports/release-evidence/release-gate-history.json`
|
|
38
|
+
- `.sce/reports/release-evidence/governance-snapshot-<tag>.json`
|
|
39
|
+
- `.sce/reports/release-evidence/weekly-ops-summary-<tag>.json`
|
|
40
|
+
- `.sce/reports/interactive-governance-report.json`
|
|
41
|
+
- `.sce/reports/interactive-dialogue-authorization-signals.jsonl`
|
|
42
|
+
- `.sce/reports/interactive-runtime-signals.jsonl`
|
|
43
|
+
- `.sce/reports/interactive-authorization-tier-signals.jsonl`
|
|
44
|
+
- `.sce/reports/interactive-dialogue-governance.json`
|
|
45
|
+
- `.sce/reports/interactive-execution-ledger.jsonl`
|
|
46
|
+
- `.sce/reports/interactive-approval-events.jsonl`
|
|
47
47
|
|
|
48
48
|
## 5. Weekly Control Loop
|
|
49
49
|
|
|
@@ -51,7 +51,7 @@ This baseline is the default operating policy for SCE-driven delivery, including
|
|
|
51
51
|
node scripts/interactive-governance-report.js --period weekly --fail-on-alert --json
|
|
52
52
|
node scripts/release-ops-weekly-summary.js --json
|
|
53
53
|
node scripts/release-weekly-ops-gate.js
|
|
54
|
-
node scripts/release-risk-remediation-bundle.js --gate-report .
|
|
54
|
+
node scripts/release-risk-remediation-bundle.js --gate-report .sce/reports/release-evidence/release-gate.json --json
|
|
55
55
|
node scripts/release-asset-integrity-check.js
|
|
56
56
|
```
|
|
57
57
|
|
|
@@ -71,7 +71,7 @@ sce collab assign session-manager SCE-3
|
|
|
71
71
|
|
|
72
72
|
### 4. Define Interface Contracts
|
|
73
73
|
|
|
74
|
-
Create an interface contract for a Spec (in `.
|
|
74
|
+
Create an interface contract for a Spec (in `.sce/specs/{spec-name}/interfaces/`):
|
|
75
75
|
|
|
76
76
|
```json
|
|
77
77
|
{
|
|
@@ -306,7 +306,7 @@ When you need to make breaking changes to an interface:
|
|
|
306
306
|
|
|
307
307
|
### Custom Integration Tests
|
|
308
308
|
|
|
309
|
-
Create integration tests in `.
|
|
309
|
+
Create integration tests in `.sce/specs/{master-spec}/integration-tests/`:
|
|
310
310
|
|
|
311
311
|
```javascript
|
|
312
312
|
module.exports = {
|
|
@@ -332,7 +332,7 @@ module.exports = {
|
|
|
332
332
|
|
|
333
333
|
## Metadata File Format
|
|
334
334
|
|
|
335
|
-
Collaboration metadata is stored in `.
|
|
335
|
+
Collaboration metadata is stored in `.sce/specs/{spec-name}/collaboration.json`:
|
|
336
336
|
|
|
337
337
|
```json
|
|
338
338
|
{
|
|
@@ -174,7 +174,7 @@ sce lock acquire quick-fix --timeout 2 # 2 hours
|
|
|
174
174
|
|
|
175
175
|
### Machine ID Storage
|
|
176
176
|
|
|
177
|
-
Machine IDs are stored in `.
|
|
177
|
+
Machine IDs are stored in `.sce/config/machine-id.json` and are automatically generated on first use.
|
|
178
178
|
|
|
179
179
|
## Troubleshooting
|
|
180
180
|
|
|
@@ -202,7 +202,7 @@ Consider adding this to your CI/CD pipeline or team workflow.
|
|
|
202
202
|
|
|
203
203
|
## File Format
|
|
204
204
|
|
|
205
|
-
Lock files are stored as `.
|
|
205
|
+
Lock files are stored as `.sce/specs/<spec-name>/.lock` with JSON format:
|
|
206
206
|
|
|
207
207
|
```json
|
|
208
208
|
{
|
package/docs/spec-workflow.md
CHANGED
|
@@ -254,7 +254,7 @@ Response: { ... }
|
|
|
254
254
|
sce spec bootstrap --name 01-00-user-login --non-interactive
|
|
255
255
|
```
|
|
256
256
|
|
|
257
|
-
**2. Write Requirements** (`.
|
|
257
|
+
**2. Write Requirements** (`.sce/specs/01-00-user-login/requirements.md`):
|
|
258
258
|
```markdown
|
|
259
259
|
# User Login
|
|
260
260
|
|
|
@@ -266,7 +266,7 @@ sce spec bootstrap --name 01-00-user-login --non-interactive
|
|
|
266
266
|
- WHEN user enters invalid credentials THEN they see an error
|
|
267
267
|
```
|
|
268
268
|
|
|
269
|
-
**3. Write Design** (`.
|
|
269
|
+
**3. Write Design** (`.sce/specs/01-00-user-login/design.md`):
|
|
270
270
|
```markdown
|
|
271
271
|
# User Login - Design
|
|
272
272
|
|
|
@@ -281,7 +281,7 @@ Response: { token } or { error }
|
|
|
281
281
|
- UserRepository - database access
|
|
282
282
|
```
|
|
283
283
|
|
|
284
|
-
**4. Write Tasks** (`.
|
|
284
|
+
**4. Write Tasks** (`.sce/specs/01-00-user-login/tasks.md`):
|
|
285
285
|
```markdown
|
|
286
286
|
- [ ] 1.1 Create AuthController
|
|
287
287
|
- [ ] 1.2 Create AuthService
|
|
@@ -44,7 +44,7 @@ node scripts/release-ops-weekly-summary.js --json
|
|
|
44
44
|
|
|
45
45
|
## Default Evidence Set
|
|
46
46
|
|
|
47
|
-
- `.
|
|
48
|
-
- `.
|
|
49
|
-
- `.
|
|
50
|
-
- `.
|
|
47
|
+
- `.sce/reports/release-evidence/handoff-runs.json`
|
|
48
|
+
- `.sce/reports/release-evidence/release-gate-history.json`
|
|
49
|
+
- `.sce/reports/release-evidence/governance-snapshot-<tag>.json`
|
|
50
|
+
- `.sce/reports/release-evidence/weekly-ops-summary-<tag>.json`
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
{
|
|
6
6
|
"id": "60-10-example-capability-spec",
|
|
7
7
|
"status": "completed",
|
|
8
|
-
"scene_package": ".
|
|
9
|
-
"scene_manifest": ".
|
|
8
|
+
"scene_package": ".sce/specs/60-10-example-capability-spec/custom/scene-package.json",
|
|
9
|
+
"scene_manifest": ".sce/specs/60-10-example-capability-spec/custom/scene.yaml"
|
|
10
10
|
}
|
|
11
11
|
],
|
|
12
12
|
"templates": [
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
When adopting scene-capability-engine (sce) into a project that already has steering files in `.
|
|
5
|
+
When adopting scene-capability-engine (sce) into a project that already has steering files in `.sce/steering/`, you must choose a steering strategy. This is because AI IDE loads all files in the steering directory, and having both sce steering rules and your project's custom steering rules can cause conflicts.
|
|
6
6
|
|
|
7
7
|
## Why Steering Exclusivity?
|
|
8
8
|
|
|
9
|
-
AI IDE automatically loads all Markdown files in `.
|
|
9
|
+
AI IDE automatically loads all Markdown files in `.sce/steering/` as AI behavior rules. If you have both sce steering files and your project's custom steering files, the AI will try to follow both sets of rules, which can lead to:
|
|
10
10
|
|
|
11
11
|
- Conflicting instructions
|
|
12
12
|
- Unpredictable AI behavior
|
|
@@ -24,9 +24,9 @@ Therefore, you must choose **one** set of steering rules to use.
|
|
|
24
24
|
- You want the full sce experience with optimized AI behavior
|
|
25
25
|
|
|
26
26
|
**What happens:**
|
|
27
|
-
1. Your existing steering files are backed up to `.
|
|
28
|
-
2. sce steering template files are installed to `.
|
|
29
|
-
3. The backup ID is saved in `.
|
|
27
|
+
1. Your existing steering files are backed up to `.sce/backups/steering-{timestamp}/`
|
|
28
|
+
2. sce steering template files are installed to `.sce/steering/`
|
|
29
|
+
3. The backup ID is saved in `.sce/adoption-config.json`
|
|
30
30
|
4. You can rollback if needed
|
|
31
31
|
|
|
32
32
|
**Files installed:**
|
|
@@ -45,7 +45,7 @@ Therefore, you must choose **one** set of steering rules to use.
|
|
|
45
45
|
**What happens:**
|
|
46
46
|
1. Your existing steering files are preserved
|
|
47
47
|
2. sce steering files are **not** installed
|
|
48
|
-
3. The choice is documented in `.
|
|
48
|
+
3. The choice is documented in `.sce/adoption-config.json`
|
|
49
49
|
4. You can manually integrate sce steering concepts if desired
|
|
50
50
|
|
|
51
51
|
**Trade-offs:**
|
|
@@ -81,20 +81,20 @@ sce rollback --list
|
|
|
81
81
|
sce rollback {backup-id}
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
Or manually restore from `.
|
|
84
|
+
Or manually restore from `.sce/backups/steering-{timestamp}/`.
|
|
85
85
|
|
|
86
86
|
## Manual Integration
|
|
87
87
|
|
|
88
88
|
If you chose "use-project" but want to incorporate sce steering concepts:
|
|
89
89
|
|
|
90
|
-
1. Review sce steering templates in `template/.
|
|
90
|
+
1. Review sce steering templates in `template/.sce/steering/`
|
|
91
91
|
2. Identify useful concepts (Spec workflow, Ultrawork principles, etc.)
|
|
92
92
|
3. Manually merge relevant sections into your steering files
|
|
93
93
|
4. Test with a sample Spec to ensure compatibility
|
|
94
94
|
|
|
95
95
|
## Configuration File
|
|
96
96
|
|
|
97
|
-
Your steering strategy choice is saved in `.
|
|
97
|
+
Your steering strategy choice is saved in `.sce/adoption-config.json`:
|
|
98
98
|
|
|
99
99
|
```json
|
|
100
100
|
{
|
|
@@ -137,7 +137,7 @@ Your steering strategy choice is saved in `.kiro/adoption-config.json`:
|
|
|
137
137
|
### Problem: AI behavior is inconsistent after adoption
|
|
138
138
|
|
|
139
139
|
**Solution:**
|
|
140
|
-
- Check which steering strategy you chose: `cat .
|
|
140
|
+
- Check which steering strategy you chose: `cat .sce/adoption-config.json`
|
|
141
141
|
- If "use-kse", verify sce steering files are present
|
|
142
142
|
- If "use-project", ensure your steering files are compatible with sce
|
|
143
143
|
|
|
@@ -151,13 +151,13 @@ Your steering strategy choice is saved in `.kiro/adoption-config.json`:
|
|
|
151
151
|
|
|
152
152
|
2. If currently "use-project":
|
|
153
153
|
- Manually backup your steering files
|
|
154
|
-
- Copy sce templates from `template/.
|
|
155
|
-
- Update `.
|
|
154
|
+
- Copy sce templates from `template/.sce/steering/`
|
|
155
|
+
- Update `.sce/adoption-config.json`
|
|
156
156
|
|
|
157
157
|
### Problem: Lost steering backup
|
|
158
158
|
|
|
159
159
|
**Solution:**
|
|
160
|
-
- Check `.
|
|
160
|
+
- Check `.sce/backups/` for steering backups
|
|
161
161
|
- Backups are named `steering-{timestamp}`
|
|
162
162
|
- If no backup exists, you'll need to recreate your steering files
|
|
163
163
|
|
|
@@ -186,8 +186,8 @@ A: Yes, but you'll need to manually manage the steering files and update the con
|
|
|
186
186
|
## Related Documentation
|
|
187
187
|
|
|
188
188
|
- [Adoption Guide](./adoption-guide.md) - Complete adoption workflow
|
|
189
|
-
- [Spec Workflow Guide](../.
|
|
190
|
-
- [Steering Files](../.
|
|
189
|
+
- [Spec Workflow Guide](../.sce/specs/SPEC_WORKFLOW_GUIDE.md) - How to use Specs
|
|
190
|
+
- [Steering Files](../.sce/steering/) - sce steering templates
|
|
191
191
|
|
|
192
192
|
---
|
|
193
193
|
|