ai-flow-dev 2.7.0 → 2.8.1

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 (171) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +573 -570
  3. package/package.json +74 -74
  4. package/prompts/backend/flow-build-phase-0.md +535 -535
  5. package/prompts/backend/flow-build-phase-1.md +626 -626
  6. package/prompts/backend/flow-build-phase-10.md +340 -340
  7. package/prompts/backend/flow-build-phase-2.md +573 -573
  8. package/prompts/backend/flow-build-phase-3.md +834 -834
  9. package/prompts/backend/flow-build-phase-4.md +554 -554
  10. package/prompts/backend/flow-build-phase-5.md +703 -703
  11. package/prompts/backend/flow-build-phase-6.md +524 -524
  12. package/prompts/backend/flow-build-phase-7.md +1001 -1001
  13. package/prompts/backend/flow-build-phase-8.md +1407 -1407
  14. package/prompts/backend/flow-build-phase-9.md +477 -477
  15. package/prompts/backend/flow-build.md +137 -137
  16. package/prompts/backend/flow-check-review.md +656 -20
  17. package/prompts/backend/flow-check-test.md +526 -14
  18. package/prompts/backend/flow-check.md +717 -67
  19. package/prompts/backend/flow-commit.md +88 -119
  20. package/prompts/backend/flow-docs-sync.md +354 -354
  21. package/prompts/backend/flow-finish.md +919 -0
  22. package/prompts/backend/flow-release.md +949 -0
  23. package/prompts/backend/flow-work-feature.md +61 -61
  24. package/prompts/backend/flow-work-fix.md +46 -46
  25. package/prompts/backend/flow-work-refactor.md +48 -48
  26. package/prompts/backend/flow-work-resume.md +34 -34
  27. package/prompts/backend/flow-work.md +1098 -1286
  28. package/prompts/desktop/flow-build-phase-0.md +359 -359
  29. package/prompts/desktop/flow-build-phase-1.md +295 -295
  30. package/prompts/desktop/flow-build-phase-10.md +357 -357
  31. package/prompts/desktop/flow-build-phase-2.md +282 -282
  32. package/prompts/desktop/flow-build-phase-3.md +291 -291
  33. package/prompts/desktop/flow-build-phase-4.md +308 -308
  34. package/prompts/desktop/flow-build-phase-5.md +269 -269
  35. package/prompts/desktop/flow-build-phase-6.md +350 -350
  36. package/prompts/desktop/flow-build-phase-7.md +297 -297
  37. package/prompts/desktop/flow-build-phase-8.md +541 -541
  38. package/prompts/desktop/flow-build-phase-9.md +439 -439
  39. package/prompts/desktop/flow-build.md +156 -156
  40. package/prompts/desktop/flow-check-review.md +656 -20
  41. package/prompts/desktop/flow-check-test.md +526 -14
  42. package/prompts/desktop/flow-check.md +717 -67
  43. package/prompts/desktop/flow-commit.md +88 -119
  44. package/prompts/desktop/flow-docs-sync.md +354 -354
  45. package/prompts/desktop/flow-finish.md +919 -0
  46. package/prompts/desktop/flow-release.md +662 -0
  47. package/prompts/desktop/flow-work-feature.md +61 -61
  48. package/prompts/desktop/flow-work-fix.md +46 -46
  49. package/prompts/desktop/flow-work-refactor.md +48 -48
  50. package/prompts/desktop/flow-work-resume.md +34 -34
  51. package/prompts/desktop/flow-work.md +1202 -1390
  52. package/prompts/frontend/flow-build-phase-0.md +425 -425
  53. package/prompts/frontend/flow-build-phase-1.md +626 -626
  54. package/prompts/frontend/flow-build-phase-10.md +33 -33
  55. package/prompts/frontend/flow-build-phase-2.md +573 -573
  56. package/prompts/frontend/flow-build-phase-3.md +782 -782
  57. package/prompts/frontend/flow-build-phase-4.md +554 -554
  58. package/prompts/frontend/flow-build-phase-5.md +703 -703
  59. package/prompts/frontend/flow-build-phase-6.md +524 -524
  60. package/prompts/frontend/flow-build-phase-7.md +1001 -1001
  61. package/prompts/frontend/flow-build-phase-8.md +872 -872
  62. package/prompts/frontend/flow-build-phase-9.md +94 -94
  63. package/prompts/frontend/flow-build.md +137 -137
  64. package/prompts/frontend/flow-check-review.md +656 -20
  65. package/prompts/frontend/flow-check-test.md +526 -14
  66. package/prompts/frontend/flow-check.md +717 -67
  67. package/prompts/frontend/flow-commit.md +88 -119
  68. package/prompts/frontend/flow-docs-sync.md +550 -550
  69. package/prompts/frontend/flow-finish.md +919 -0
  70. package/prompts/frontend/flow-release.md +519 -0
  71. package/prompts/frontend/flow-work-api.md +1547 -0
  72. package/prompts/frontend/flow-work-feature.md +61 -61
  73. package/prompts/frontend/flow-work-fix.md +38 -38
  74. package/prompts/frontend/flow-work-refactor.md +48 -48
  75. package/prompts/frontend/flow-work-resume.md +34 -34
  76. package/prompts/frontend/flow-work.md +1595 -1320
  77. package/prompts/mobile/flow-build-phase-0.md +425 -425
  78. package/prompts/mobile/flow-build-phase-1.md +626 -626
  79. package/prompts/mobile/flow-build-phase-10.md +32 -32
  80. package/prompts/mobile/flow-build-phase-2.md +573 -573
  81. package/prompts/mobile/flow-build-phase-3.md +782 -782
  82. package/prompts/mobile/flow-build-phase-4.md +554 -554
  83. package/prompts/mobile/flow-build-phase-5.md +703 -703
  84. package/prompts/mobile/flow-build-phase-6.md +524 -524
  85. package/prompts/mobile/flow-build-phase-7.md +1001 -1001
  86. package/prompts/mobile/flow-build-phase-8.md +888 -888
  87. package/prompts/mobile/flow-build-phase-9.md +90 -90
  88. package/prompts/mobile/flow-build.md +135 -135
  89. package/prompts/mobile/flow-check-review.md +656 -20
  90. package/prompts/mobile/flow-check-test.md +526 -14
  91. package/prompts/mobile/flow-check.md +717 -67
  92. package/prompts/mobile/flow-commit.md +88 -119
  93. package/prompts/mobile/flow-docs-sync.md +620 -620
  94. package/prompts/mobile/flow-finish.md +919 -0
  95. package/prompts/mobile/flow-release.md +751 -0
  96. package/prompts/mobile/flow-work-api.md +1500 -0
  97. package/prompts/mobile/flow-work-feature.md +61 -61
  98. package/prompts/mobile/flow-work-fix.md +46 -46
  99. package/prompts/mobile/flow-work-refactor.md +48 -48
  100. package/prompts/mobile/flow-work-resume.md +34 -34
  101. package/prompts/mobile/flow-work.md +1605 -1329
  102. package/prompts/shared/mermaid-guidelines.md +102 -102
  103. package/prompts/shared/scope-levels.md +114 -114
  104. package/prompts/shared/smart-skip-preflight.md +214 -214
  105. package/prompts/shared/story-points.md +55 -55
  106. package/prompts/shared/task-format.md +74 -74
  107. package/prompts/shared/task-summary-template.md +277 -277
  108. package/templates/AGENT.template.md +443 -443
  109. package/templates/backend/.clauderules.template +112 -112
  110. package/templates/backend/.cursorrules.template +102 -102
  111. package/templates/backend/README.template.md +2 -2
  112. package/templates/backend/ai-instructions.template.md +2 -2
  113. package/templates/backend/copilot-instructions.template.md +2 -2
  114. package/templates/backend/docs/api.template.md +320 -320
  115. package/templates/backend/docs/business-flows.template.md +97 -97
  116. package/templates/backend/docs/code-standards.template.md +2 -2
  117. package/templates/backend/docs/contributing.template.md +3 -3
  118. package/templates/backend/docs/data-model.template.md +520 -520
  119. package/templates/backend/docs/testing.template.md +2 -2
  120. package/templates/backend/project-brief.template.md +2 -2
  121. package/templates/backend/specs/configuration.template.md +2 -2
  122. package/templates/backend/specs/security.template.md +2 -2
  123. package/templates/desktop/.clauderules.template +112 -112
  124. package/templates/desktop/.cursorrules.template +102 -102
  125. package/templates/desktop/README.template.md +170 -170
  126. package/templates/desktop/ai-instructions.template.md +366 -366
  127. package/templates/desktop/copilot-instructions.template.md +140 -140
  128. package/templates/desktop/docs/docs/api.template.md +320 -320
  129. package/templates/desktop/docs/docs/architecture.template.md +724 -724
  130. package/templates/desktop/docs/docs/business-flows.template.md +102 -102
  131. package/templates/desktop/docs/docs/code-standards.template.md +792 -792
  132. package/templates/desktop/docs/docs/contributing.template.md +149 -149
  133. package/templates/desktop/docs/docs/data-model.template.md +520 -520
  134. package/templates/desktop/docs/docs/operations.template.md +720 -720
  135. package/templates/desktop/docs/docs/testing.template.md +722 -722
  136. package/templates/desktop/project-brief.template.md +150 -150
  137. package/templates/desktop/specs/specs/configuration.template.md +121 -121
  138. package/templates/desktop/specs/specs/security.template.md +392 -392
  139. package/templates/frontend/README.template.md +2 -2
  140. package/templates/frontend/ai-instructions.template.md +2 -2
  141. package/templates/frontend/docs/api-integration.template.md +362 -362
  142. package/templates/frontend/docs/components.template.md +2 -2
  143. package/templates/frontend/docs/error-handling.template.md +360 -360
  144. package/templates/frontend/docs/operations.template.md +107 -107
  145. package/templates/frontend/docs/performance.template.md +124 -124
  146. package/templates/frontend/docs/pwa.template.md +119 -119
  147. package/templates/frontend/docs/state-management.template.md +2 -2
  148. package/templates/frontend/docs/styling.template.md +2 -2
  149. package/templates/frontend/docs/testing.template.md +2 -2
  150. package/templates/frontend/project-brief.template.md +2 -2
  151. package/templates/frontend/specs/accessibility.template.md +95 -95
  152. package/templates/frontend/specs/configuration.template.md +2 -2
  153. package/templates/frontend/specs/security.template.md +175 -175
  154. package/templates/fullstack/README.template.md +252 -252
  155. package/templates/fullstack/ai-instructions.template.md +444 -444
  156. package/templates/fullstack/project-brief.template.md +157 -157
  157. package/templates/fullstack/specs/configuration.template.md +340 -340
  158. package/templates/mobile/README.template.md +167 -167
  159. package/templates/mobile/ai-instructions.template.md +196 -196
  160. package/templates/mobile/docs/app-store.template.md +135 -135
  161. package/templates/mobile/docs/architecture.template.md +63 -63
  162. package/templates/mobile/docs/native-features.template.md +94 -94
  163. package/templates/mobile/docs/navigation.template.md +59 -59
  164. package/templates/mobile/docs/offline-strategy.template.md +65 -65
  165. package/templates/mobile/docs/permissions.template.md +56 -56
  166. package/templates/mobile/docs/state-management.template.md +85 -85
  167. package/templates/mobile/docs/testing.template.md +109 -109
  168. package/templates/mobile/project-brief.template.md +69 -69
  169. package/templates/mobile/specs/build-configuration.template.md +91 -91
  170. package/templates/mobile/specs/deployment.template.md +92 -92
  171. package/templates/work.template.md +61 -47
@@ -1,340 +1,340 @@
1
- ## PHASE 10: Agile Planning - User Stories (5-10 min)
2
-
3
- > **Order for this phase:** OPTIONAL. Executed after Phase 9 or on demand.
4
-
5
- > **📌 Scope-based behavior:**
6
- > - **All Scopes:** Generate detailed User Stories for each milestone in the Roadmap.
7
-
8
- ### Objective
9
- Break down technical roadmap tasks into user-centric Agile requirements (User Stories) to facilitate development, testing, and acceptance criteria definition.
10
-
11
- - All Epics: 30-60 minutes
12
- - One Epic: 5-10 minutes
13
- - One User Story: 2-3 minutes
14
-
15
- ---
16
-
17
- ## Command Modes
18
-
19
- ```
20
- /flow-build fase 10 → Generate all (or Sprint 1 selection)
21
- /flow-build fase 10 EP-001 → Generate User Stories for specific Epic
22
- /flow-build fase 10 HU-001-001 → Generate/regenerate specific User Story
23
- ```
24
-
25
- ---
26
-
27
- ## Workflow: 4 Steps
28
-
29
- // turbo
30
- ### Step 10.1: Load Context from Roadmap
31
-
32
- **Extract from `planning/roadmap.md`:**
33
-
34
- ```
35
- CONTEXT LOADED
36
- ├── Language: {{LANGUAGE}}
37
- ├── Framework: {{FRAMEWORK}}
38
- ├── Architecture: {{ARCHITECTURE}}
39
- ├── Epics: X
40
- ├── Features: X
41
- ├── Tasks: X
42
- └── Total SP: X
43
- ```
44
-
45
- **Load additional context from:**
46
- - `project-brief.md` - Business context, target users
47
- - `ai-instructions.md` - Tech stack, patterns
48
- - `docs/api.md` - Endpoints specification
49
- - `specs/security.md` - Security requirements
50
-
51
- ---
52
-
53
- ### Step 10.2: Select Scope
54
-
55
- **Show options:**
56
-
57
- ```
58
- SCOPE SELECTION
59
- ├── A) All Epics (complete backlog)
60
- ├── B) Sprint 1 only (P0/P1 priorities)
61
- ├── C) Specific Epics (select which)
62
- └── D) Cancel
63
- ```
64
-
65
- ---
66
-
67
- ### Step 10.3: Generate User Story Documents
68
-
69
- **For each Feature in roadmap, create `planning/user-stories/EP-XXX/HU-XXX-YYY.md`:**
70
-
71
- ```markdown
72
- # User Story: HU-{{EPIC}}-{{FEATURE}}
73
-
74
- **Title:** {{FEATURE_NAME}}
75
- **Priority:** {{PRIORITY}} (Must Have | Should Have | Could Have)
76
- **Story Points:** {{SP}} SP
77
- **Sprint:** {{SPRINT}} or "Backlog"
78
-
79
- ## Description
80
-
81
- **As a** {{USER_TYPE}}
82
- **I want** {{DESIRED_FUNCTIONALITY}}
83
- **So that** {{USER_BENEFIT}}
84
-
85
- ---
86
-
87
- ## Acceptance Criteria
88
-
89
- > Minimum 5-6 scenarios: Happy path (2-3) + Error cases (2) + Edge/Security (1-2)
90
-
91
- 1. **Given** {{PRECONDITION}}
92
- **When** {{ACTION}}
93
- **Then** {{EXPECTED_RESULT}}
94
-
95
- 2. **Given** {{PRECONDITION}}
96
- **When** {{ACTION}}
97
- **Then** {{EXPECTED_RESULT}}
98
-
99
- 3. **Given** {{ERROR_PRECONDITION}}
100
- **When** {{ERROR_ACTION}}
101
- **Then** {{ERROR_RESULT}}
102
-
103
- 4. **Given** {{EDGE_PRECONDITION}}
104
- **When** {{EDGE_ACTION}}
105
- **Then** {{EDGE_RESULT}}
106
-
107
- 5. **Given** {{SECURITY_PRECONDITION}}
108
- **When** {{SECURITY_ACTION}}
109
- **Then** {{SECURITY_RESULT}}
110
-
111
- ---
112
-
113
- ## Technical Notes
114
-
115
- > From ai-instructions.md, architecture.md, security.md
116
-
117
- - {{IMPLEMENTATION_DETAIL_1}}
118
- - {{IMPLEMENTATION_DETAIL_2}}
119
- - {{SECURITY_REQUIREMENT}}
120
- - {{INTEGRATION_DETAIL}}
121
-
122
- ---
123
-
124
- ## Tasks
125
-
126
- > Inherited from planning/roadmap.md Feature {{FEATURE_NUMBER}}
127
-
128
- {{TASKS_FROM_ROADMAP}}
129
-
130
- ---
131
-
132
- ## Dependencies
133
-
134
- - **Requires:** {{REQUIRED_STORIES}}
135
- - **Blocks:** {{BLOCKED_STORIES}}
136
- - **Related:** {{RELATED_STORIES}}
137
-
138
- ---
139
-
140
- ## Definition of Done
141
-
142
- - [ ] Code implemented and peer reviewed
143
- - [ ] Unit tests passing (coverage >= 80%)
144
- - [ ] Integration tests implemented
145
- - [ ] Security requirements verified
146
- - [ ] API documentation updated
147
- - [ ] QA validation completed
148
- - [ ] No lint/format errors
149
-
150
- ---
151
-
152
- ## Estimation
153
-
154
- - **Story Points:** {{SP}} SP
155
- - **Time Estimate:** {{TIME_RANGE}}
156
- - **Complexity:** {{COMPLEXITY}} (Low | Medium | High)
157
-
158
- ---
159
-
160
- ## Assignment
161
-
162
- - **Assigned to:** (Unassigned)
163
- - **Start date:** (TBD)
164
- - **Due date:** (TBD)
165
- - **Status:** Draft | Ready | In Progress | Done
166
- ```
167
-
168
- ---
169
-
170
- ### Step 10.4: Generate Test Cases (Separate Files)
171
-
172
- **For each User Story, create `planning/user-stories/EP-XXX/tests/TC-XXX-YYY.md`:**
173
-
174
- ```markdown
175
- # Test Cases: HU-{{EPIC}}-{{FEATURE}}
176
-
177
- > Derived from Acceptance Criteria (1-2 test cases per scenario)
178
-
179
- ## TC-001: {{TEST_NAME}} (Happy Path)
180
-
181
- - **Precondition:** {{INITIAL_STATE}}
182
- - **Test Data:**
183
- - Field1: `value1`
184
- - Field2: `value2`
185
- - **Steps:**
186
- 1. {{STEP_1}}
187
- 2. {{STEP_2}}
188
- 3. {{STEP_3}}
189
- - **Expected Result:** {{EXPECTED_OUTCOME}}
190
- - **Priority:** High
191
- - **Type:** Functional
192
- - **Automatable:** Yes/No
193
-
194
- ## TC-002: {{TEST_NAME}} (Error Case)
195
-
196
- - **Precondition:** {{INITIAL_STATE}}
197
- - **Test Data:**
198
- - Field1: `invalid_value`
199
- - **Steps:**
200
- 1. {{STEP_1}}
201
- 2. {{STEP_2}}
202
- - **Expected Result:** {{ERROR_MESSAGE}}
203
- - **Priority:** High
204
- - **Type:** Functional
205
-
206
- ## TC-003: {{TEST_NAME}} (Edge Case)
207
-
208
- - **Precondition:** {{INITIAL_STATE}}
209
- - **Test Data:**
210
- - Field1: `boundary_value`
211
- - **Steps:**
212
- 1. {{STEP_1}}
213
- - **Expected Result:** {{EXPECTED_BEHAVIOR}}
214
- - **Priority:** Medium
215
- - **Type:** Boundary
216
-
217
- ## TC-004: {{TEST_NAME}} (Security)
218
-
219
- - **Precondition:** {{SECURITY_STATE}}
220
- - **Test Data:**
221
- - Attempts: 5
222
- - **Steps:**
223
- 1. {{SECURITY_STEP}}
224
- - **Expected Result:** {{SECURITY_OUTCOME}}
225
- - **Priority:** High
226
- - **Type:** Security
227
-
228
- ---
229
-
230
- **Total Test Cases:** {{N}}
231
- **Coverage:** {{N}}/{{TOTAL_CRITERIA}} (100%)
232
- ```
233
-
234
- ---
235
-
236
- ### Step 10.5: Update Roadmap with Links
237
-
238
- **After generating, update `planning/roadmap.md`:**
239
-
240
- ```markdown
241
- ### Feature 1.1: {{FEATURE_NAME}} • {{SP}} SP
242
-
243
- **User Story:** [HU-001-001](planning/user-stories/EP-001/HU-001-001.md)
244
- **Status:** Not Started
245
-
246
- **Tasks:**
247
- {{TASKS}}
248
- ```
249
-
250
- ---
251
-
252
- ## Generation Rules
253
-
254
- ### User Story Format
255
- - **Title:** From Feature name in roadmap
256
- - **Priority:** MoSCoW (Must/Should/Could/Won't Have)
257
- - **As a:** From project-brief.md (target users)
258
- - **I want:** From Feature description
259
- - **So that:** User value/benefit
260
-
261
- ### Acceptance Criteria
262
- - **Minimum 5-6 scenarios**
263
- - **Gherkin format:** Given/When/Then
264
- - **Include:** Happy path, Error cases, Edge cases, Security
265
- - **Each scenario = executable test**
266
-
267
- ### Technical Notes
268
- - Pull from ai-instructions.md, architecture.md, security.md
269
- - Be specific (e.g., "bcrypt 12 rounds", not "hash passwords")
270
- - Include rate limiting, logging, integrations
271
-
272
- ### Tasks
273
- - **Inherit from roadmap** (don't duplicate)
274
- - Keep same format: `TXXX [CAT] Desc • N SP → {{path}} | deps: X`
275
- - Keep Story Points from roadmap
276
-
277
- ### Test Cases
278
- - **Separate file** per User Story
279
- - 1-2 test cases per acceptance scenario
280
- - Include specific test data
281
- - Mark priority and type
282
-
283
- ---
284
-
285
- ## DO NOT
286
-
287
- - ❌ Create User Story without roadmap context
288
- - ❌ Skip acceptance criteria (minimum 5-6 required)
289
- - ❌ Generate generic test cases without test data
290
- - ❌ Duplicate tasks from roadmap
291
- - ❌ Omit security scenarios
292
- - ❌ Hardcode language-specific details
293
- - ❌ Forget to update roadmap with links
294
-
295
- ## ALWAYS
296
-
297
- - ✅ Inherit context variables from roadmap
298
- - ✅ Generate 5-6 Gherkin acceptance scenarios
299
- - ✅ Include security scenarios
300
- - ✅ Derive test cases from criteria
301
- - ✅ Separate test cases into tests/ folder
302
- - ✅ Update roadmap with User Story links
303
- - ✅ Create backup before regenerating
304
-
305
- ---
306
-
307
- ## Summary
308
-
309
- ```
310
- PHASE 10 COMPLETE
311
- ├── Generated: X User Stories
312
- ├── Total SP: X SP
313
- ├── Test Cases: X
314
- ├── Files: planning/user-stories/EP-XXX/
315
- └── Updated: planning/roadmap.md (added links)
316
-
317
- Next steps:
318
- 1. Review User Stories in planning/user-stories/
319
- 2. Start implementing: /flow-dev-feature HU-001-001
320
- 3. Generate more: /flow-build fase 10 EP-XXX
321
- ```
322
-
323
- ---
324
-
325
- ## 📝 Generated Documents
326
-
327
- After Phase 10, generate/update:
328
-
329
- - `planning/user-stories/*.md` - Detailed Agile requirements
330
- - `planning/roadmap.md` - (updated with story links)
331
-
332
- ---
333
-
334
- **CONGRATULATIONS!** Project documentation and planning are complete. 🚀
335
-
336
- ---
337
-
338
- **Last Updated:** 2025-12-20
339
- **Version:** 2.1.8
340
-
1
+ ## PHASE 10: Agile Planning - User Stories (5-10 min)
2
+
3
+ > **Order for this phase:** OPTIONAL. Executed after Phase 9 or on demand.
4
+
5
+ > **📌 Scope-based behavior:**
6
+ > - **All Scopes:** Generate detailed User Stories for each milestone in the Roadmap.
7
+
8
+ ### Objective
9
+ Break down technical roadmap tasks into user-centric Agile requirements (User Stories) to facilitate development, testing, and acceptance criteria definition.
10
+
11
+ - All Epics: 30-60 minutes
12
+ - One Epic: 5-10 minutes
13
+ - One User Story: 2-3 minutes
14
+
15
+ ---
16
+
17
+ ## Command Modes
18
+
19
+ ```
20
+ /flow-build fase 10 → Generate all (or Sprint 1 selection)
21
+ /flow-build fase 10 EP-001 → Generate User Stories for specific Epic
22
+ /flow-build fase 10 HU-001-001 → Generate/regenerate specific User Story
23
+ ```
24
+
25
+ ---
26
+
27
+ ## Workflow: 4 Steps
28
+
29
+ // turbo
30
+ ### Step 10.1: Load Context from Roadmap
31
+
32
+ **Extract from `planning/roadmap.md`:**
33
+
34
+ ```
35
+ CONTEXT LOADED
36
+ ├── Language: {{LANGUAGE}}
37
+ ├── Framework: {{FRAMEWORK}}
38
+ ├── Architecture: {{ARCHITECTURE}}
39
+ ├── Epics: X
40
+ ├── Features: X
41
+ ├── Tasks: X
42
+ └── Total SP: X
43
+ ```
44
+
45
+ **Load additional context from:**
46
+ - `project-brief.md` - Business context, target users
47
+ - `ai-instructions.md` - Tech stack, patterns
48
+ - `docs/api.md` - Endpoints specification
49
+ - `specs/security.md` - Security requirements
50
+
51
+ ---
52
+
53
+ ### Step 10.2: Select Scope
54
+
55
+ **Show options:**
56
+
57
+ ```
58
+ SCOPE SELECTION
59
+ ├── A) All Epics (complete backlog)
60
+ ├── B) Sprint 1 only (P0/P1 priorities)
61
+ ├── C) Specific Epics (select which)
62
+ └── D) Cancel
63
+ ```
64
+
65
+ ---
66
+
67
+ ### Step 10.3: Generate User Story Documents
68
+
69
+ **For each Feature in roadmap, create `planning/user-stories/EP-XXX/HU-XXX-YYY.md`:**
70
+
71
+ ```markdown
72
+ # User Story: HU-{{EPIC}}-{{FEATURE}}
73
+
74
+ **Title:** {{FEATURE_NAME}}
75
+ **Priority:** {{PRIORITY}} (Must Have | Should Have | Could Have)
76
+ **Story Points:** {{SP}} SP
77
+ **Sprint:** {{SPRINT}} or "Backlog"
78
+
79
+ ## Description
80
+
81
+ **As a** {{USER_TYPE}}
82
+ **I want** {{DESIRED_FUNCTIONALITY}}
83
+ **So that** {{USER_BENEFIT}}
84
+
85
+ ---
86
+
87
+ ## Acceptance Criteria
88
+
89
+ > Minimum 5-6 scenarios: Happy path (2-3) + Error cases (2) + Edge/Security (1-2)
90
+
91
+ 1. **Given** {{PRECONDITION}}
92
+ **When** {{ACTION}}
93
+ **Then** {{EXPECTED_RESULT}}
94
+
95
+ 2. **Given** {{PRECONDITION}}
96
+ **When** {{ACTION}}
97
+ **Then** {{EXPECTED_RESULT}}
98
+
99
+ 3. **Given** {{ERROR_PRECONDITION}}
100
+ **When** {{ERROR_ACTION}}
101
+ **Then** {{ERROR_RESULT}}
102
+
103
+ 4. **Given** {{EDGE_PRECONDITION}}
104
+ **When** {{EDGE_ACTION}}
105
+ **Then** {{EDGE_RESULT}}
106
+
107
+ 5. **Given** {{SECURITY_PRECONDITION}}
108
+ **When** {{SECURITY_ACTION}}
109
+ **Then** {{SECURITY_RESULT}}
110
+
111
+ ---
112
+
113
+ ## Technical Notes
114
+
115
+ > From ai-instructions.md, architecture.md, security.md
116
+
117
+ - {{IMPLEMENTATION_DETAIL_1}}
118
+ - {{IMPLEMENTATION_DETAIL_2}}
119
+ - {{SECURITY_REQUIREMENT}}
120
+ - {{INTEGRATION_DETAIL}}
121
+
122
+ ---
123
+
124
+ ## Tasks
125
+
126
+ > Inherited from planning/roadmap.md Feature {{FEATURE_NUMBER}}
127
+
128
+ {{TASKS_FROM_ROADMAP}}
129
+
130
+ ---
131
+
132
+ ## Dependencies
133
+
134
+ - **Requires:** {{REQUIRED_STORIES}}
135
+ - **Blocks:** {{BLOCKED_STORIES}}
136
+ - **Related:** {{RELATED_STORIES}}
137
+
138
+ ---
139
+
140
+ ## Definition of Done
141
+
142
+ - [ ] Code implemented and peer reviewed
143
+ - [ ] Unit tests passing (coverage >= 80%)
144
+ - [ ] Integration tests implemented
145
+ - [ ] Security requirements verified
146
+ - [ ] API documentation updated
147
+ - [ ] QA validation completed
148
+ - [ ] No lint/format errors
149
+
150
+ ---
151
+
152
+ ## Estimation
153
+
154
+ - **Story Points:** {{SP}} SP
155
+ - **Time Estimate:** {{TIME_RANGE}}
156
+ - **Complexity:** {{COMPLEXITY}} (Low | Medium | High)
157
+
158
+ ---
159
+
160
+ ## Assignment
161
+
162
+ - **Assigned to:** (Unassigned)
163
+ - **Start date:** (TBD)
164
+ - **Due date:** (TBD)
165
+ - **Status:** Draft | Ready | In Progress | Done
166
+ ```
167
+
168
+ ---
169
+
170
+ ### Step 10.4: Generate Test Cases (Separate Files)
171
+
172
+ **For each User Story, create `planning/user-stories/EP-XXX/tests/TC-XXX-YYY.md`:**
173
+
174
+ ```markdown
175
+ # Test Cases: HU-{{EPIC}}-{{FEATURE}}
176
+
177
+ > Derived from Acceptance Criteria (1-2 test cases per scenario)
178
+
179
+ ## TC-001: {{TEST_NAME}} (Happy Path)
180
+
181
+ - **Precondition:** {{INITIAL_STATE}}
182
+ - **Test Data:**
183
+ - Field1: `value1`
184
+ - Field2: `value2`
185
+ - **Steps:**
186
+ 1. {{STEP_1}}
187
+ 2. {{STEP_2}}
188
+ 3. {{STEP_3}}
189
+ - **Expected Result:** {{EXPECTED_OUTCOME}}
190
+ - **Priority:** High
191
+ - **Type:** Functional
192
+ - **Automatable:** Yes/No
193
+
194
+ ## TC-002: {{TEST_NAME}} (Error Case)
195
+
196
+ - **Precondition:** {{INITIAL_STATE}}
197
+ - **Test Data:**
198
+ - Field1: `invalid_value`
199
+ - **Steps:**
200
+ 1. {{STEP_1}}
201
+ 2. {{STEP_2}}
202
+ - **Expected Result:** {{ERROR_MESSAGE}}
203
+ - **Priority:** High
204
+ - **Type:** Functional
205
+
206
+ ## TC-003: {{TEST_NAME}} (Edge Case)
207
+
208
+ - **Precondition:** {{INITIAL_STATE}}
209
+ - **Test Data:**
210
+ - Field1: `boundary_value`
211
+ - **Steps:**
212
+ 1. {{STEP_1}}
213
+ - **Expected Result:** {{EXPECTED_BEHAVIOR}}
214
+ - **Priority:** Medium
215
+ - **Type:** Boundary
216
+
217
+ ## TC-004: {{TEST_NAME}} (Security)
218
+
219
+ - **Precondition:** {{SECURITY_STATE}}
220
+ - **Test Data:**
221
+ - Attempts: 5
222
+ - **Steps:**
223
+ 1. {{SECURITY_STEP}}
224
+ - **Expected Result:** {{SECURITY_OUTCOME}}
225
+ - **Priority:** High
226
+ - **Type:** Security
227
+
228
+ ---
229
+
230
+ **Total Test Cases:** {{N}}
231
+ **Coverage:** {{N}}/{{TOTAL_CRITERIA}} (100%)
232
+ ```
233
+
234
+ ---
235
+
236
+ ### Step 10.5: Update Roadmap with Links
237
+
238
+ **After generating, update `planning/roadmap.md`:**
239
+
240
+ ```markdown
241
+ ### Feature 1.1: {{FEATURE_NAME}} • {{SP}} SP
242
+
243
+ **User Story:** [HU-001-001](planning/user-stories/EP-001/HU-001-001.md)
244
+ **Status:** Not Started
245
+
246
+ **Tasks:**
247
+ {{TASKS}}
248
+ ```
249
+
250
+ ---
251
+
252
+ ## Generation Rules
253
+
254
+ ### User Story Format
255
+ - **Title:** From Feature name in roadmap
256
+ - **Priority:** MoSCoW (Must/Should/Could/Won't Have)
257
+ - **As a:** From project-brief.md (target users)
258
+ - **I want:** From Feature description
259
+ - **So that:** User value/benefit
260
+
261
+ ### Acceptance Criteria
262
+ - **Minimum 5-6 scenarios**
263
+ - **Gherkin format:** Given/When/Then
264
+ - **Include:** Happy path, Error cases, Edge cases, Security
265
+ - **Each scenario = executable test**
266
+
267
+ ### Technical Notes
268
+ - Pull from ai-instructions.md, architecture.md, security.md
269
+ - Be specific (e.g., "bcrypt 12 rounds", not "hash passwords")
270
+ - Include rate limiting, logging, integrations
271
+
272
+ ### Tasks
273
+ - **Inherit from roadmap** (don't duplicate)
274
+ - Keep same format: `TXXX [CAT] Desc • N SP → {{path}} | deps: X`
275
+ - Keep Story Points from roadmap
276
+
277
+ ### Test Cases
278
+ - **Separate file** per User Story
279
+ - 1-2 test cases per acceptance scenario
280
+ - Include specific test data
281
+ - Mark priority and type
282
+
283
+ ---
284
+
285
+ ## DO NOT
286
+
287
+ - ❌ Create User Story without roadmap context
288
+ - ❌ Skip acceptance criteria (minimum 5-6 required)
289
+ - ❌ Generate generic test cases without test data
290
+ - ❌ Duplicate tasks from roadmap
291
+ - ❌ Omit security scenarios
292
+ - ❌ Hardcode language-specific details
293
+ - ❌ Forget to update roadmap with links
294
+
295
+ ## ALWAYS
296
+
297
+ - ✅ Inherit context variables from roadmap
298
+ - ✅ Generate 5-6 Gherkin acceptance scenarios
299
+ - ✅ Include security scenarios
300
+ - ✅ Derive test cases from criteria
301
+ - ✅ Separate test cases into tests/ folder
302
+ - ✅ Update roadmap with User Story links
303
+ - ✅ Create backup before regenerating
304
+
305
+ ---
306
+
307
+ ## Summary
308
+
309
+ ```
310
+ PHASE 10 COMPLETE
311
+ ├── Generated: X User Stories
312
+ ├── Total SP: X SP
313
+ ├── Test Cases: X
314
+ ├── Files: planning/user-stories/EP-XXX/
315
+ └── Updated: planning/roadmap.md (added links)
316
+
317
+ Next steps:
318
+ 1. Review User Stories in planning/user-stories/
319
+ 2. Start implementing: /flow-dev-feature HU-001-001
320
+ 3. Generate more: /flow-build fase 10 EP-XXX
321
+ ```
322
+
323
+ ---
324
+
325
+ ## 📝 Generated Documents
326
+
327
+ After Phase 10, generate/update:
328
+
329
+ - `planning/user-stories/*.md` - Detailed Agile requirements
330
+ - `planning/roadmap.md` - (updated with story links)
331
+
332
+ ---
333
+
334
+ **CONGRATULATIONS!** Project documentation and planning are complete. 🚀
335
+
336
+ ---
337
+
338
+ **Last Updated:** 2025-12-20
339
+ **Version:** 2.1.8
340
+