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,453 @@
|
|
|
1
|
+
# Spec Workflow Guide
|
|
2
|
+
|
|
3
|
+
> Understanding the Spec-driven development workflow in kse
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Version**: 1.0.0
|
|
8
|
+
**Last Updated**: 2026-01-23
|
|
9
|
+
**Audience**: Intermediate
|
|
10
|
+
**Estimated Time**: 10 minutes
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
A **Spec** (specification) is the fundamental unit of work in kse. It's a structured description of a feature or component that guides both human developers and AI assistants through the implementation process.
|
|
17
|
+
|
|
18
|
+
Every Spec follows a three-stage workflow: **Requirements → Design → Tasks**
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## The Spec Creation Workflow
|
|
23
|
+
|
|
24
|
+
```mermaid
|
|
25
|
+
graph LR
|
|
26
|
+
A[Idea/Feature Request] --> B[Requirements]
|
|
27
|
+
B --> C[Design]
|
|
28
|
+
C --> D[Tasks]
|
|
29
|
+
D --> E[Implementation]
|
|
30
|
+
E --> F[Completion]
|
|
31
|
+
F --> G[Archive/Document]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Stage Descriptions
|
|
35
|
+
|
|
36
|
+
1. **Idea/Feature Request** - The initial concept or need
|
|
37
|
+
2. **Requirements** - What you're building and why (user stories, acceptance criteria)
|
|
38
|
+
3. **Design** - How you'll build it (architecture, APIs, components)
|
|
39
|
+
4. **Tasks** - Step-by-step implementation plan
|
|
40
|
+
5. **Implementation** - Actual coding (often AI-assisted)
|
|
41
|
+
6. **Completion** - All tasks done, feature working
|
|
42
|
+
7. **Archive/Document** - Spec serves as documentation
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Stage 1: Requirements
|
|
47
|
+
|
|
48
|
+
**Purpose:** Define WHAT you're building and WHY
|
|
49
|
+
|
|
50
|
+
**File:** `requirements.md`
|
|
51
|
+
|
|
52
|
+
**Key Components:**
|
|
53
|
+
- **Overview** - Brief description of the feature
|
|
54
|
+
- **User Stories** - "As a... I want... So that..."
|
|
55
|
+
- **Functional Requirements** - Specific capabilities the system must have
|
|
56
|
+
- **Acceptance Criteria** - "WHEN... THEN..." statements
|
|
57
|
+
- **Non-Functional Requirements** - Performance, security, usability
|
|
58
|
+
|
|
59
|
+
**Example Structure:**
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
# Feature Name
|
|
63
|
+
|
|
64
|
+
## Overview
|
|
65
|
+
Brief description of what this feature does
|
|
66
|
+
|
|
67
|
+
## User Stories
|
|
68
|
+
- As a [user type], I want to [action], so that [benefit]
|
|
69
|
+
|
|
70
|
+
## Functional Requirements
|
|
71
|
+
### FR-1: Requirement Name
|
|
72
|
+
Description of what the system must do
|
|
73
|
+
|
|
74
|
+
## Acceptance Criteria
|
|
75
|
+
- WHEN [condition] THEN [expected result]
|
|
76
|
+
|
|
77
|
+
## Non-Functional Requirements
|
|
78
|
+
- Performance: Response time < 500ms
|
|
79
|
+
- Security: Data encrypted at rest
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Best Practices:**
|
|
83
|
+
- ✅ Write from user perspective
|
|
84
|
+
- ✅ Be specific and measurable
|
|
85
|
+
- ✅ Include edge cases
|
|
86
|
+
- ✅ Consider security and performance
|
|
87
|
+
- ❌ Don't include implementation details (that's for Design)
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Stage 2: Design
|
|
92
|
+
|
|
93
|
+
**Purpose:** Define HOW you'll build it
|
|
94
|
+
|
|
95
|
+
**File:** `design.md`
|
|
96
|
+
|
|
97
|
+
**Key Components:**
|
|
98
|
+
- **Architecture Overview** - High-level system structure
|
|
99
|
+
- **Component Design** - Individual components and their responsibilities
|
|
100
|
+
- **API Design** - Endpoints, request/response formats
|
|
101
|
+
- **Data Models** - Database schemas, data structures
|
|
102
|
+
- **Technology Stack** - Languages, frameworks, libraries
|
|
103
|
+
- **Requirements Traceability** - Map requirements to design components
|
|
104
|
+
|
|
105
|
+
**Example Structure:**
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
# Feature Name - Design
|
|
109
|
+
|
|
110
|
+
## Architecture
|
|
111
|
+
|
|
112
|
+
```mermaid
|
|
113
|
+
graph TD
|
|
114
|
+
A[Component A] --> B[Component B]
|
|
115
|
+
B --> C[Database]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## API Design
|
|
119
|
+
### POST /api/endpoint
|
|
120
|
+
Request: { ... }
|
|
121
|
+
Response: { ... }
|
|
122
|
+
|
|
123
|
+
## Component Design
|
|
124
|
+
### ComponentName
|
|
125
|
+
**Responsibility:** What it does
|
|
126
|
+
**Methods:**
|
|
127
|
+
- method1() - Description
|
|
128
|
+
- method2() - Description
|
|
129
|
+
|
|
130
|
+
## Data Models
|
|
131
|
+
```javascript
|
|
132
|
+
{
|
|
133
|
+
field1: type,
|
|
134
|
+
field2: type
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Technology Stack
|
|
139
|
+
- Backend: Node.js + Express
|
|
140
|
+
- Database: PostgreSQL
|
|
141
|
+
|
|
142
|
+
## Requirements Traceability
|
|
143
|
+
| Requirement | Design Component |
|
|
144
|
+
|-------------|------------------|
|
|
145
|
+
| FR-1 | ComponentA.method1() |
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Best Practices:**
|
|
149
|
+
- ✅ Use diagrams to visualize architecture
|
|
150
|
+
- ✅ Define clear component responsibilities
|
|
151
|
+
- ✅ Specify all APIs and data formats
|
|
152
|
+
- ✅ Link back to requirements
|
|
153
|
+
- ❌ Don't skip the traceability section
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Stage 3: Tasks
|
|
158
|
+
|
|
159
|
+
**Purpose:** Break down implementation into actionable steps
|
|
160
|
+
|
|
161
|
+
**File:** `tasks.md`
|
|
162
|
+
|
|
163
|
+
**Key Components:**
|
|
164
|
+
- **Task List** - Checkbox list of implementation steps
|
|
165
|
+
- **Task Hierarchy** - Organized by phase or component
|
|
166
|
+
- **Task IDs** - Numbered for easy reference (1.1, 1.2, 2.1, etc.)
|
|
167
|
+
- **Dependencies** - Implicit through ordering
|
|
168
|
+
|
|
169
|
+
**Example Structure:**
|
|
170
|
+
|
|
171
|
+
```markdown
|
|
172
|
+
# Feature Name - Tasks
|
|
173
|
+
|
|
174
|
+
## Phase 1: Setup
|
|
175
|
+
- [ ] 1.1 Set up project structure
|
|
176
|
+
- [ ] 1.2 Install dependencies
|
|
177
|
+
- [ ] 1.3 Configure environment
|
|
178
|
+
|
|
179
|
+
## Phase 2: Core Implementation
|
|
180
|
+
- [ ] 2.1 Implement ComponentA
|
|
181
|
+
- [ ] 2.1.1 Create class structure
|
|
182
|
+
- [ ] 2.1.2 Implement method1()
|
|
183
|
+
- [ ] 2.1.3 Write unit tests
|
|
184
|
+
- [ ] 2.2 Implement ComponentB
|
|
185
|
+
|
|
186
|
+
## Phase 3: Integration
|
|
187
|
+
- [ ] 3.1 Connect components
|
|
188
|
+
- [ ] 3.2 Integration testing
|
|
189
|
+
- [ ] 3.3 End-to-end testing
|
|
190
|
+
|
|
191
|
+
## Phase 4: Documentation
|
|
192
|
+
- [ ] 4.1 API documentation
|
|
193
|
+
- [ ] 4.2 User guide
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Best Practices:**
|
|
197
|
+
- ✅ Break large tasks into subtasks
|
|
198
|
+
- ✅ Order tasks logically (dependencies first)
|
|
199
|
+
- ✅ Include testing tasks
|
|
200
|
+
- ✅ Be specific enough for AI to understand
|
|
201
|
+
- ❌ Don't make tasks too granular (not every line of code)
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## The Complete Workflow in Action
|
|
206
|
+
|
|
207
|
+
### Example: User Login Feature
|
|
208
|
+
|
|
209
|
+
**1. Create the Spec:**
|
|
210
|
+
```bash
|
|
211
|
+
kse create-spec 01-00-user-login
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**2. Write Requirements** (`.kiro/specs/01-00-user-login/requirements.md`):
|
|
215
|
+
```markdown
|
|
216
|
+
# User Login
|
|
217
|
+
|
|
218
|
+
## User Stories
|
|
219
|
+
- As a user, I want to log in with email and password
|
|
220
|
+
|
|
221
|
+
## Acceptance Criteria
|
|
222
|
+
- WHEN user enters valid credentials THEN they are logged in
|
|
223
|
+
- WHEN user enters invalid credentials THEN they see an error
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**3. Write Design** (`.kiro/specs/01-00-user-login/design.md`):
|
|
227
|
+
```markdown
|
|
228
|
+
# User Login - Design
|
|
229
|
+
|
|
230
|
+
## API Design
|
|
231
|
+
POST /api/auth/login
|
|
232
|
+
Request: { email, password }
|
|
233
|
+
Response: { token } or { error }
|
|
234
|
+
|
|
235
|
+
## Components
|
|
236
|
+
- AuthController - handles login requests
|
|
237
|
+
- AuthService - validates credentials
|
|
238
|
+
- UserRepository - database access
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**4. Write Tasks** (`.kiro/specs/01-00-user-login/tasks.md`):
|
|
242
|
+
```markdown
|
|
243
|
+
- [ ] 1.1 Create AuthController
|
|
244
|
+
- [ ] 1.2 Create AuthService
|
|
245
|
+
- [ ] 1.3 Create UserRepository
|
|
246
|
+
- [ ] 1.4 Implement login endpoint
|
|
247
|
+
- [ ] 1.5 Write tests
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**5. Export Context:**
|
|
251
|
+
```bash
|
|
252
|
+
kse context export 01-00-user-login
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**6. Implement with AI:**
|
|
256
|
+
- Provide context to your AI tool
|
|
257
|
+
- AI implements tasks based on your Spec
|
|
258
|
+
- Update task checkboxes as you complete them
|
|
259
|
+
|
|
260
|
+
**7. Track Progress:**
|
|
261
|
+
```bash
|
|
262
|
+
kse status
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Workflow Variations
|
|
268
|
+
|
|
269
|
+
### Iterative Refinement
|
|
270
|
+
|
|
271
|
+
You don't have to complete all three stages before starting implementation:
|
|
272
|
+
|
|
273
|
+
```mermaid
|
|
274
|
+
graph TD
|
|
275
|
+
A[Write Basic Requirements] --> B[Write Basic Design]
|
|
276
|
+
B --> C[Write First Tasks]
|
|
277
|
+
C --> D[Implement First Tasks]
|
|
278
|
+
D --> E{Need More Detail?}
|
|
279
|
+
E -->|Yes| F[Refine Requirements/Design]
|
|
280
|
+
F --> C
|
|
281
|
+
E -->|No| G[Continue Implementation]
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**When to use:**
|
|
285
|
+
- Exploring new features
|
|
286
|
+
- Prototyping
|
|
287
|
+
- Learning new technologies
|
|
288
|
+
|
|
289
|
+
### Waterfall Approach
|
|
290
|
+
|
|
291
|
+
Complete each stage fully before moving to the next:
|
|
292
|
+
|
|
293
|
+
```mermaid
|
|
294
|
+
graph TD
|
|
295
|
+
A[Complete Requirements] --> B[Review Requirements]
|
|
296
|
+
B --> C[Complete Design]
|
|
297
|
+
C --> D[Review Design]
|
|
298
|
+
D --> E[Complete Tasks]
|
|
299
|
+
E --> F[Begin Implementation]
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**When to use:**
|
|
303
|
+
- Well-understood features
|
|
304
|
+
- Critical systems
|
|
305
|
+
- Team collaboration (clear handoffs)
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Integration with AI Tools
|
|
310
|
+
|
|
311
|
+
### Context Export Workflow
|
|
312
|
+
|
|
313
|
+
```mermaid
|
|
314
|
+
sequenceDiagram
|
|
315
|
+
participant Dev as Developer
|
|
316
|
+
participant kse as kse
|
|
317
|
+
participant AI as AI Tool
|
|
318
|
+
|
|
319
|
+
Dev->>kse: Create Spec (requirements, design, tasks)
|
|
320
|
+
Dev->>kse: kse context export spec-name
|
|
321
|
+
kse->>Dev: context-export.md
|
|
322
|
+
Dev->>AI: Provide context
|
|
323
|
+
AI->>Dev: Generate code
|
|
324
|
+
Dev->>kse: Update task status
|
|
325
|
+
Dev->>kse: kse status (check progress)
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### Automated Workflow (Windsurf/Cline)
|
|
329
|
+
|
|
330
|
+
```mermaid
|
|
331
|
+
sequenceDiagram
|
|
332
|
+
participant Dev as Developer
|
|
333
|
+
participant AI as AI Tool
|
|
334
|
+
participant kse as kse
|
|
335
|
+
|
|
336
|
+
Dev->>AI: "Implement user login feature"
|
|
337
|
+
AI->>kse: kse context export 01-00-user-login
|
|
338
|
+
kse->>AI: Return context
|
|
339
|
+
AI->>AI: Generate code
|
|
340
|
+
AI->>kse: kse task claim 01-00-user-login 1.1
|
|
341
|
+
AI->>Dev: Code generated, task claimed
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Best Practices
|
|
347
|
+
|
|
348
|
+
### Requirements Stage
|
|
349
|
+
1. **Start with user stories** - Understand the user's perspective
|
|
350
|
+
2. **Use EARS format** for acceptance criteria (WHEN... THEN...)
|
|
351
|
+
3. **Include non-functional requirements** - Don't forget performance, security
|
|
352
|
+
4. **Think about edge cases** - What could go wrong?
|
|
353
|
+
|
|
354
|
+
### Design Stage
|
|
355
|
+
1. **Visualize with diagrams** - A picture is worth a thousand words
|
|
356
|
+
2. **Define clear interfaces** - APIs, method signatures, data formats
|
|
357
|
+
3. **Maintain traceability** - Link every design decision to a requirement
|
|
358
|
+
4. **Choose appropriate technologies** - Document your tech stack
|
|
359
|
+
|
|
360
|
+
### Tasks Stage
|
|
361
|
+
1. **Break down logically** - Group related tasks into phases
|
|
362
|
+
2. **Order by dependencies** - What needs to be done first?
|
|
363
|
+
3. **Include testing** - Every feature needs tests
|
|
364
|
+
4. **Be AI-friendly** - Tasks should be clear enough for AI to implement
|
|
365
|
+
|
|
366
|
+
### Throughout
|
|
367
|
+
1. **Keep it updated** - Specs are living documents
|
|
368
|
+
2. **Use version control** - Commit Spec changes
|
|
369
|
+
3. **Review regularly** - Ensure Spec matches implementation
|
|
370
|
+
4. **Archive completed Specs** - They become documentation
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## Common Pitfalls
|
|
375
|
+
|
|
376
|
+
### ❌ Too Vague
|
|
377
|
+
**Bad:**
|
|
378
|
+
```markdown
|
|
379
|
+
- [ ] Make login work
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**Good:**
|
|
383
|
+
```markdown
|
|
384
|
+
- [ ] 1.1 Implement AuthController.login() method
|
|
385
|
+
- Accept email and password
|
|
386
|
+
- Validate inputs
|
|
387
|
+
- Return JWT token on success
|
|
388
|
+
- Return error message on failure
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### ❌ Too Detailed
|
|
392
|
+
**Bad:**
|
|
393
|
+
```markdown
|
|
394
|
+
- [ ] 1.1 Create variable named 'email'
|
|
395
|
+
- [ ] 1.2 Create variable named 'password'
|
|
396
|
+
- [ ] 1.3 Write if statement to check email
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**Good:**
|
|
400
|
+
```markdown
|
|
401
|
+
- [ ] 1.1 Implement input validation
|
|
402
|
+
- Validate email format
|
|
403
|
+
- Validate password length
|
|
404
|
+
- Return validation errors
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### ❌ Missing Traceability
|
|
408
|
+
**Bad:** Design with no connection to requirements
|
|
409
|
+
|
|
410
|
+
**Good:** Design with clear traceability table:
|
|
411
|
+
```markdown
|
|
412
|
+
| Requirement | Design Component |
|
|
413
|
+
|-------------|------------------|
|
|
414
|
+
| FR-1: User can log in | AuthController.login() |
|
|
415
|
+
| FR-2: Validate inputs | ValidationService |
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## Related Documentation
|
|
421
|
+
|
|
422
|
+
- **[Quick Start Guide](quick-start.md)** - Get started with your first Spec
|
|
423
|
+
- **[Integration Modes](integration-modes.md)** - How to use Specs with AI tools
|
|
424
|
+
- **[Command Reference](command-reference.md)** - All kse commands
|
|
425
|
+
- **[Examples](examples/)** - Complete example Specs
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
## Summary
|
|
430
|
+
|
|
431
|
+
The Spec workflow is:
|
|
432
|
+
1. **Requirements** - Define WHAT and WHY
|
|
433
|
+
2. **Design** - Define HOW
|
|
434
|
+
3. **Tasks** - Define STEPS
|
|
435
|
+
4. **Implementation** - Build it (with AI assistance)
|
|
436
|
+
5. **Completion** - Verify and document
|
|
437
|
+
|
|
438
|
+
**Key Benefits:**
|
|
439
|
+
- ✅ Clear structure for features
|
|
440
|
+
- ✅ Better AI assistance (AI understands your intent)
|
|
441
|
+
- ✅ Built-in documentation
|
|
442
|
+
- ✅ Progress tracking
|
|
443
|
+
- ✅ Team collaboration
|
|
444
|
+
|
|
445
|
+
**Start your next Spec:** 🚀
|
|
446
|
+
```bash
|
|
447
|
+
kse create-spec 02-00-your-feature
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
**Version**: 1.0.0
|
|
453
|
+
**Last Updated**: 2026-01-23
|
|
@@ -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
|