ai-sprint-kit 1.1.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/README.md +299 -0
- package/bin/cli.js +135 -0
- package/lib/installer.js +205 -0
- package/lib/scanner.js +341 -0
- package/package.json +55 -0
- package/templates/.claude/.env.example +13 -0
- package/templates/.claude/agents/debugger.md +667 -0
- package/templates/.claude/agents/devops.md +727 -0
- package/templates/.claude/agents/docs.md +661 -0
- package/templates/.claude/agents/implementer.md +235 -0
- package/templates/.claude/agents/planner.md +243 -0
- package/templates/.claude/agents/researcher.md +448 -0
- package/templates/.claude/agents/reviewer.md +610 -0
- package/templates/.claude/agents/security.md +202 -0
- package/templates/.claude/agents/tester.md +604 -0
- package/templates/.claude/commands/auto.md +85 -0
- package/templates/.claude/commands/code.md +301 -0
- package/templates/.claude/commands/debug.md +449 -0
- package/templates/.claude/commands/deploy.md +475 -0
- package/templates/.claude/commands/docs.md +519 -0
- package/templates/.claude/commands/plan.md +57 -0
- package/templates/.claude/commands/review.md +412 -0
- package/templates/.claude/commands/scan.md +146 -0
- package/templates/.claude/commands/secure.md +88 -0
- package/templates/.claude/commands/test.md +352 -0
- package/templates/.claude/commands/validate.md +238 -0
- package/templates/.claude/settings.json +27 -0
- package/templates/.claude/skills/codebase-context/SKILL.md +68 -0
- package/templates/.claude/skills/codebase-context/references/reading-context.md +68 -0
- package/templates/.claude/skills/codebase-context/references/refresh-triggers.md +82 -0
- package/templates/.claude/skills/implementation/SKILL.md +70 -0
- package/templates/.claude/skills/implementation/references/error-handling.md +106 -0
- package/templates/.claude/skills/implementation/references/security-patterns.md +73 -0
- package/templates/.claude/skills/implementation/references/validation-patterns.md +107 -0
- package/templates/.claude/skills/memory/SKILL.md +67 -0
- package/templates/.claude/skills/memory/references/decisions-format.md +68 -0
- package/templates/.claude/skills/memory/references/learning-format.md +74 -0
- package/templates/.claude/skills/planning/SKILL.md +72 -0
- package/templates/.claude/skills/planning/references/plan-templates.md +81 -0
- package/templates/.claude/skills/planning/references/research-phase.md +62 -0
- package/templates/.claude/skills/planning/references/solution-design.md +66 -0
- package/templates/.claude/skills/quality-assurance/SKILL.md +79 -0
- package/templates/.claude/skills/quality-assurance/references/review-checklist.md +72 -0
- package/templates/.claude/skills/quality-assurance/references/security-checklist.md +70 -0
- package/templates/.claude/skills/quality-assurance/references/testing-strategy.md +85 -0
- package/templates/.claude/statusline.sh +126 -0
- package/templates/.claude/workflows/development-rules.md +97 -0
- package/templates/.claude/workflows/orchestration-protocol.md +194 -0
- package/templates/.mcp.json.example +36 -0
- package/templates/CLAUDE.md +409 -0
- package/templates/README.md +331 -0
- package/templates/ai_context/codebase/.gitkeep +0 -0
- package/templates/ai_context/memory/active.md +15 -0
- package/templates/ai_context/memory/decisions.md +18 -0
- package/templates/ai_context/memory/learning.md +22 -0
- package/templates/ai_context/plans/.gitkeep +0 -0
- package/templates/ai_context/reports/.gitkeep +0 -0
- package/templates/docs/user-guide-th.md +454 -0
- package/templates/docs/user-guide.md +595 -0
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate and update project documentation
|
|
3
|
+
argument-hint: [optional: specific doc type (readme|api|architecture)]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Command: /docs
|
|
7
|
+
|
|
8
|
+
Generate comprehensive, up-to-date documentation including README, API docs, architecture diagrams, and inline code comments.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/docs
|
|
14
|
+
/docs readme
|
|
15
|
+
/docs api
|
|
16
|
+
/docs architecture
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
### 1. Audit Existing Docs
|
|
22
|
+
- Check current documentation
|
|
23
|
+
- Identify outdated sections
|
|
24
|
+
- Find missing documentation
|
|
25
|
+
- List undocumented code
|
|
26
|
+
|
|
27
|
+
### 2. Generate Documentation
|
|
28
|
+
- README.md (if missing/outdated)
|
|
29
|
+
- API documentation (OpenAPI/GraphQL)
|
|
30
|
+
- Architecture diagrams (Mermaid)
|
|
31
|
+
- Code comments (TSDoc/JSDoc)
|
|
32
|
+
|
|
33
|
+
### 3. Update Documentation
|
|
34
|
+
- Sync with current codebase
|
|
35
|
+
- Fix broken links
|
|
36
|
+
- Update examples
|
|
37
|
+
- Add missing sections
|
|
38
|
+
|
|
39
|
+
### 4. Validate
|
|
40
|
+
- Test all code examples
|
|
41
|
+
- Check all links work
|
|
42
|
+
- Verify accuracy
|
|
43
|
+
- Ensure completeness
|
|
44
|
+
|
|
45
|
+
## Documentation Types
|
|
46
|
+
|
|
47
|
+
### README.md
|
|
48
|
+
```markdown
|
|
49
|
+
# Project Name
|
|
50
|
+
|
|
51
|
+
Brief description (1-2 sentences)
|
|
52
|
+
|
|
53
|
+
## Features
|
|
54
|
+
- ✅ Feature 1
|
|
55
|
+
- ✅ Feature 2
|
|
56
|
+
- ✅ Feature 3
|
|
57
|
+
|
|
58
|
+
## Quick Start
|
|
59
|
+
\`\`\`bash
|
|
60
|
+
npm install
|
|
61
|
+
npm run dev
|
|
62
|
+
\`\`\`
|
|
63
|
+
|
|
64
|
+
## Installation
|
|
65
|
+
|
|
66
|
+
### Prerequisites
|
|
67
|
+
- Node.js 20+
|
|
68
|
+
- PostgreSQL 16+
|
|
69
|
+
|
|
70
|
+
### Steps
|
|
71
|
+
1. Clone repository
|
|
72
|
+
\`\`\`bash
|
|
73
|
+
git clone https://github.com/org/repo
|
|
74
|
+
cd repo
|
|
75
|
+
\`\`\`
|
|
76
|
+
|
|
77
|
+
2. Install dependencies
|
|
78
|
+
\`\`\`bash
|
|
79
|
+
npm install
|
|
80
|
+
\`\`\`
|
|
81
|
+
|
|
82
|
+
3. Configure environment
|
|
83
|
+
\`\`\`bash
|
|
84
|
+
cp .env.example .env
|
|
85
|
+
# Edit .env with your values
|
|
86
|
+
\`\`\`
|
|
87
|
+
|
|
88
|
+
4. Run database migrations
|
|
89
|
+
\`\`\`bash
|
|
90
|
+
npm run db:migrate
|
|
91
|
+
\`\`\`
|
|
92
|
+
|
|
93
|
+
5. Start development server
|
|
94
|
+
\`\`\`bash
|
|
95
|
+
npm run dev
|
|
96
|
+
\`\`\`
|
|
97
|
+
|
|
98
|
+
Open [http://localhost:3000](http://localhost:3000)
|
|
99
|
+
|
|
100
|
+
## Usage
|
|
101
|
+
|
|
102
|
+
### Basic Example
|
|
103
|
+
\`\`\`typescript
|
|
104
|
+
import { feature } from 'package';
|
|
105
|
+
|
|
106
|
+
const result = feature({ option: 'value' });
|
|
107
|
+
\`\`\`
|
|
108
|
+
|
|
109
|
+
### Advanced Example
|
|
110
|
+
\`\`\`typescript
|
|
111
|
+
// More complex usage
|
|
112
|
+
\`\`\`
|
|
113
|
+
|
|
114
|
+
## API Reference
|
|
115
|
+
|
|
116
|
+
See [API.md](API.md)
|
|
117
|
+
|
|
118
|
+
## Development
|
|
119
|
+
|
|
120
|
+
### Project Structure
|
|
121
|
+
\`\`\`
|
|
122
|
+
app/ # Next.js app directory
|
|
123
|
+
lib/ # Utilities
|
|
124
|
+
components/ # React components
|
|
125
|
+
tests/ # Tests
|
|
126
|
+
\`\`\`
|
|
127
|
+
|
|
128
|
+
### Commands
|
|
129
|
+
\`\`\`bash
|
|
130
|
+
npm run dev # Development server
|
|
131
|
+
npm run build # Production build
|
|
132
|
+
npm test # Run tests
|
|
133
|
+
npm run lint # Lint code
|
|
134
|
+
\`\`\`
|
|
135
|
+
|
|
136
|
+
## Environment Variables
|
|
137
|
+
|
|
138
|
+
| Variable | Description | Required |
|
|
139
|
+
|----------|-------------|----------|
|
|
140
|
+
| `DATABASE_URL` | PostgreSQL connection | Yes |
|
|
141
|
+
| `JWT_SECRET` | JWT signing secret | Yes |
|
|
142
|
+
|
|
143
|
+
## Deployment
|
|
144
|
+
|
|
145
|
+
See [DEPLOYMENT.md](DEPLOYMENT.md)
|
|
146
|
+
|
|
147
|
+
## Contributing
|
|
148
|
+
|
|
149
|
+
1. Fork repository
|
|
150
|
+
2. Create feature branch
|
|
151
|
+
3. Make changes
|
|
152
|
+
4. Submit pull request
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
MIT
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### API Documentation (OpenAPI)
|
|
160
|
+
```yaml
|
|
161
|
+
openapi: 3.0.0
|
|
162
|
+
info:
|
|
163
|
+
title: App API
|
|
164
|
+
version: 1.0.0
|
|
165
|
+
description: REST API for the application
|
|
166
|
+
|
|
167
|
+
servers:
|
|
168
|
+
- url: https://api.example.com
|
|
169
|
+
description: Production
|
|
170
|
+
- url: http://localhost:3000
|
|
171
|
+
description: Development
|
|
172
|
+
|
|
173
|
+
paths:
|
|
174
|
+
/api/users:
|
|
175
|
+
get:
|
|
176
|
+
summary: List users
|
|
177
|
+
description: Get paginated list of users
|
|
178
|
+
parameters:
|
|
179
|
+
- name: page
|
|
180
|
+
in: query
|
|
181
|
+
schema:
|
|
182
|
+
type: integer
|
|
183
|
+
default: 1
|
|
184
|
+
- name: limit
|
|
185
|
+
in: query
|
|
186
|
+
schema:
|
|
187
|
+
type: integer
|
|
188
|
+
default: 20
|
|
189
|
+
responses:
|
|
190
|
+
'200':
|
|
191
|
+
description: Success
|
|
192
|
+
content:
|
|
193
|
+
application/json:
|
|
194
|
+
schema:
|
|
195
|
+
type: object
|
|
196
|
+
properties:
|
|
197
|
+
users:
|
|
198
|
+
type: array
|
|
199
|
+
items:
|
|
200
|
+
$ref: '#/components/schemas/User'
|
|
201
|
+
total:
|
|
202
|
+
type: integer
|
|
203
|
+
page:
|
|
204
|
+
type: integer
|
|
205
|
+
|
|
206
|
+
post:
|
|
207
|
+
summary: Create user
|
|
208
|
+
requestBody:
|
|
209
|
+
required: true
|
|
210
|
+
content:
|
|
211
|
+
application/json:
|
|
212
|
+
schema:
|
|
213
|
+
type: object
|
|
214
|
+
properties:
|
|
215
|
+
email:
|
|
216
|
+
type: string
|
|
217
|
+
format: email
|
|
218
|
+
password:
|
|
219
|
+
type: string
|
|
220
|
+
minLength: 8
|
|
221
|
+
responses:
|
|
222
|
+
'201':
|
|
223
|
+
description: User created
|
|
224
|
+
'400':
|
|
225
|
+
description: Invalid input
|
|
226
|
+
|
|
227
|
+
components:
|
|
228
|
+
schemas:
|
|
229
|
+
User:
|
|
230
|
+
type: object
|
|
231
|
+
properties:
|
|
232
|
+
id:
|
|
233
|
+
type: string
|
|
234
|
+
email:
|
|
235
|
+
type: string
|
|
236
|
+
createdAt:
|
|
237
|
+
type: string
|
|
238
|
+
format: date-time
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Architecture Documentation
|
|
242
|
+
```markdown
|
|
243
|
+
# System Architecture
|
|
244
|
+
|
|
245
|
+
## Overview
|
|
246
|
+
Modern full-stack application with Next.js frontend and Node.js backend.
|
|
247
|
+
|
|
248
|
+
## Tech Stack
|
|
249
|
+
|
|
250
|
+
### Frontend
|
|
251
|
+
- Next.js 15 (React framework)
|
|
252
|
+
- TypeScript
|
|
253
|
+
- Tailwind CSS
|
|
254
|
+
|
|
255
|
+
### Backend
|
|
256
|
+
- Node.js REST API
|
|
257
|
+
- PostgreSQL (database)
|
|
258
|
+
- Redis (cache)
|
|
259
|
+
|
|
260
|
+
### Infrastructure
|
|
261
|
+
- Vercel (frontend hosting)
|
|
262
|
+
- Railway (backend + DB)
|
|
263
|
+
- Cloudflare (CDN)
|
|
264
|
+
|
|
265
|
+
## Architecture Diagram
|
|
266
|
+
|
|
267
|
+
\`\`\`mermaid
|
|
268
|
+
graph TD
|
|
269
|
+
A[User] -->|HTTPS| B[Cloudflare CDN]
|
|
270
|
+
B -->|Static Assets| C[Vercel - Next.js]
|
|
271
|
+
C -->|API Calls| D[Railway - Node.js API]
|
|
272
|
+
D -->|Query| E[PostgreSQL]
|
|
273
|
+
D -->|Cache| F[Redis]
|
|
274
|
+
\`\`\`
|
|
275
|
+
|
|
276
|
+
## Database Schema
|
|
277
|
+
|
|
278
|
+
\`\`\`mermaid
|
|
279
|
+
erDiagram
|
|
280
|
+
USER ||--o{ ORDER : places
|
|
281
|
+
USER {
|
|
282
|
+
string id PK
|
|
283
|
+
string email UK
|
|
284
|
+
string password
|
|
285
|
+
datetime created_at
|
|
286
|
+
}
|
|
287
|
+
ORDER {
|
|
288
|
+
string id PK
|
|
289
|
+
string user_id FK
|
|
290
|
+
decimal amount
|
|
291
|
+
string status
|
|
292
|
+
datetime created_at
|
|
293
|
+
}
|
|
294
|
+
\`\`\`
|
|
295
|
+
|
|
296
|
+
## API Flow
|
|
297
|
+
|
|
298
|
+
\`\`\`mermaid
|
|
299
|
+
sequenceDiagram
|
|
300
|
+
User->>Frontend: Submit form
|
|
301
|
+
Frontend->>API: POST /api/orders
|
|
302
|
+
API->>DB: Create order
|
|
303
|
+
DB-->>API: Order created
|
|
304
|
+
API->>Queue: Add to processing
|
|
305
|
+
API-->>Frontend: Order ID
|
|
306
|
+
Frontend-->>User: Show confirmation
|
|
307
|
+
\`\`\`
|
|
308
|
+
|
|
309
|
+
## Security
|
|
310
|
+
|
|
311
|
+
- JWT authentication
|
|
312
|
+
- HTTPS only
|
|
313
|
+
- Rate limiting (100 req/15min)
|
|
314
|
+
- Input validation
|
|
315
|
+
- SQL injection prevention (parameterized queries)
|
|
316
|
+
- XSS prevention (output encoding)
|
|
317
|
+
|
|
318
|
+
## Performance
|
|
319
|
+
|
|
320
|
+
- Redis caching (1 hour TTL)
|
|
321
|
+
- Database connection pooling
|
|
322
|
+
- CDN for static assets
|
|
323
|
+
- Image optimization (Next.js)
|
|
324
|
+
- Code splitting (automatic)
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Code Comments (TSDoc)
|
|
328
|
+
```typescript
|
|
329
|
+
/**
|
|
330
|
+
* Calculate user's subscription tier based on usage
|
|
331
|
+
*
|
|
332
|
+
* Uses a sliding window of 30 days to prevent gaming.
|
|
333
|
+
* Tier upgrades are immediate, downgrades have 7-day grace period.
|
|
334
|
+
*
|
|
335
|
+
* @param userId - User identifier
|
|
336
|
+
* @returns Subscription tier (free|pro|enterprise)
|
|
337
|
+
* @throws {NotFoundError} If user doesn't exist
|
|
338
|
+
*
|
|
339
|
+
* @example
|
|
340
|
+
* ```typescript
|
|
341
|
+
* const tier = await calculateTier('user_123');
|
|
342
|
+
* console.log(tier); // 'pro'
|
|
343
|
+
* ```
|
|
344
|
+
*/
|
|
345
|
+
export async function calculateTier(userId: string): Promise<Tier> {
|
|
346
|
+
// Implementation
|
|
347
|
+
}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## Generated Documentation
|
|
351
|
+
|
|
352
|
+
### For Libraries/Packages
|
|
353
|
+
```markdown
|
|
354
|
+
# Package Name
|
|
355
|
+
|
|
356
|
+
Brief description
|
|
357
|
+
|
|
358
|
+
## Installation
|
|
359
|
+
\`\`\`bash
|
|
360
|
+
npm install package-name
|
|
361
|
+
\`\`\`
|
|
362
|
+
|
|
363
|
+
## Quick Start
|
|
364
|
+
\`\`\`typescript
|
|
365
|
+
import { feature } from 'package-name';
|
|
366
|
+
|
|
367
|
+
feature({ option: 'value' });
|
|
368
|
+
\`\`\`
|
|
369
|
+
|
|
370
|
+
## API Reference
|
|
371
|
+
|
|
372
|
+
### `feature(options)`
|
|
373
|
+
|
|
374
|
+
**Parameters:**
|
|
375
|
+
- `options.option` (string): Description
|
|
376
|
+
|
|
377
|
+
**Returns:** Description
|
|
378
|
+
|
|
379
|
+
**Example:**
|
|
380
|
+
\`\`\`typescript
|
|
381
|
+
const result = feature({ option: 'value' });
|
|
382
|
+
\`\`\`
|
|
383
|
+
|
|
384
|
+
## Advanced Usage
|
|
385
|
+
|
|
386
|
+
### Custom Configuration
|
|
387
|
+
\`\`\`typescript
|
|
388
|
+
// Example
|
|
389
|
+
\`\`\`
|
|
390
|
+
|
|
391
|
+
## Contributing
|
|
392
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
393
|
+
|
|
394
|
+
## License
|
|
395
|
+
MIT
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### For Applications
|
|
399
|
+
```markdown
|
|
400
|
+
# App Name
|
|
401
|
+
|
|
402
|
+
What the app does in one sentence.
|
|
403
|
+
|
|
404
|
+
## Demo
|
|
405
|
+
[Live Demo](https://app.com) | [Video](https://youtube.com)
|
|
406
|
+
|
|
407
|
+
## Features
|
|
408
|
+
- ✅ Feature 1
|
|
409
|
+
- ✅ Feature 2
|
|
410
|
+
|
|
411
|
+
## Tech Stack
|
|
412
|
+
**Frontend:** Next.js, TypeScript
|
|
413
|
+
**Backend:** Node.js, PostgreSQL
|
|
414
|
+
**Deployment:** Vercel, Railway
|
|
415
|
+
|
|
416
|
+
## Getting Started
|
|
417
|
+
[Installation instructions]
|
|
418
|
+
|
|
419
|
+
## Development
|
|
420
|
+
[Development guide]
|
|
421
|
+
|
|
422
|
+
## Deployment
|
|
423
|
+
See [DEPLOYMENT.md](DEPLOYMENT.md)
|
|
424
|
+
|
|
425
|
+
## License
|
|
426
|
+
MIT
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
## Documentation Tools
|
|
430
|
+
|
|
431
|
+
### Generate OpenAPI Docs
|
|
432
|
+
```bash
|
|
433
|
+
# From OpenAPI spec
|
|
434
|
+
npx @redocly/cli build-docs openapi.yaml
|
|
435
|
+
|
|
436
|
+
# Or auto-generate from code
|
|
437
|
+
npx swagger-jsdoc -d swaggerDef.js routes/*.js -o openapi.json
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
### Generate TypeDoc
|
|
441
|
+
```bash
|
|
442
|
+
# API docs from TypeScript
|
|
443
|
+
npx typedoc --out docs src/
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
### Mermaid Diagrams
|
|
447
|
+
```markdown
|
|
448
|
+
\`\`\`mermaid
|
|
449
|
+
graph TD
|
|
450
|
+
A[Start] --> B[Process]
|
|
451
|
+
B --> C[End]
|
|
452
|
+
\`\`\`
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
## Documentation Checklist
|
|
456
|
+
|
|
457
|
+
### Minimum Viable
|
|
458
|
+
- ✅ README with quick start
|
|
459
|
+
- ✅ Installation instructions
|
|
460
|
+
- ✅ Basic usage examples
|
|
461
|
+
- ✅ Environment variables
|
|
462
|
+
- ✅ License
|
|
463
|
+
|
|
464
|
+
### Complete
|
|
465
|
+
- ✅ All above
|
|
466
|
+
- ✅ API reference
|
|
467
|
+
- ✅ Architecture diagram
|
|
468
|
+
- ✅ Contributing guide
|
|
469
|
+
- ✅ Deployment guide
|
|
470
|
+
- ✅ Troubleshooting
|
|
471
|
+
- ✅ Changelog
|
|
472
|
+
|
|
473
|
+
## Common Issues
|
|
474
|
+
|
|
475
|
+
### Outdated Docs
|
|
476
|
+
- Set up automation to check docs
|
|
477
|
+
- Update docs with code changes
|
|
478
|
+
- Add docs to CI/CD checks
|
|
479
|
+
|
|
480
|
+
### Broken Links
|
|
481
|
+
- Use link checker in CI
|
|
482
|
+
- Test all examples
|
|
483
|
+
- Verify external links
|
|
484
|
+
|
|
485
|
+
### Missing Examples
|
|
486
|
+
- Add code examples to all functions
|
|
487
|
+
- Include error handling examples
|
|
488
|
+
- Show common use cases
|
|
489
|
+
|
|
490
|
+
## Integration with Other Commands
|
|
491
|
+
|
|
492
|
+
**/code** → **/docs**
|
|
493
|
+
- After generating code, document it
|
|
494
|
+
|
|
495
|
+
**/review** → **/docs**
|
|
496
|
+
- Review identifies missing docs
|
|
497
|
+
|
|
498
|
+
**/test** → **/docs**
|
|
499
|
+
- Tests validate doc examples work
|
|
500
|
+
|
|
501
|
+
## Success Criteria
|
|
502
|
+
|
|
503
|
+
Documentation is successful when:
|
|
504
|
+
- ✅ New users can start in <10 minutes
|
|
505
|
+
- ✅ All code examples work
|
|
506
|
+
- ✅ API is fully documented
|
|
507
|
+
- ✅ No broken links
|
|
508
|
+
- ✅ Architecture is clear
|
|
509
|
+
- ✅ Updated with code
|
|
510
|
+
|
|
511
|
+
## Remember
|
|
512
|
+
|
|
513
|
+
**Good documentation:**
|
|
514
|
+
- Helps users succeed
|
|
515
|
+
- Saves support time
|
|
516
|
+
- Onboards developers
|
|
517
|
+
- Shows professionalism
|
|
518
|
+
|
|
519
|
+
**Write docs your future self will thank you for.**
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create comprehensive implementation plan with research and architecture
|
|
3
|
+
argument-hint: [feature or task description]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Command: /plan
|
|
7
|
+
|
|
8
|
+
Create a detailed implementation plan for the given feature or task.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/plan "implement user authentication with OAuth2"
|
|
14
|
+
/plan "add real-time notifications"
|
|
15
|
+
/plan "refactor database layer for PostgreSQL"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
1. **Get timestamp** - `date "+%y%m%d-%H%M"` (DO NOT guess dates)
|
|
21
|
+
2. **Check memory** - Read `ai_context/memory/learning.md` for past lessons
|
|
22
|
+
3. **Understand** the requirement
|
|
23
|
+
4. **Ask** clarifying questions if needed
|
|
24
|
+
5. **Delegate** to planner agent
|
|
25
|
+
6. **Research** best practices and approaches
|
|
26
|
+
7. **Create** comprehensive plan in `ai_context/plans/` directory
|
|
27
|
+
8. **Update memory** - Record decisions in `ai_context/memory/decisions.md`
|
|
28
|
+
|
|
29
|
+
## Plan Contents
|
|
30
|
+
|
|
31
|
+
- **Overview** - Summary with phases
|
|
32
|
+
- **Architecture** - Technical decisions
|
|
33
|
+
- **Phases** - Step-by-step implementation
|
|
34
|
+
- **Risks** - Potential issues and mitigation
|
|
35
|
+
- **Security** - Security considerations
|
|
36
|
+
- **Success Criteria** - Definition of done
|
|
37
|
+
|
|
38
|
+
## Output
|
|
39
|
+
|
|
40
|
+
Plan created at: `ai_context/plans/YYMMDD-HHMM-feature-name/`
|
|
41
|
+
- `plan.md` - Main overview
|
|
42
|
+
- `phase-*.md` - Detailed phases
|
|
43
|
+
|
|
44
|
+
## Memory Integration
|
|
45
|
+
|
|
46
|
+
Before planning:
|
|
47
|
+
- Check `ai_context/memory/learning.md` for past mistakes to avoid
|
|
48
|
+
|
|
49
|
+
After planning:
|
|
50
|
+
- Update `ai_context/memory/decisions.md` with key decisions
|
|
51
|
+
|
|
52
|
+
## Next Steps
|
|
53
|
+
|
|
54
|
+
After plan creation:
|
|
55
|
+
1. Review plan
|
|
56
|
+
2. Approve or request changes
|
|
57
|
+
3. Execute with `/code` or `/auto`
|