kiro-spec-engine 1.3.0 → 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 +61 -0
- package/README.md +223 -369
- package/README.zh.md +0 -330
- package/docs/README.md +223 -0
- package/docs/command-reference.md +252 -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/quick-start-with-ai-tools.md +374 -0
- package/docs/quick-start.md +711 -0
- package/docs/spec-workflow.md +453 -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/package.json +1 -1
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
# Using kse with Windsurf
|
|
2
|
+
|
|
3
|
+
> Complete guide to integrating kse with Windsurf for automated AI-assisted development
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Version**: 1.0.0
|
|
8
|
+
**Last Updated**: 2026-01-23
|
|
9
|
+
**Tool**: Windsurf
|
|
10
|
+
**Integration Mode**: Native + Manual Export + Watch Mode
|
|
11
|
+
**Estimated Setup Time**: 10 minutes
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
**Windsurf** is an AI coding agent that can execute commands, modify files, and interact with your development environment autonomously.
|
|
18
|
+
|
|
19
|
+
**kse integration with Windsurf** supports all three modes:
|
|
20
|
+
- **Native-like**: Windsurf can execute kse commands directly
|
|
21
|
+
- **Manual Export**: Traditional export and paste workflow
|
|
22
|
+
- **Watch Mode**: Automatic context updates
|
|
23
|
+
|
|
24
|
+
### Why Use kse with Windsurf?
|
|
25
|
+
|
|
26
|
+
- ✅ **Fully automated** - Windsurf can run kse commands itself
|
|
27
|
+
- ✅ **Command execution** - No manual copy-paste needed
|
|
28
|
+
- ✅ **File modification** - Windsurf updates tasks.md automatically
|
|
29
|
+
- ✅ **Best automation** - Most seamless kse integration after Kiro
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Integration Modes
|
|
34
|
+
|
|
35
|
+
### Mode 1: AI-Executed Commands (Recommended) ⭐
|
|
36
|
+
|
|
37
|
+
**How it works:**
|
|
38
|
+
1. You tell Windsurf what to build
|
|
39
|
+
2. Windsurf executes `kse context export` automatically
|
|
40
|
+
3. Windsurf reads the exported context
|
|
41
|
+
4. Windsurf implements the feature
|
|
42
|
+
5. Windsurf updates tasks.md automatically
|
|
43
|
+
|
|
44
|
+
**Example:**
|
|
45
|
+
```
|
|
46
|
+
You: "Implement the user login feature using kse"
|
|
47
|
+
|
|
48
|
+
Windsurf:
|
|
49
|
+
[Executes] kse context export 01-00-user-login
|
|
50
|
+
[Reads] .kiro/specs/01-00-user-login/context-export.md
|
|
51
|
+
[Implements] Code according to design
|
|
52
|
+
[Updates] tasks.md with completed tasks
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Mode 2: Watch Mode + Windsurf
|
|
56
|
+
|
|
57
|
+
**How it works:**
|
|
58
|
+
1. Start kse watch mode
|
|
59
|
+
2. Edit Specs, context auto-updates
|
|
60
|
+
3. Windsurf always has latest context
|
|
61
|
+
4. Fully automated workflow
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Setup
|
|
66
|
+
|
|
67
|
+
### Prerequisites
|
|
68
|
+
|
|
69
|
+
- **Windsurf installed** ([Download](https://windsurf.ai/))
|
|
70
|
+
- **kse installed** globally (`npm install -g kiro-spec-engine`)
|
|
71
|
+
- **Project adopted** by kse (`kse adopt`)
|
|
72
|
+
|
|
73
|
+
### Step 1: Configure Windsurf System Prompt
|
|
74
|
+
|
|
75
|
+
Add to Windsurf's system prompt or project instructions:
|
|
76
|
+
|
|
77
|
+
```markdown
|
|
78
|
+
# kse Integration
|
|
79
|
+
|
|
80
|
+
This project uses kse (Kiro Spec Engine) for spec-driven development.
|
|
81
|
+
|
|
82
|
+
## Before Implementing Features
|
|
83
|
+
|
|
84
|
+
1. Check if a Spec exists: `kse status`
|
|
85
|
+
2. Export Spec context: `kse context export <spec-name>`
|
|
86
|
+
3. Read the exported context file
|
|
87
|
+
4. Follow the design document exactly
|
|
88
|
+
5. Update tasks.md when completing tasks
|
|
89
|
+
|
|
90
|
+
## kse Commands
|
|
91
|
+
|
|
92
|
+
- `kse status` - Show project status and available Specs
|
|
93
|
+
- `kse context export <spec-name>` - Export Spec context
|
|
94
|
+
- `kse task claim <spec-name> <task-id>` - Claim a task
|
|
95
|
+
- `kse prompt generate <spec-name> <task-id>` - Generate task prompt
|
|
96
|
+
|
|
97
|
+
## Workflow
|
|
98
|
+
|
|
99
|
+
When user asks to implement a feature:
|
|
100
|
+
1. Run `kse context export <spec-name>`
|
|
101
|
+
2. Read `.kiro/specs/<spec-name>/context-export.md`
|
|
102
|
+
3. Implement according to design
|
|
103
|
+
4. Update `.kiro/specs/<spec-name>/tasks.md` (change [ ] to [x])
|
|
104
|
+
|
|
105
|
+
## Example
|
|
106
|
+
|
|
107
|
+
User: "Implement user login"
|
|
108
|
+
You should:
|
|
109
|
+
1. `kse context export 01-00-user-login`
|
|
110
|
+
2. Read context file
|
|
111
|
+
3. Implement AuthController, AuthService, etc.
|
|
112
|
+
4. Update tasks.md: `- [x] 1.1 Create AuthController`
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Step 2: Enable Watch Mode (Optional)
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
kse watch init
|
|
119
|
+
kse watch install context-export
|
|
120
|
+
kse watch start
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Workflow
|
|
126
|
+
|
|
127
|
+
### Method 1: Fully Automated (Recommended) ⭐
|
|
128
|
+
|
|
129
|
+
**Step 1: Tell Windsurf what to build**
|
|
130
|
+
```
|
|
131
|
+
You: "I need to implement the user login feature. Use kse to get the Spec and implement it."
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Step 2: Windsurf executes automatically**
|
|
135
|
+
```
|
|
136
|
+
Windsurf:
|
|
137
|
+
[Executes] kse status
|
|
138
|
+
[Output] Found Spec: 01-00-user-login
|
|
139
|
+
|
|
140
|
+
[Executes] kse context export 01-00-user-login
|
|
141
|
+
[Output] Context exported to context-export.md
|
|
142
|
+
|
|
143
|
+
[Reads] .kiro/specs/01-00-user-login/context-export.md
|
|
144
|
+
|
|
145
|
+
[Analyzes] Requirements, Design, Tasks
|
|
146
|
+
|
|
147
|
+
[Implements] Task 1.1: Set up project dependencies
|
|
148
|
+
[Creates] package.json updates
|
|
149
|
+
|
|
150
|
+
[Updates] tasks.md: - [x] 1.1 Set up project dependencies
|
|
151
|
+
|
|
152
|
+
[Implements] Task 1.2: Create User model
|
|
153
|
+
[Creates] src/models/User.js
|
|
154
|
+
|
|
155
|
+
[Updates] tasks.md: - [x] 1.2 Create User model
|
|
156
|
+
|
|
157
|
+
[Continues through all tasks...]
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Step 3: Review and approve**
|
|
161
|
+
- Windsurf shows you what it's doing
|
|
162
|
+
- You can approve or modify each step
|
|
163
|
+
- Tasks are automatically tracked
|
|
164
|
+
|
|
165
|
+
### Method 2: Task-by-Task
|
|
166
|
+
|
|
167
|
+
**More control over implementation:**
|
|
168
|
+
```
|
|
169
|
+
You: "Use kse to get the user login Spec, then implement task 1.1 only"
|
|
170
|
+
|
|
171
|
+
Windsurf:
|
|
172
|
+
[Executes] kse context export 01-00-user-login
|
|
173
|
+
[Reads] context
|
|
174
|
+
[Implements] Only task 1.1
|
|
175
|
+
[Updates] tasks.md
|
|
176
|
+
|
|
177
|
+
You: "Good! Now implement task 1.2"
|
|
178
|
+
|
|
179
|
+
Windsurf:
|
|
180
|
+
[Implements] Task 1.2
|
|
181
|
+
[Updates] tasks.md
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Method 3: With Watch Mode
|
|
185
|
+
|
|
186
|
+
**Setup once, use forever:**
|
|
187
|
+
```bash
|
|
188
|
+
# Terminal 1: Start watch mode
|
|
189
|
+
kse watch start
|
|
190
|
+
|
|
191
|
+
# Terminal 2: Work with Windsurf
|
|
192
|
+
# Edit Specs → Context auto-updates → Windsurf always has latest
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Example Workflow
|
|
198
|
+
|
|
199
|
+
### Complete Feature Implementation
|
|
200
|
+
|
|
201
|
+
**Scenario:** Implement user login from scratch
|
|
202
|
+
|
|
203
|
+
**1. Create Spec**
|
|
204
|
+
```bash
|
|
205
|
+
kse create-spec 01-00-user-login
|
|
206
|
+
# Edit requirements.md, design.md, tasks.md
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**2. Tell Windsurf**
|
|
210
|
+
```
|
|
211
|
+
You: "I've created a Spec for user login at .kiro/specs/01-00-user-login/
|
|
212
|
+
|
|
213
|
+
Please:
|
|
214
|
+
1. Use kse to export the context
|
|
215
|
+
2. Read the requirements and design
|
|
216
|
+
3. Implement all tasks in order
|
|
217
|
+
4. Update tasks.md as you complete each task
|
|
218
|
+
5. Run tests after each major component"
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**3. Windsurf works autonomously**
|
|
222
|
+
```
|
|
223
|
+
Windsurf:
|
|
224
|
+
✓ Exported context
|
|
225
|
+
✓ Read Spec (requirements, design, tasks)
|
|
226
|
+
✓ Implemented task 1.1: Set up dependencies
|
|
227
|
+
✓ Implemented task 1.2: Create User model
|
|
228
|
+
✓ Implemented task 2.1: ValidationService
|
|
229
|
+
✓ Implemented task 2.2: AuthService
|
|
230
|
+
✓ Implemented task 2.3: UserRepository
|
|
231
|
+
✓ Implemented task 3.1: AuthController
|
|
232
|
+
✓ Implemented task 3.2: Rate limiting
|
|
233
|
+
✓ Implemented task 4.1: Tests
|
|
234
|
+
✓ All tests passing
|
|
235
|
+
✓ Updated tasks.md (all tasks marked complete)
|
|
236
|
+
|
|
237
|
+
Feature complete! All 15 tasks implemented and tested.
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Tips & Best Practices
|
|
243
|
+
|
|
244
|
+
### 1. Let Windsurf Execute kse Commands
|
|
245
|
+
|
|
246
|
+
**Good:**
|
|
247
|
+
```
|
|
248
|
+
"Use kse to get the Spec for user login and implement it"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Not as good:**
|
|
252
|
+
```
|
|
253
|
+
[You manually export context and paste it]
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### 2. Be Specific About Task Updates
|
|
257
|
+
|
|
258
|
+
**Include in your instructions:**
|
|
259
|
+
```
|
|
260
|
+
"After completing each task, update tasks.md by changing [ ] to [x]"
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### 3. Use Task Claiming
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
"Before implementing, claim task 1.1 using: kse task claim 01-00-user-login 1.1"
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### 4. Request Progress Updates
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
"After each task, show me what you completed and what's next"
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### 5. Combine with Watch Mode
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# Keep watch mode running
|
|
279
|
+
kse watch start
|
|
280
|
+
|
|
281
|
+
# Tell Windsurf
|
|
282
|
+
"The Spec context auto-updates. Just read the latest context-export.md file"
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Advanced Techniques
|
|
288
|
+
|
|
289
|
+
### 1. Automated Testing
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
"After implementing each component:
|
|
293
|
+
1. Run the tests
|
|
294
|
+
2. If tests fail, fix the implementation
|
|
295
|
+
3. Don't move to next task until tests pass"
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### 2. Incremental Commits
|
|
299
|
+
|
|
300
|
+
```
|
|
301
|
+
"After completing each task:
|
|
302
|
+
1. Update tasks.md
|
|
303
|
+
2. Run tests
|
|
304
|
+
3. Commit with message: 'Implement task X.X: [task name]'"
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### 3. Design Validation
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
"Before implementing:
|
|
311
|
+
1. Read the design document
|
|
312
|
+
2. Identify any potential issues
|
|
313
|
+
3. Suggest improvements
|
|
314
|
+
4. Wait for my approval before proceeding"
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### 4. Continuous Integration
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
"After implementing all tasks:
|
|
321
|
+
1. Run full test suite
|
|
322
|
+
2. Check code coverage
|
|
323
|
+
3. Run linter
|
|
324
|
+
4. Fix any issues
|
|
325
|
+
5. Generate test report"
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Troubleshooting
|
|
331
|
+
|
|
332
|
+
### Issue: Windsurf doesn't know about kse
|
|
333
|
+
|
|
334
|
+
**Solution:** Add kse instructions to system prompt (see Setup section)
|
|
335
|
+
|
|
336
|
+
### Issue: Windsurf doesn't update tasks.md
|
|
337
|
+
|
|
338
|
+
**Solution:** Be explicit:
|
|
339
|
+
```
|
|
340
|
+
"After completing task 1.1, edit .kiro/specs/01-00-user-login/tasks.md and change:
|
|
341
|
+
- [ ] 1.1 Task name
|
|
342
|
+
to:
|
|
343
|
+
- [x] 1.1 Task name"
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Issue: Windsurf deviates from design
|
|
347
|
+
|
|
348
|
+
**Solution:**
|
|
349
|
+
```
|
|
350
|
+
"Strictly follow the design document. Do not make architectural changes without asking first."
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## Related Documentation
|
|
356
|
+
|
|
357
|
+
- **[Quick Start Guide](../quick-start.md)** - Get started with kse
|
|
358
|
+
- **[Integration Modes](../integration-modes.md)** - Understanding integration modes
|
|
359
|
+
- **[Command Reference](../command-reference.md)** - All kse commands
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## Summary
|
|
364
|
+
|
|
365
|
+
**Windsurf + kse = Most Automated Workflow**
|
|
366
|
+
|
|
367
|
+
**Key advantages:**
|
|
368
|
+
- ✅ Windsurf executes kse commands automatically
|
|
369
|
+
- ✅ No manual copy-paste needed
|
|
370
|
+
- ✅ Automatic task tracking
|
|
371
|
+
- ✅ Full feature implementation with minimal intervention
|
|
372
|
+
|
|
373
|
+
**Best practices:**
|
|
374
|
+
- Configure system prompt with kse instructions
|
|
375
|
+
- Let Windsurf execute kse commands
|
|
376
|
+
- Use watch mode for auto-updates
|
|
377
|
+
- Request progress updates
|
|
378
|
+
- Review before approving changes
|
|
379
|
+
|
|
380
|
+
**Start using:** 🚀
|
|
381
|
+
```bash
|
|
382
|
+
kse adopt
|
|
383
|
+
kse create-spec 01-00-my-feature
|
|
384
|
+
# Tell Windsurf: "Use kse to implement 01-00-my-feature"
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
**Version**: 1.0.0
|
|
390
|
+
**Last Updated**: 2026-01-23
|