kiro-spec-engine 1.2.3 → 1.4.0
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 +135 -0
- package/README.md +239 -213
- package/README.zh.md +0 -330
- package/bin/kiro-spec-engine.js +62 -0
- package/docs/README.md +223 -0
- package/docs/agent-hooks-analysis.md +815 -0
- package/docs/command-reference.md +252 -0
- package/docs/cross-tool-guide.md +554 -0
- package/docs/examples/add-export-command/design.md +194 -0
- package/docs/examples/add-export-command/requirements.md +110 -0
- package/docs/examples/add-export-command/tasks.md +88 -0
- package/docs/examples/add-rest-api/design.md +855 -0
- package/docs/examples/add-rest-api/requirements.md +323 -0
- package/docs/examples/add-rest-api/tasks.md +355 -0
- package/docs/examples/add-user-dashboard/design.md +192 -0
- package/docs/examples/add-user-dashboard/requirements.md +143 -0
- package/docs/examples/add-user-dashboard/tasks.md +91 -0
- package/docs/faq.md +696 -0
- package/docs/integration-modes.md +525 -0
- package/docs/integration-philosophy.md +313 -0
- package/docs/manual-workflows-guide.md +417 -0
- package/docs/quick-start-with-ai-tools.md +374 -0
- package/docs/quick-start.md +711 -0
- package/docs/spec-workflow.md +453 -0
- package/docs/steering-strategy-guide.md +196 -0
- package/docs/tools/claude-guide.md +653 -0
- package/docs/tools/cursor-guide.md +705 -0
- package/docs/tools/generic-guide.md +445 -0
- package/docs/tools/kiro-guide.md +308 -0
- package/docs/tools/vscode-guide.md +444 -0
- package/docs/tools/windsurf-guide.md +390 -0
- package/docs/troubleshooting.md +795 -0
- package/docs/zh/README.md +275 -0
- package/docs/zh/quick-start.md +711 -0
- package/docs/zh/tools/claude-guide.md +348 -0
- package/docs/zh/tools/cursor-guide.md +280 -0
- package/docs/zh/tools/generic-guide.md +498 -0
- package/docs/zh/tools/kiro-guide.md +342 -0
- package/docs/zh/tools/vscode-guide.md +448 -0
- package/docs/zh/tools/windsurf-guide.md +377 -0
- package/lib/adoption/detection-engine.js +14 -4
- package/lib/commands/adopt.js +117 -3
- package/lib/commands/context.js +99 -0
- package/lib/commands/prompt.js +105 -0
- package/lib/commands/status.js +225 -0
- package/lib/commands/task.js +199 -0
- package/lib/commands/watch.js +569 -0
- package/lib/commands/workflows.js +240 -0
- package/lib/commands/workspace.js +189 -0
- package/lib/context/context-exporter.js +378 -0
- package/lib/context/prompt-generator.js +482 -0
- package/lib/steering/adoption-config.js +164 -0
- package/lib/steering/steering-manager.js +289 -0
- package/lib/task/task-claimer.js +430 -0
- package/lib/utils/tool-detector.js +383 -0
- package/lib/watch/action-executor.js +458 -0
- package/lib/watch/event-debouncer.js +323 -0
- package/lib/watch/execution-logger.js +550 -0
- package/lib/watch/file-watcher.js +499 -0
- package/lib/watch/presets.js +266 -0
- package/lib/watch/watch-manager.js +533 -0
- package/lib/workspace/workspace-manager.js +370 -0
- package/lib/workspace/workspace-sync.js +356 -0
- package/package.json +3 -1
- package/template/.kiro/tools/backup_manager.py +295 -0
- package/template/.kiro/tools/configuration_manager.py +218 -0
- package/template/.kiro/tools/document_evaluator.py +550 -0
- package/template/.kiro/tools/enhancement_logger.py +168 -0
- package/template/.kiro/tools/error_handler.py +335 -0
- package/template/.kiro/tools/improvement_identifier.py +444 -0
- package/template/.kiro/tools/modification_applicator.py +737 -0
- package/template/.kiro/tools/quality_gate_enforcer.py +207 -0
- package/template/.kiro/tools/quality_scorer.py +305 -0
- package/template/.kiro/tools/report_generator.py +154 -0
- package/template/.kiro/tools/ultrawork_enhancer_refactored.py +0 -0
- package/template/.kiro/tools/ultrawork_enhancer_v2.py +463 -0
- package/template/.kiro/tools/ultrawork_enhancer_v3.py +606 -0
- package/template/.kiro/tools/workflow_quality_gate.py +100 -0
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
# Integration Modes Guide
|
|
2
|
+
|
|
3
|
+
> Three ways to integrate kse with your AI coding tools
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Version**: 1.0.0
|
|
8
|
+
**Last Updated**: 2026-01-23
|
|
9
|
+
**Audience**: Intermediate
|
|
10
|
+
**Estimated Time**: 8 minutes
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
kse supports three integration modes to work with different AI coding tools. Each mode offers different levels of automation and suits different workflows.
|
|
17
|
+
|
|
18
|
+
```mermaid
|
|
19
|
+
graph TD
|
|
20
|
+
A[kse Integration] --> B[Native Integration]
|
|
21
|
+
A --> C[Manual Export]
|
|
22
|
+
A --> D[Watch Mode]
|
|
23
|
+
B --> E[Kiro IDE]
|
|
24
|
+
C --> F[Cursor/Claude/VS Code]
|
|
25
|
+
D --> G[All Tools]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Mode 1: Native Integration ⭐
|
|
31
|
+
|
|
32
|
+
**Best for:** Kiro IDE users
|
|
33
|
+
**Automation Level:** Fully Automatic
|
|
34
|
+
**Setup Complexity:** None (built-in)
|
|
35
|
+
|
|
36
|
+
### How It Works
|
|
37
|
+
|
|
38
|
+
With native integration, the AI tool directly accesses kse without any manual steps. The AI can read Specs, export context, and update tasks automatically.
|
|
39
|
+
|
|
40
|
+
```mermaid
|
|
41
|
+
sequenceDiagram
|
|
42
|
+
participant User
|
|
43
|
+
participant AI Tool
|
|
44
|
+
participant kse
|
|
45
|
+
|
|
46
|
+
User->>AI Tool: "Implement user login"
|
|
47
|
+
AI Tool->>kse: Read Spec files directly
|
|
48
|
+
kse->>AI Tool: Spec content
|
|
49
|
+
AI Tool->>AI Tool: Generate code
|
|
50
|
+
AI Tool->>kse: Update task status
|
|
51
|
+
AI Tool->>User: Code generated
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Supported Tools
|
|
55
|
+
|
|
56
|
+
- **Kiro IDE** - Full native support
|
|
57
|
+
|
|
58
|
+
### Workflow Example
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
You: "Implement the user login feature"
|
|
62
|
+
|
|
63
|
+
Kiro AI:
|
|
64
|
+
[Automatically reads .kiro/specs/01-00-user-login/]
|
|
65
|
+
[Understands requirements and design]
|
|
66
|
+
[Generates code]
|
|
67
|
+
[Updates tasks.md automatically]
|
|
68
|
+
|
|
69
|
+
✓ Implemented AuthController
|
|
70
|
+
✓ Implemented AuthService
|
|
71
|
+
✓ Updated task 1.1 to complete
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Advantages
|
|
75
|
+
|
|
76
|
+
- ✅ **Zero manual steps** - AI handles everything
|
|
77
|
+
- ✅ **Always up-to-date** - AI reads latest Spec files
|
|
78
|
+
- ✅ **Automatic task tracking** - AI updates task status
|
|
79
|
+
- ✅ **Seamless workflow** - No context switching
|
|
80
|
+
|
|
81
|
+
### Limitations
|
|
82
|
+
|
|
83
|
+
- ❌ **Tool-specific** - Only works with Kiro IDE currently
|
|
84
|
+
- ❌ **Requires compatible AI** - AI must support file system access
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Mode 2: Manual Export
|
|
89
|
+
|
|
90
|
+
**Best for:** Claude Code, ChatGPT, Cursor, VS Code + Copilot
|
|
91
|
+
**Automation Level:** Semi-Manual
|
|
92
|
+
**Setup Complexity:** Low
|
|
93
|
+
|
|
94
|
+
### How It Works
|
|
95
|
+
|
|
96
|
+
You manually export context from kse and provide it to your AI tool. The AI tool doesn't directly access kse.
|
|
97
|
+
|
|
98
|
+
```mermaid
|
|
99
|
+
sequenceDiagram
|
|
100
|
+
participant User
|
|
101
|
+
participant kse
|
|
102
|
+
participant AI Tool
|
|
103
|
+
|
|
104
|
+
User->>kse: kse context export spec-name
|
|
105
|
+
kse->>User: context-export.md
|
|
106
|
+
User->>User: Copy context
|
|
107
|
+
User->>AI Tool: Paste context
|
|
108
|
+
AI Tool->>User: Generate code
|
|
109
|
+
User->>kse: Update tasks.md manually
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Supported Tools
|
|
113
|
+
|
|
114
|
+
- **Claude Code** - Large context window, excellent understanding
|
|
115
|
+
- **ChatGPT** - Good for conversational development
|
|
116
|
+
- **Cursor** - IDE integration with AI pair programming
|
|
117
|
+
- **VS Code + Copilot** - Inline suggestions with context
|
|
118
|
+
- **Any AI tool** - Works with any tool that accepts text input
|
|
119
|
+
|
|
120
|
+
### Workflow Example
|
|
121
|
+
|
|
122
|
+
**Step 1: Export context**
|
|
123
|
+
```bash
|
|
124
|
+
kse context export 01-00-user-login
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Step 2: Copy context**
|
|
128
|
+
```bash
|
|
129
|
+
# macOS
|
|
130
|
+
cat .kiro/specs/01-00-user-login/context-export.md | pbcopy
|
|
131
|
+
|
|
132
|
+
# Windows
|
|
133
|
+
type .kiro\specs\01-00-user-login\context-export.md | clip
|
|
134
|
+
|
|
135
|
+
# Linux
|
|
136
|
+
cat .kiro/specs/01-00-user-login/context-export.md | xclip -selection clipboard
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Step 3: Paste into AI tool**
|
|
140
|
+
```
|
|
141
|
+
[Paste context into Claude/ChatGPT/Cursor]
|
|
142
|
+
|
|
143
|
+
You: "Please implement task 1.1: Create AuthController"
|
|
144
|
+
|
|
145
|
+
AI: [Generates code based on your Spec]
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Step 4: Update tasks**
|
|
149
|
+
Edit `.kiro/specs/01-00-user-login/tasks.md`:
|
|
150
|
+
```markdown
|
|
151
|
+
- [x] 1.1 Create AuthController ← Changed from [ ] to [x]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Advantages
|
|
155
|
+
|
|
156
|
+
- ✅ **Works with any AI tool** - Universal compatibility
|
|
157
|
+
- ✅ **Full control** - You decide what context to share
|
|
158
|
+
- ✅ **Simple setup** - No configuration needed
|
|
159
|
+
- ✅ **Reliable** - No dependencies on tool capabilities
|
|
160
|
+
|
|
161
|
+
### Limitations
|
|
162
|
+
|
|
163
|
+
- ❌ **Manual steps** - Copy-paste required
|
|
164
|
+
- ❌ **Context can be stale** - Need to re-export after Spec changes
|
|
165
|
+
- ❌ **Manual task tracking** - You update tasks.md yourself
|
|
166
|
+
|
|
167
|
+
### Optimization Tips
|
|
168
|
+
|
|
169
|
+
**Create shell aliases for faster export:**
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Add to ~/.bashrc or ~/.zshrc
|
|
173
|
+
alias kse-clip='kse context export $1 && cat .kiro/specs/$1/context-export.md | pbcopy && echo "✅ Context copied to clipboard"'
|
|
174
|
+
|
|
175
|
+
# Usage
|
|
176
|
+
kse-clip 01-00-user-login
|
|
177
|
+
# Now just paste into your AI tool
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Generate task-specific prompts:**
|
|
181
|
+
```bash
|
|
182
|
+
# Instead of exporting entire Spec
|
|
183
|
+
kse prompt generate 01-00-user-login 1.1
|
|
184
|
+
|
|
185
|
+
# Generates focused prompt for just task 1.1
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Mode 3: Watch Mode 🔄
|
|
191
|
+
|
|
192
|
+
**Best for:** Frequent Spec changes, team collaboration
|
|
193
|
+
**Automation Level:** Automatic (after setup)
|
|
194
|
+
**Setup Complexity:** Medium
|
|
195
|
+
|
|
196
|
+
### How It Works
|
|
197
|
+
|
|
198
|
+
kse monitors your Spec files for changes and automatically re-exports context. Your AI tool can always access the latest context without manual export.
|
|
199
|
+
|
|
200
|
+
```mermaid
|
|
201
|
+
sequenceDiagram
|
|
202
|
+
participant User
|
|
203
|
+
participant kse Watch
|
|
204
|
+
participant Spec Files
|
|
205
|
+
participant AI Tool
|
|
206
|
+
|
|
207
|
+
User->>Spec Files: Edit requirements.md
|
|
208
|
+
Spec Files->>kse Watch: File changed event
|
|
209
|
+
kse Watch->>kse Watch: Auto-export context
|
|
210
|
+
kse Watch->>Spec Files: Update context-export.md
|
|
211
|
+
User->>AI Tool: Use latest context
|
|
212
|
+
AI Tool->>Spec Files: Read context-export.md
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Supported Tools
|
|
216
|
+
|
|
217
|
+
- **All tools** - Works with any AI tool
|
|
218
|
+
- **Best with:** Windsurf, Cline (can execute commands)
|
|
219
|
+
- **Good with:** Cursor, Claude (manual context refresh)
|
|
220
|
+
|
|
221
|
+
### Setup
|
|
222
|
+
|
|
223
|
+
**1. Initialize watch mode:**
|
|
224
|
+
```bash
|
|
225
|
+
kse watch init
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**2. Install auto-export preset:**
|
|
229
|
+
```bash
|
|
230
|
+
kse watch install context-export
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**3. Start watching:**
|
|
234
|
+
```bash
|
|
235
|
+
kse watch start
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**4. Verify it's running:**
|
|
239
|
+
```bash
|
|
240
|
+
kse watch status
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Expected output:
|
|
244
|
+
```
|
|
245
|
+
Watch Mode: Active
|
|
246
|
+
Watching: .kiro/specs/**/*.md
|
|
247
|
+
Actions: context-export
|
|
248
|
+
Last execution: 2 minutes ago
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Workflow Example
|
|
252
|
+
|
|
253
|
+
**With watch mode running:**
|
|
254
|
+
|
|
255
|
+
1. **Edit your Spec** (e.g., add a new requirement)
|
|
256
|
+
```bash
|
|
257
|
+
# Edit .kiro/specs/01-00-user-login/requirements.md
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
2. **kse automatically detects the change**
|
|
261
|
+
```
|
|
262
|
+
[Watch Mode] Detected change: requirements.md
|
|
263
|
+
[Watch Mode] Exporting context for 01-00-user-login...
|
|
264
|
+
[Watch Mode] ✓ Context exported
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
3. **Use updated context immediately**
|
|
268
|
+
```bash
|
|
269
|
+
# Context is already up-to-date
|
|
270
|
+
cat .kiro/specs/01-00-user-login/context-export.md | pbcopy
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Advantages
|
|
274
|
+
|
|
275
|
+
- ✅ **Always up-to-date** - Context auto-updates on Spec changes
|
|
276
|
+
- ✅ **No manual export** - Set it and forget it
|
|
277
|
+
- ✅ **Great for iteration** - Refine Specs without re-exporting
|
|
278
|
+
- ✅ **Team-friendly** - Everyone gets latest context
|
|
279
|
+
|
|
280
|
+
### Limitations
|
|
281
|
+
|
|
282
|
+
- ❌ **Requires setup** - Initial configuration needed
|
|
283
|
+
- ❌ **Background process** - Must keep watch mode running
|
|
284
|
+
- ❌ **Resource usage** - Monitors file system continuously
|
|
285
|
+
|
|
286
|
+
### Advanced Configuration
|
|
287
|
+
|
|
288
|
+
**Custom watch patterns:**
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"patterns": [
|
|
292
|
+
".kiro/specs/**/requirements.md",
|
|
293
|
+
".kiro/specs/**/design.md",
|
|
294
|
+
".kiro/specs/**/tasks.md"
|
|
295
|
+
],
|
|
296
|
+
"actions": [
|
|
297
|
+
{
|
|
298
|
+
"name": "auto-export",
|
|
299
|
+
"command": "kse context export ${spec-name}"
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Multiple actions:**
|
|
306
|
+
```bash
|
|
307
|
+
# Install multiple presets
|
|
308
|
+
kse watch install context-export
|
|
309
|
+
kse watch install prompt-regen
|
|
310
|
+
kse watch install auto-sync
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Choosing the Right Mode
|
|
316
|
+
|
|
317
|
+
### Decision Matrix
|
|
318
|
+
|
|
319
|
+
| Factor | Native | Manual Export | Watch Mode |
|
|
320
|
+
|--------|--------|---------------|------------|
|
|
321
|
+
| **Setup Time** | None | None | 5 minutes |
|
|
322
|
+
| **Automation** | Full | None | Partial |
|
|
323
|
+
| **Tool Support** | Kiro only | All tools | All tools |
|
|
324
|
+
| **Context Freshness** | Always fresh | Manual refresh | Auto-refresh |
|
|
325
|
+
| **Task Tracking** | Automatic | Manual | Manual |
|
|
326
|
+
| **Best For** | Kiro users | Quick start | Active development |
|
|
327
|
+
|
|
328
|
+
### Recommendations by Tool
|
|
329
|
+
|
|
330
|
+
**Kiro IDE:**
|
|
331
|
+
- ✅ Use **Native Integration** (built-in)
|
|
332
|
+
- No setup needed, fully automatic
|
|
333
|
+
|
|
334
|
+
**Windsurf / Cline:**
|
|
335
|
+
- ✅ Use **Manual Export** initially
|
|
336
|
+
- ⭐ Upgrade to **Watch Mode** for active projects
|
|
337
|
+
- These tools can execute kse commands directly
|
|
338
|
+
|
|
339
|
+
**Claude Code / ChatGPT:**
|
|
340
|
+
- ✅ Use **Manual Export**
|
|
341
|
+
- Create shell aliases for faster workflow
|
|
342
|
+
- Use task-specific prompts for large Specs
|
|
343
|
+
|
|
344
|
+
**Cursor:**
|
|
345
|
+
- ✅ Use **Manual Export** with prompt generation
|
|
346
|
+
- ⭐ Consider **Watch Mode** for frequently changing Specs
|
|
347
|
+
- Cursor can read updated context files automatically
|
|
348
|
+
|
|
349
|
+
**VS Code + Copilot:**
|
|
350
|
+
- ✅ Use **Manual Export**
|
|
351
|
+
- Reference Spec files in code comments
|
|
352
|
+
- Copilot reads project files automatically
|
|
353
|
+
|
|
354
|
+
**Generic AI Tools:**
|
|
355
|
+
- ✅ Use **Manual Export**
|
|
356
|
+
- Universal compatibility
|
|
357
|
+
- Simple copy-paste workflow
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## Hybrid Approaches
|
|
362
|
+
|
|
363
|
+
### Manual Export + Watch Mode
|
|
364
|
+
|
|
365
|
+
Use watch mode to keep context fresh, but still manually provide context to AI:
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
# Terminal 1: Keep watch mode running
|
|
369
|
+
kse watch start
|
|
370
|
+
|
|
371
|
+
# Terminal 2: Work normally
|
|
372
|
+
# Edit Specs, context auto-updates
|
|
373
|
+
# Copy latest context when needed
|
|
374
|
+
cat .kiro/specs/01-00-user-login/context-export.md | pbcopy
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**Benefits:**
|
|
378
|
+
- Context always fresh
|
|
379
|
+
- Full control over when to provide context to AI
|
|
380
|
+
- Best of both worlds
|
|
381
|
+
|
|
382
|
+
### Native + Manual Export
|
|
383
|
+
|
|
384
|
+
Use native integration primarily, but export for sharing:
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
# Work with Kiro IDE (native integration)
|
|
388
|
+
# When sharing with team member using different tool:
|
|
389
|
+
kse context export 01-00-user-login
|
|
390
|
+
# Send context-export.md to teammate
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**Benefits:**
|
|
394
|
+
- Seamless personal workflow
|
|
395
|
+
- Easy collaboration with non-Kiro users
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## Context Flow Visualization
|
|
400
|
+
|
|
401
|
+
### Complete Context Flow
|
|
402
|
+
|
|
403
|
+
```mermaid
|
|
404
|
+
sequenceDiagram
|
|
405
|
+
participant Dev as Developer
|
|
406
|
+
participant kse as kse
|
|
407
|
+
participant Spec as Spec Files
|
|
408
|
+
participant AI as AI Tool
|
|
409
|
+
|
|
410
|
+
Dev->>kse: Create Spec
|
|
411
|
+
kse->>Spec: Generate requirements.md, design.md, tasks.md
|
|
412
|
+
Dev->>Spec: Edit Spec files
|
|
413
|
+
|
|
414
|
+
alt Native Integration
|
|
415
|
+
AI->>Spec: Read files directly
|
|
416
|
+
AI->>Dev: Generate code
|
|
417
|
+
AI->>Spec: Update tasks.md
|
|
418
|
+
else Manual Export
|
|
419
|
+
Dev->>kse: kse context export
|
|
420
|
+
kse->>Spec: Generate context-export.md
|
|
421
|
+
Dev->>AI: Provide context
|
|
422
|
+
AI->>Dev: Generate code
|
|
423
|
+
Dev->>Spec: Update tasks.md
|
|
424
|
+
else Watch Mode
|
|
425
|
+
Spec->>kse: File change event
|
|
426
|
+
kse->>Spec: Auto-generate context-export.md
|
|
427
|
+
Dev->>AI: Provide context
|
|
428
|
+
AI->>Dev: Generate code
|
|
429
|
+
Dev->>Spec: Update tasks.md
|
|
430
|
+
end
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## Best Practices
|
|
436
|
+
|
|
437
|
+
### For All Modes
|
|
438
|
+
|
|
439
|
+
1. **Keep Specs updated** - Outdated Specs lead to incorrect code
|
|
440
|
+
2. **Use version control** - Commit Spec changes
|
|
441
|
+
3. **Review AI output** - AI follows Spec, but verify correctness
|
|
442
|
+
4. **Update tasks promptly** - Track progress accurately
|
|
443
|
+
|
|
444
|
+
### For Manual Export
|
|
445
|
+
|
|
446
|
+
1. **Create aliases** - Speed up export workflow
|
|
447
|
+
2. **Use task-specific prompts** - For large Specs
|
|
448
|
+
3. **Re-export after changes** - Keep context fresh
|
|
449
|
+
4. **Include steering rules** - For consistent AI behavior
|
|
450
|
+
|
|
451
|
+
### For Watch Mode
|
|
452
|
+
|
|
453
|
+
1. **Start watch at project start** - Make it part of your routine
|
|
454
|
+
2. **Check watch status** - Ensure it's running
|
|
455
|
+
3. **Monitor logs** - Catch any export errors
|
|
456
|
+
4. **Stop when not needed** - Save system resources
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
## Troubleshooting
|
|
461
|
+
|
|
462
|
+
### Native Integration Issues
|
|
463
|
+
|
|
464
|
+
**Problem:** AI doesn't see Spec files
|
|
465
|
+
**Solution:** Ensure `.kiro/specs/` directory exists and has correct permissions
|
|
466
|
+
|
|
467
|
+
### Manual Export Issues
|
|
468
|
+
|
|
469
|
+
**Problem:** Context file too large for AI tool
|
|
470
|
+
**Solution:** Use task-specific prompts:
|
|
471
|
+
```bash
|
|
472
|
+
kse prompt generate spec-name task-id
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
**Problem:** AI doesn't follow Spec
|
|
476
|
+
**Solution:** Be explicit in prompt: "Strictly follow the design document"
|
|
477
|
+
|
|
478
|
+
### Watch Mode Issues
|
|
479
|
+
|
|
480
|
+
**Problem:** Watch mode not detecting changes
|
|
481
|
+
**Solution:**
|
|
482
|
+
```bash
|
|
483
|
+
kse watch stop
|
|
484
|
+
kse watch start
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
**Problem:** Context not updating
|
|
488
|
+
**Solution:** Check watch logs:
|
|
489
|
+
```bash
|
|
490
|
+
kse watch logs
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## Related Documentation
|
|
496
|
+
|
|
497
|
+
- **[Quick Start Guide](quick-start.md)** - Get started with kse
|
|
498
|
+
- **[Tool-Specific Guides](tools/)** - Detailed guides for each AI tool
|
|
499
|
+
- **[Spec Workflow](spec-workflow.md)** - Understanding Specs
|
|
500
|
+
- **[Command Reference](command-reference.md)** - All kse commands
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
## Summary
|
|
505
|
+
|
|
506
|
+
**Three Integration Modes:**
|
|
507
|
+
|
|
508
|
+
1. **Native Integration** - Fully automatic (Kiro IDE)
|
|
509
|
+
2. **Manual Export** - Universal compatibility (all tools)
|
|
510
|
+
3. **Watch Mode** - Auto-refresh context (all tools)
|
|
511
|
+
|
|
512
|
+
**Choose based on:**
|
|
513
|
+
- Your AI tool's capabilities
|
|
514
|
+
- Your workflow preferences
|
|
515
|
+
- Project activity level
|
|
516
|
+
|
|
517
|
+
**Start simple, upgrade as needed:**
|
|
518
|
+
```
|
|
519
|
+
Manual Export → Watch Mode → Native Integration
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
**Version**: 1.0.0
|
|
525
|
+
**Last Updated**: 2026-01-23
|