plan-flow-skill 1.0.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.
Files changed (124) hide show
  1. package/.claude/commands/create-contract.md +468 -0
  2. package/.claude/commands/create-plan.md +512 -0
  3. package/.claude/commands/discovery-plan.md +561 -0
  4. package/.claude/commands/execute-plan.md +682 -0
  5. package/.claude/commands/review-code.md +459 -0
  6. package/.claude/commands/review-pr.md +651 -0
  7. package/.claude/commands/setup.md +1609 -0
  8. package/.claude/commands/write-tests.md +543 -0
  9. package/.claude/rules/core/allowed-patterns.md +175 -0
  10. package/.claude/rules/core/complexity-scoring.md +225 -0
  11. package/.claude/rules/core/forbidden-patterns.md +253 -0
  12. package/.claude/rules/languages/python-patterns.md +6 -0
  13. package/.claude/rules/languages/typescript-patterns.md +7 -0
  14. package/.claude/rules/patterns/contract-patterns.md +332 -0
  15. package/.claude/rules/patterns/discovery-patterns.md +342 -0
  16. package/.claude/rules/patterns/discovery-templates.md +319 -0
  17. package/.claude/rules/patterns/jest-patterns.md +482 -0
  18. package/.claude/rules/patterns/plans-patterns.md +225 -0
  19. package/.claude/rules/patterns/plans-templates.md +227 -0
  20. package/.claude/rules/patterns/pytest-patterns.md +457 -0
  21. package/.claude/rules/patterns/review-code-templates.md +305 -0
  22. package/.claude/rules/patterns/review-pr-patterns.md +360 -0
  23. package/.claude/rules/tools/auth-pr-tool.md +30 -0
  24. package/.claude/rules/tools/interactive-questions-tool.md +235 -0
  25. package/.claude/rules/tools/jest-testing-tool.md +73 -0
  26. package/.claude/rules/tools/plan-mode-tool.md +164 -0
  27. package/.claude/rules/tools/pytest-testing-tool.md +121 -0
  28. package/.claude/rules/tools/reference-expansion-tool.md +326 -0
  29. package/LICENSE +21 -0
  30. package/README.md +167 -0
  31. package/dist/cli/commands/init.d.ts +6 -0
  32. package/dist/cli/commands/init.d.ts.map +1 -0
  33. package/dist/cli/commands/init.js +139 -0
  34. package/dist/cli/commands/init.js.map +1 -0
  35. package/dist/cli/handlers/claude.d.ts +9 -0
  36. package/dist/cli/handlers/claude.d.ts.map +1 -0
  37. package/dist/cli/handlers/claude.js +119 -0
  38. package/dist/cli/handlers/claude.js.map +1 -0
  39. package/dist/cli/handlers/codex.d.ts +9 -0
  40. package/dist/cli/handlers/codex.d.ts.map +1 -0
  41. package/dist/cli/handlers/codex.js +100 -0
  42. package/dist/cli/handlers/codex.js.map +1 -0
  43. package/dist/cli/handlers/cursor.d.ts +8 -0
  44. package/dist/cli/handlers/cursor.d.ts.map +1 -0
  45. package/dist/cli/handlers/cursor.js +34 -0
  46. package/dist/cli/handlers/cursor.js.map +1 -0
  47. package/dist/cli/handlers/openclaw.d.ts +8 -0
  48. package/dist/cli/handlers/openclaw.d.ts.map +1 -0
  49. package/dist/cli/handlers/openclaw.js +34 -0
  50. package/dist/cli/handlers/openclaw.js.map +1 -0
  51. package/dist/cli/handlers/shared.d.ts +9 -0
  52. package/dist/cli/handlers/shared.d.ts.map +1 -0
  53. package/dist/cli/handlers/shared.js +44 -0
  54. package/dist/cli/handlers/shared.js.map +1 -0
  55. package/dist/cli/index.d.ts +8 -0
  56. package/dist/cli/index.d.ts.map +1 -0
  57. package/dist/cli/index.js +43 -0
  58. package/dist/cli/index.js.map +1 -0
  59. package/dist/cli/types.d.ts +26 -0
  60. package/dist/cli/types.d.ts.map +1 -0
  61. package/dist/cli/types.js +5 -0
  62. package/dist/cli/types.js.map +1 -0
  63. package/dist/cli/utils/files.d.ts +37 -0
  64. package/dist/cli/utils/files.d.ts.map +1 -0
  65. package/dist/cli/utils/files.js +122 -0
  66. package/dist/cli/utils/files.js.map +1 -0
  67. package/dist/cli/utils/logger.d.ts +11 -0
  68. package/dist/cli/utils/logger.d.ts.map +1 -0
  69. package/dist/cli/utils/logger.js +34 -0
  70. package/dist/cli/utils/logger.js.map +1 -0
  71. package/dist/cli/utils/prompts.d.ts +10 -0
  72. package/dist/cli/utils/prompts.d.ts.map +1 -0
  73. package/dist/cli/utils/prompts.js +65 -0
  74. package/dist/cli/utils/prompts.js.map +1 -0
  75. package/dist/test/setup.d.ts +5 -0
  76. package/dist/test/setup.d.ts.map +1 -0
  77. package/dist/test/setup.js +7 -0
  78. package/dist/test/setup.js.map +1 -0
  79. package/package.json +63 -0
  80. package/rules/core/_index.mdc +89 -0
  81. package/rules/core/allowed-patterns.mdc +185 -0
  82. package/rules/core/complexity-scoring.mdc +235 -0
  83. package/rules/core/forbidden-patterns.mdc +263 -0
  84. package/rules/languages/_index.mdc +80 -0
  85. package/rules/languages/python-patterns.mdc +188 -0
  86. package/rules/languages/typescript-patterns.mdc +128 -0
  87. package/rules/patterns/_index.mdc +185 -0
  88. package/rules/patterns/contract-patterns.mdc +344 -0
  89. package/rules/patterns/discovery-patterns.mdc +354 -0
  90. package/rules/patterns/discovery-templates.mdc +329 -0
  91. package/rules/patterns/jest-patterns.mdc +492 -0
  92. package/rules/patterns/plans-patterns.mdc +237 -0
  93. package/rules/patterns/plans-templates.mdc +237 -0
  94. package/rules/patterns/pytest-patterns.mdc +467 -0
  95. package/rules/patterns/review-code-templates.mdc +315 -0
  96. package/rules/patterns/review-pr-patterns.mdc +370 -0
  97. package/rules/skills/_index.mdc +174 -0
  98. package/rules/skills/create-contract-skill.mdc +239 -0
  99. package/rules/skills/create-plan-skill.mdc +271 -0
  100. package/rules/skills/discovery-skill.mdc +295 -0
  101. package/rules/skills/execute-plan-skill.mdc +388 -0
  102. package/rules/skills/review-code-skill.mdc +308 -0
  103. package/rules/skills/review-pr-skill.mdc +496 -0
  104. package/rules/skills/setup-skill.mdc +923 -0
  105. package/rules/skills/write-tests-skill.mdc +294 -0
  106. package/rules/templates/index-template.mdc +126 -0
  107. package/rules/tools/_index.mdc +114 -0
  108. package/rules/tools/auth-pr-tool.mdc +362 -0
  109. package/rules/tools/interactive-questions-tool.mdc +337 -0
  110. package/rules/tools/jest-testing-tool.mdc +96 -0
  111. package/rules/tools/plan-mode-tool.mdc +229 -0
  112. package/rules/tools/pytest-testing-tool.mdc +144 -0
  113. package/rules/tools/reference-expansion-tool.mdc +338 -0
  114. package/skills/plan-flow/SKILL.md +109 -0
  115. package/skills/plan-flow/create-contract/SKILL.md +139 -0
  116. package/skills/plan-flow/create-plan/SKILL.md +93 -0
  117. package/skills/plan-flow/discovery/SKILL.md +85 -0
  118. package/skills/plan-flow/execute-plan/SKILL.md +89 -0
  119. package/skills/plan-flow/review-code/SKILL.md +100 -0
  120. package/skills/plan-flow/review-pr/SKILL.md +122 -0
  121. package/skills/plan-flow/setup/SKILL.md +73 -0
  122. package/skills/plan-flow/write-tests/SKILL.md +115 -0
  123. package/templates/shared/AGENTS.md.template +60 -0
  124. package/templates/shared/CLAUDE.md.template +62 -0
@@ -0,0 +1,512 @@
1
+ ---
2
+ description: This command creates a structured implementation plan based on a discovery document or user input. T
3
+ ---
4
+
5
+ # Create Implementation Plan
6
+
7
+ ## Command Description
8
+
9
+ This command creates a structured implementation plan based on a discovery document or user input. The command validates inputs and orchestrates the planning process by invoking the `create-plan` skill.
10
+
11
+ **Output**: A markdown file at `flow/plans/plan_<feature_name>_v<version>.md`
12
+
13
+ ---
14
+
15
+
16
+ ## Help
17
+
18
+ **If the user invokes this command with `-help`, display only this section and stop:**
19
+
20
+ ```
21
+ /create-plan - Create Implementation Plan
22
+
23
+ DESCRIPTION:
24
+ Creates a structured implementation plan with phases, complexity scores,
25
+ and tasks based on a discovery document or user input.
26
+
27
+ USAGE:
28
+ /create-plan <discovery_document>
29
+ /create-plan <feature_description>
30
+ /create-plan -help
31
+
32
+ ARGUMENTS:
33
+ discovery_document Path to discovery document (recommended)
34
+ feature_description Direct description of feature to plan (if no discovery)
35
+
36
+ EXAMPLES:
37
+ /create-plan @flow/discovery/discovery_user_auth_v1.md
38
+ /create-plan "Add dark mode toggle to settings page"
39
+ /create-plan @flow/contracts/api_contract.md
40
+
41
+ OUTPUT:
42
+ Creates: flow/plans/plan_<feature_name>_v<version>.md
43
+
44
+ WORKFLOW:
45
+ 1. Validates discovery document exists (or prompts for discovery first)
46
+ 2. Extracts requirements from discovery document
47
+ 3. Creates phases with complexity scores (0-10)
48
+ 4. Assigns tasks to each phase
49
+ 5. Tests phase is always last
50
+
51
+ RECOMMENDED MODEL:
52
+ Claude Opus 4.5 or Sonnet 4.5 for best results
53
+
54
+ RELATED COMMANDS:
55
+ /discovery-plan Run discovery first (recommended)
56
+ /execute-plan Execute the created plan
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Critical Rules
62
+
63
+ | Rule | Description |
64
+ | ------------------------ | -------------------------------------------------------- |
65
+ | **No Auto-Chaining** | NEVER auto-invoke /execute-plan - user must invoke it |
66
+ | **Complete and Stop** | After presenting results, STOP and wait for user |
67
+
68
+ ---
69
+
70
+ ## Instructions
71
+
72
+ ### Step 1: Validate Inputs
73
+
74
+ | Input | Required | Description |
75
+ | -------------------- | -------- | -------------------------------------------------- |
76
+ | `discovery_document` | Optional | Path to discovery document (recommended) |
77
+ | `feature_description`| Optional | Direct description of feature (if no discovery) |
78
+
79
+ **At least one must be provided.**
80
+
81
+ ---
82
+
83
+ ### Step 2: Validate Discovery Phase Completion
84
+
85
+ **Before creating a plan, verify that proper discovery was performed.**
86
+
87
+ 1. Check user input for discovery indicators:
88
+ - Discovery document reference (`@flow/discovery/...`)
89
+ - FR/NFR prefixes in requirements
90
+ 2. Check the discovery folder for a matching document in `flow/discovery/`
91
+ 3. If NO discovery indicators found: Recommend `/discovery-plan` command first
92
+ 4. If discovery indicators ARE found: Proceed with plan creation
93
+
94
+ **Important**: NEVER read or reference files in `flow/archive/` - these are outdated.
95
+
96
+ ---
97
+
98
+ ### Step 3: Determine Plan Version
99
+
100
+ Check `flow/plans/` for existing plans with the same feature name:
101
+
102
+ 1. If existing plans found, increment version number
103
+ 2. If no existing plans, use version 1
104
+
105
+ ---
106
+
107
+ ### Step 4: Invoke Create Plan Skill
108
+
109
+ The skill will:
110
+
111
+ 1. Extract requirements from discovery document (or user input)
112
+ 2. Analyze scope and complexity
113
+ 3. Structure phases with complexity scores
114
+ 4. Add key changes summary
115
+ 5. Generate plan document
116
+
117
+ See: `.claude/rules/skills/create-plan-skill.md`
118
+
119
+ ---
120
+
121
+ ### Step 5: Present Results
122
+
123
+ After the skill completes, confirm file creation and summarize:
124
+
125
+ ```markdown
126
+ Plan Created!
127
+
128
+ **Deliverable**: `flow/plans/plan_<feature>_v<version>.md`
129
+
130
+ **Summary**:
131
+ - X phases created
132
+ - Total complexity: XX/XX
133
+ - Highest complexity: Phase X at Y/10
134
+
135
+ **Next Steps** (user must invoke manually):
136
+ 1. Review the plan above
137
+ 2. Request any refinements
138
+ 3. When ready, invoke `/execute-plan @flow/plans/plan_<feature>_v<version>.md`
139
+ ```
140
+
141
+ **CRITICAL**: This command is now complete. Do NOT auto-invoke `/execute-plan`. Wait for the user to explicitly invoke it.
142
+
143
+ ---
144
+
145
+ ## Flow Diagram
146
+
147
+ ```
148
+ +------------------------------------------+
149
+ | /create-plan COMMAND |
150
+ +------------------------------------------+
151
+ |
152
+ v
153
+ +------------------------------------------+
154
+ | Step 1: Validate Inputs |
155
+ | - Check for discovery doc or description |
156
+ +------------------------------------------+
157
+ |
158
+ v
159
+ +------------------------------------------+
160
+ | Step 2: Validate Discovery Completion |
161
+ | - Check for discovery indicators |
162
+ | - Recommend /discovery-plan if missing |
163
+ +------------------------------------------+
164
+ |
165
+ v
166
+ +------------------------------------------+
167
+ | Step 3: Determine Plan Version |
168
+ | - Check existing plans |
169
+ | - Increment version if needed |
170
+ +------------------------------------------+
171
+ |
172
+ v
173
+ +------------------------------------------+
174
+ | Step 4: Invoke Create Plan Skill |
175
+ | - Skill handles all planning logic |
176
+ | - See create-plan-skill.md |
177
+ +------------------------------------------+
178
+ |
179
+ v
180
+ +------------------------------------------+
181
+ | Step 5: Present Results |
182
+ | - Show summary |
183
+ | - Link to /execute-plan command |
184
+ +------------------------------------------+
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Example Usage
190
+
191
+ **User**: `/create-plan @flow/discovery/discovery_user_auth_v1.md`
192
+
193
+ **Execution**:
194
+
195
+ 1. Validate input: discovery document provided
196
+ 2. Verify discovery was completed
197
+ 3. Check for existing plans, determine version
198
+ 4. Invoke create-plan skill
199
+ 5. Present plan summary
200
+ 6. User reviews and proceeds to `/execute-plan`
201
+
202
+ ---
203
+
204
+ ## Context Optimization
205
+
206
+ This command uses hierarchical context loading to reduce context consumption. Instead of loading full files, load indexes first and expand specific sections on-demand.
207
+
208
+ ### Recommended Loading Order
209
+
210
+ 1. **Always load first**: This command file (`commands/create-plan.md`)
211
+ 2. **Load indexes**: Load `_index.md` files for relevant folders
212
+ 3. **Expand on-demand**: Use reference codes to load specific sections when needed
213
+
214
+ ### Index Files for Plan Creation
215
+
216
+ | Index | When to Load |
217
+ |-------|--------------|
218
+ | `rules/patterns/_index.md` | To find plan patterns and templates |
219
+ | `rules/skills/_index.md` | To understand skill workflow |
220
+ | `rules/core/_index.md` | For complexity scoring reference |
221
+
222
+ ### Reference Codes for Plan Creation
223
+
224
+ | Code | Description | When to Expand |
225
+ |------|-------------|----------------|
226
+ | PTN-PLN-1 | Plan document structure | Creating new plan |
227
+ | PTN-PLN-2 | Phase organization | Structuring phases |
228
+ | PTN-PLNT-1 | Plan template | Creating output file |
229
+ | SKL-PLN-1 | Create plan skill workflow | Understanding full process |
230
+ | COR-CS-1 | Complexity scoring table | Assigning complexity scores |
231
+
232
+ ### Expansion Instructions
233
+
234
+ When executing this command:
235
+
236
+ 1. **Start with indexes**: Read `rules/patterns/_index.md` and `rules/core/_index.md`
237
+ 2. **Identify needed codes**: Based on current step, identify which codes are relevant
238
+ 3. **Expand as needed**: Use the Read tool with specific line ranges from the index
239
+ 4. **Don't expand everything**: Only load content required for the current step
240
+
241
+ ---
242
+
243
+ ## Related Resources
244
+
245
+ | Resource | Purpose |
246
+ | --------------------------- | --------------------------------- |
247
+ | `rules/skills/_index.md` | Index of skills with reference codes |
248
+ | `rules/patterns/_index.md` | Index of patterns with reference codes |
249
+ | `rules/core/_index.md` | Index of core rules with reference codes |
250
+ | `create-plan-skill.md` | Skill that creates the plan |
251
+ | `plans-patterns.md` | Rules and patterns for plans |
252
+ | `plans-templates.md` | Plan templates |
253
+ | `complexity-scoring.md` | Complexity scoring system |
254
+ | `/discovery-plan` command | Run discovery first |
255
+ | `/execute-plan` command | Execute the created plan |
256
+
257
+ ---
258
+
259
+ # Implementation Details
260
+
261
+
262
+ ## Restrictions - PLANNING ONLY
263
+
264
+ This skill is **strictly for creating plan documents**. The process:
265
+
266
+ 1. **Reads** the discovery document or gathers requirements
267
+ 2. **Analyzes** complexity and scope
268
+ 3. **Structures** phases with complexity scores
269
+ 4. **Generates** a plan markdown file
270
+
271
+ **No code, no implementation, no source file modifications.**
272
+
273
+ ### NEVER Do These Actions
274
+
275
+ | Forbidden Action | Reason |
276
+ | ----------------------------------- | -------------------------------- |
277
+ | Create/edit source code files | Planning only, no implementation |
278
+ | Write implementation code | Plans describe what, not how |
279
+ | Execute any plan phases | Use /execute-plan for that |
280
+ | Run build or test commands | No execution commands |
281
+ | Create files outside `flow/plans/` | Only write plan documents |
282
+
283
+ ### Allowed Actions
284
+
285
+ | Allowed Action | Purpose |
286
+ | -------------------------------------- | --------------------------------- |
287
+ | Read discovery documents | Extract requirements |
288
+ | Read any project file | Understand existing codebase |
289
+ | Search codebase (grep, glob, semantic) | Find existing patterns |
290
+ | Write to `flow/plans/` | Save plan document |
291
+ | Read project rule files | Understand patterns to follow |
292
+
293
+ > **Important**: The ONLY writable location is `flow/plans/`. No source code or other files should be modified.
294
+
295
+ ---
296
+
297
+ ## Inputs
298
+
299
+ | Input | Required | Description |
300
+ | -------------------- | -------- | -------------------------------------------------- |
301
+ | `discovery_document` | Optional | Path to discovery document (recommended) |
302
+ | `feature_name` | Yes | Name of the feature to plan |
303
+ | `requirements` | Optional | Direct requirements if no discovery document |
304
+ | `version` | Optional | Version number (auto-incremented if not provided) |
305
+
306
+ ---
307
+
308
+ ## Workflow
309
+
310
+ ### Step 1: Extract Requirements
311
+
312
+ **If discovery document was provided**:
313
+
314
+ 1. Read the discovery document
315
+ 2. Extract feature name, description, goals from the document
316
+ 3. Extract FR, NFR, Constraints
317
+ 4. Note any risks identified
318
+
319
+ **If no discovery document**:
320
+
321
+ 1. Use requirements provided directly
322
+ 2. Note that discovery was skipped
323
+
324
+ ---
325
+
326
+ ### Step 2: Analyze Scope and Complexity
327
+
328
+ Based on extracted requirements:
329
+
330
+ 1. Identify the major components/areas of work
331
+ 2. Group related tasks into logical phases
332
+ 3. Estimate complexity for each phase using `.claude/rules/core/complexity-scoring.md`
333
+
334
+ ---
335
+
336
+ ### Step 3: Structure Phases
337
+
338
+ Create phases following these guidelines:
339
+
340
+ **Phase Structure**:
341
+
342
+ ```markdown
343
+ ### Phase X: [Phase Name]
344
+
345
+ **Scope**: [What this phase covers]
346
+ **Complexity**: X/10
347
+
348
+ - [ ] Task 1
349
+ - [ ] Task 2
350
+
351
+ **Build Verification**: Run `npm run build`
352
+ ```
353
+
354
+ **Standard Phase Order**:
355
+
356
+ 1. Types and Schemas (usually low complexity)
357
+ 2. Backend/API Implementation
358
+ 3. Store/State Management
359
+ 4. UI Components
360
+ 5. Integration
361
+ 6. Tests (ALWAYS last)
362
+
363
+ **Complexity Scoring** (per `.claude/rules/core/complexity-scoring.md`):
364
+
365
+ | Score | Level | Description |
366
+ | ----- | --------- | -------------------------------- |
367
+ | 0-2 | Trivial | Simple, mechanical changes |
368
+ | 3-4 | Low | Straightforward implementation |
369
+ | 5-6 | Medium | Moderate effort, some decisions |
370
+ | 7-8 | High | Complex, multiple considerations |
371
+ | 9-10 | Very High | Significant complexity/risk |
372
+
373
+ ---
374
+
375
+ ### Step 4: Add Key Changes Summary
376
+
377
+ Document the most important modifications:
378
+
379
+ ```markdown
380
+ ## Key Changes
381
+
382
+ 1. **[Category]**: [Description of change]
383
+ 2. **[Category]**: [Description of change]
384
+ ```
385
+
386
+ ---
387
+
388
+ ### Step 5: Generate Plan Document
389
+
390
+ Create the plan markdown file:
391
+
392
+ **Location**: `flow/plans/plan_<feature_name>_v<version>.md`
393
+
394
+ **Use Template**: See `.claude/rules/patterns/plans-templates.md`
395
+
396
+ **Required Sections**:
397
+
398
+ 1. Overview (with discovery document reference)
399
+ 2. Goals
400
+ 3. Non-Goals
401
+ 4. Requirements Summary (FR, NFR, Constraints)
402
+ 5. Risks
403
+ 6. Phases (with complexity scores)
404
+ 7. Key Changes
405
+
406
+ ---
407
+
408
+ ## Output Format
409
+
410
+ The plan document should follow the template in `.claude/rules/patterns/plans-templates.md`.
411
+
412
+ **Naming Convention**: `plan_<feature_name>_v<version>.md`
413
+
414
+ **Examples**:
415
+ - `plan_user_authentication_v1.md`
416
+ - `plan_dark_mode_v2.md`
417
+
418
+ ---
419
+
420
+ ## Plan Template
421
+
422
+ ```markdown
423
+ # Plan: [Feature Name]
424
+
425
+ ## Overview
426
+
427
+ [Brief description of the feature and its purpose]
428
+
429
+ **Based on Discovery**: `flow/discovery/discovery_<feature>_v1.md` (or "Discovery skipped")
430
+
431
+ ## Goals
432
+
433
+ - [Goal 1]
434
+ - [Goal 2]
435
+
436
+ ## Non-Goals
437
+
438
+ - [What this plan explicitly does NOT cover]
439
+
440
+ ## Requirements Summary
441
+
442
+ ### Functional Requirements
443
+
444
+ - [FR-1]: [Description]
445
+
446
+ ### Non-Functional Requirements
447
+
448
+ - [NFR-1]: [Description]
449
+
450
+ ### Constraints
451
+
452
+ - [C-1]: [Description]
453
+
454
+ ## Risks
455
+
456
+ | Risk | Impact | Mitigation |
457
+ | -------- | --------------- | --------------------- |
458
+ | [Risk 1] | High/Medium/Low | [Mitigation strategy] |
459
+
460
+ ## Phases
461
+
462
+ ### Phase 1: [Phase Name]
463
+
464
+ **Scope**: [What this phase covers]
465
+ **Complexity**: X/10
466
+
467
+ - [ ] Task 1
468
+ - [ ] Task 2
469
+
470
+ **Build Verification**: Run `npm run build`
471
+
472
+ ### Phase N: Tests (Final)
473
+
474
+ **Scope**: Write comprehensive tests
475
+ **Complexity**: X/10
476
+
477
+ - [ ] Unit tests
478
+ - [ ] Integration tests
479
+
480
+ **Build Verification**: Run `npm run build && npm run test`
481
+
482
+ ## Key Changes
483
+
484
+ 1. **[Category]**: [Description]
485
+ ```
486
+
487
+ ---
488
+
489
+ ## Validation Checklist
490
+
491
+ Before completing the plan, verify:
492
+
493
+ - [ ] Plan is saved in `flow/plans/` folder
494
+ - [ ] File uses snake_case naming: `plan_<feature>_v<version>.md`
495
+ - [ ] All phases have complexity scores (X/10)
496
+ - [ ] Tests are the LAST phase
497
+ - [ ] Key Changes section is populated
498
+ - [ ] Discovery document is referenced (or noted as skipped)
499
+ - [ ] **NO implementation code is included**
500
+ - [ ] **NO source files were created or modified**
501
+
502
+ ---
503
+
504
+ ## Related Files
505
+
506
+ | File | Purpose |
507
+ | ---------------------------------------------- | -------------------------------- |
508
+ | `.claude/rules/patterns/plans-patterns.md` | Rules and patterns for plans |
509
+ | `.claude/rules/patterns/plans-templates.md` | Plan templates |
510
+ | `.claude/rules/core/complexity-scoring.md` | Complexity scoring system |
511
+ | `flow/plans/` | Output folder for plan documents |
512
+ | `flow/discovery/` | Input discovery documents |