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,711 @@
|
|
|
1
|
+
# Quick Start Guide
|
|
2
|
+
|
|
3
|
+
> Get started with kse in 5 minutes - from installation to your first AI-assisted feature implementation
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Version**: 1.0.0
|
|
8
|
+
**Last Updated**: 2026-01-23
|
|
9
|
+
**Estimated Time**: 5 minutes
|
|
10
|
+
**Audience**: Beginners
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## What You'll Learn
|
|
15
|
+
|
|
16
|
+
By the end of this guide, you will:
|
|
17
|
+
- ✅ Install kse and set up your first project
|
|
18
|
+
- ✅ Create a complete Spec (Requirements → Design → Tasks)
|
|
19
|
+
- ✅ Export context for your AI tool
|
|
20
|
+
- ✅ Use AI to implement features based on your Spec
|
|
21
|
+
- ✅ Track task progress
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
Before starting, ensure you have:
|
|
28
|
+
- **Node.js** 14 or higher ([Download](https://nodejs.org/))
|
|
29
|
+
- **npm** 6 or higher (comes with Node.js)
|
|
30
|
+
- Basic command-line knowledge
|
|
31
|
+
- An AI coding tool (Claude, Cursor, Windsurf, Copilot, etc.)
|
|
32
|
+
|
|
33
|
+
Check your versions:
|
|
34
|
+
```bash
|
|
35
|
+
node --version # Should show v14.0.0 or higher
|
|
36
|
+
npm --version # Should show 6.0.0 or higher
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Step 1: Install kse (30 seconds)
|
|
42
|
+
|
|
43
|
+
Install kse globally using npm:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm install -g kiro-spec-engine
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Expected output:**
|
|
50
|
+
```
|
|
51
|
+
added 50 packages in 5s
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Verify installation:**
|
|
55
|
+
```bash
|
|
56
|
+
kse --version
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Expected output:**
|
|
60
|
+
```
|
|
61
|
+
1.3.0
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Troubleshooting:**
|
|
65
|
+
- **"kse: command not found"** → Restart your terminal or check your PATH
|
|
66
|
+
- **Permission errors on macOS/Linux** → Use `sudo npm install -g kiro-spec-engine`
|
|
67
|
+
- **Windows permission errors** → Run terminal as Administrator
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Step 2: Adopt kse in Your Project (1 minute)
|
|
72
|
+
|
|
73
|
+
Navigate to your project directory (or create a new one):
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# For existing project
|
|
77
|
+
cd your-project
|
|
78
|
+
|
|
79
|
+
# Or create a new project
|
|
80
|
+
mkdir my-awesome-app
|
|
81
|
+
cd my-awesome-app
|
|
82
|
+
git init # kse works best with git projects
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Adopt kse:**
|
|
86
|
+
```bash
|
|
87
|
+
kse adopt
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Expected output:**
|
|
91
|
+
```
|
|
92
|
+
✓ Detected project type: Node.js
|
|
93
|
+
✓ Created .kiro/ directory
|
|
94
|
+
✓ Created specs/ directory
|
|
95
|
+
✓ Created steering/ directory
|
|
96
|
+
✓ Generated CORE_PRINCIPLES.md
|
|
97
|
+
✓ Generated ENVIRONMENT.md
|
|
98
|
+
✓ Generated CURRENT_CONTEXT.md
|
|
99
|
+
|
|
100
|
+
✅ Project successfully adopted kse!
|
|
101
|
+
|
|
102
|
+
Next steps:
|
|
103
|
+
1. Create your first Spec: kse create-spec 01-00-my-feature
|
|
104
|
+
2. Read the guide: .kiro/README.md
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**What was created:**
|
|
108
|
+
```
|
|
109
|
+
your-project/
|
|
110
|
+
├── .kiro/
|
|
111
|
+
│ ├── specs/ # Your Specs will live here
|
|
112
|
+
│ ├── steering/ # AI behavior rules
|
|
113
|
+
│ │ ├── CORE_PRINCIPLES.md
|
|
114
|
+
│ │ ├── ENVIRONMENT.md
|
|
115
|
+
│ │ └── CURRENT_CONTEXT.md
|
|
116
|
+
│ └── README.md # Kiro system documentation
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Verification:**
|
|
120
|
+
```bash
|
|
121
|
+
kse status
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Expected output:**
|
|
125
|
+
```
|
|
126
|
+
Project: my-awesome-app
|
|
127
|
+
Specs: 0
|
|
128
|
+
Status: Ready
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Step 3: Create Your First Spec (2 minutes)
|
|
134
|
+
|
|
135
|
+
Let's create a Spec for a user login feature:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
kse create-spec 01-00-user-login
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Expected output:**
|
|
142
|
+
```
|
|
143
|
+
✓ Created spec: 01-00-user-login
|
|
144
|
+
✓ Created requirements.md
|
|
145
|
+
✓ Created design.md
|
|
146
|
+
✓ Created tasks.md
|
|
147
|
+
|
|
148
|
+
📝 Next steps:
|
|
149
|
+
1. Edit requirements.md to define what you're building
|
|
150
|
+
2. Edit design.md to define how you'll build it
|
|
151
|
+
3. Edit tasks.md to break down implementation steps
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### 3.1 Write Requirements
|
|
155
|
+
|
|
156
|
+
Open `.kiro/specs/01-00-user-login/requirements.md` and write:
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
# User Login Feature
|
|
160
|
+
|
|
161
|
+
## Overview
|
|
162
|
+
Enable users to log in to the application using email and password.
|
|
163
|
+
|
|
164
|
+
## User Stories
|
|
165
|
+
|
|
166
|
+
### US-1: User Login
|
|
167
|
+
**As a** user
|
|
168
|
+
**I want to** log in with my email and password
|
|
169
|
+
**So that** I can access my account
|
|
170
|
+
|
|
171
|
+
### US-2: Login Validation
|
|
172
|
+
**As a** user
|
|
173
|
+
**I want to** see clear error messages when login fails
|
|
174
|
+
**So that** I know what went wrong
|
|
175
|
+
|
|
176
|
+
## Functional Requirements
|
|
177
|
+
|
|
178
|
+
### FR-1: Login Form
|
|
179
|
+
The system shall provide a login form with:
|
|
180
|
+
- Email input field
|
|
181
|
+
- Password input field
|
|
182
|
+
- Submit button
|
|
183
|
+
|
|
184
|
+
### FR-2: Credential Validation
|
|
185
|
+
**WHEN** user submits valid credentials
|
|
186
|
+
**THEN** system authenticates user and redirects to dashboard
|
|
187
|
+
|
|
188
|
+
**WHEN** user submits invalid credentials
|
|
189
|
+
**THEN** system displays error message "Invalid email or password"
|
|
190
|
+
|
|
191
|
+
### FR-3: Input Validation
|
|
192
|
+
**WHEN** user submits empty email
|
|
193
|
+
**THEN** system displays error "Email is required"
|
|
194
|
+
|
|
195
|
+
**WHEN** user submits invalid email format
|
|
196
|
+
**THEN** system displays error "Please enter a valid email"
|
|
197
|
+
|
|
198
|
+
**WHEN** user submits password shorter than 6 characters
|
|
199
|
+
**THEN** system displays error "Password must be at least 6 characters"
|
|
200
|
+
|
|
201
|
+
## Non-Functional Requirements
|
|
202
|
+
|
|
203
|
+
### NFR-1: Security
|
|
204
|
+
- Passwords must be hashed before storage
|
|
205
|
+
- Use bcrypt with salt rounds >= 10
|
|
206
|
+
- Implement rate limiting (max 5 attempts per minute)
|
|
207
|
+
|
|
208
|
+
### NFR-2: Performance
|
|
209
|
+
- Login response time < 500ms
|
|
210
|
+
- Support 100 concurrent login requests
|
|
211
|
+
|
|
212
|
+
### NFR-3: Usability
|
|
213
|
+
- Clear error messages
|
|
214
|
+
- Accessible form (WCAG 2.1 Level AA)
|
|
215
|
+
|
|
216
|
+
## Acceptance Criteria
|
|
217
|
+
|
|
218
|
+
- [ ] User can log in with valid email and password
|
|
219
|
+
- [ ] User sees error message with invalid credentials
|
|
220
|
+
- [ ] Email validation works correctly
|
|
221
|
+
- [ ] Password validation works correctly
|
|
222
|
+
- [ ] Passwords are hashed in database
|
|
223
|
+
- [ ] Rate limiting prevents brute force attacks
|
|
224
|
+
- [ ] Login response time is under 500ms
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### 3.2 Write Design
|
|
228
|
+
|
|
229
|
+
Open `.kiro/specs/01-00-user-login/design.md` and write:
|
|
230
|
+
|
|
231
|
+
```markdown
|
|
232
|
+
# User Login - Design Document
|
|
233
|
+
|
|
234
|
+
## Overview
|
|
235
|
+
This design implements a secure user login system with email/password authentication, input validation, and rate limiting.
|
|
236
|
+
|
|
237
|
+
## Architecture
|
|
238
|
+
|
|
239
|
+
### System Components
|
|
240
|
+
|
|
241
|
+
```mermaid
|
|
242
|
+
graph TD
|
|
243
|
+
A[Login Form] --> B[AuthController]
|
|
244
|
+
B --> C[ValidationService]
|
|
245
|
+
B --> D[AuthService]
|
|
246
|
+
D --> E[UserRepository]
|
|
247
|
+
D --> F[TokenService]
|
|
248
|
+
E --> G[Database]
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## API Design
|
|
252
|
+
|
|
253
|
+
### POST /api/auth/login
|
|
254
|
+
|
|
255
|
+
**Request:**
|
|
256
|
+
```json
|
|
257
|
+
{
|
|
258
|
+
"email": "user@example.com",
|
|
259
|
+
"password": "secret123"
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**Success Response (200):**
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"success": true,
|
|
267
|
+
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
|
|
268
|
+
"user": {
|
|
269
|
+
"id": "123",
|
|
270
|
+
"email": "user@example.com",
|
|
271
|
+
"name": "John Doe"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**Error Response (401):**
|
|
277
|
+
```json
|
|
278
|
+
{
|
|
279
|
+
"success": false,
|
|
280
|
+
"error": "Invalid email or password"
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**Error Response (429):**
|
|
285
|
+
```json
|
|
286
|
+
{
|
|
287
|
+
"success": false,
|
|
288
|
+
"error": "Too many login attempts. Please try again later."
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Component Design
|
|
293
|
+
|
|
294
|
+
### AuthController
|
|
295
|
+
**Responsibility:** Handle HTTP requests for authentication
|
|
296
|
+
|
|
297
|
+
**Methods:**
|
|
298
|
+
- `login(req, res)` - Process login request
|
|
299
|
+
- `validateRequest(req)` - Validate request format
|
|
300
|
+
|
|
301
|
+
### ValidationService
|
|
302
|
+
**Responsibility:** Validate user input
|
|
303
|
+
|
|
304
|
+
**Methods:**
|
|
305
|
+
- `validateEmail(email)` - Check email format
|
|
306
|
+
- `validatePassword(password)` - Check password requirements
|
|
307
|
+
- Returns: `{ valid: boolean, errors: string[] }`
|
|
308
|
+
|
|
309
|
+
### AuthService
|
|
310
|
+
**Responsibility:** Business logic for authentication
|
|
311
|
+
|
|
312
|
+
**Methods:**
|
|
313
|
+
- `authenticate(email, password)` - Verify credentials
|
|
314
|
+
- `generateToken(user)` - Create JWT token
|
|
315
|
+
- `hashPassword(password)` - Hash password with bcrypt
|
|
316
|
+
|
|
317
|
+
### UserRepository
|
|
318
|
+
**Responsibility:** Database operations for users
|
|
319
|
+
|
|
320
|
+
**Methods:**
|
|
321
|
+
- `findByEmail(email)` - Get user by email
|
|
322
|
+
- `updateLastLogin(userId)` - Update last login timestamp
|
|
323
|
+
|
|
324
|
+
### RateLimiter
|
|
325
|
+
**Responsibility:** Prevent brute force attacks
|
|
326
|
+
|
|
327
|
+
**Configuration:**
|
|
328
|
+
- Max attempts: 5 per minute per IP
|
|
329
|
+
- Block duration: 15 minutes after limit exceeded
|
|
330
|
+
|
|
331
|
+
## Data Models
|
|
332
|
+
|
|
333
|
+
### User
|
|
334
|
+
```javascript
|
|
335
|
+
{
|
|
336
|
+
id: string,
|
|
337
|
+
email: string,
|
|
338
|
+
passwordHash: string,
|
|
339
|
+
name: string,
|
|
340
|
+
createdAt: Date,
|
|
341
|
+
lastLoginAt: Date
|
|
342
|
+
}
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
## Security Considerations
|
|
346
|
+
|
|
347
|
+
1. **Password Hashing:** Use bcrypt with 10 salt rounds
|
|
348
|
+
2. **JWT Tokens:** Sign with secret key, expire in 24 hours
|
|
349
|
+
3. **Rate Limiting:** Implement per-IP rate limiting
|
|
350
|
+
4. **Input Sanitization:** Sanitize all user inputs
|
|
351
|
+
5. **HTTPS Only:** Enforce HTTPS in production
|
|
352
|
+
|
|
353
|
+
## Error Handling
|
|
354
|
+
|
|
355
|
+
| Error | HTTP Code | Message |
|
|
356
|
+
|-------|-----------|---------|
|
|
357
|
+
| Invalid credentials | 401 | "Invalid email or password" |
|
|
358
|
+
| Missing email | 400 | "Email is required" |
|
|
359
|
+
| Invalid email format | 400 | "Please enter a valid email" |
|
|
360
|
+
| Missing password | 400 | "Password is required" |
|
|
361
|
+
| Password too short | 400 | "Password must be at least 6 characters" |
|
|
362
|
+
| Rate limit exceeded | 429 | "Too many login attempts. Please try again later." |
|
|
363
|
+
| Server error | 500 | "An error occurred. Please try again." |
|
|
364
|
+
|
|
365
|
+
## Technology Stack
|
|
366
|
+
|
|
367
|
+
- **Backend:** Node.js + Express
|
|
368
|
+
- **Database:** PostgreSQL
|
|
369
|
+
- **Authentication:** JWT (jsonwebtoken)
|
|
370
|
+
- **Password Hashing:** bcrypt
|
|
371
|
+
- **Rate Limiting:** express-rate-limit
|
|
372
|
+
- **Validation:** validator.js
|
|
373
|
+
|
|
374
|
+
## Requirements Traceability
|
|
375
|
+
|
|
376
|
+
| Requirement | Design Component |
|
|
377
|
+
|-------------|------------------|
|
|
378
|
+
| FR-1: Login Form | AuthController.login() |
|
|
379
|
+
| FR-2: Credential Validation | AuthService.authenticate() |
|
|
380
|
+
| FR-3: Input Validation | ValidationService |
|
|
381
|
+
| NFR-1: Security | bcrypt, JWT, RateLimiter |
|
|
382
|
+
| NFR-2: Performance | Indexed database queries |
|
|
383
|
+
| NFR-3: Usability | Clear error messages in API responses |
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### 3.3 Write Tasks
|
|
387
|
+
|
|
388
|
+
Open `.kiro/specs/01-00-user-login/tasks.md` and write:
|
|
389
|
+
|
|
390
|
+
```markdown
|
|
391
|
+
# User Login - Implementation Tasks
|
|
392
|
+
|
|
393
|
+
## Phase 1: Setup and Models
|
|
394
|
+
|
|
395
|
+
- [ ] 1.1 Set up project dependencies
|
|
396
|
+
- Install express, bcrypt, jsonwebtoken, validator, express-rate-limit
|
|
397
|
+
- Configure TypeScript (if using)
|
|
398
|
+
|
|
399
|
+
- [ ] 1.2 Create User model and database schema
|
|
400
|
+
- Define User interface/class
|
|
401
|
+
- Create database migration for users table
|
|
402
|
+
- Add indexes on email field
|
|
403
|
+
|
|
404
|
+
## Phase 2: Core Services
|
|
405
|
+
|
|
406
|
+
- [ ] 2.1 Implement ValidationService
|
|
407
|
+
- Create validateEmail() method
|
|
408
|
+
- Create validatePassword() method
|
|
409
|
+
- Write unit tests
|
|
410
|
+
|
|
411
|
+
- [ ] 2.2 Implement AuthService
|
|
412
|
+
- Create hashPassword() method
|
|
413
|
+
- Create authenticate() method
|
|
414
|
+
- Create generateToken() method
|
|
415
|
+
- Write unit tests
|
|
416
|
+
|
|
417
|
+
- [ ] 2.3 Implement UserRepository
|
|
418
|
+
- Create findByEmail() method
|
|
419
|
+
- Create updateLastLogin() method
|
|
420
|
+
- Write unit tests
|
|
421
|
+
|
|
422
|
+
## Phase 3: API Implementation
|
|
423
|
+
|
|
424
|
+
- [ ] 3.1 Implement AuthController
|
|
425
|
+
- Create login() endpoint handler
|
|
426
|
+
- Add request validation
|
|
427
|
+
- Add error handling
|
|
428
|
+
- Write integration tests
|
|
429
|
+
|
|
430
|
+
- [ ] 3.2 Implement rate limiting
|
|
431
|
+
- Configure express-rate-limit
|
|
432
|
+
- Apply to login endpoint
|
|
433
|
+
- Test rate limiting behavior
|
|
434
|
+
|
|
435
|
+
## Phase 4: Testing and Documentation
|
|
436
|
+
|
|
437
|
+
- [ ] 4.1 Write comprehensive tests
|
|
438
|
+
- Unit tests for all services
|
|
439
|
+
- Integration tests for API endpoint
|
|
440
|
+
- Test error scenarios
|
|
441
|
+
- Test rate limiting
|
|
442
|
+
|
|
443
|
+
- [ ] 4.2 Create API documentation
|
|
444
|
+
- Document request/response formats
|
|
445
|
+
- Add example requests
|
|
446
|
+
- Document error codes
|
|
447
|
+
|
|
448
|
+
- [ ] 4.3 Manual testing
|
|
449
|
+
- Test with valid credentials
|
|
450
|
+
- Test with invalid credentials
|
|
451
|
+
- Test input validation
|
|
452
|
+
- Test rate limiting
|
|
453
|
+
- Test performance (response time < 500ms)
|
|
454
|
+
|
|
455
|
+
## Phase 5: Deployment
|
|
456
|
+
|
|
457
|
+
- [ ] 5.1 Environment configuration
|
|
458
|
+
- Set up environment variables
|
|
459
|
+
- Configure JWT secret
|
|
460
|
+
- Configure database connection
|
|
461
|
+
|
|
462
|
+
- [ ] 5.2 Deploy to staging
|
|
463
|
+
- Deploy code
|
|
464
|
+
- Run smoke tests
|
|
465
|
+
- Verify functionality
|
|
466
|
+
|
|
467
|
+
## Notes
|
|
468
|
+
- All passwords must be hashed before storage
|
|
469
|
+
- Use environment variables for secrets
|
|
470
|
+
- Follow project coding standards
|
|
471
|
+
- Write tests before marking tasks complete
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## Step 4: Export Context for Your AI Tool (1 minute)
|
|
477
|
+
|
|
478
|
+
Now that your Spec is complete, export it for your AI tool:
|
|
479
|
+
|
|
480
|
+
```bash
|
|
481
|
+
kse context export 01-00-user-login
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**Expected output:**
|
|
485
|
+
```
|
|
486
|
+
✓ Exported context to .kiro/specs/01-00-user-login/context-export.md
|
|
487
|
+
✓ Context size: 3.2 KB
|
|
488
|
+
✓ Ready to use with AI tools
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
**What was created:**
|
|
492
|
+
A file at `.kiro/specs/01-00-user-login/context-export.md` containing:
|
|
493
|
+
- All requirements
|
|
494
|
+
- Complete design
|
|
495
|
+
- Task list
|
|
496
|
+
- Project structure
|
|
497
|
+
- Formatted for AI consumption
|
|
498
|
+
|
|
499
|
+
---
|
|
500
|
+
|
|
501
|
+
## Step 5: Use Your AI Tool (1 minute)
|
|
502
|
+
|
|
503
|
+
Now use your AI tool to implement the feature. Choose your tool:
|
|
504
|
+
|
|
505
|
+
### Option A: Claude Code / ChatGPT
|
|
506
|
+
|
|
507
|
+
1. **Open the context file:**
|
|
508
|
+
```bash
|
|
509
|
+
# On macOS
|
|
510
|
+
cat .kiro/specs/01-00-user-login/context-export.md | pbcopy
|
|
511
|
+
|
|
512
|
+
# On Windows
|
|
513
|
+
type .kiro\specs\01-00-user-login\context-export.md | clip
|
|
514
|
+
|
|
515
|
+
# On Linux
|
|
516
|
+
cat .kiro/specs/01-00-user-login/context-export.md | xclip -selection clipboard
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
2. **Start a new conversation** with Claude or ChatGPT
|
|
520
|
+
|
|
521
|
+
3. **Paste the context** and say:
|
|
522
|
+
```
|
|
523
|
+
I've provided the complete Spec for a user login feature.
|
|
524
|
+
Please implement task 1.1: "Set up project dependencies"
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
4. **Claude/ChatGPT will:**
|
|
528
|
+
- Understand your requirements and design
|
|
529
|
+
- Generate the appropriate code
|
|
530
|
+
- Follow your architecture decisions
|
|
531
|
+
|
|
532
|
+
### Option B: Cursor
|
|
533
|
+
|
|
534
|
+
1. **Generate a task-specific prompt:**
|
|
535
|
+
```bash
|
|
536
|
+
kse prompt generate 01-00-user-login 1.1
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
2. **Open Cursor Composer** (Cmd+K or Ctrl+K)
|
|
540
|
+
|
|
541
|
+
3. **Paste the generated prompt**
|
|
542
|
+
|
|
543
|
+
4. **Cursor will:**
|
|
544
|
+
- Read your Spec files
|
|
545
|
+
- Generate code matching your design
|
|
546
|
+
- Create or modify files directly
|
|
547
|
+
|
|
548
|
+
### Option C: Windsurf / Cline
|
|
549
|
+
|
|
550
|
+
1. **Simply tell the AI:**
|
|
551
|
+
```
|
|
552
|
+
Use kse to check the spec for 01-00-user-login and implement task 1.1
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
2. **The AI will:**
|
|
556
|
+
- Automatically run `kse context export 01-00-user-login`
|
|
557
|
+
- Read the exported context
|
|
558
|
+
- Implement the task
|
|
559
|
+
- Update task status
|
|
560
|
+
|
|
561
|
+
### Option D: VS Code + Copilot
|
|
562
|
+
|
|
563
|
+
1. **Create a new file** (e.g., `src/auth/AuthController.js`)
|
|
564
|
+
|
|
565
|
+
2. **Add a comment referencing your Spec:**
|
|
566
|
+
```javascript
|
|
567
|
+
// Task 1.1: Set up project dependencies
|
|
568
|
+
// See: .kiro/specs/01-00-user-login/design.md
|
|
569
|
+
//
|
|
570
|
+
// Install: express, bcrypt, jsonwebtoken, validator, express-rate-limit
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
3. **Copilot will:**
|
|
574
|
+
- Suggest code based on your Spec
|
|
575
|
+
- Follow your design patterns
|
|
576
|
+
- Generate appropriate implementations
|
|
577
|
+
|
|
578
|
+
---
|
|
579
|
+
|
|
580
|
+
## Step 6: Track Your Progress (30 seconds)
|
|
581
|
+
|
|
582
|
+
As you complete tasks, update the task status:
|
|
583
|
+
|
|
584
|
+
**Edit** `.kiro/specs/01-00-user-login/tasks.md`:
|
|
585
|
+
|
|
586
|
+
```markdown
|
|
587
|
+
- [x] 1.1 Set up project dependencies ← Changed from [ ] to [x]
|
|
588
|
+
- [ ] 1.2 Create User model and database schema
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
**Check your progress:**
|
|
592
|
+
```bash
|
|
593
|
+
kse status
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
**Expected output:**
|
|
597
|
+
```
|
|
598
|
+
Project: my-awesome-app
|
|
599
|
+
Specs: 1
|
|
600
|
+
|
|
601
|
+
Spec: 01-00-user-login
|
|
602
|
+
Total tasks: 15
|
|
603
|
+
Completed: 1
|
|
604
|
+
In progress: 0
|
|
605
|
+
Not started: 14
|
|
606
|
+
Progress: 6.7%
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
---
|
|
610
|
+
|
|
611
|
+
## Next Steps
|
|
612
|
+
|
|
613
|
+
Congratulations! You've completed the quick start. Here's what to do next:
|
|
614
|
+
|
|
615
|
+
### Learn More About Integration
|
|
616
|
+
|
|
617
|
+
Choose your AI tool for detailed guidance:
|
|
618
|
+
- **[Cursor Guide](tools/cursor-guide.md)** - Deep dive into Cursor integration
|
|
619
|
+
- **[Claude Guide](tools/claude-guide.md)** - Best practices for Claude Code
|
|
620
|
+
- **[Windsurf Guide](tools/windsurf-guide.md)** - Automated workflows with Windsurf
|
|
621
|
+
- **[Generic Guide](tools/generic-guide.md)** - Works with any AI tool
|
|
622
|
+
|
|
623
|
+
### Explore Advanced Features
|
|
624
|
+
|
|
625
|
+
- **[Integration Modes](integration-modes.md)** - Native, Manual, and Watch Mode
|
|
626
|
+
- **[Spec Workflow](spec-workflow.md)** - Deep dive into Spec creation
|
|
627
|
+
- **[Command Reference](command-reference.md)** - All kse commands
|
|
628
|
+
|
|
629
|
+
### See Real Examples
|
|
630
|
+
|
|
631
|
+
- **[API Feature Example](examples/add-rest-api/)** - Complete RESTful API Spec
|
|
632
|
+
- **[UI Feature Example](examples/add-user-dashboard/)** - React dashboard Spec
|
|
633
|
+
- **[CLI Feature Example](examples/add-export-command/)** - CLI command Spec
|
|
634
|
+
|
|
635
|
+
---
|
|
636
|
+
|
|
637
|
+
## Troubleshooting
|
|
638
|
+
|
|
639
|
+
### Issue: "kse: command not found"
|
|
640
|
+
|
|
641
|
+
**Solution:**
|
|
642
|
+
1. Restart your terminal
|
|
643
|
+
2. Check if npm global bin is in PATH:
|
|
644
|
+
```bash
|
|
645
|
+
npm config get prefix
|
|
646
|
+
```
|
|
647
|
+
3. Add to PATH if needed (macOS/Linux):
|
|
648
|
+
```bash
|
|
649
|
+
export PATH="$(npm config get prefix)/bin:$PATH"
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
### Issue: Context file is too large for AI tool
|
|
653
|
+
|
|
654
|
+
**Solution:** Generate task-specific prompts:
|
|
655
|
+
```bash
|
|
656
|
+
kse prompt generate 01-00-user-login 1.1
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
This creates a smaller, focused context for just that task.
|
|
660
|
+
|
|
661
|
+
### Issue: AI doesn't follow my design
|
|
662
|
+
|
|
663
|
+
**Solution:**
|
|
664
|
+
1. Make your design.md more detailed
|
|
665
|
+
2. Add code examples in design.md
|
|
666
|
+
3. Be explicit in your prompt: "Strictly follow the design document"
|
|
667
|
+
4. Include steering rules:
|
|
668
|
+
```bash
|
|
669
|
+
kse context export 01-00-user-login --steering
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
### Issue: Can't find my Spec files
|
|
673
|
+
|
|
674
|
+
**Solution:**
|
|
675
|
+
All Specs are in `.kiro/specs/`:
|
|
676
|
+
```bash
|
|
677
|
+
ls .kiro/specs/
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
### More Help
|
|
681
|
+
|
|
682
|
+
- 📖 **[Troubleshooting Guide](troubleshooting.md)** - Common issues and solutions
|
|
683
|
+
- 🤔 **[FAQ](faq.md)** - Frequently asked questions
|
|
684
|
+
- 💬 **[GitHub Discussions](https://github.com/yourusername/kiro-spec-engine/discussions)** - Community help
|
|
685
|
+
|
|
686
|
+
---
|
|
687
|
+
|
|
688
|
+
## Summary
|
|
689
|
+
|
|
690
|
+
You've learned how to:
|
|
691
|
+
- ✅ Install and set up kse
|
|
692
|
+
- ✅ Create structured Specs with requirements, design, and tasks
|
|
693
|
+
- ✅ Export context for AI tools
|
|
694
|
+
- ✅ Use AI to implement features based on Specs
|
|
695
|
+
- ✅ Track implementation progress
|
|
696
|
+
|
|
697
|
+
**The kse workflow:**
|
|
698
|
+
```
|
|
699
|
+
Create Spec → Export Context → AI Implements → Update Tasks → Repeat
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
**Ready to build your next feature?** 🚀
|
|
703
|
+
|
|
704
|
+
```bash
|
|
705
|
+
kse create-spec 02-00-your-next-feature
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
---
|
|
709
|
+
|
|
710
|
+
**Version**: 1.0.0
|
|
711
|
+
**Last Updated**: 2026-01-23
|