planflow-ai 1.0.7 → 1.0.8
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/.claude/commands/create-contract.md +8 -232
- package/.claude/commands/create-plan.md +8 -264
- package/.claude/commands/discovery-plan.md +11 -375
- package/.claude/commands/execute-plan.md +8 -390
- package/.claude/commands/review-code.md +9 -301
- package/.claude/commands/review-pr.md +11 -490
- package/.claude/commands/setup.md +12 -920
- package/.claude/commands/write-tests.md +8 -292
- package/.claude/resources/core/_index.md +107 -0
- package/.claude/resources/languages/_index.md +76 -0
- package/.claude/resources/patterns/_index.md +181 -0
- package/.claude/{rules → resources}/patterns/discovery-patterns.md +4 -4
- package/.claude/{rules → resources}/patterns/plans-patterns.md +6 -6
- package/.claude/{rules → resources}/patterns/plans-templates.md +1 -1
- package/.claude/{rules → resources}/patterns/review-pr-patterns.md +9 -9
- package/.claude/resources/skills/_index.md +170 -0
- package/.claude/resources/skills/create-contract-skill.md +235 -0
- package/.claude/resources/skills/create-plan-skill.md +264 -0
- package/.claude/resources/skills/discovery-skill.md +291 -0
- package/.claude/resources/skills/execute-plan-skill.md +384 -0
- package/.claude/resources/skills/review-code-skill.md +304 -0
- package/.claude/resources/skills/review-pr-skill.md +492 -0
- package/.claude/resources/skills/setup-skill.md +897 -0
- package/.claude/resources/skills/write-tests-skill.md +290 -0
- package/.claude/resources/tools/_index.md +110 -0
- package/.claude/{rules → resources}/tools/interactive-questions-tool.md +2 -2
- package/.claude/{rules → resources}/tools/plan-mode-tool.md +2 -2
- package/.claude/{rules → resources}/tools/reference-expansion-tool.md +36 -36
- package/README.md +3 -2
- package/dist/cli/commands/update.d.ts +16 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +78 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/handlers/claude.d.ts +1 -1
- package/dist/cli/handlers/claude.d.ts.map +1 -1
- package/dist/cli/handlers/claude.js +72 -3
- package/dist/cli/handlers/claude.js.map +1 -1
- package/dist/cli/index.js +13 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/utils/files.d.ts +17 -0
- package/dist/cli/utils/files.d.ts.map +1 -1
- package/dist/cli/utils/files.js +48 -1
- package/dist/cli/utils/files.js.map +1 -1
- package/dist/cli/utils/prompts.d.ts +5 -0
- package/dist/cli/utils/prompts.d.ts.map +1 -1
- package/dist/cli/utils/prompts.js +31 -0
- package/dist/cli/utils/prompts.js.map +1 -1
- package/package.json +2 -1
- package/rules/core/_index.mdc +3 -3
- package/rules/core/autopilot-mode.mdc +2 -2
- package/rules/core/project-ledger.mdc +2 -2
- package/templates/shared/CLAUDE.md.template +11 -5
- /package/.claude/{rules → resources}/core/autopilot-mode.md +0 -0
- /package/.claude/{rules → resources}/core/complexity-scoring.md +0 -0
- /package/.claude/{rules → resources}/core/project-ledger.md +0 -0
- /package/.claude/{rules → resources}/languages/python-patterns.md +0 -0
- /package/.claude/{rules → resources}/languages/typescript-patterns.md +0 -0
- /package/.claude/{rules → resources}/patterns/contract-patterns.md +0 -0
- /package/.claude/{rules → resources}/patterns/discovery-templates.md +0 -0
- /package/.claude/{rules → resources}/patterns/jest-patterns.md +0 -0
- /package/.claude/{rules → resources}/patterns/pytest-patterns.md +0 -0
- /package/.claude/{rules → resources}/patterns/review-code-templates.md +0 -0
- /package/.claude/{rules → resources}/tools/auth-pr-tool.md +0 -0
- /package/.claude/{rules → resources}/tools/jest-testing-tool.md +0 -0
- /package/.claude/{rules → resources}/tools/pytest-testing-tool.md +0 -0
|
@@ -111,7 +111,7 @@ The skill will:
|
|
|
111
111
|
3. Ask clarifying questions via Interactive Questions Tool
|
|
112
112
|
4. Generate contract document
|
|
113
113
|
|
|
114
|
-
See: `.claude/
|
|
114
|
+
See: `.claude/resources/skills/create-contract-skill.md`
|
|
115
115
|
|
|
116
116
|
---
|
|
117
117
|
|
|
@@ -204,9 +204,9 @@ This command uses hierarchical context loading to reduce context consumption. In
|
|
|
204
204
|
|
|
205
205
|
| Index | When to Load |
|
|
206
206
|
|-------|--------------|
|
|
207
|
-
| `
|
|
208
|
-
| `
|
|
209
|
-
| `
|
|
207
|
+
| `resources/patterns/_index.md` | To find contract patterns |
|
|
208
|
+
| `resources/skills/_index.md` | To understand skill workflow |
|
|
209
|
+
| `resources/tools/_index.md` | When using interactive questions |
|
|
210
210
|
|
|
211
211
|
### Reference Codes for Contract Creation
|
|
212
212
|
|
|
@@ -222,7 +222,7 @@ This command uses hierarchical context loading to reduce context consumption. In
|
|
|
222
222
|
|
|
223
223
|
When executing this command:
|
|
224
224
|
|
|
225
|
-
1. **Start with indexes**: Read `
|
|
225
|
+
1. **Start with indexes**: Read `resources/patterns/_index.md` and `resources/skills/_index.md`
|
|
226
226
|
2. **Identify needed codes**: Based on current step, identify which codes are relevant
|
|
227
227
|
3. **Expand as needed**: Use the Read tool with specific line ranges from the index
|
|
228
228
|
4. **Don't expand everything**: Only load content required for the current step
|
|
@@ -233,236 +233,12 @@ When executing this command:
|
|
|
233
233
|
|
|
234
234
|
| Resource | Purpose |
|
|
235
235
|
| ------------------------------ | -------------------------------------- |
|
|
236
|
-
| `
|
|
237
|
-
| `
|
|
238
|
-
| `
|
|
236
|
+
| `resources/skills/_index.md` | Index of skills with reference codes |
|
|
237
|
+
| `resources/patterns/_index.md` | Index of patterns with reference codes |
|
|
238
|
+
| `resources/tools/_index.md` | Index of tools with reference codes |
|
|
239
239
|
| `create-contract-skill.md` | Skill that creates the contract |
|
|
240
240
|
| `contract-patterns.md` | Rules and patterns for contracts |
|
|
241
241
|
| `interactive-questions-tool.md` | Interactive Questions UI workflow |
|
|
242
242
|
| `/discovery-plan` command | Create discovery from contract |
|
|
243
243
|
| `/create-plan` command | Create plan from discovery |
|
|
244
244
|
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
# Implementation Details
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
## Restrictions - CONTRACT CREATION ONLY
|
|
251
|
-
|
|
252
|
-
This skill is **strictly for creating contract documents**. The process:
|
|
253
|
-
|
|
254
|
-
1. **Fetches** information from the source URL
|
|
255
|
-
2. **Analyzes** the API structure and schemas
|
|
256
|
-
3. **Asks** clarifying questions via Interactive Questions Tool
|
|
257
|
-
4. **Generates** a contract markdown file
|
|
258
|
-
|
|
259
|
-
**No code, no implementation, no source file modifications.**
|
|
260
|
-
|
|
261
|
-
### NEVER Do These Actions
|
|
262
|
-
|
|
263
|
-
| Forbidden Action | Reason |
|
|
264
|
-
| -------------------------------------- | ----------------------------------- |
|
|
265
|
-
| Create/edit source code files | Contract creation only |
|
|
266
|
-
| Write implementation code | Contracts describe, not implement |
|
|
267
|
-
| Modify configuration files | No codebase changes |
|
|
268
|
-
| Run build or test commands | No execution commands |
|
|
269
|
-
| Create files outside `flow/contracts/` | Only write contract documents |
|
|
270
|
-
|
|
271
|
-
### Allowed Actions
|
|
272
|
-
|
|
273
|
-
| Allowed Action | Purpose |
|
|
274
|
-
| -------------------------------------- | ------------------------------------ |
|
|
275
|
-
| Use Web Search tool | Fetch documentation from URLs |
|
|
276
|
-
| Read repository files | Analyze API structure |
|
|
277
|
-
| Use Interactive Questions Tool | Gather requirements from user |
|
|
278
|
-
| Write to `flow/contracts/` | Save contract document |
|
|
279
|
-
| Read project rule files | Understand patterns to follow |
|
|
280
|
-
|
|
281
|
-
> **Important**: The ONLY writable location is `flow/contracts/`. No source code or other files should be modified.
|
|
282
|
-
|
|
283
|
-
---
|
|
284
|
-
|
|
285
|
-
## Inputs
|
|
286
|
-
|
|
287
|
-
| Input | Required | Description |
|
|
288
|
-
| ------------- | -------- | ---------------------------------------------------- |
|
|
289
|
-
| `source_url` | Yes | Documentation URL or repository URL |
|
|
290
|
-
| `description` | Yes | What the user wants to integrate on the frontend |
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
## Workflow
|
|
295
|
-
|
|
296
|
-
### Step 1: Detect Source Type
|
|
297
|
-
|
|
298
|
-
Analyze the provided URL to determine the source type:
|
|
299
|
-
|
|
300
|
-
| Source Type | Detection |
|
|
301
|
-
| ---------------- | ---------------------------------------------- |
|
|
302
|
-
| Documentation | Contains `/docs`, `/api`, swagger, openapi |
|
|
303
|
-
| Repository | Contains github.com, gitlab.com, bitbucket.org |
|
|
304
|
-
| OpenAPI Spec | Ends with `.json`, `.yaml`, `/swagger` |
|
|
305
|
-
|
|
306
|
-
---
|
|
307
|
-
|
|
308
|
-
### Step 2A: Handle Documentation URL
|
|
309
|
-
|
|
310
|
-
If the source is a documentation URL:
|
|
311
|
-
|
|
312
|
-
1. Use Web Search tool to fetch documentation content
|
|
313
|
-
2. Extract key information:
|
|
314
|
-
- API endpoints
|
|
315
|
-
- Request/response schemas
|
|
316
|
-
- Authentication methods
|
|
317
|
-
- Error formats
|
|
318
|
-
- Rate limits
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
### Step 2B: Handle Repository URL
|
|
323
|
-
|
|
324
|
-
If the source is a repository URL:
|
|
325
|
-
|
|
326
|
-
1. Analyze repository structure
|
|
327
|
-
2. Identify relevant files:
|
|
328
|
-
- API route definitions
|
|
329
|
-
- Type definitions
|
|
330
|
-
- Schema files
|
|
331
|
-
- README/docs
|
|
332
|
-
3. Read and extract key information
|
|
333
|
-
|
|
334
|
-
---
|
|
335
|
-
|
|
336
|
-
### Step 3: Ask Clarifying Questions
|
|
337
|
-
|
|
338
|
-
**Use Interactive Questions Tool** to gather requirements.
|
|
339
|
-
|
|
340
|
-
Follow `.claude/rules/tools/interactive-questions-tool.md`:
|
|
341
|
-
|
|
342
|
-
1. Call `SwitchMode` tool to enter Plan mode
|
|
343
|
-
2. Call `Ask the user directly in conversation` tool for each question about:
|
|
344
|
-
- **Scope**: Which specific endpoints/features are needed?
|
|
345
|
-
- **Authentication**: How will the FE authenticate?
|
|
346
|
-
- **Error Handling**: How should the FE handle errors?
|
|
347
|
-
- **Caching**: Any caching requirements?
|
|
348
|
-
3. Wait for all responses
|
|
349
|
-
4. Call `SwitchMode` tool to return to Agent mode
|
|
350
|
-
5. Document answers for use in the contract document
|
|
351
|
-
|
|
352
|
-
---
|
|
353
|
-
|
|
354
|
-
### Step 4: Generate Contract Document
|
|
355
|
-
|
|
356
|
-
Create the contract with all gathered information:
|
|
357
|
-
|
|
358
|
-
**Location**: `flow/contracts/<service_name>_contract.md`
|
|
359
|
-
|
|
360
|
-
**Required Sections**:
|
|
361
|
-
|
|
362
|
-
1. Overview
|
|
363
|
-
2. Authentication
|
|
364
|
-
3. Endpoints (with request/response schemas)
|
|
365
|
-
4. Error Handling
|
|
366
|
-
5. Integration Notes
|
|
367
|
-
6. Usage Examples
|
|
368
|
-
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
## Output Format
|
|
372
|
-
|
|
373
|
-
### Contract Template
|
|
374
|
-
|
|
375
|
-
```markdown
|
|
376
|
-
# Integration Contract: [Service Name]
|
|
377
|
-
|
|
378
|
-
## Overview
|
|
379
|
-
|
|
380
|
-
**Source**: [URL]
|
|
381
|
-
**Description**: [What this integration provides]
|
|
382
|
-
**Version**: [API version if applicable]
|
|
383
|
-
|
|
384
|
-
## Authentication
|
|
385
|
-
|
|
386
|
-
**Method**: [Bearer token, API key, OAuth, etc.]
|
|
387
|
-
**Header**: [Authorization header format]
|
|
388
|
-
**Token Source**: [Where FE gets the token]
|
|
389
|
-
|
|
390
|
-
## Endpoints
|
|
391
|
-
|
|
392
|
-
### [Endpoint Name]
|
|
393
|
-
|
|
394
|
-
**Method**: [GET/POST/PUT/DELETE]
|
|
395
|
-
**URL**: [Endpoint URL]
|
|
396
|
-
**Description**: [What this endpoint does]
|
|
397
|
-
|
|
398
|
-
**Request**:
|
|
399
|
-
```typescript
|
|
400
|
-
interface RequestBody {
|
|
401
|
-
// Request schema
|
|
402
|
-
}
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
**Response**:
|
|
406
|
-
```typescript
|
|
407
|
-
interface Response {
|
|
408
|
-
// Response schema
|
|
409
|
-
}
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
**Example**:
|
|
413
|
-
```bash
|
|
414
|
-
curl -X POST /api/endpoint \
|
|
415
|
-
-H "Authorization: Bearer token" \
|
|
416
|
-
-d '{"field": "value"}'
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
## Error Handling
|
|
420
|
-
|
|
421
|
-
| Status Code | Meaning | FE Action |
|
|
422
|
-
| ----------- | -------------------- | ------------------------- |
|
|
423
|
-
| 400 | Bad Request | Show validation error |
|
|
424
|
-
| 401 | Unauthorized | Redirect to login |
|
|
425
|
-
| 404 | Not Found | Show not found message |
|
|
426
|
-
| 500 | Server Error | Show generic error |
|
|
427
|
-
|
|
428
|
-
## Integration Notes
|
|
429
|
-
|
|
430
|
-
### Rate Limits
|
|
431
|
-
[Any rate limiting information]
|
|
432
|
-
|
|
433
|
-
### Caching
|
|
434
|
-
[Caching recommendations]
|
|
435
|
-
|
|
436
|
-
### Pagination
|
|
437
|
-
[Pagination format if applicable]
|
|
438
|
-
|
|
439
|
-
## Usage Examples
|
|
440
|
-
|
|
441
|
-
### [Use Case 1]
|
|
442
|
-
[Code example or description]
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
---
|
|
446
|
-
|
|
447
|
-
## Validation Checklist
|
|
448
|
-
|
|
449
|
-
Before completing the contract, verify:
|
|
450
|
-
|
|
451
|
-
- [ ] Contract is saved in `flow/contracts/` folder
|
|
452
|
-
- [ ] File uses naming: `<service_name>_contract.md`
|
|
453
|
-
- [ ] All requested endpoints are documented
|
|
454
|
-
- [ ] Authentication method is clear
|
|
455
|
-
- [ ] Request/response schemas are defined
|
|
456
|
-
- [ ] Error handling is documented
|
|
457
|
-
- [ ] **NO implementation code is included**
|
|
458
|
-
- [ ] **NO source files were created or modified**
|
|
459
|
-
|
|
460
|
-
---
|
|
461
|
-
|
|
462
|
-
## Related Files
|
|
463
|
-
|
|
464
|
-
| File | Purpose |
|
|
465
|
-
| -------------------------------------------------- | --------------------------------- |
|
|
466
|
-
| `.claude/rules/patterns/contract-patterns.md` | Rules and patterns for contracts |
|
|
467
|
-
| `.claude/rules/tools/interactive-questions-tool.md` | Interactive Questions workflow |
|
|
468
|
-
| `flow/contracts/` | Output folder for contracts |
|
|
@@ -130,7 +130,7 @@ The skill will:
|
|
|
130
130
|
4. Add key changes summary
|
|
131
131
|
5. Generate plan document
|
|
132
132
|
|
|
133
|
-
See: `.claude/
|
|
133
|
+
See: `.claude/resources/skills/create-plan-skill.md`
|
|
134
134
|
|
|
135
135
|
---
|
|
136
136
|
|
|
@@ -254,9 +254,9 @@ This command uses hierarchical context loading to reduce context consumption. In
|
|
|
254
254
|
|
|
255
255
|
| Index | When to Load |
|
|
256
256
|
|-------|--------------|
|
|
257
|
-
| `
|
|
258
|
-
| `
|
|
259
|
-
| `
|
|
257
|
+
| `resources/patterns/_index.md` | To find plan patterns and templates |
|
|
258
|
+
| `resources/skills/_index.md` | To understand skill workflow |
|
|
259
|
+
| `resources/core/_index.md` | For complexity scoring reference |
|
|
260
260
|
|
|
261
261
|
### Reference Codes for Plan Creation
|
|
262
262
|
|
|
@@ -272,7 +272,7 @@ This command uses hierarchical context loading to reduce context consumption. In
|
|
|
272
272
|
|
|
273
273
|
When executing this command:
|
|
274
274
|
|
|
275
|
-
1. **Start with indexes**: Read `
|
|
275
|
+
1. **Start with indexes**: Read `resources/patterns/_index.md` and `resources/core/_index.md`
|
|
276
276
|
2. **Identify needed codes**: Based on current step, identify which codes are relevant
|
|
277
277
|
3. **Expand as needed**: Use the Read tool with specific line ranges from the index
|
|
278
278
|
4. **Don't expand everything**: Only load content required for the current step
|
|
@@ -283,9 +283,9 @@ When executing this command:
|
|
|
283
283
|
|
|
284
284
|
| Resource | Purpose |
|
|
285
285
|
| --------------------------- | --------------------------------- |
|
|
286
|
-
| `
|
|
287
|
-
| `
|
|
288
|
-
| `
|
|
286
|
+
| `resources/skills/_index.md` | Index of skills with reference codes |
|
|
287
|
+
| `resources/patterns/_index.md` | Index of patterns with reference codes |
|
|
288
|
+
| `resources/core/_index.md` | Index of core rules with reference codes |
|
|
289
289
|
| `create-plan-skill.md` | Skill that creates the plan |
|
|
290
290
|
| `plans-patterns.md` | Rules and patterns for plans |
|
|
291
291
|
| `plans-templates.md` | Plan templates |
|
|
@@ -293,259 +293,3 @@ When executing this command:
|
|
|
293
293
|
| `/discovery-plan` command | Run discovery first |
|
|
294
294
|
| `/execute-plan` command | Execute the created plan |
|
|
295
295
|
|
|
296
|
-
---
|
|
297
|
-
|
|
298
|
-
# Implementation Details
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
## Restrictions - PLANNING ONLY
|
|
302
|
-
|
|
303
|
-
This skill is **strictly for creating plan documents**. The process:
|
|
304
|
-
|
|
305
|
-
1. **Reads** the discovery document or gathers requirements
|
|
306
|
-
2. **Analyzes** complexity and scope
|
|
307
|
-
3. **Structures** phases with complexity scores
|
|
308
|
-
4. **Generates** a plan markdown file
|
|
309
|
-
|
|
310
|
-
**No code, no implementation, no source file modifications.**
|
|
311
|
-
|
|
312
|
-
### NEVER Do These Actions
|
|
313
|
-
|
|
314
|
-
| Forbidden Action | Reason |
|
|
315
|
-
| ----------------------------------- | -------------------------------- |
|
|
316
|
-
| Create/edit source code files | Planning only, no implementation |
|
|
317
|
-
| Write implementation code | Plans describe what, not how |
|
|
318
|
-
| Execute any plan phases | Use /execute-plan for that |
|
|
319
|
-
| Run build or test commands | No execution commands |
|
|
320
|
-
| Create files outside `flow/plans/` | Only write plan documents |
|
|
321
|
-
|
|
322
|
-
### Allowed Actions
|
|
323
|
-
|
|
324
|
-
| Allowed Action | Purpose |
|
|
325
|
-
| -------------------------------------- | --------------------------------- |
|
|
326
|
-
| Read discovery documents | Extract requirements |
|
|
327
|
-
| Read any project file | Understand existing codebase |
|
|
328
|
-
| Search codebase (grep, glob, semantic) | Find existing patterns |
|
|
329
|
-
| Write to `flow/plans/` | Save plan document |
|
|
330
|
-
| Read project rule files | Understand patterns to follow |
|
|
331
|
-
|
|
332
|
-
> **Important**: The ONLY writable location is `flow/plans/`. No source code or other files should be modified.
|
|
333
|
-
|
|
334
|
-
---
|
|
335
|
-
|
|
336
|
-
## Inputs
|
|
337
|
-
|
|
338
|
-
| Input | Required | Description |
|
|
339
|
-
| -------------------- | -------- | -------------------------------------------------- |
|
|
340
|
-
| `discovery_document` | Optional | Path to discovery document (recommended) |
|
|
341
|
-
| `feature_name` | Yes | Name of the feature to plan |
|
|
342
|
-
| `requirements` | Optional | Direct requirements if no discovery document |
|
|
343
|
-
| `version` | Optional | Version number (auto-incremented if not provided) |
|
|
344
|
-
|
|
345
|
-
---
|
|
346
|
-
|
|
347
|
-
## Workflow
|
|
348
|
-
|
|
349
|
-
### Step 1: Extract Requirements
|
|
350
|
-
|
|
351
|
-
**If discovery document was provided**:
|
|
352
|
-
|
|
353
|
-
1. Read the discovery document
|
|
354
|
-
2. Extract feature name, description, goals from the document
|
|
355
|
-
3. Extract FR, NFR, Constraints
|
|
356
|
-
4. Note any risks identified
|
|
357
|
-
|
|
358
|
-
**If no discovery document**:
|
|
359
|
-
|
|
360
|
-
1. Use requirements provided directly
|
|
361
|
-
2. Note that discovery was skipped
|
|
362
|
-
|
|
363
|
-
---
|
|
364
|
-
|
|
365
|
-
### Step 2: Analyze Scope and Complexity
|
|
366
|
-
|
|
367
|
-
Based on extracted requirements:
|
|
368
|
-
|
|
369
|
-
1. Identify the major components/areas of work
|
|
370
|
-
2. Group related tasks into logical phases
|
|
371
|
-
3. Estimate complexity for each phase using `.claude/rules/core/complexity-scoring.md`
|
|
372
|
-
|
|
373
|
-
---
|
|
374
|
-
|
|
375
|
-
### Step 3: Structure Phases
|
|
376
|
-
|
|
377
|
-
Create phases following these guidelines:
|
|
378
|
-
|
|
379
|
-
**Phase Structure**:
|
|
380
|
-
|
|
381
|
-
```markdown
|
|
382
|
-
### Phase X: [Phase Name]
|
|
383
|
-
|
|
384
|
-
**Scope**: [What this phase covers]
|
|
385
|
-
**Complexity**: X/10
|
|
386
|
-
|
|
387
|
-
- [ ] Task 1
|
|
388
|
-
- [ ] Task 2
|
|
389
|
-
|
|
390
|
-
**Build Verification**: Run `npm run build`
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
**Standard Phase Order**:
|
|
394
|
-
|
|
395
|
-
1. Types and Schemas (usually low complexity)
|
|
396
|
-
2. Backend/API Implementation
|
|
397
|
-
3. Store/State Management
|
|
398
|
-
4. UI Components
|
|
399
|
-
5. Integration
|
|
400
|
-
6. Tests (ALWAYS last)
|
|
401
|
-
|
|
402
|
-
**Complexity Scoring** (per `.claude/rules/core/complexity-scoring.md`):
|
|
403
|
-
|
|
404
|
-
| Score | Level | Description |
|
|
405
|
-
| ----- | --------- | -------------------------------- |
|
|
406
|
-
| 0-2 | Trivial | Simple, mechanical changes |
|
|
407
|
-
| 3-4 | Low | Straightforward implementation |
|
|
408
|
-
| 5-6 | Medium | Moderate effort, some decisions |
|
|
409
|
-
| 7-8 | High | Complex, multiple considerations |
|
|
410
|
-
| 9-10 | Very High | Significant complexity/risk |
|
|
411
|
-
|
|
412
|
-
---
|
|
413
|
-
|
|
414
|
-
### Step 4: Add Key Changes Summary
|
|
415
|
-
|
|
416
|
-
Document the most important modifications:
|
|
417
|
-
|
|
418
|
-
```markdown
|
|
419
|
-
## Key Changes
|
|
420
|
-
|
|
421
|
-
1. **[Category]**: [Description of change]
|
|
422
|
-
2. **[Category]**: [Description of change]
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
---
|
|
426
|
-
|
|
427
|
-
### Step 5: Generate Plan Document
|
|
428
|
-
|
|
429
|
-
Create the plan markdown file:
|
|
430
|
-
|
|
431
|
-
**Location**: `flow/plans/plan_<feature_name>_v<version>.md`
|
|
432
|
-
|
|
433
|
-
**Use Template**: See `.claude/rules/patterns/plans-templates.md`
|
|
434
|
-
|
|
435
|
-
**Required Sections**:
|
|
436
|
-
|
|
437
|
-
1. Overview (with discovery document reference)
|
|
438
|
-
2. Goals
|
|
439
|
-
3. Non-Goals
|
|
440
|
-
4. Requirements Summary (FR, NFR, Constraints)
|
|
441
|
-
5. Risks
|
|
442
|
-
6. Phases (with complexity scores)
|
|
443
|
-
7. Key Changes
|
|
444
|
-
|
|
445
|
-
---
|
|
446
|
-
|
|
447
|
-
## Output Format
|
|
448
|
-
|
|
449
|
-
The plan document should follow the template in `.claude/rules/patterns/plans-templates.md`.
|
|
450
|
-
|
|
451
|
-
**Naming Convention**: `plan_<feature_name>_v<version>.md`
|
|
452
|
-
|
|
453
|
-
**Examples**:
|
|
454
|
-
- `plan_user_authentication_v1.md`
|
|
455
|
-
- `plan_dark_mode_v2.md`
|
|
456
|
-
|
|
457
|
-
---
|
|
458
|
-
|
|
459
|
-
## Plan Template
|
|
460
|
-
|
|
461
|
-
```markdown
|
|
462
|
-
# Plan: [Feature Name]
|
|
463
|
-
|
|
464
|
-
## Overview
|
|
465
|
-
|
|
466
|
-
[Brief description of the feature and its purpose]
|
|
467
|
-
|
|
468
|
-
**Based on Discovery**: `flow/discovery/discovery_<feature>_v1.md` (or "Discovery skipped")
|
|
469
|
-
|
|
470
|
-
## Goals
|
|
471
|
-
|
|
472
|
-
- [Goal 1]
|
|
473
|
-
- [Goal 2]
|
|
474
|
-
|
|
475
|
-
## Non-Goals
|
|
476
|
-
|
|
477
|
-
- [What this plan explicitly does NOT cover]
|
|
478
|
-
|
|
479
|
-
## Requirements Summary
|
|
480
|
-
|
|
481
|
-
### Functional Requirements
|
|
482
|
-
|
|
483
|
-
- [FR-1]: [Description]
|
|
484
|
-
|
|
485
|
-
### Non-Functional Requirements
|
|
486
|
-
|
|
487
|
-
- [NFR-1]: [Description]
|
|
488
|
-
|
|
489
|
-
### Constraints
|
|
490
|
-
|
|
491
|
-
- [C-1]: [Description]
|
|
492
|
-
|
|
493
|
-
## Risks
|
|
494
|
-
|
|
495
|
-
| Risk | Impact | Mitigation |
|
|
496
|
-
| -------- | --------------- | --------------------- |
|
|
497
|
-
| [Risk 1] | High/Medium/Low | [Mitigation strategy] |
|
|
498
|
-
|
|
499
|
-
## Phases
|
|
500
|
-
|
|
501
|
-
### Phase 1: [Phase Name]
|
|
502
|
-
|
|
503
|
-
**Scope**: [What this phase covers]
|
|
504
|
-
**Complexity**: X/10
|
|
505
|
-
|
|
506
|
-
- [ ] Task 1
|
|
507
|
-
- [ ] Task 2
|
|
508
|
-
|
|
509
|
-
**Build Verification**: Run `npm run build`
|
|
510
|
-
|
|
511
|
-
### Phase N: Tests (Final)
|
|
512
|
-
|
|
513
|
-
**Scope**: Write comprehensive tests
|
|
514
|
-
**Complexity**: X/10
|
|
515
|
-
|
|
516
|
-
- [ ] Unit tests
|
|
517
|
-
- [ ] Integration tests
|
|
518
|
-
|
|
519
|
-
**Build Verification**: Run `npm run build && npm run test`
|
|
520
|
-
|
|
521
|
-
## Key Changes
|
|
522
|
-
|
|
523
|
-
1. **[Category]**: [Description]
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
---
|
|
527
|
-
|
|
528
|
-
## Validation Checklist
|
|
529
|
-
|
|
530
|
-
Before completing the plan, verify:
|
|
531
|
-
|
|
532
|
-
- [ ] Plan is saved in `flow/plans/` folder
|
|
533
|
-
- [ ] File uses snake_case naming: `plan_<feature>_v<version>.md`
|
|
534
|
-
- [ ] All phases have complexity scores (X/10)
|
|
535
|
-
- [ ] Tests are the LAST phase
|
|
536
|
-
- [ ] Key Changes section is populated
|
|
537
|
-
- [ ] Discovery document is referenced (or noted as skipped)
|
|
538
|
-
- [ ] **NO implementation code is included**
|
|
539
|
-
- [ ] **NO source files were created or modified**
|
|
540
|
-
|
|
541
|
-
---
|
|
542
|
-
|
|
543
|
-
## Related Files
|
|
544
|
-
|
|
545
|
-
| File | Purpose |
|
|
546
|
-
| ---------------------------------------------- | -------------------------------- |
|
|
547
|
-
| `.claude/rules/patterns/plans-patterns.md` | Rules and patterns for plans |
|
|
548
|
-
| `.claude/rules/patterns/plans-templates.md` | Plan templates |
|
|
549
|
-
| `.claude/rules/core/complexity-scoring.md` | Complexity scoring system |
|
|
550
|
-
| `flow/plans/` | Output folder for plan documents |
|
|
551
|
-
| `flow/discovery/` | Input discovery documents |
|