scene-capability-engine 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +233 -233
- package/LICENSE +2 -2
- package/README.md +8 -11
- package/README.zh.md +7 -10
- package/bin/kse.js +1 -1
- package/bin/sce.js +1 -1
- package/bin/sco.js +1 -1
- package/docs/331-poc-adaptation-roadmap.md +25 -25
- package/docs/331-poc-dual-track-integration-guide.md +26 -26
- package/docs/331-poc-weekly-delivery-checklist.md +8 -8
- package/docs/OFFLINE_INSTALL.md +10 -10
- package/docs/README.md +24 -24
- package/docs/adopt-migration-guide.md +51 -51
- package/docs/adoption-guide.md +56 -56
- package/docs/agent-hooks-analysis.md +52 -52
- package/docs/architecture.md +6 -6
- package/docs/articles/ai-driven-development-philosophy-and-practice-review.md +4 -4
- package/docs/articles/ai-driven-development-philosophy-and-practice.en.md +9 -9
- package/docs/articles/ai-driven-development-philosophy-and-practice.md +10 -10
- package/docs/autonomous-control-guide.md +89 -89
- package/docs/command-reference.md +11 -11
- package/docs/community.md +4 -4
- package/docs/cross-tool-guide.md +47 -47
- package/docs/developer-guide.md +5 -5
- package/docs/document-governance.md +91 -91
- package/docs/environment-management-guide.md +53 -53
- package/docs/examples/add-export-command/design.md +2 -2
- package/docs/examples/add-export-command/requirements.md +5 -5
- package/docs/examples/add-export-command/tasks.md +2 -2
- package/docs/faq.md +69 -69
- package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.json +9 -9
- package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.md +3 -3
- package/docs/integration-modes.md +60 -60
- package/docs/integration-philosophy.md +48 -48
- package/docs/knowledge-management-guide.md +21 -21
- package/docs/manual-workflows-guide.md +20 -20
- package/docs/moqui-capability-matrix.md +22 -22
- package/docs/moqui-template-core-library-playbook.md +20 -20
- package/docs/multi-agent-coordination-guide.md +19 -19
- package/docs/multi-repo-management-guide.md +93 -93
- package/docs/quick-start-with-ai-tools.md +36 -36
- package/docs/quick-start.md +16 -16
- package/docs/release-checklist.md +7 -7
- package/docs/releases/v1.46.2-validation.md +1 -1
- package/docs/releases/v1.46.2.md +10 -10
- package/docs/scene-runtime-guide.md +42 -42
- package/docs/spec-collaboration-guide.md +43 -43
- package/docs/spec-locking-guide.md +26 -26
- package/docs/spec-numbering-guide.md +6 -6
- package/docs/spec-workflow.md +25 -25
- package/docs/steering-strategy-guide.md +36 -36
- package/docs/team-collaboration-guide.md +23 -23
- package/docs/testing-strategy.md +2 -2
- package/docs/tools/claude-guide.md +26 -26
- package/docs/tools/cursor-guide.md +31 -31
- package/docs/tools/generic-guide.md +22 -22
- package/docs/tools/kiro-guide.md +43 -43
- package/docs/tools/vscode-guide.md +18 -18
- package/docs/tools/windsurf-guide.md +50 -50
- package/docs/troubleshooting.md +116 -116
- package/docs/upgrade-guide.md +49 -49
- package/docs/value-observability-guide.md +6 -6
- package/docs/zh/README.md +22 -22
- package/docs/zh/quick-start.md +34 -34
- package/docs/zh/release-checklist.md +6 -6
- package/docs/zh/releases/v1.46.2-validation.md +1 -1
- package/docs/zh/releases/v1.46.2.md +9 -9
- package/docs/zh/spec-numbering-guide.md +6 -6
- package/docs/zh/tools/claude-guide.md +14 -14
- package/docs/zh/tools/cursor-guide.md +18 -18
- package/docs/zh/tools/generic-guide.md +40 -40
- package/docs/zh/tools/kiro-guide.md +50 -50
- package/docs/zh/tools/vscode-guide.md +20 -20
- package/docs/zh/tools/windsurf-guide.md +49 -49
- package/docs/zh/value-observability-guide.md +6 -6
- package/docs//344/272/244/344/273/230/346/270/205/345/215/225.md +4 -4
- package/lib/adoption/adoption-logger.js +1 -1
- package/lib/adoption/adoption-strategy.js +3 -3
- package/lib/adoption/detection-engine.js +1 -1
- package/lib/adoption/error-formatter.js +17 -17
- package/lib/adoption/progress-reporter.js +2 -2
- package/lib/adoption/smart-orchestrator.js +2 -2
- package/lib/adoption/strategy-selector.js +2 -2
- package/lib/adoption/summary-generator.js +3 -3
- package/lib/auto/autonomous-engine.js +2 -2
- package/lib/auto/close-loop-runner.js +9 -9
- package/lib/backup/backup-system.js +2 -2
- package/lib/collab/collab-manager.js +2 -2
- package/lib/commands/adopt.js +16 -16
- package/lib/commands/auto.js +93 -93
- package/lib/commands/collab.js +8 -8
- package/lib/commands/docs.js +26 -26
- package/lib/commands/doctor.js +2 -2
- package/lib/commands/env.js +14 -14
- package/lib/commands/knowledge.js +13 -13
- package/lib/commands/lock.js +6 -6
- package/lib/commands/ops.js +19 -19
- package/lib/commands/orchestrate.js +5 -5
- package/lib/commands/prompt.js +3 -3
- package/lib/commands/rollback.js +4 -4
- package/lib/commands/scene.js +29 -29
- package/lib/commands/spec-bootstrap.js +1 -1
- package/lib/commands/spec-gate.js +1 -1
- package/lib/commands/spec-pipeline.js +1 -1
- package/lib/commands/task.js +1 -1
- package/lib/commands/templates.js +27 -27
- package/lib/commands/upgrade.js +8 -8
- package/lib/commands/value.js +4 -4
- package/lib/commands/watch.js +9 -9
- package/lib/commands/workflows.js +5 -5
- package/lib/commands/workspace-multi.js +17 -17
- package/lib/commands/workspace.js +5 -5
- package/lib/context/context-exporter.js +1 -1
- package/lib/context/prompt-generator.js +1 -1
- package/lib/data/moqui-capability-lexicon.json +1 -1
- package/lib/environment/environment-manager.js +1 -1
- package/lib/gitignore/gitignore-detector.js +4 -4
- package/lib/gitignore/gitignore-integration.js +2 -2
- package/lib/gitignore/gitignore-transformer.js +3 -3
- package/lib/gitignore/layered-rules-template.js +2 -2
- package/lib/governance/diagnostic-engine.js +4 -4
- package/lib/governance/doc-reference-checker.js +1 -1
- package/lib/governance/hooks-manager.js +5 -5
- package/lib/governance/reporter.js +1 -1
- package/lib/knowledge/knowledge-manager.js +6 -6
- package/lib/orchestrator/agent-spawner.js +1 -1
- package/lib/orchestrator/bootstrap-prompt-builder.js +2 -2
- package/lib/repo/config-manager.js +2 -2
- package/lib/repo/handlers/init-handler.js +3 -3
- package/lib/scene-runtime/audit-emitter.js +2 -2
- package/lib/scene-runtime/binding-plugin-loader.js +1 -1
- package/lib/scene-runtime/moqui-adapter.js +2 -2
- package/lib/scene-runtime/moqui-extractor.js +3 -3
- package/lib/scene-runtime/scene-loader.js +3 -3
- package/lib/scene-runtime/scene-template-linter.js +1 -1
- package/lib/scene-runtime/templates/scene-template-erp-query-v0.1.yaml +1 -1
- package/lib/scene-runtime/templates/scene-template-hybrid-shadow-v0.1.yaml +1 -1
- package/lib/spec/multi-spec-orchestrate.js +1 -1
- package/lib/spec-gate/rules/default-rules.js +1 -1
- package/lib/steering/adoption-config.js +1 -1
- package/lib/steering/compliance-auto-fixer.js +1 -1
- package/lib/steering/compliance-cache.js +3 -3
- package/lib/steering/compliance-error-reporter.js +1 -1
- package/lib/steering/index.js +1 -1
- package/lib/steering/steering-manager.js +7 -7
- package/lib/task/task-claimer.js +2 -1
- package/lib/templates/metadata-collector.js +6 -6
- package/lib/templates/template-creator.js +2 -2
- package/lib/templates/template-exporter.js +12 -12
- package/lib/upgrade/migration-engine.js +4 -4
- package/lib/utils/tool-detector.js +25 -25
- package/lib/utils/validation.js +3 -3
- package/lib/version/version-checker.js +13 -13
- package/lib/version/version-manager.js +7 -7
- package/lib/watch/presets.js +4 -4
- package/lib/workspace/multi/path-utils.js +1 -1
- package/lib/workspace/multi/workspace-context-resolver.js +9 -9
- package/lib/workspace/multi/workspace-registry.js +2 -2
- package/lib/workspace/multi/workspace-state-manager.js +1 -1
- package/lib/workspace/multi/workspace.js +1 -1
- package/lib/workspace/workspace-sync.js +1 -1
- package/locales/en.json +1 -1
- package/locales/zh.json +1 -1
- package/package.json +3 -5
- package/template/.kiro/README.md +40 -40
- package/template/.kiro/specs/SPEC_WORKFLOW_GUIDE.md +3 -3
- package/template/.kiro/steering/CORE_PRINCIPLES.md +3 -3
- package/template/.kiro/steering/ENVIRONMENT.md +2 -2
- package/template/README.md +3 -3
- /package/bin/{kiro-spec-engine.js → scene-capability-engine.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Integration Modes Guide
|
|
2
2
|
|
|
3
|
-
> Three ways to integrate
|
|
3
|
+
> Three ways to integrate sce with your AI coding tools
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
|
|
14
14
|
## Overview
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
sce supports three integration modes to work with different AI coding tools. Each mode offers different levels of automation and suits different workflows.
|
|
17
17
|
|
|
18
18
|
```mermaid
|
|
19
19
|
graph TD
|
|
20
|
-
A[
|
|
20
|
+
A[sce Integration] --> B[Native Integration]
|
|
21
21
|
A --> C[Manual Export]
|
|
22
22
|
A --> D[Watch Mode]
|
|
23
|
-
B --> E[
|
|
23
|
+
B --> E[AI IDE]
|
|
24
24
|
C --> F[Cursor/Claude/VS Code]
|
|
25
25
|
D --> G[All Tools]
|
|
26
26
|
```
|
|
@@ -29,38 +29,38 @@ graph TD
|
|
|
29
29
|
|
|
30
30
|
## Mode 1: Native Integration ⭐
|
|
31
31
|
|
|
32
|
-
**Best for:**
|
|
32
|
+
**Best for:** AI IDE users
|
|
33
33
|
**Automation Level:** Fully Automatic
|
|
34
34
|
**Setup Complexity:** None (built-in)
|
|
35
35
|
|
|
36
36
|
### How It Works
|
|
37
37
|
|
|
38
|
-
With native integration, the AI tool directly accesses
|
|
38
|
+
With native integration, the AI tool directly accesses sce without any manual steps. The AI can read Specs, export context, and update tasks automatically.
|
|
39
39
|
|
|
40
40
|
```mermaid
|
|
41
41
|
sequenceDiagram
|
|
42
42
|
participant User
|
|
43
43
|
participant AI Tool
|
|
44
|
-
participant
|
|
44
|
+
participant sce
|
|
45
45
|
|
|
46
46
|
User->>AI Tool: "Implement user login"
|
|
47
|
-
AI Tool->>
|
|
48
|
-
|
|
47
|
+
AI Tool->>sce: Read Spec files directly
|
|
48
|
+
sce->>AI Tool: Spec content
|
|
49
49
|
AI Tool->>AI Tool: Generate code
|
|
50
|
-
AI Tool->>
|
|
50
|
+
AI Tool->>sce: Update task status
|
|
51
51
|
AI Tool->>User: Code generated
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
### Supported Tools
|
|
55
55
|
|
|
56
|
-
- **
|
|
56
|
+
- **AI IDE** - Full native support
|
|
57
57
|
|
|
58
58
|
### Workflow Example
|
|
59
59
|
|
|
60
60
|
```
|
|
61
61
|
You: "Implement the user login feature"
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
SCE AI:
|
|
64
64
|
[Automatically reads .kiro/specs/01-00-user-login/]
|
|
65
65
|
[Understands requirements and design]
|
|
66
66
|
[Generates code]
|
|
@@ -80,7 +80,7 @@ Kiro AI:
|
|
|
80
80
|
|
|
81
81
|
### Limitations
|
|
82
82
|
|
|
83
|
-
- ❌ **Tool-specific** - Only works with
|
|
83
|
+
- ❌ **Tool-specific** - Only works with AI IDE currently
|
|
84
84
|
- ❌ **Requires compatible AI** - AI must support file system access
|
|
85
85
|
|
|
86
86
|
---
|
|
@@ -93,20 +93,20 @@ Kiro AI:
|
|
|
93
93
|
|
|
94
94
|
### How It Works
|
|
95
95
|
|
|
96
|
-
The AI tool can directly call
|
|
96
|
+
The AI tool can directly call sce commands during your conversation. You stay in your familiar AI tool interface - the AI handles sce interaction automatically.
|
|
97
97
|
|
|
98
98
|
```mermaid
|
|
99
99
|
sequenceDiagram
|
|
100
100
|
participant User
|
|
101
101
|
participant AI Tool
|
|
102
|
-
participant
|
|
102
|
+
participant sce
|
|
103
103
|
|
|
104
104
|
User->>AI Tool: "Implement user login feature"
|
|
105
|
-
AI Tool->>
|
|
106
|
-
|
|
105
|
+
AI Tool->>sce: sce context export user-login
|
|
106
|
+
sce->>AI Tool: context-export.md content
|
|
107
107
|
AI Tool->>AI Tool: Generate code based on Spec
|
|
108
108
|
AI Tool->>User: Here's the implementation
|
|
109
|
-
AI Tool->>
|
|
109
|
+
AI Tool->>sce: Update tasks.md
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
**Note:** For AI tools without command execution (like ChatGPT web), you can manually export and paste as a fallback.
|
|
@@ -128,7 +128,7 @@ You: "I have a Spec for user login at 01-00-user-login.
|
|
|
128
128
|
Please implement task 1.1: Create AuthController"
|
|
129
129
|
|
|
130
130
|
AI Tool:
|
|
131
|
-
[Executes:
|
|
131
|
+
[Executes: sce context export 01-00-user-login]
|
|
132
132
|
[Reads the exported context]
|
|
133
133
|
[Generates AuthController code]
|
|
134
134
|
[Updates tasks.md automatically]
|
|
@@ -141,7 +141,7 @@ AI Tool:
|
|
|
141
141
|
|
|
142
142
|
```bash
|
|
143
143
|
# You run this once
|
|
144
|
-
|
|
144
|
+
sce context export 01-00-user-login
|
|
145
145
|
cat .kiro/specs/01-00-user-login/context-export.md | pbcopy
|
|
146
146
|
|
|
147
147
|
# Then paste into AI tool
|
|
@@ -157,7 +157,7 @@ AI: [Generates code based on your Spec]
|
|
|
157
157
|
### Advantages
|
|
158
158
|
|
|
159
159
|
- ✅ **Works with any AI tool** - Universal compatibility
|
|
160
|
-
- ✅ **AI can call
|
|
160
|
+
- ✅ **AI can call sce directly** - For tools with command execution
|
|
161
161
|
- ✅ **Fallback to manual** - Copy-paste for web-based tools
|
|
162
162
|
- ✅ **Simple setup** - No configuration needed
|
|
163
163
|
- ✅ **Reliable** - No dependencies on special integrations
|
|
@@ -174,17 +174,17 @@ AI: [Generates code based on your Spec]
|
|
|
174
174
|
|
|
175
175
|
```bash
|
|
176
176
|
# Add to ~/.bashrc or ~/.zshrc
|
|
177
|
-
alias
|
|
177
|
+
alias sce-clip='sce context export $1 && cat .kiro/specs/$1/context-export.md | pbcopy && echo "✅ Context copied to clipboard"'
|
|
178
178
|
|
|
179
179
|
# Usage
|
|
180
|
-
|
|
180
|
+
sce-clip 01-00-user-login
|
|
181
181
|
# Now just paste into your AI tool
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
**Generate task-specific prompts:**
|
|
185
185
|
```bash
|
|
186
186
|
# Instead of exporting entire Spec
|
|
187
|
-
|
|
187
|
+
sce prompt generate 01-00-user-login 1.1
|
|
188
188
|
|
|
189
189
|
# Generates focused prompt for just task 1.1
|
|
190
190
|
```
|
|
@@ -199,19 +199,19 @@ kse prompt generate 01-00-user-login 1.1
|
|
|
199
199
|
|
|
200
200
|
### How It Works
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
sce monitors your Spec files for changes and automatically re-exports context. Your AI tool can always access the latest context without manual export.
|
|
203
203
|
|
|
204
204
|
```mermaid
|
|
205
205
|
sequenceDiagram
|
|
206
206
|
participant User
|
|
207
|
-
participant
|
|
207
|
+
participant sce Watch
|
|
208
208
|
participant Spec Files
|
|
209
209
|
participant AI Tool
|
|
210
210
|
|
|
211
211
|
User->>Spec Files: Edit requirements.md
|
|
212
|
-
Spec Files->>
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
Spec Files->>sce Watch: File changed event
|
|
213
|
+
sce Watch->>sce Watch: Auto-export context
|
|
214
|
+
sce Watch->>Spec Files: Update context-export.md
|
|
215
215
|
User->>AI Tool: Use latest context
|
|
216
216
|
AI Tool->>Spec Files: Read context-export.md
|
|
217
217
|
```
|
|
@@ -226,22 +226,22 @@ sequenceDiagram
|
|
|
226
226
|
|
|
227
227
|
**1. Initialize watch mode:**
|
|
228
228
|
```bash
|
|
229
|
-
|
|
229
|
+
sce watch init
|
|
230
230
|
```
|
|
231
231
|
|
|
232
232
|
**2. Install auto-export preset:**
|
|
233
233
|
```bash
|
|
234
|
-
|
|
234
|
+
sce watch install context-export
|
|
235
235
|
```
|
|
236
236
|
|
|
237
237
|
**3. Start watching:**
|
|
238
238
|
```bash
|
|
239
|
-
|
|
239
|
+
sce watch start
|
|
240
240
|
```
|
|
241
241
|
|
|
242
242
|
**4. Verify it's running:**
|
|
243
243
|
```bash
|
|
244
|
-
|
|
244
|
+
sce watch status
|
|
245
245
|
```
|
|
246
246
|
|
|
247
247
|
Expected output:
|
|
@@ -261,7 +261,7 @@ Last execution: 2 minutes ago
|
|
|
261
261
|
# Edit .kiro/specs/01-00-user-login/requirements.md
|
|
262
262
|
```
|
|
263
263
|
|
|
264
|
-
2. **
|
|
264
|
+
2. **sce automatically detects the change**
|
|
265
265
|
```
|
|
266
266
|
[Watch Mode] Detected change: requirements.md
|
|
267
267
|
[Watch Mode] Exporting context for 01-00-user-login...
|
|
@@ -300,7 +300,7 @@ Last execution: 2 minutes ago
|
|
|
300
300
|
"actions": [
|
|
301
301
|
{
|
|
302
302
|
"name": "auto-export",
|
|
303
|
-
"command": "
|
|
303
|
+
"command": "sce context export ${spec-name}"
|
|
304
304
|
}
|
|
305
305
|
]
|
|
306
306
|
}
|
|
@@ -309,9 +309,9 @@ Last execution: 2 minutes ago
|
|
|
309
309
|
**Multiple actions:**
|
|
310
310
|
```bash
|
|
311
311
|
# Install multiple presets
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
sce watch install context-export
|
|
313
|
+
sce watch install prompt-regen
|
|
314
|
+
sce watch install auto-sync
|
|
315
315
|
```
|
|
316
316
|
|
|
317
317
|
---
|
|
@@ -324,21 +324,21 @@ kse watch install auto-sync
|
|
|
324
324
|
|--------|--------|---------------|------------|
|
|
325
325
|
| **Setup Time** | None | None | 5 minutes |
|
|
326
326
|
| **Automation** | Full | None | Partial |
|
|
327
|
-
| **Tool Support** |
|
|
327
|
+
| **Tool Support** | SCE only | All tools | All tools |
|
|
328
328
|
| **Context Freshness** | Always fresh | Manual refresh | Auto-refresh |
|
|
329
329
|
| **Task Tracking** | Automatic | Manual | Manual |
|
|
330
|
-
| **Best For** |
|
|
330
|
+
| **Best For** | SCE users | Quick start | Active development |
|
|
331
331
|
|
|
332
332
|
### Recommendations by Tool
|
|
333
333
|
|
|
334
|
-
**
|
|
334
|
+
**AI IDE:**
|
|
335
335
|
- ✅ Use **Native Integration** (built-in)
|
|
336
336
|
- No setup needed, fully automatic
|
|
337
337
|
|
|
338
338
|
**Windsurf / Cline:**
|
|
339
339
|
- ✅ Use **Manual Export** initially
|
|
340
340
|
- ⭐ Upgrade to **Watch Mode** for active projects
|
|
341
|
-
- These tools can execute
|
|
341
|
+
- These tools can execute sce commands directly
|
|
342
342
|
|
|
343
343
|
**Claude Code / ChatGPT:**
|
|
344
344
|
- ✅ Use **Manual Export**
|
|
@@ -370,7 +370,7 @@ Use watch mode to keep context fresh, but still manually provide context to AI:
|
|
|
370
370
|
|
|
371
371
|
```bash
|
|
372
372
|
# Terminal 1: Keep watch mode running
|
|
373
|
-
|
|
373
|
+
sce watch start
|
|
374
374
|
|
|
375
375
|
# Terminal 2: Work normally
|
|
376
376
|
# Edit Specs, context auto-updates
|
|
@@ -388,15 +388,15 @@ cat .kiro/specs/01-00-user-login/context-export.md | pbcopy
|
|
|
388
388
|
Use native integration primarily, but export for sharing:
|
|
389
389
|
|
|
390
390
|
```bash
|
|
391
|
-
# Work with
|
|
391
|
+
# Work with AI IDE (native integration)
|
|
392
392
|
# When sharing with team member using different tool:
|
|
393
|
-
|
|
393
|
+
sce context export 01-00-user-login
|
|
394
394
|
# Send context-export.md to teammate
|
|
395
395
|
```
|
|
396
396
|
|
|
397
397
|
**Benefits:**
|
|
398
398
|
- Seamless personal workflow
|
|
399
|
-
- Easy collaboration with non-
|
|
399
|
+
- Easy collaboration with non-SCE users
|
|
400
400
|
|
|
401
401
|
---
|
|
402
402
|
|
|
@@ -407,12 +407,12 @@ kse context export 01-00-user-login
|
|
|
407
407
|
```mermaid
|
|
408
408
|
sequenceDiagram
|
|
409
409
|
participant Dev as Developer
|
|
410
|
-
participant
|
|
410
|
+
participant sce as sce
|
|
411
411
|
participant Spec as Spec Files
|
|
412
412
|
participant AI as AI Tool
|
|
413
413
|
|
|
414
|
-
Dev->>
|
|
415
|
-
|
|
414
|
+
Dev->>sce: Create Spec
|
|
415
|
+
sce->>Spec: Generate requirements.md, design.md, tasks.md
|
|
416
416
|
Dev->>Spec: Edit Spec files
|
|
417
417
|
|
|
418
418
|
alt Native Integration
|
|
@@ -420,14 +420,14 @@ sequenceDiagram
|
|
|
420
420
|
AI->>Dev: Generate code
|
|
421
421
|
AI->>Spec: Update tasks.md
|
|
422
422
|
else Manual Export
|
|
423
|
-
Dev->>
|
|
424
|
-
|
|
423
|
+
Dev->>sce: sce context export
|
|
424
|
+
sce->>Spec: Generate context-export.md
|
|
425
425
|
Dev->>AI: Provide context
|
|
426
426
|
AI->>Dev: Generate code
|
|
427
427
|
Dev->>Spec: Update tasks.md
|
|
428
428
|
else Watch Mode
|
|
429
|
-
Spec->>
|
|
430
|
-
|
|
429
|
+
Spec->>sce: File change event
|
|
430
|
+
sce->>Spec: Auto-generate context-export.md
|
|
431
431
|
Dev->>AI: Provide context
|
|
432
432
|
AI->>Dev: Generate code
|
|
433
433
|
Dev->>Spec: Update tasks.md
|
|
@@ -473,7 +473,7 @@ sequenceDiagram
|
|
|
473
473
|
**Problem:** Context file too large for AI tool
|
|
474
474
|
**Solution:** Use task-specific prompts:
|
|
475
475
|
```bash
|
|
476
|
-
|
|
476
|
+
sce prompt generate spec-name task-id
|
|
477
477
|
```
|
|
478
478
|
|
|
479
479
|
**Problem:** AI doesn't follow Spec
|
|
@@ -484,24 +484,24 @@ kse prompt generate spec-name task-id
|
|
|
484
484
|
**Problem:** Watch mode not detecting changes
|
|
485
485
|
**Solution:**
|
|
486
486
|
```bash
|
|
487
|
-
|
|
488
|
-
|
|
487
|
+
sce watch stop
|
|
488
|
+
sce watch start
|
|
489
489
|
```
|
|
490
490
|
|
|
491
491
|
**Problem:** Context not updating
|
|
492
492
|
**Solution:** Check watch logs:
|
|
493
493
|
```bash
|
|
494
|
-
|
|
494
|
+
sce watch logs
|
|
495
495
|
```
|
|
496
496
|
|
|
497
497
|
---
|
|
498
498
|
|
|
499
499
|
## Related Documentation
|
|
500
500
|
|
|
501
|
-
- **[Quick Start Guide](quick-start.md)** - Get started with
|
|
501
|
+
- **[Quick Start Guide](quick-start.md)** - Get started with sce
|
|
502
502
|
- **[Tool-Specific Guides](tools/)** - Detailed guides for each AI tool
|
|
503
503
|
- **[Spec Workflow](spec-workflow.md)** - Understanding Specs
|
|
504
|
-
- **[Command Reference](command-reference.md)** - All
|
|
504
|
+
- **[Command Reference](command-reference.md)** - All sce commands
|
|
505
505
|
|
|
506
506
|
---
|
|
507
507
|
|
|
@@ -509,7 +509,7 @@ kse watch logs
|
|
|
509
509
|
|
|
510
510
|
**Three Integration Modes:**
|
|
511
511
|
|
|
512
|
-
1. **Native Integration** - Fully automatic (
|
|
512
|
+
1. **Native Integration** - Fully automatic (AI IDE)
|
|
513
513
|
2. **Manual Export** - Universal compatibility (all tools)
|
|
514
514
|
3. **Watch Mode** - Auto-refresh context (all tools)
|
|
515
515
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# sce 集成哲学
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> sce 如何与 AI 编码工具配合工作
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## 核心定位
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**sce 不是替代 AI 工具,而是增强 AI 工具**
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
┌─────────────────────────────────────┐
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
│ 读取上下文
|
|
20
20
|
▼
|
|
21
21
|
┌─────────────────────────────────────┐
|
|
22
|
-
│
|
|
22
|
+
│ sce │
|
|
23
23
|
│ │
|
|
24
24
|
│ Spec 管理 + 上下文生成 │
|
|
25
25
|
│ (后台运行,提供结构化信息) │
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
|
|
31
31
|
## 三种集成模式
|
|
32
32
|
|
|
33
|
-
### 模式 1:AI 主动调用
|
|
33
|
+
### 模式 1:AI 主动调用 sce(最佳)⭐
|
|
34
34
|
|
|
35
35
|
**适用工具**:Windsurf、Cline、Aider(可执行命令的 AI)
|
|
36
36
|
|
|
37
37
|
**工作流**:
|
|
38
38
|
```
|
|
39
|
-
用户 → AI 工具 → AI 自动执行
|
|
39
|
+
用户 → AI 工具 → AI 自动执行 sce 命令 → 获取上下文 → 生成代码
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
**示例对话**:
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
用户:我要实现用户登录功能
|
|
45
45
|
|
|
46
46
|
AI:好的,让我先查看项目的 Spec
|
|
47
|
-
[自动执行]
|
|
47
|
+
[自动执行] sce context export 01-00-user-login
|
|
48
48
|
[读取文件] .kiro/specs/01-00-user-login/context-export.md
|
|
49
49
|
|
|
50
50
|
我看到设计文档中定义了 AuthController...
|
|
51
51
|
[生成代码]
|
|
52
52
|
|
|
53
|
-
[自动执行]
|
|
53
|
+
[自动执行] sce task claim 01-00-user-login 1.1
|
|
54
54
|
任务已认领,开始实现...
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -58,14 +58,14 @@ AI:好的,让我先查看项目的 Spec
|
|
|
58
58
|
|
|
59
59
|
在 AI 工具的系统提示中添加:
|
|
60
60
|
```markdown
|
|
61
|
-
你可以使用以下
|
|
61
|
+
你可以使用以下 sce 命令来管理项目:
|
|
62
62
|
|
|
63
|
-
- `
|
|
64
|
-
- `
|
|
65
|
-
- `
|
|
66
|
-
- `
|
|
63
|
+
- `sce context export <spec-name>` - 导出 Spec 上下文
|
|
64
|
+
- `sce prompt generate <spec-name> <task-id>` - 生成任务提示
|
|
65
|
+
- `sce task claim <spec-name> <task-id>` - 认领任务
|
|
66
|
+
- `sce status` - 查看项目状态
|
|
67
67
|
|
|
68
|
-
在实现功能前,先用
|
|
68
|
+
在实现功能前,先用 sce 命令查看相关 Spec。
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
**优势**:
|
|
@@ -81,13 +81,13 @@ AI:好的,让我先查看项目的 Spec
|
|
|
81
81
|
|
|
82
82
|
**工作流**:
|
|
83
83
|
```
|
|
84
|
-
用户 → 手动执行
|
|
84
|
+
用户 → 手动执行 sce 命令 → 复制上下文 → 粘贴到 AI → AI 生成代码
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
**示例流程**:
|
|
88
88
|
```bash
|
|
89
89
|
# 1. 用户手动导出
|
|
90
|
-
|
|
90
|
+
sce context export 01-00-user-login
|
|
91
91
|
|
|
92
92
|
# 2. 复制内容
|
|
93
93
|
cat .kiro/specs/01-00-user-login/context-export.md | pbcopy
|
|
@@ -105,8 +105,8 @@ AI:[生成代码]
|
|
|
105
105
|
**改进建议**:
|
|
106
106
|
```bash
|
|
107
107
|
# 添加快捷命令
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
sce clip 01-00-user-login # 自动复制到剪贴板
|
|
109
|
+
sce clip 01-00-user-login 1.1 # 只复制任务 1.1 的上下文
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
**优势**:
|
|
@@ -125,15 +125,15 @@ kse clip 01-00-user-login 1.1 # 只复制任务 1.1 的上下文
|
|
|
125
125
|
|
|
126
126
|
**工作流**:
|
|
127
127
|
```
|
|
128
|
-
用户修改 Spec →
|
|
128
|
+
用户修改 Spec → sce 自动检测 → 自动重新导出 → AI 工具自动刷新
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
**配置**:
|
|
132
132
|
```bash
|
|
133
133
|
# 启动 Watch Mode
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
sce watch init
|
|
135
|
+
sce watch install auto-export
|
|
136
|
+
sce watch start
|
|
137
137
|
|
|
138
138
|
# 现在修改任何 Spec 文件,都会自动重新导出
|
|
139
139
|
```
|
|
@@ -149,7 +149,7 @@ kse watch start
|
|
|
149
149
|
"actions": [
|
|
150
150
|
{
|
|
151
151
|
"name": "auto-export",
|
|
152
|
-
"command": "
|
|
152
|
+
"command": "sce context export ${spec-name}"
|
|
153
153
|
}
|
|
154
154
|
]
|
|
155
155
|
}
|
|
@@ -170,30 +170,30 @@ kse watch start
|
|
|
170
170
|
```markdown
|
|
171
171
|
# Spec 管理规则
|
|
172
172
|
|
|
173
|
-
项目使用
|
|
173
|
+
项目使用 sce (Scene Capability Engine) 管理需求和设计。
|
|
174
174
|
|
|
175
175
|
## 工作流程
|
|
176
176
|
|
|
177
|
-
1. **查看 Spec**:实现功能前,先执行 `
|
|
178
|
-
2. **认领任务**:开始工作前,执行 `
|
|
177
|
+
1. **查看 Spec**:实现功能前,先执行 `sce context export <spec-name>` 查看设计
|
|
178
|
+
2. **认领任务**:开始工作前,执行 `sce task claim <spec-name> <task-id>`
|
|
179
179
|
3. **实现代码**:严格按照 Spec 中的设计实现
|
|
180
180
|
4. **更新状态**:完成后,在 tasks.md 中标记任务为完成 `[x]`
|
|
181
181
|
|
|
182
182
|
## 可用命令
|
|
183
183
|
|
|
184
|
-
- `
|
|
185
|
-
- `
|
|
186
|
-
- `
|
|
187
|
-
- `
|
|
184
|
+
- `sce status` - 查看项目状态
|
|
185
|
+
- `sce context export <spec-name>` - 导出 Spec 上下文
|
|
186
|
+
- `sce task claim <spec-name> <task-id>` - 认领任务
|
|
187
|
+
- `sce prompt generate <spec-name> <task-id>` - 生成任务提示
|
|
188
188
|
|
|
189
189
|
## 示例
|
|
190
190
|
|
|
191
191
|
用户说:"实现用户登录"
|
|
192
192
|
你应该:
|
|
193
|
-
1. 执行 `
|
|
193
|
+
1. 执行 `sce context export 01-00-user-login`
|
|
194
194
|
2. 读取导出的上下文
|
|
195
195
|
3. 根据设计文档实现代码
|
|
196
|
-
4. 执行 `
|
|
196
|
+
4. 执行 `sce task claim 01-00-user-login 1.1`
|
|
197
197
|
```
|
|
198
198
|
|
|
199
199
|
### 对于 Claude/ChatGPT 用户
|
|
@@ -202,10 +202,10 @@ kse watch start
|
|
|
202
202
|
|
|
203
203
|
```bash
|
|
204
204
|
# ~/.bashrc 或 ~/.zshrc
|
|
205
|
-
alias
|
|
205
|
+
alias sce-clip='sce context export $1 && cat .kiro/specs/$1/context-export.md | pbcopy && echo "✅ 已复制到剪贴板"'
|
|
206
206
|
|
|
207
207
|
# 使用
|
|
208
|
-
|
|
208
|
+
sce-clip 01-00-user-login
|
|
209
209
|
# 然后直接粘贴到 Claude
|
|
210
210
|
```
|
|
211
211
|
|
|
@@ -217,7 +217,7 @@ kse-clip 01-00-user-login
|
|
|
217
217
|
```markdown
|
|
218
218
|
# Spec 驱动开发
|
|
219
219
|
|
|
220
|
-
项目使用
|
|
220
|
+
项目使用 sce 管理 Spec。实现功能前:
|
|
221
221
|
|
|
222
222
|
1. 查看 `.kiro/specs/<spec-name>/design.md`
|
|
223
223
|
2. 按照设计实现
|
|
@@ -234,12 +234,12 @@ kse-clip 01-00-user-login
|
|
|
234
234
|
|
|
235
235
|
### 1. MCP (Model Context Protocol) 集成
|
|
236
236
|
|
|
237
|
-
让 AI 工具通过 MCP 直接访问
|
|
237
|
+
让 AI 工具通过 MCP 直接访问 sce:
|
|
238
238
|
|
|
239
239
|
```javascript
|
|
240
240
|
// AI 工具可以直接调用
|
|
241
|
-
const context = await mcp.call('
|
|
242
|
-
const tasks = await mcp.call('
|
|
241
|
+
const context = await mcp.call('sce.getContext', '01-00-user-login');
|
|
242
|
+
const tasks = await mcp.call('sce.getTasks', '01-00-user-login');
|
|
243
243
|
```
|
|
244
244
|
|
|
245
245
|
### 2. IDE 插件
|
|
@@ -258,7 +258,7 @@ const tasks = await mcp.call('kse.getTasks', '01-00-user-login');
|
|
|
258
258
|
|
|
259
259
|
提供 Web 界面:
|
|
260
260
|
```bash
|
|
261
|
-
|
|
261
|
+
sce serve
|
|
262
262
|
# 打开 http://localhost:3000
|
|
263
263
|
# 可视化管理 Spec,一键复制上下文
|
|
264
264
|
```
|
|
@@ -267,10 +267,10 @@ kse serve
|
|
|
267
267
|
|
|
268
268
|
## 常见问题
|
|
269
269
|
|
|
270
|
-
### Q: 为什么不把
|
|
270
|
+
### Q: 为什么不把 sce 做成 AI 工具的插件?
|
|
271
271
|
|
|
272
272
|
**A**:
|
|
273
|
-
-
|
|
273
|
+
- sce 是**通用工具**,支持所有 AI 工具
|
|
274
274
|
- 做成插件会限制在特定工具
|
|
275
275
|
- CLI 工具更灵活,可以被任何工具调用
|
|
276
276
|
|
|
@@ -279,29 +279,29 @@ kse serve
|
|
|
279
279
|
**A**:
|
|
280
280
|
- 部分工具支持(Cursor、Copilot)
|
|
281
281
|
- 但需要明确的上下文导出更可靠
|
|
282
|
-
-
|
|
282
|
+
- sce 的价值在于**结构化和格式化**上下文
|
|
283
283
|
|
|
284
284
|
### Q: 两套工具确实有点麻烦,有更简单的方案吗?
|
|
285
285
|
|
|
286
286
|
**A**:
|
|
287
|
-
- **短期**:使用 Windsurf/Cline,让 AI 自动调用
|
|
288
|
-
- **中期**:使用快捷脚本(如 `
|
|
287
|
+
- **短期**:使用 Windsurf/Cline,让 AI 自动调用 sce
|
|
288
|
+
- **中期**:使用快捷脚本(如 `sce-clip`)
|
|
289
289
|
- **长期**:MCP 集成,完全无缝
|
|
290
290
|
|
|
291
291
|
---
|
|
292
292
|
|
|
293
293
|
## 总结
|
|
294
294
|
|
|
295
|
-
**
|
|
295
|
+
**sce 的定位**:
|
|
296
296
|
- ❌ 不是独立的开发工具
|
|
297
297
|
- ❌ 不是 AI 工具的竞争对手
|
|
298
298
|
- ✅ 是 AI 工具的**上下文提供者**
|
|
299
299
|
- ✅ 是项目的**Spec 管理系统**
|
|
300
300
|
|
|
301
301
|
**最佳实践**:
|
|
302
|
-
1. **用
|
|
302
|
+
1. **用 sce 管理 Spec**(需求、设计、任务)
|
|
303
303
|
2. **用 AI 工具写代码**(主要工作界面)
|
|
304
|
-
3. **让 AI 工具调用
|
|
304
|
+
3. **让 AI 工具调用 sce**(自动化集成)
|
|
305
305
|
|
|
306
306
|
**选择合适的模式**:
|
|
307
307
|
- 能执行命令的 AI → 模式 1(AI 主动调用)⭐
|
|
@@ -310,4 +310,4 @@ kse serve
|
|
|
310
310
|
|
|
311
311
|
---
|
|
312
312
|
|
|
313
|
-
**记住**:
|
|
313
|
+
**记住**:sce 是幕后英雄,AI 工具是前台明星。两者配合,才能发挥最大价值!🚀
|