kiro-spec-engine 1.2.3 → 1.3.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 +74 -0
- package/README.md +172 -0
- package/bin/kiro-spec-engine.js +62 -0
- package/docs/agent-hooks-analysis.md +815 -0
- package/docs/cross-tool-guide.md +554 -0
- package/docs/manual-workflows-guide.md +417 -0
- package/docs/steering-strategy-guide.md +196 -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,417 @@
|
|
|
1
|
+
# Manual Workflows Guide
|
|
2
|
+
|
|
3
|
+
> Complete guide for manual workflows when automation is not available
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This guide provides step-by-step instructions for common workflows when using kiro-spec-engine without automation (watch mode or agent hooks). These workflows are designed to be efficient and easy to follow.
|
|
10
|
+
|
|
11
|
+
**When to use manual workflows:**
|
|
12
|
+
- When automation is not set up
|
|
13
|
+
- When working in environments without watch mode support
|
|
14
|
+
- When you prefer manual control over automation
|
|
15
|
+
- For one-off tasks or testing
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Table of Contents
|
|
20
|
+
|
|
21
|
+
1. [Task Sync Workflow](#task-sync-workflow)
|
|
22
|
+
2. [Context Export Workflow](#context-export-workflow)
|
|
23
|
+
3. [Prompt Generation Workflow](#prompt-generation-workflow)
|
|
24
|
+
4. [Workflow Checklists](#workflow-checklists)
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Task Sync Workflow
|
|
29
|
+
|
|
30
|
+
### Purpose
|
|
31
|
+
Keep your workspace synchronized with task progress across multiple users or tools.
|
|
32
|
+
|
|
33
|
+
### Time Estimate
|
|
34
|
+
- Initial sync: 2-3 minutes
|
|
35
|
+
- Subsequent syncs: 30-60 seconds
|
|
36
|
+
|
|
37
|
+
### Prerequisites
|
|
38
|
+
- Project adopted with kiro-spec-engine
|
|
39
|
+
- Active spec with tasks.md file
|
|
40
|
+
- Write access to .kiro/specs/ directory
|
|
41
|
+
|
|
42
|
+
### Step-by-Step Instructions
|
|
43
|
+
|
|
44
|
+
#### 1. Check Current Status
|
|
45
|
+
```bash
|
|
46
|
+
kse status
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**What to look for:**
|
|
50
|
+
- Current spec name
|
|
51
|
+
- Number of tasks (total, completed, in progress)
|
|
52
|
+
- Last sync timestamp
|
|
53
|
+
|
|
54
|
+
**Time:** ~5 seconds
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
#### 2. Review Task Changes
|
|
59
|
+
Open your spec's `tasks.md` file and review:
|
|
60
|
+
- Tasks you've completed (mark with `[x]`)
|
|
61
|
+
- Tasks you're working on (mark with `[-]`)
|
|
62
|
+
- Tasks you've queued (mark with `[~]`)
|
|
63
|
+
|
|
64
|
+
**Example:**
|
|
65
|
+
```markdown
|
|
66
|
+
- [x] 1.1 Completed task
|
|
67
|
+
- [-] 1.2 In progress task
|
|
68
|
+
- [~] 1.3 Queued task
|
|
69
|
+
- [ ] 1.4 Not started task
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Time:** ~30-60 seconds
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
#### 3. Sync Workspace
|
|
77
|
+
```bash
|
|
78
|
+
kse workspace sync
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**What this does:**
|
|
82
|
+
- Updates workspace metadata
|
|
83
|
+
- Synchronizes task status
|
|
84
|
+
- Detects conflicts
|
|
85
|
+
- Updates timestamps
|
|
86
|
+
|
|
87
|
+
**Time:** ~10-15 seconds
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
#### 4. Verify Sync
|
|
92
|
+
```bash
|
|
93
|
+
kse status
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Verify:**
|
|
97
|
+
- Task counts are updated
|
|
98
|
+
- Sync timestamp is current
|
|
99
|
+
- No conflicts reported
|
|
100
|
+
|
|
101
|
+
**Time:** ~5 seconds
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### Best Practices
|
|
106
|
+
|
|
107
|
+
1. **Sync Frequency**
|
|
108
|
+
- Before starting work: Always sync first
|
|
109
|
+
- After completing tasks: Sync immediately
|
|
110
|
+
- During long sessions: Sync every 30-60 minutes
|
|
111
|
+
|
|
112
|
+
2. **Conflict Resolution**
|
|
113
|
+
- If conflicts detected, review both versions
|
|
114
|
+
- Keep the most recent accurate state
|
|
115
|
+
- Document resolution in commit message
|
|
116
|
+
|
|
117
|
+
3. **Team Coordination**
|
|
118
|
+
- Communicate task claims in team chat
|
|
119
|
+
- Use task claiming feature: `kse task claim <spec> <task-id>`
|
|
120
|
+
- Check for claimed tasks before starting work
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Context Export Workflow
|
|
125
|
+
|
|
126
|
+
### Purpose
|
|
127
|
+
Export spec context for sharing with AI assistants or team members.
|
|
128
|
+
|
|
129
|
+
### Time Estimate
|
|
130
|
+
- Single spec export: 15-30 seconds
|
|
131
|
+
- With steering rules: 30-45 seconds
|
|
132
|
+
|
|
133
|
+
### Prerequisites
|
|
134
|
+
- Active spec with requirements, design, and tasks
|
|
135
|
+
- Optional: Steering rules configured
|
|
136
|
+
|
|
137
|
+
### Step-by-Step Instructions
|
|
138
|
+
|
|
139
|
+
#### 1. Identify Spec to Export
|
|
140
|
+
```bash
|
|
141
|
+
kse status
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Note the spec name you want to export.
|
|
145
|
+
|
|
146
|
+
**Time:** ~5 seconds
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
#### 2. Export Context
|
|
151
|
+
```bash
|
|
152
|
+
kse context export <spec-name>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Options:**
|
|
156
|
+
- `--include-steering`: Include steering rules
|
|
157
|
+
- `--steering-files <files>`: Specific steering files (comma-separated)
|
|
158
|
+
- `--output <path>`: Custom output path
|
|
159
|
+
|
|
160
|
+
**Example:**
|
|
161
|
+
```bash
|
|
162
|
+
kse context export my-feature --include-steering --steering-files CORE_PRINCIPLES.md,ENVIRONMENT.md
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Time:** ~10-20 seconds
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
#### 3. Locate Export File
|
|
170
|
+
The export is saved to:
|
|
171
|
+
```
|
|
172
|
+
.kiro/specs/<spec-name>/context-export.md
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Time:** ~5 seconds
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
#### 4. Use Exported Context
|
|
180
|
+
- Copy content to AI assistant
|
|
181
|
+
- Share with team members
|
|
182
|
+
- Use as documentation reference
|
|
183
|
+
- Include in project handoff
|
|
184
|
+
|
|
185
|
+
**Time:** Varies by use case
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### Best Practices
|
|
190
|
+
|
|
191
|
+
1. **When to Export**
|
|
192
|
+
- Before starting a new task
|
|
193
|
+
- When asking for AI assistance
|
|
194
|
+
- For project documentation
|
|
195
|
+
- During team handoffs
|
|
196
|
+
|
|
197
|
+
2. **What to Include**
|
|
198
|
+
- Always: requirements, design, tasks
|
|
199
|
+
- Usually: core steering rules
|
|
200
|
+
- Sometimes: environment-specific rules
|
|
201
|
+
- Rarely: all steering rules (too verbose)
|
|
202
|
+
|
|
203
|
+
3. **Export Management**
|
|
204
|
+
- Exports are regenerated each time
|
|
205
|
+
- Old exports are overwritten
|
|
206
|
+
- Consider versioning important exports
|
|
207
|
+
- Clean up old exports periodically
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Prompt Generation Workflow
|
|
212
|
+
|
|
213
|
+
### Purpose
|
|
214
|
+
Generate AI prompts for specific tasks with relevant context.
|
|
215
|
+
|
|
216
|
+
### Time Estimate
|
|
217
|
+
- Single task prompt: 20-30 seconds
|
|
218
|
+
- Batch generation: 1-2 minutes per 10 tasks
|
|
219
|
+
|
|
220
|
+
### Prerequisites
|
|
221
|
+
- Active spec with tasks
|
|
222
|
+
- Task IDs identified
|
|
223
|
+
- Requirements and design documents complete
|
|
224
|
+
|
|
225
|
+
### Step-by-Step Instructions
|
|
226
|
+
|
|
227
|
+
#### 1. Identify Task
|
|
228
|
+
Review tasks.md and note the task ID:
|
|
229
|
+
```bash
|
|
230
|
+
cat .kiro/specs/<spec-name>/tasks.md
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Example task ID:** `1.2` or `3.1.1`
|
|
234
|
+
|
|
235
|
+
**Time:** ~10-15 seconds
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
#### 2. Generate Prompt
|
|
240
|
+
```bash
|
|
241
|
+
kse prompt generate <spec-name> <task-id>
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**Options:**
|
|
245
|
+
- `--target <tool>`: Target tool (kiro, vscode, cursor, other)
|
|
246
|
+
- `--output <path>`: Custom output path
|
|
247
|
+
|
|
248
|
+
**Example:**
|
|
249
|
+
```bash
|
|
250
|
+
kse prompt generate my-feature 1.2 --target vscode
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Time:** ~10-15 seconds
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
#### 3. Locate Generated Prompt
|
|
258
|
+
The prompt is saved to:
|
|
259
|
+
```
|
|
260
|
+
.kiro/specs/<spec-name>/prompts/task-<task-id>.md
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**Time:** ~5 seconds
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
#### 4. Use Generated Prompt
|
|
268
|
+
- Copy to AI assistant
|
|
269
|
+
- Review for accuracy
|
|
270
|
+
- Customize if needed
|
|
271
|
+
- Execute task based on prompt
|
|
272
|
+
|
|
273
|
+
**Time:** Varies by task complexity
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
### Batch Operations
|
|
278
|
+
|
|
279
|
+
For multiple tasks:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
# Generate prompts for all incomplete tasks
|
|
283
|
+
for task in 1.1 1.2 1.3; do
|
|
284
|
+
kse prompt generate my-feature $task
|
|
285
|
+
done
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**Time:** ~20-30 seconds per task
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### Best Practices
|
|
293
|
+
|
|
294
|
+
1. **Prompt Quality**
|
|
295
|
+
- Review generated prompts before use
|
|
296
|
+
- Customize for specific context
|
|
297
|
+
- Add tool-specific instructions
|
|
298
|
+
- Include relevant examples
|
|
299
|
+
|
|
300
|
+
2. **Prompt Organization**
|
|
301
|
+
- Keep prompts in spec directory
|
|
302
|
+
- Use consistent naming
|
|
303
|
+
- Version control prompts
|
|
304
|
+
- Clean up after task completion
|
|
305
|
+
|
|
306
|
+
3. **Optimization Tips**
|
|
307
|
+
- Generate prompts in batches
|
|
308
|
+
- Reuse prompts for similar tasks
|
|
309
|
+
- Template common patterns
|
|
310
|
+
- Document customizations
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Workflow Checklists
|
|
315
|
+
|
|
316
|
+
### Daily Workflow Checklist
|
|
317
|
+
|
|
318
|
+
**Morning (Start of Work)**
|
|
319
|
+
- [ ] Sync workspace: `kse workspace sync`
|
|
320
|
+
- [ ] Check status: `kse status`
|
|
321
|
+
- [ ] Review task list
|
|
322
|
+
- [ ] Claim tasks you'll work on
|
|
323
|
+
- [ ] Export context for active tasks
|
|
324
|
+
|
|
325
|
+
**During Work**
|
|
326
|
+
- [ ] Update task status as you progress
|
|
327
|
+
- [ ] Sync every 30-60 minutes
|
|
328
|
+
- [ ] Export context when asking for help
|
|
329
|
+
- [ ] Generate prompts for new tasks
|
|
330
|
+
|
|
331
|
+
**End of Day**
|
|
332
|
+
- [ ] Mark completed tasks
|
|
333
|
+
- [ ] Update in-progress tasks
|
|
334
|
+
- [ ] Final sync: `kse workspace sync`
|
|
335
|
+
- [ ] Commit changes to version control
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
### Task Completion Checklist
|
|
340
|
+
|
|
341
|
+
- [ ] Review task requirements
|
|
342
|
+
- [ ] Generate task prompt
|
|
343
|
+
- [ ] Export context if needed
|
|
344
|
+
- [ ] Complete implementation
|
|
345
|
+
- [ ] Run tests
|
|
346
|
+
- [ ] Update task status to completed
|
|
347
|
+
- [ ] Sync workspace
|
|
348
|
+
- [ ] Commit changes
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
### Spec Creation Checklist
|
|
353
|
+
|
|
354
|
+
- [ ] Create spec: `kse create-spec <name>`
|
|
355
|
+
- [ ] Write requirements.md
|
|
356
|
+
- [ ] Write design.md
|
|
357
|
+
- [ ] Generate tasks.md
|
|
358
|
+
- [ ] Export initial context
|
|
359
|
+
- [ ] Generate prompts for first tasks
|
|
360
|
+
- [ ] Sync workspace
|
|
361
|
+
- [ ] Begin implementation
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## Time Estimates Summary
|
|
366
|
+
|
|
367
|
+
| Workflow | Time Estimate |
|
|
368
|
+
|----------|---------------|
|
|
369
|
+
| Task Sync | 30-60 seconds |
|
|
370
|
+
| Context Export | 15-45 seconds |
|
|
371
|
+
| Prompt Generation | 20-30 seconds |
|
|
372
|
+
| Daily Sync Routine | 2-3 minutes |
|
|
373
|
+
| Full Spec Setup | 10-15 minutes |
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Troubleshooting
|
|
378
|
+
|
|
379
|
+
### Common Issues
|
|
380
|
+
|
|
381
|
+
**Issue: Sync conflicts**
|
|
382
|
+
- **Solution:** Review both versions, keep most recent
|
|
383
|
+
- **Prevention:** Sync more frequently
|
|
384
|
+
|
|
385
|
+
**Issue: Export fails**
|
|
386
|
+
- **Solution:** Check spec exists, files are readable
|
|
387
|
+
- **Prevention:** Verify spec structure before export
|
|
388
|
+
|
|
389
|
+
**Issue: Prompt generation incomplete**
|
|
390
|
+
- **Solution:** Ensure requirements and design are complete
|
|
391
|
+
- **Prevention:** Complete docs before generating prompts
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## Next Steps
|
|
396
|
+
|
|
397
|
+
1. **Set Up Automation:** Consider using watch mode for automatic workflows
|
|
398
|
+
```bash
|
|
399
|
+
kse watch init
|
|
400
|
+
kse watch install auto-sync
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
2. **Learn More:**
|
|
404
|
+
- [Watch Mode Guide](./watch-mode-guide.md)
|
|
405
|
+
- [Cross-Tool Guide](./cross-tool-guide.md)
|
|
406
|
+
- [Architecture](./architecture.md)
|
|
407
|
+
|
|
408
|
+
3. **Get Help:**
|
|
409
|
+
- Run `kse --help` for command reference
|
|
410
|
+
- Check [GitHub Issues](https://github.com/heguangyong/kiro-spec-engine/issues)
|
|
411
|
+
- Review [Contributing Guide](../CONTRIBUTING.md)
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
**Version:** 1.0
|
|
416
|
+
**Last Updated:** 2026-01-23
|
|
417
|
+
**Spec:** 05-00-agent-hooks-and-automation
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# Steering Strategy Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
When adopting kiro-spec-engine (kse) into a project that already has steering files in `.kiro/steering/`, you must choose a steering strategy. This is because Kiro IDE loads all files in the steering directory, and having both kse steering rules and your project's custom steering rules can cause conflicts.
|
|
6
|
+
|
|
7
|
+
## Why Steering Exclusivity?
|
|
8
|
+
|
|
9
|
+
Kiro IDE automatically loads all Markdown files in `.kiro/steering/` as AI behavior rules. If you have both kse steering files and your project's custom steering files, the AI will try to follow both sets of rules, which can lead to:
|
|
10
|
+
|
|
11
|
+
- Conflicting instructions
|
|
12
|
+
- Unpredictable AI behavior
|
|
13
|
+
- Confusion about which rules take precedence
|
|
14
|
+
|
|
15
|
+
Therefore, you must choose **one** set of steering rules to use.
|
|
16
|
+
|
|
17
|
+
## Steering Strategies
|
|
18
|
+
|
|
19
|
+
### Strategy 1: Use kse Steering (Recommended for New Users)
|
|
20
|
+
|
|
21
|
+
**When to choose:**
|
|
22
|
+
- You're new to kse and want to use the recommended steering rules
|
|
23
|
+
- You don't have critical custom steering rules
|
|
24
|
+
- You want the full kse experience with optimized AI behavior
|
|
25
|
+
|
|
26
|
+
**What happens:**
|
|
27
|
+
1. Your existing steering files are backed up to `.kiro/backups/steering-{timestamp}/`
|
|
28
|
+
2. kse steering template files are installed to `.kiro/steering/`
|
|
29
|
+
3. The backup ID is saved in `.kiro/adoption-config.json`
|
|
30
|
+
4. You can rollback if needed
|
|
31
|
+
|
|
32
|
+
**Files installed:**
|
|
33
|
+
- `CORE_PRINCIPLES.md` - Core development principles and Spec workflow
|
|
34
|
+
- `ENVIRONMENT.md` - Project environment configuration
|
|
35
|
+
- `CURRENT_CONTEXT.md` - Current Spec context (updated per Spec)
|
|
36
|
+
- `RULES_GUIDE.md` - Index of steering rules
|
|
37
|
+
|
|
38
|
+
### Strategy 2: Use Project Steering (Keep Existing)
|
|
39
|
+
|
|
40
|
+
**When to choose:**
|
|
41
|
+
- You have custom steering rules that are critical to your project
|
|
42
|
+
- You want to integrate kse without changing your AI behavior rules
|
|
43
|
+
- You're experienced with steering files and want full control
|
|
44
|
+
|
|
45
|
+
**What happens:**
|
|
46
|
+
1. Your existing steering files are preserved
|
|
47
|
+
2. kse steering files are **not** installed
|
|
48
|
+
3. The choice is documented in `.kiro/adoption-config.json`
|
|
49
|
+
4. You can manually integrate kse steering concepts if desired
|
|
50
|
+
|
|
51
|
+
**Trade-offs:**
|
|
52
|
+
- You won't get kse's optimized AI behavior out of the box
|
|
53
|
+
- You'll need to manually add kse-specific steering rules if needed
|
|
54
|
+
- Spec workflow may not work as smoothly without kse steering
|
|
55
|
+
|
|
56
|
+
## Adoption Flow
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
kse adopt
|
|
60
|
+
↓
|
|
61
|
+
Detect existing steering files
|
|
62
|
+
↓
|
|
63
|
+
├─ No steering files → Install kse steering (default)
|
|
64
|
+
│
|
|
65
|
+
└─ Steering files found → Prompt for strategy
|
|
66
|
+
↓
|
|
67
|
+
├─ use-kse → Backup existing → Install kse steering
|
|
68
|
+
│
|
|
69
|
+
└─ use-project → Keep existing → Skip kse steering
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Rollback
|
|
73
|
+
|
|
74
|
+
If you chose "use-kse" and want to restore your original steering files:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# List available backups
|
|
78
|
+
kse rollback --list
|
|
79
|
+
|
|
80
|
+
# Restore from backup
|
|
81
|
+
kse rollback {backup-id}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Or manually restore from `.kiro/backups/steering-{timestamp}/`.
|
|
85
|
+
|
|
86
|
+
## Manual Integration
|
|
87
|
+
|
|
88
|
+
If you chose "use-project" but want to incorporate kse steering concepts:
|
|
89
|
+
|
|
90
|
+
1. Review kse steering templates in `template/.kiro/steering/`
|
|
91
|
+
2. Identify useful concepts (Spec workflow, Ultrawork principles, etc.)
|
|
92
|
+
3. Manually merge relevant sections into your steering files
|
|
93
|
+
4. Test with a sample Spec to ensure compatibility
|
|
94
|
+
|
|
95
|
+
## Configuration File
|
|
96
|
+
|
|
97
|
+
Your steering strategy choice is saved in `.kiro/adoption-config.json`:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"version": "1.0.0",
|
|
102
|
+
"adoptedAt": "2026-01-23T10:00:00.000Z",
|
|
103
|
+
"steeringStrategy": "use-kse",
|
|
104
|
+
"steeringBackupId": "steering-2026-01-23T10-00-00-000Z",
|
|
105
|
+
"multiUserMode": false,
|
|
106
|
+
"lastUpdated": "2026-01-23T10:00:00.000Z"
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Best Practices
|
|
111
|
+
|
|
112
|
+
### For New kse Users
|
|
113
|
+
|
|
114
|
+
1. **Choose "use-kse"** to get the full experience
|
|
115
|
+
2. Review the installed steering files to understand kse workflow
|
|
116
|
+
3. Customize `ENVIRONMENT.md` for your project specifics
|
|
117
|
+
4. Update `CURRENT_CONTEXT.md` as you work on different Specs
|
|
118
|
+
|
|
119
|
+
### For Experienced Users
|
|
120
|
+
|
|
121
|
+
1. **Choose "use-project"** if you have mature steering rules
|
|
122
|
+
2. Review kse steering templates for useful patterns
|
|
123
|
+
3. Consider creating a hybrid approach:
|
|
124
|
+
- Keep your core steering rules
|
|
125
|
+
- Add kse-specific rules in separate files
|
|
126
|
+
- Use file naming to control load order (e.g., `00-core.md`, `10-kse.md`)
|
|
127
|
+
|
|
128
|
+
### For Teams
|
|
129
|
+
|
|
130
|
+
1. **Discuss strategy** with your team before adoption
|
|
131
|
+
2. **Document the choice** in your project README
|
|
132
|
+
3. **Version control** your steering files (if using custom rules)
|
|
133
|
+
4. **Share backups** if team members need to rollback
|
|
134
|
+
|
|
135
|
+
## Troubleshooting
|
|
136
|
+
|
|
137
|
+
### Problem: AI behavior is inconsistent after adoption
|
|
138
|
+
|
|
139
|
+
**Solution:**
|
|
140
|
+
- Check which steering strategy you chose: `cat .kiro/adoption-config.json`
|
|
141
|
+
- If "use-kse", verify kse steering files are present
|
|
142
|
+
- If "use-project", ensure your steering files are compatible with kse
|
|
143
|
+
|
|
144
|
+
### Problem: Want to switch strategies after adoption
|
|
145
|
+
|
|
146
|
+
**Solution:**
|
|
147
|
+
1. If currently "use-kse":
|
|
148
|
+
```bash
|
|
149
|
+
kse rollback {steering-backup-id}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
2. If currently "use-project":
|
|
153
|
+
- Manually backup your steering files
|
|
154
|
+
- Copy kse templates from `template/.kiro/steering/`
|
|
155
|
+
- Update `.kiro/adoption-config.json`
|
|
156
|
+
|
|
157
|
+
### Problem: Lost steering backup
|
|
158
|
+
|
|
159
|
+
**Solution:**
|
|
160
|
+
- Check `.kiro/backups/` for steering backups
|
|
161
|
+
- Backups are named `steering-{timestamp}`
|
|
162
|
+
- If no backup exists, you'll need to recreate your steering files
|
|
163
|
+
|
|
164
|
+
## FAQ
|
|
165
|
+
|
|
166
|
+
**Q: Can I use both kse and project steering files?**
|
|
167
|
+
|
|
168
|
+
A: No, due to Kiro IDE's behavior. You must choose one set of rules.
|
|
169
|
+
|
|
170
|
+
**Q: Will my Specs work without kse steering?**
|
|
171
|
+
|
|
172
|
+
A: Yes, but the AI may not follow kse workflow conventions as closely.
|
|
173
|
+
|
|
174
|
+
**Q: Can I modify kse steering files after installation?**
|
|
175
|
+
|
|
176
|
+
A: Yes! kse steering files are templates. Customize them for your project.
|
|
177
|
+
|
|
178
|
+
**Q: What if I don't have any steering files?**
|
|
179
|
+
|
|
180
|
+
A: kse will automatically install its steering files (no choice needed).
|
|
181
|
+
|
|
182
|
+
**Q: Can I switch strategies later?**
|
|
183
|
+
|
|
184
|
+
A: Yes, but you'll need to manually manage the steering files and update the config.
|
|
185
|
+
|
|
186
|
+
## Related Documentation
|
|
187
|
+
|
|
188
|
+
- [Adoption Guide](./adoption-guide.md) - Complete adoption workflow
|
|
189
|
+
- [Spec Workflow Guide](../.kiro/specs/SPEC_WORKFLOW_GUIDE.md) - How to use Specs
|
|
190
|
+
- [Steering Files](../.kiro/steering/) - kse steering templates
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
**Version**: 1.0.0
|
|
195
|
+
**Last Updated**: 2026-01-23
|
|
196
|
+
**Spec**: 03-00-multi-user-and-cross-tool-support
|
|
@@ -11,6 +11,7 @@ const {
|
|
|
11
11
|
listFiles,
|
|
12
12
|
readJSON
|
|
13
13
|
} = require('../utils/fs-utils');
|
|
14
|
+
const SteeringManager = require('../steering/steering-manager');
|
|
14
15
|
|
|
15
16
|
class DetectionEngine {
|
|
16
17
|
constructor() {
|
|
@@ -19,6 +20,7 @@ class DetectionEngine {
|
|
|
19
20
|
this.specsDir = 'specs';
|
|
20
21
|
this.steeringDir = 'steering';
|
|
21
22
|
this.toolsDir = 'tools';
|
|
23
|
+
this.steeringManager = new SteeringManager();
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
/**
|
|
@@ -37,6 +39,7 @@ class DetectionEngine {
|
|
|
37
39
|
let hasSteering = false;
|
|
38
40
|
let hasTools = false;
|
|
39
41
|
let existingVersion = null;
|
|
42
|
+
let steeringDetection = null;
|
|
40
43
|
|
|
41
44
|
if (hasKiroDir) {
|
|
42
45
|
// Check for version.json
|
|
@@ -57,9 +60,9 @@ class DetectionEngine {
|
|
|
57
60
|
const specsPath = path.join(kiroPath, this.specsDir);
|
|
58
61
|
hasSpecs = await pathExists(specsPath);
|
|
59
62
|
|
|
60
|
-
// Check for steering/
|
|
61
|
-
|
|
62
|
-
hasSteering =
|
|
63
|
+
// Check for steering/ using SteeringManager
|
|
64
|
+
steeringDetection = await this.steeringManager.detectSteering(projectPath);
|
|
65
|
+
hasSteering = steeringDetection.hasExistingSteering;
|
|
63
66
|
|
|
64
67
|
// Check for tools/
|
|
65
68
|
const toolsPath = path.join(kiroPath, this.toolsDir);
|
|
@@ -80,7 +83,8 @@ class DetectionEngine {
|
|
|
80
83
|
hasTools,
|
|
81
84
|
projectType,
|
|
82
85
|
existingVersion,
|
|
83
|
-
conflicts
|
|
86
|
+
conflicts,
|
|
87
|
+
steeringDetection // Add steering detection details
|
|
84
88
|
};
|
|
85
89
|
} catch (error) {
|
|
86
90
|
throw new Error(`Failed to analyze project: ${error.message}`);
|
|
@@ -225,6 +229,12 @@ class DetectionEngine {
|
|
|
225
229
|
}
|
|
226
230
|
lines.push(` specs/: ${result.hasSpecs ? 'Yes' : 'No'}`);
|
|
227
231
|
lines.push(` steering/: ${result.hasSteering ? 'Yes' : 'No'}`);
|
|
232
|
+
|
|
233
|
+
// Show steering details if available
|
|
234
|
+
if (result.steeringDetection && result.steeringDetection.hasExistingSteering) {
|
|
235
|
+
lines.push(` Files: ${result.steeringDetection.count} file(s)`);
|
|
236
|
+
}
|
|
237
|
+
|
|
228
238
|
lines.push(` tools/: ${result.hasTools ? 'Yes' : 'No'}`);
|
|
229
239
|
|
|
230
240
|
if (result.conflicts.length > 0) {
|