scene-capability-engine 3.3.26 → 3.4.5
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 +62 -0
- package/README.md +81 -719
- package/README.zh.md +85 -586
- package/bin/scene-capability-engine.js +103 -0
- package/docs/README.md +47 -249
- package/docs/command-reference.md +49 -4
- package/docs/spec-workflow.md +35 -4
- package/docs/zh/README.md +44 -331
- package/lib/adoption/adoption-strategy.js +4 -0
- package/lib/adoption/detection-engine.js +4 -0
- package/lib/adoption/file-classifier.js +5 -1
- package/lib/adoption/smart-orchestrator.js +4 -0
- package/lib/commands/adopt.js +32 -0
- package/lib/commands/errorbook.js +409 -2
- package/lib/commands/spec-domain.js +78 -2
- package/lib/commands/studio.js +251 -3
- package/lib/commands/upgrade.js +16 -0
- package/lib/problem/problem-evaluator.js +620 -0
- package/lib/spec/domain-modeling.js +217 -1
- package/lib/workspace/takeover-baseline.js +446 -0
- package/package.json +1 -1
- package/template/.sce/config/problem-eval-policy.json +36 -0
- package/template/.sce/config/session-governance.json +8 -0
- package/template/.sce/config/spec-domain-policy.json +6 -0
- package/template/.sce/config/takeover-baseline.json +33 -0
|
@@ -29,6 +29,7 @@ const {
|
|
|
29
29
|
migrateLegacyKiroDirectories,
|
|
30
30
|
} = require('../lib/workspace/legacy-kiro-migrator');
|
|
31
31
|
const { auditSceTracking } = require('../lib/workspace/sce-tracking-audit');
|
|
32
|
+
const { applyTakeoverBaseline } = require('../lib/workspace/takeover-baseline');
|
|
32
33
|
|
|
33
34
|
const i18n = getI18n();
|
|
34
35
|
const t = (key, params) => i18n.t(key, params);
|
|
@@ -167,6 +168,31 @@ function isLegacyMigrationAllowlistedCommand(args) {
|
|
|
167
168
|
return false;
|
|
168
169
|
}
|
|
169
170
|
|
|
171
|
+
/**
|
|
172
|
+
* Commands that should inspect drift before auto-takeover mutates state.
|
|
173
|
+
*
|
|
174
|
+
* @param {string[]} args
|
|
175
|
+
* @returns {boolean}
|
|
176
|
+
*/
|
|
177
|
+
function isTakeoverAutoApplySkippedCommand(args) {
|
|
178
|
+
if (!Array.isArray(args) || args.length === 0) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const commandIndex = findCommandIndex(args);
|
|
183
|
+
if (commandIndex < 0) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const command = args[commandIndex];
|
|
188
|
+
if (command !== 'workspace') {
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const subcommand = args[commandIndex + 1];
|
|
193
|
+
return subcommand === 'takeover-audit';
|
|
194
|
+
}
|
|
195
|
+
|
|
170
196
|
// 版本和基本信息
|
|
171
197
|
program
|
|
172
198
|
.name(t('cli.name'))
|
|
@@ -761,6 +787,70 @@ workspaceCmd
|
|
|
761
787
|
}
|
|
762
788
|
});
|
|
763
789
|
|
|
790
|
+
workspaceCmd
|
|
791
|
+
.command('takeover-audit')
|
|
792
|
+
.description('Audit whether project takeover baseline is aligned with current SCE defaults')
|
|
793
|
+
.option('--json', 'Output in JSON format')
|
|
794
|
+
.option('--strict', 'Exit non-zero when takeover drift is detected')
|
|
795
|
+
.action(async (options) => {
|
|
796
|
+
const report = await applyTakeoverBaseline(process.cwd(), {
|
|
797
|
+
apply: false,
|
|
798
|
+
writeReport: false,
|
|
799
|
+
sceVersion: packageJson.version
|
|
800
|
+
});
|
|
801
|
+
|
|
802
|
+
if (options.json) {
|
|
803
|
+
console.log(JSON.stringify(report, null, 2));
|
|
804
|
+
} else if (!report.detected_project) {
|
|
805
|
+
console.log(chalk.gray(report.message || 'No .sce project detected.'));
|
|
806
|
+
} else if (report.passed) {
|
|
807
|
+
console.log(chalk.green('✓ Takeover baseline audit passed.'));
|
|
808
|
+
console.log(chalk.gray(`Aligned files: ${report.summary.unchanged}`));
|
|
809
|
+
} else {
|
|
810
|
+
console.log(chalk.yellow('⚠ Takeover baseline drift detected.'));
|
|
811
|
+
console.log(chalk.gray(`Pending fixes: ${report.summary.pending}`));
|
|
812
|
+
report.files
|
|
813
|
+
.filter((item) => item.status === 'pending')
|
|
814
|
+
.forEach((item) => {
|
|
815
|
+
console.log(chalk.gray(` - ${item.path}`));
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
if (report.detected_project && options.strict && !report.passed) {
|
|
820
|
+
process.exitCode = 1;
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
|
|
824
|
+
workspaceCmd
|
|
825
|
+
.command('takeover-apply')
|
|
826
|
+
.description('Apply takeover baseline defaults for current SCE operating mode')
|
|
827
|
+
.option('--json', 'Output in JSON format')
|
|
828
|
+
.action(async (options) => {
|
|
829
|
+
const report = await applyTakeoverBaseline(process.cwd(), {
|
|
830
|
+
apply: true,
|
|
831
|
+
writeReport: true,
|
|
832
|
+
sceVersion: packageJson.version
|
|
833
|
+
});
|
|
834
|
+
|
|
835
|
+
if (options.json) {
|
|
836
|
+
console.log(JSON.stringify(report, null, 2));
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
if (!report.detected_project) {
|
|
841
|
+
console.log(chalk.gray(report.message || 'No .sce project detected.'));
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
console.log(chalk.green('✓ Takeover baseline applied.'));
|
|
846
|
+
console.log(chalk.gray(`Created: ${report.summary.created}`));
|
|
847
|
+
console.log(chalk.gray(`Updated: ${report.summary.updated}`));
|
|
848
|
+
console.log(chalk.gray(`Unchanged: ${report.summary.unchanged}`));
|
|
849
|
+
if (report.report_file) {
|
|
850
|
+
console.log(chalk.gray(`Report: ${report.report_file}`));
|
|
851
|
+
}
|
|
852
|
+
});
|
|
853
|
+
|
|
764
854
|
// Environment configuration management commands
|
|
765
855
|
const envCommand = require('../lib/commands/env');
|
|
766
856
|
|
|
@@ -979,6 +1069,7 @@ async function updateProjectConfig(projectName) {
|
|
|
979
1069
|
// Parse startup flags and guardrails
|
|
980
1070
|
const args = process.argv.slice(2);
|
|
981
1071
|
const isLegacyAllowlistedCommand = isLegacyMigrationAllowlistedCommand(args);
|
|
1072
|
+
const skipAutoTakeover = isTakeoverAutoApplySkippedCommand(args);
|
|
982
1073
|
const skipCheck = args.includes('--skip-steering-check') ||
|
|
983
1074
|
process.env.KSE_SKIP_STEERING_CHECK === '1';
|
|
984
1075
|
const forceCheck = args.includes('--force-steering-check');
|
|
@@ -995,6 +1086,18 @@ async function updateProjectConfig(projectName) {
|
|
|
995
1086
|
process.exit(2);
|
|
996
1087
|
}
|
|
997
1088
|
}
|
|
1089
|
+
|
|
1090
|
+
if (!isLegacyAllowlistedCommand && !skipAutoTakeover) {
|
|
1091
|
+
try {
|
|
1092
|
+
await applyTakeoverBaseline(process.cwd(), {
|
|
1093
|
+
apply: true,
|
|
1094
|
+
writeReport: true,
|
|
1095
|
+
sceVersion: packageJson.version
|
|
1096
|
+
});
|
|
1097
|
+
} catch (_error) {
|
|
1098
|
+
// Startup auto-takeover is best effort and should not block commands.
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
998
1101
|
|
|
999
1102
|
// Run compliance check
|
|
1000
1103
|
await runSteeringComplianceCheck({
|
package/docs/README.md
CHANGED
|
@@ -1,291 +1,89 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SCE Documentation Hub
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This hub focuses on high-value paths for adopting and scaling SCE.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
**Last Updated**: 2026-02-14
|
|
7
|
+
## Start Here
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- **[Quick Start Guide](quick-start.md)** - Get up and running in 5 minutes
|
|
17
|
-
- **[FAQ](faq.md)** - Frequently asked questions
|
|
18
|
-
- **[Troubleshooting](troubleshooting.md)** - Common issues and solutions
|
|
19
|
-
|
|
20
|
-
## ⭐ Why Teams Choose sce
|
|
21
|
-
|
|
22
|
-
- **Structured AI delivery**: Specs enforce Requirements → Design → Tasks before implementation.
|
|
23
|
-
- **Parallel execution at scale**: Orchestrate multiple Specs with dependency-aware scheduling.
|
|
24
|
-
- **Dual-track handoff closure**: `sce auto handoff run` executes plan/queue/batch/observability in one closed loop, supports `--continue-from` resume, and emits executable follow-up recommendations.
|
|
25
|
-
- **Measurable outcomes**: KPI snapshot/baseline/trend commands make delivery quality auditable.
|
|
26
|
-
- **Tool-agnostic workflow**: Works across Claude, Cursor, Windsurf, Copilot, and SCE.
|
|
27
|
-
- **Built-in governance**: Locks, document governance, environment/workspace controls, and audit trails.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## 📖 Core Concepts
|
|
32
|
-
|
|
33
|
-
Understand how sce works:
|
|
34
|
-
|
|
35
|
-
- **[Spec Workflow](spec-workflow.md)** - Understanding the Spec-driven development process
|
|
36
|
-
- **[Integration Modes](integration-modes.md)** - Three ways to integrate sce with AI tools
|
|
37
|
-
- **[Command Reference](command-reference.md)** - Complete list of all sce commands
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## 🛠️ Tool-Specific Guides
|
|
42
|
-
|
|
43
|
-
Choose your AI tool and learn how to integrate:
|
|
44
|
-
|
|
45
|
-
### Native Integration
|
|
46
|
-
- **[AI IDE Guide](tools/SCE-guide.md)** - Fully automatic integration
|
|
47
|
-
|
|
48
|
-
### Manual Export Integration
|
|
49
|
-
- **[Cursor Guide](tools/cursor-guide.md)** - Using sce with Cursor IDE
|
|
50
|
-
- **[Claude Code Guide](tools/claude-guide.md)** - Using sce with Claude Code
|
|
51
|
-
- **[VS Code + Copilot Guide](tools/vscode-guide.md)** - Using sce with VS Code and GitHub Copilot
|
|
52
|
-
|
|
53
|
-
### Watch Mode Integration
|
|
54
|
-
- **[Windsurf Guide](tools/windsurf-guide.md)** - Using sce with Windsurf (supports watch mode)
|
|
55
|
-
|
|
56
|
-
### Universal Integration
|
|
57
|
-
- **[Generic AI Tools Guide](tools/generic-guide.md)** - Using sce with any AI tool
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## 📚 Examples
|
|
62
|
-
|
|
63
|
-
Learn by example with complete Spec demonstrations:
|
|
64
|
-
|
|
65
|
-
### API Development
|
|
66
|
-
- **[REST API Example](examples/add-rest-api/)** - Complete RESTful API with authentication
|
|
67
|
-
- Requirements, design, and tasks for a task management API
|
|
68
|
-
- JWT authentication, CRUD operations, error handling
|
|
69
|
-
- Node.js + Express + PostgreSQL
|
|
70
|
-
|
|
71
|
-
### UI Development
|
|
72
|
-
- **[User Dashboard Example](examples/add-user-dashboard/)** - React dashboard with data visualization
|
|
73
|
-
- Component hierarchy, state management, API integration
|
|
74
|
-
- Responsive design, charts, loading states
|
|
75
|
-
- React + Recharts
|
|
76
|
-
|
|
77
|
-
### CLI Development
|
|
78
|
-
- **[Export Command Example](examples/add-export-command/)** - Adding a new CLI command
|
|
79
|
-
- Command structure, argument parsing, file I/O
|
|
80
|
-
- Multiple output formats (JSON, Markdown, HTML)
|
|
81
|
-
- Node.js + Commander.js
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## 🔧 Reference
|
|
86
|
-
|
|
87
|
-
Detailed technical documentation:
|
|
88
|
-
|
|
89
|
-
- **[Command Reference](command-reference.md)** - All sce commands with examples
|
|
90
|
-
- **[Environment Management Guide](environment-management-guide.md)** - Multi-environment configuration management
|
|
91
|
-
- **[Multi-Repository Management Guide](multi-repo-management-guide.md)** - Managing multiple Git repositories
|
|
92
|
-
- **[Value Observability Guide](value-observability-guide.md)** - KPI snapshot, baseline, trend, and gate evidence workflow
|
|
93
|
-
- **[Scene Runtime Guide](scene-runtime-guide.md)** - Scene template engine, quality pipeline, ontology, and Moqui ERP integration
|
|
94
|
-
- **[Moqui Template Core Library Playbook](moqui-template-core-library-playbook.md)** - Default-gated intake flow for absorbing Moqui capabilities into sce templates
|
|
95
|
-
- **[331-poc Dual-Track Integration Guide](331-poc-dual-track-integration-guide.md)** - Handoff contract and integration playbook between 331-poc and sce
|
|
96
|
-
- **[331-poc Adaptation Roadmap](331-poc-adaptation-roadmap.md)** - Ongoing sce-side adaptation backlog and rollout phases
|
|
97
|
-
- **[SCE Capability Matrix Roadmap](sce-capability-matrix-roadmap.md)** - Strategy routing, symbol evidence, self-repair, ontology mapping, and multi-agent merge policy roadmap
|
|
98
|
-
- **[SCE Capability Matrix E2E Example](sce-capability-matrix-e2e-example.md)** - End-to-end example from strategy decision to summary-driven merge block/allow
|
|
99
|
-
- **[Handoff Profile Integration Guide](handoff-profile-integration-guide.md)** - External project intake contract for `default|moqui|enterprise` handoff profiles
|
|
100
|
-
- **[SCE Business Mode Map](sce-business-mode-map.md)** - Default takeover model and `user/ops/dev` mode execution governance
|
|
101
|
-
- **[Multi-Agent Coordination Guide](multi-agent-coordination-guide.md)** - Multi-agent parallel coordination for concurrent development
|
|
102
|
-
- **[Troubleshooting](troubleshooting.md)** - Solutions to common problems
|
|
103
|
-
- **[FAQ](faq.md)** - Answers to frequently asked questions
|
|
9
|
+
- [Quick Start](quick-start.md)
|
|
10
|
+
- [Quick Start with AI Tools](quick-start-with-ai-tools.md)
|
|
11
|
+
- [Command Reference](command-reference.md)
|
|
12
|
+
- [FAQ](faq.md)
|
|
13
|
+
- [Troubleshooting](troubleshooting.md)
|
|
104
14
|
|
|
105
15
|
---
|
|
106
16
|
|
|
107
|
-
##
|
|
17
|
+
## Delivery Workflows
|
|
108
18
|
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
- **[Business Mode Policy Baseline](interactive-customization/business-mode-policy-baseline.json)** - Executable mode preset contract for `user/ops/dev` routing
|
|
115
|
-
- **[Release-Ready Starter Kit](starter-kit/README.md)** - Starter manifest + workflow sample for external project onboarding
|
|
116
|
-
- **[Release Archive](releases/README.md)** - Index of release notes and validation reports
|
|
117
|
-
- **[Release Notes v1.46.2](releases/v1.46.2.md)** - Summary of value observability and onboarding improvements
|
|
118
|
-
- **[Validation Report v1.46.2](releases/v1.46.2-validation.md)** - Test and package verification evidence
|
|
119
|
-
- **[Environment Management Guide](environment-management-guide.md)** - Managing multiple environments
|
|
120
|
-
- **[Multi-Repository Management Guide](multi-repo-management-guide.md)** - Managing multiple Git repositories
|
|
121
|
-
- **[Scene Runtime Guide](scene-runtime-guide.md)** - Scene template engine, quality pipeline, ontology, and Moqui ERP integration
|
|
122
|
-
- **[Multi-Agent Coordination Guide](multi-agent-coordination-guide.md)** - Multi-agent parallel coordination for concurrent development
|
|
123
|
-
- **[Developer Guide](developer-guide.md)** - Contributing to sce development
|
|
124
|
-
- **[Architecture](architecture.md)** - sce system architecture
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## 🌍 Language
|
|
129
|
-
|
|
130
|
-
- **English** - You are here
|
|
131
|
-
- **[中文 (Chinese)](zh/README.md)** - Chinese documentation
|
|
19
|
+
- [Spec Workflow](spec-workflow.md)
|
|
20
|
+
- [Autonomous Control Guide](autonomous-control-guide.md)
|
|
21
|
+
- [Multi-Agent Coordination Guide](multi-agent-coordination-guide.md)
|
|
22
|
+
- [Spec Collaboration Guide](spec-collaboration-guide.md)
|
|
23
|
+
- [Spec Locking Guide](spec-locking-guide.md)
|
|
132
24
|
|
|
133
25
|
---
|
|
134
26
|
|
|
135
|
-
##
|
|
136
|
-
|
|
137
|
-
### For Beginners
|
|
138
|
-
1. [Quick Start Guide](quick-start.md) - Start here!
|
|
139
|
-
2. [FAQ](faq.md) - Common questions
|
|
140
|
-
3. [Tool-Specific Guide](tools/) - Pick your AI tool
|
|
141
|
-
4. [Examples](examples/) - Learn by example
|
|
27
|
+
## Scene, Ontology, and Moqui
|
|
142
28
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
### For Advanced Users
|
|
150
|
-
1. [Developer Guide](developer-guide.md) - Contribute to sce
|
|
151
|
-
2. [Architecture](architecture.md) - Understand internals
|
|
152
|
-
3. [Manual Workflows Guide](manual-workflows-guide.md) - Advanced workflows
|
|
29
|
+
- [Scene Runtime Guide](scene-runtime-guide.md)
|
|
30
|
+
- [Moqui Template Core Library Playbook](moqui-template-core-library-playbook.md)
|
|
31
|
+
- [Moqui Capability Matrix](moqui-capability-matrix.md)
|
|
32
|
+
- [Moqui Standard Rebuild Guide](moqui-standard-rebuild-guide.md)
|
|
33
|
+
- [SCE Capability Matrix Roadmap](sce-capability-matrix-roadmap.md)
|
|
153
34
|
|
|
154
35
|
---
|
|
155
36
|
|
|
156
|
-
##
|
|
157
|
-
|
|
158
|
-
### Setting Up
|
|
159
|
-
- [Quick Start Guide](quick-start.md) - First-time setup
|
|
160
|
-
- [Adoption Guide](adoption-guide.md) - Add to existing project
|
|
161
|
-
- [Tool-Specific Guides](tools/) - Configure your AI tool
|
|
162
|
-
|
|
163
|
-
### Creating Specs
|
|
164
|
-
- [Spec Workflow](spec-workflow.md) - How to create Specs
|
|
165
|
-
- [Examples](examples/) - See complete examples
|
|
166
|
-
- [Quick Start Guide](quick-start.md) - Your first Spec
|
|
167
|
-
|
|
168
|
-
### Using with AI Tools
|
|
169
|
-
- [Integration Modes](integration-modes.md) - Choose integration mode
|
|
170
|
-
- [Tool-Specific Guides](tools/) - Tool-specific instructions
|
|
171
|
-
- [Command Reference](command-reference.md) - Export context commands
|
|
37
|
+
## Governance, Quality, and Release
|
|
172
38
|
|
|
173
|
-
|
|
174
|
-
- [
|
|
175
|
-
- [
|
|
176
|
-
- [
|
|
39
|
+
- [Document Governance](document-governance.md)
|
|
40
|
+
- [Security Governance Default Baseline](security-governance-default-baseline.md)
|
|
41
|
+
- [Errorbook Registry Guide](errorbook-registry.md)
|
|
42
|
+
- [Release Checklist](release-checklist.md)
|
|
43
|
+
- [Release Archive](releases/README.md)
|
|
177
44
|
|
|
178
45
|
---
|
|
179
46
|
|
|
180
|
-
##
|
|
181
|
-
|
|
182
|
-
### Spec Management
|
|
183
|
-
- [Creating Specs](spec-workflow.md#stage-1-requirements)
|
|
184
|
-
- [Spec Structure](spec-workflow.md#the-spec-creation-workflow)
|
|
185
|
-
- [Example Specs](examples/)
|
|
47
|
+
## Ops and Platform Management
|
|
186
48
|
|
|
187
|
-
### Environment Management
|
|
188
49
|
- [Environment Management Guide](environment-management-guide.md)
|
|
189
|
-
- [Environment Commands](command-reference.md#environment-management)
|
|
190
|
-
- [Multi-Environment Workflow](environment-management-guide.md#common-workflows)
|
|
191
|
-
|
|
192
|
-
### Multi-Repository Management
|
|
193
50
|
- [Multi-Repository Management Guide](multi-repo-management-guide.md)
|
|
194
|
-
- [
|
|
195
|
-
- [
|
|
196
|
-
|
|
197
|
-
### Scene Runtime
|
|
198
|
-
- [Scene Runtime Guide](scene-runtime-guide.md)
|
|
199
|
-
- [Moqui Template Core Library Playbook](moqui-template-core-library-playbook.md)
|
|
200
|
-
- [331-poc Dual-Track Integration Guide](331-poc-dual-track-integration-guide.md)
|
|
201
|
-
- [331-poc Adaptation Roadmap](331-poc-adaptation-roadmap.md)
|
|
202
|
-
- [Handoff Profile Integration Guide](handoff-profile-integration-guide.md)
|
|
203
|
-
- [SCE Business Mode Map](sce-business-mode-map.md)
|
|
204
|
-
- [Release-Ready Starter Kit](starter-kit/README.md)
|
|
205
|
-
- [Security Governance Default Baseline](security-governance-default-baseline.md)
|
|
206
|
-
- [Scene Template Engine](command-reference.md#scene-template-engine)
|
|
207
|
-
- [Scene Quality Pipeline](command-reference.md#scene-template-quality-pipeline)
|
|
208
|
-
- [Scene Ontology](command-reference.md#scene-ontology-enhancement)
|
|
209
|
-
- [Moqui ERP Integration](command-reference.md#moqui-erp-integration)
|
|
210
|
-
|
|
211
|
-
### KPI Observability
|
|
212
|
-
- [Value Metrics Commands](command-reference.md#value-metrics)
|
|
213
|
-
- [Value Observability Guide](value-observability-guide.md)
|
|
214
|
-
- [Spec Workflow](spec-workflow.md)
|
|
215
|
-
- [Quick Start Guide](quick-start.md)
|
|
216
|
-
|
|
217
|
-
### Context Export
|
|
218
|
-
- [Manual Export Mode](integration-modes.md#mode-2-manual-export)
|
|
219
|
-
- [Export Commands](command-reference.md#context--prompts)
|
|
220
|
-
- [Using Exported Context](tools/)
|
|
221
|
-
|
|
222
|
-
### Watch Mode
|
|
223
|
-
- [Watch Mode Guide](integration-modes.md#mode-3-watch-mode)
|
|
224
|
-
- [Watch Commands](command-reference.md#watch-mode)
|
|
225
|
-
- [Windsurf Integration](tools/windsurf-guide.md)
|
|
226
|
-
|
|
227
|
-
### Task Management
|
|
228
|
-
- [Task Commands](command-reference.md#task-management)
|
|
229
|
-
- [Task Workflow](spec-workflow.md#stage-3-tasks)
|
|
230
|
-
- [Team Collaboration](workspace-info.md)
|
|
51
|
+
- [Team Collaboration Guide](team-collaboration-guide.md)
|
|
52
|
+
- [Manual Workflows Guide](manual-workflows-guide.md)
|
|
231
53
|
|
|
232
54
|
---
|
|
233
55
|
|
|
234
|
-
##
|
|
235
|
-
|
|
236
|
-
**Finding Information:**
|
|
237
|
-
- Use your browser's search (Ctrl+F / Cmd+F) to find specific topics
|
|
238
|
-
- Check the [FAQ](faq.md) first for quick answers
|
|
239
|
-
- Browse [Examples](examples/) to learn by doing
|
|
240
|
-
|
|
241
|
-
**Learning Path:**
|
|
242
|
-
1. **Day 1:** [Quick Start Guide](quick-start.md) + [Your Tool Guide](tools/)
|
|
243
|
-
2. **Week 1:** [Spec Workflow](spec-workflow.md) + [Examples](examples/)
|
|
244
|
-
3. **Month 1:** [Integration Modes](integration-modes.md) + [Advanced Features](command-reference.md)
|
|
56
|
+
## Integrations
|
|
245
57
|
|
|
246
|
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
250
|
-
-
|
|
58
|
+
- [Cursor Guide](tools/cursor-guide.md)
|
|
59
|
+
- [Claude Code Guide](tools/claude-guide.md)
|
|
60
|
+
- [Windsurf Guide](tools/windsurf-guide.md)
|
|
61
|
+
- [VS Code + Copilot Guide](tools/vscode-guide.md)
|
|
62
|
+
- [Generic AI Tools Guide](tools/generic-guide.md)
|
|
251
63
|
|
|
252
64
|
---
|
|
253
65
|
|
|
254
|
-
##
|
|
66
|
+
## Value and Observability
|
|
255
67
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
| Spec Workflow | ✅ Complete | 2026-01-23 |
|
|
260
|
-
| Integration Modes | ✅ Complete | 2026-01-23 |
|
|
261
|
-
| Tool Guides (6) | ✅ Complete | 2026-01-23 |
|
|
262
|
-
| Examples (3) | ✅ Complete | 2026-01-23 |
|
|
263
|
-
| FAQ | ✅ Complete | 2026-02-11 |
|
|
264
|
-
| Troubleshooting | ✅ Complete | 2026-01-23 |
|
|
265
|
-
| Command Reference | ✅ Complete | 2026-02-14 |
|
|
266
|
-
| Value Observability Guide | ✅ Complete | 2026-02-14 |
|
|
267
|
-
| Environment Management | ✅ Complete | 2026-01-31 |
|
|
268
|
-
| Multi-Repository Management | ✅ Complete | 2026-01-31 |
|
|
269
|
-
| Scene Runtime Guide | ✅ Complete | 2026-02-11 |
|
|
270
|
-
| Multi-Agent Coordination | ✅ Complete | 2026-02-12 |
|
|
68
|
+
- [Value Observability Guide](value-observability-guide.md)
|
|
69
|
+
- [Architecture](architecture.md)
|
|
70
|
+
- [Developer Guide](developer-guide.md)
|
|
271
71
|
|
|
272
72
|
---
|
|
273
73
|
|
|
274
|
-
##
|
|
275
|
-
|
|
276
|
-
Found an error? Want to improve the docs?
|
|
74
|
+
## Community
|
|
277
75
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
76
|
+
- [Community](community.md)
|
|
77
|
+
- [GitHub Discussions](https://github.com/heguangyong/scene-capability-engine/discussions)
|
|
78
|
+
- [GitHub Issues](https://github.com/heguangyong/scene-capability-engine/issues)
|
|
281
79
|
|
|
282
80
|
---
|
|
283
81
|
|
|
284
|
-
##
|
|
82
|
+
## Language
|
|
285
83
|
|
|
286
|
-
|
|
84
|
+
- [中文文档索引](zh/README.md)
|
|
287
85
|
|
|
288
86
|
---
|
|
289
87
|
|
|
290
|
-
**
|
|
291
|
-
|
|
88
|
+
**Version**: 3.3.26
|
|
89
|
+
**Last Updated**: 2026-03-02
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> Quick reference for all `sce` commands
|
|
4
4
|
|
|
5
|
-
**Version**: 3.
|
|
6
|
-
**Last Updated**: 2026-02
|
|
5
|
+
**Version**: 3.4.5
|
|
6
|
+
**Last Updated**: 2026-03-02
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -71,6 +71,8 @@ sce spec gate run --spec 01-00-feature-name --scene scene.customer-order-invento
|
|
|
71
71
|
# Maintain domain modeling artifacts explicitly
|
|
72
72
|
sce spec domain init --spec 01-00-feature-name --scene scene.customer-order-inventory --json
|
|
73
73
|
sce spec domain validate --spec 01-00-feature-name --fail-on-error --json
|
|
74
|
+
sce spec domain validate --spec 01-00-feature-name --fail-on-gap --json
|
|
75
|
+
sce spec domain coverage --spec 01-00-feature-name --json
|
|
74
76
|
sce spec domain refresh --spec 01-00-feature-name --scene scene.customer-order-inventory --json
|
|
75
77
|
|
|
76
78
|
# Find related historical specs before starting a new analysis
|
|
@@ -95,6 +97,11 @@ Spec session governance:
|
|
|
95
97
|
- `.sce/specs/<spec>/custom/problem-domain-map.md`
|
|
96
98
|
- `.sce/specs/<spec>/custom/scene-spec.md`
|
|
97
99
|
- `.sce/specs/<spec>/custom/problem-domain-chain.json`
|
|
100
|
+
- Closed-loop scene research baseline is now part of domain modeling artifacts:
|
|
101
|
+
- `problem-domain-map.md` must include `Closed-Loop Research Coverage Matrix`
|
|
102
|
+
- `scene-spec.md` must include `Closed-Loop Research Contract`
|
|
103
|
+
- `problem-domain-chain.json` must include `research_coverage` contract
|
|
104
|
+
- `sce spec domain coverage` reports coverage dimensions (scene boundary, entity/relation/rules/policy/flow, failure signals, debug evidence plan, verification gate).
|
|
98
105
|
|
|
99
106
|
### Timeline Snapshots
|
|
100
107
|
|
|
@@ -298,9 +305,20 @@ sce workspace legacy-migrate --dry-run --json
|
|
|
298
305
|
sce workspace tracking-audit
|
|
299
306
|
sce workspace tracking-audit --json
|
|
300
307
|
|
|
308
|
+
# Audit takeover baseline drift (non-mutating)
|
|
309
|
+
sce workspace takeover-audit
|
|
310
|
+
sce workspace takeover-audit --json
|
|
311
|
+
sce workspace takeover-audit --strict
|
|
312
|
+
|
|
313
|
+
# Apply takeover baseline defaults explicitly
|
|
314
|
+
sce workspace takeover-apply
|
|
315
|
+
sce workspace takeover-apply --json
|
|
316
|
+
|
|
301
317
|
# Safety guardrail (default):
|
|
302
318
|
# If legacy .kiro directories exist, sce blocks non-migration commands
|
|
303
319
|
# until manual migration is completed.
|
|
320
|
+
# For adopted projects, startup auto-runs takeover baseline alignment
|
|
321
|
+
# before command execution (best effort, non-blocking).
|
|
304
322
|
|
|
305
323
|
# Legacy commands (still supported)
|
|
306
324
|
sce workspace sync
|
|
@@ -396,6 +414,10 @@ sce errorbook record \
|
|
|
396
414
|
--status verified \
|
|
397
415
|
--json
|
|
398
416
|
|
|
417
|
+
# Inspect temporary trial-and-error incident loop
|
|
418
|
+
sce errorbook incident list --state open --json
|
|
419
|
+
sce errorbook incident show <incident-id> --json
|
|
420
|
+
|
|
399
421
|
# List/show/find entries
|
|
400
422
|
sce errorbook list --status promoted --min-quality 75 --json
|
|
401
423
|
sce errorbook show <entry-id> --json
|
|
@@ -448,6 +470,10 @@ SCE_REGISTRY_HEALTH_STRICT=1 node scripts/errorbook-registry-health-gate.js --js
|
|
|
448
470
|
```
|
|
449
471
|
|
|
450
472
|
Curated quality policy (`宁缺毋滥,优胜略汰`) defaults:
|
|
473
|
+
- All issues enter an incident loop by default:
|
|
474
|
+
- each `errorbook record` writes one staging attempt under `.sce/errorbook/staging/incidents/`
|
|
475
|
+
- staging incidents preserve full trial-and-error history to avoid repeated mistakes
|
|
476
|
+
- when record status reaches `verified|promoted|deprecated`, the incident auto-resolves and snapshot is archived under `.sce/errorbook/staging/resolved/`
|
|
451
477
|
- `record` requires: `title`, `symptom`, `root_cause`, and at least one `fix_action`.
|
|
452
478
|
- Fingerprint dedup is automatic; repeated records merge evidence and increment occurrence count.
|
|
453
479
|
- Repeated-failure hard rule: from attempt `#3` of the same fingerprint (two failed rounds already happened), record must include debug evidence.
|
|
@@ -482,8 +508,11 @@ Curated quality policy (`宁缺毋滥,优胜略汰`) defaults:
|
|
|
482
508
|
- branch is ahead/behind upstream
|
|
483
509
|
- upstream is not a GitHub/GitLab remote (when such remotes exist)
|
|
484
510
|
- If project has no GitHub/GitLab remote, gate passes by default (can hard-enforce with `--no-allow-no-remote` or `SCE_GIT_MANAGEMENT_ALLOW_NO_REMOTE=0`).
|
|
485
|
-
- In CI/tag detached-HEAD context (`CI=1` or `GITHUB_ACTIONS=1`), branch/upstream
|
|
486
|
-
Use `SCE_GIT_MANAGEMENT_STRICT_CI=1` (or `--strict-ci`) to enforce full local-level branch checks in CI.
|
|
511
|
+
- In CI/tag detached-HEAD context (`CI=1` or `GITHUB_ACTIONS=1`), branch/upstream/worktree checks are relaxed by default (advisory warnings only).
|
|
512
|
+
Use `SCE_GIT_MANAGEMENT_STRICT_CI=1` (or `--strict-ci`) to enforce full local-level branch/worktree checks in CI.
|
|
513
|
+
- When CI generates temporary release artifacts before `npm publish`, you can allow untracked-only worktree drift while keeping tracked-change protection:
|
|
514
|
+
- `SCE_GIT_MANAGEMENT_ALLOW_UNTRACKED=1` (or `--allow-untracked`)
|
|
515
|
+
- tracked file changes still fail the gate.
|
|
487
516
|
|
|
488
517
|
### Studio Workflow
|
|
489
518
|
|
|
@@ -535,6 +564,22 @@ Stage guardrails are enforced by default:
|
|
|
535
564
|
- `release` requires `verify`
|
|
536
565
|
- `verify` / `release` reports and failure auto-records inherit `spec_id + domain-chain` context for better root-cause traceability
|
|
537
566
|
|
|
567
|
+
Problem evaluation mode (default required):
|
|
568
|
+
- Studio now runs problem evaluation on every stage: `plan`, `generate`, `apply`, `verify`, `release`.
|
|
569
|
+
- Default policy file: `.sce/config/problem-eval-policy.json` (also provisioned by template/adopt/takeover baseline).
|
|
570
|
+
- Default hard-block stages: `apply`, `release`.
|
|
571
|
+
- Evaluation combines risk/evidence/readiness and emits adaptive strategy:
|
|
572
|
+
- `direct-execution`
|
|
573
|
+
- `controlled-execution`
|
|
574
|
+
- `evidence-first`
|
|
575
|
+
- `explore-and-validate`
|
|
576
|
+
- `debug-first`
|
|
577
|
+
- Evaluation report artifact is written to `.sce/reports/problem-eval/<job-id>-<stage>.json`.
|
|
578
|
+
- Stage metadata and event payload now include `problem_evaluation` summary plus artifact pointer.
|
|
579
|
+
- Environment overrides:
|
|
580
|
+
- `SCE_PROBLEM_EVAL_MODE=off|advisory|required`
|
|
581
|
+
- `SCE_PROBLEM_EVAL_DISABLED=1`
|
|
582
|
+
|
|
538
583
|
Studio gate execution defaults:
|
|
539
584
|
- `verify --profile standard` runs executable gates (unit test script when available, interactive governance report when present, scene package publish-batch dry-run when handoff manifest exists)
|
|
540
585
|
- `release --profile standard` runs executable release preflight (npm pack dry-run, git managed gate, errorbook release gate, weekly ops gate when summary exists, release asset integrity when evidence directory exists, scene package publish-batch ontology gate, handoff capability matrix gate)
|
package/docs/spec-workflow.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
**Version**:
|
|
8
|
-
**Last Updated**: 2026-02
|
|
7
|
+
**Version**: 3.3.26
|
|
8
|
+
**Last Updated**: 2026-03-02
|
|
9
9
|
**Audience**: Intermediate
|
|
10
10
|
**Estimated Time**: 10 minutes
|
|
11
11
|
|
|
@@ -86,6 +86,37 @@ graph LR
|
|
|
86
86
|
|
|
87
87
|
---
|
|
88
88
|
|
|
89
|
+
## Stage 0: Scene-Closed-Loop Research (Mandatory)
|
|
90
|
+
|
|
91
|
+
Before implementation, SCE enforces a closed-loop scene research baseline under `.sce/specs/<spec>/custom/`:
|
|
92
|
+
|
|
93
|
+
- `problem-domain-map.md`
|
|
94
|
+
- `scene-spec.md`
|
|
95
|
+
- `problem-domain-chain.json`
|
|
96
|
+
|
|
97
|
+
These artifacts must cover:
|
|
98
|
+
|
|
99
|
+
1. Scene boundary
|
|
100
|
+
2. Entity / relation
|
|
101
|
+
3. Business rule
|
|
102
|
+
4. Decision policy
|
|
103
|
+
5. Execution flow
|
|
104
|
+
6. Failure signals
|
|
105
|
+
7. Debug evidence plan
|
|
106
|
+
8. Verification gates
|
|
107
|
+
|
|
108
|
+
Commands:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
sce spec domain init --spec <spec-id> --scene <scene-id>
|
|
112
|
+
sce spec domain coverage --spec <spec-id> --json
|
|
113
|
+
sce spec domain validate --spec <spec-id> --fail-on-gap --json
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
This is the default way to avoid wrong-direction implementation and to force evidence-based correction loops.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
89
120
|
## Stage 1: Requirements
|
|
90
121
|
|
|
91
122
|
**Purpose:** Define WHAT you're building and WHY
|
|
@@ -514,6 +545,6 @@ sce spec bootstrap --name 02-00-your-feature --non-interactive
|
|
|
514
545
|
|
|
515
546
|
---
|
|
516
547
|
|
|
517
|
-
**Version**:
|
|
518
|
-
**Last Updated**: 2026-02
|
|
548
|
+
**Version**: 3.3.26
|
|
549
|
+
**Last Updated**: 2026-03-02
|
|
519
550
|
|