ai-flow-dev 2.1.3 → 2.1.4

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 (96) hide show
  1. package/README.md +25 -38
  2. package/dist/cli.js +68 -46
  3. package/dist/cli.js.map +1 -1
  4. package/package.json +5 -5
  5. package/prompts/backend/flow-build-phase-0.md +31 -63
  6. package/prompts/backend/flow-build-phase-1.md +9 -17
  7. package/prompts/backend/flow-build-phase-10.md +199 -585
  8. package/prompts/backend/flow-build-phase-2.md +152 -86
  9. package/prompts/backend/flow-build-phase-3.md +108 -68
  10. package/prompts/backend/flow-build-phase-4.md +5 -8
  11. package/prompts/backend/flow-build-phase-5.md +39 -12
  12. package/prompts/backend/flow-build-phase-6.md +29 -8
  13. package/prompts/backend/flow-build-phase-7.md +120 -40
  14. package/prompts/backend/flow-build-phase-8.md +28 -65
  15. package/prompts/backend/flow-build-phase-9.md +267 -1298
  16. package/prompts/backend/flow-build.md +881 -957
  17. package/prompts/backend/flow-dev-commit.md +27 -50
  18. package/prompts/backend/flow-dev-feature.md +1929 -2017
  19. package/prompts/backend/flow-dev-fix.md +936 -964
  20. package/prompts/backend/flow-dev-refactor.md +672 -701
  21. package/prompts/backend/flow-dev-review.md +356 -389
  22. package/prompts/backend/flow-dev-work.md +1066 -1118
  23. package/prompts/backend/flow-docs-sync.md +20 -196
  24. package/prompts/frontend/flow-build-phase-0.md +503 -484
  25. package/prompts/frontend/flow-build-phase-1.md +445 -433
  26. package/prompts/frontend/flow-build-phase-2.md +910 -957
  27. package/prompts/frontend/flow-build-phase-3.md +692 -664
  28. package/prompts/frontend/flow-build-phase-4.md +478 -463
  29. package/prompts/frontend/flow-build-phase-5.md +488 -467
  30. package/prompts/frontend/flow-build-phase-6.md +571 -550
  31. package/prompts/frontend/flow-build-phase-7.md +560 -592
  32. package/prompts/frontend/flow-build-phase-8.md +17 -42
  33. package/prompts/frontend/flow-build.md +457 -503
  34. package/prompts/frontend/flow-docs-sync.md +14 -35
  35. package/prompts/mobile/flow-build-phase-0.md +104 -97
  36. package/prompts/mobile/flow-build-phase-1.md +137 -122
  37. package/prompts/mobile/flow-build-phase-2.md +123 -130
  38. package/prompts/mobile/flow-build-phase-3.md +144 -149
  39. package/prompts/mobile/flow-build-phase-4.md +140 -132
  40. package/prompts/mobile/flow-build-phase-5.md +70 -70
  41. package/prompts/mobile/flow-build-phase-6.md +136 -134
  42. package/prompts/mobile/flow-build-phase-7.md +24 -58
  43. package/prompts/mobile/flow-build-phase-8.md +17 -42
  44. package/prompts/mobile/flow-build.md +47 -97
  45. package/prompts/mobile/flow-docs-sync.md +13 -32
  46. package/prompts/shared/mermaid-guidelines.md +106 -0
  47. package/prompts/shared/scope-levels.md +126 -0
  48. package/prompts/shared/story-points.md +65 -0
  49. package/prompts/shared/task-format.md +86 -0
  50. package/templates/AGENT.template.md +194 -15
  51. package/templates/backend/README.template.md +2 -32
  52. package/templates/backend/ai-instructions.template.md +2 -32
  53. package/templates/backend/copilot-instructions.template.md +2 -22
  54. package/templates/backend/docs/api.template.md +89 -20
  55. package/templates/backend/docs/architecture.template.md +165 -53
  56. package/templates/backend/docs/business-flows.template.md +7 -14
  57. package/templates/backend/docs/code-standards.template.md +2 -38
  58. package/templates/backend/docs/contributing.template.md +2 -16
  59. package/templates/backend/docs/data-model.template.md +125 -21
  60. package/templates/backend/docs/operations.template.md +179 -50
  61. package/templates/backend/docs/testing.template.md +2 -42
  62. package/templates/backend/project-brief.template.md +2 -28
  63. package/templates/backend/specs/configuration.template.md +2 -14
  64. package/templates/backend/specs/security.template.md +2 -32
  65. package/templates/frontend/README.template.md +2 -18
  66. package/templates/frontend/ai-instructions.template.md +2 -20
  67. package/templates/frontend/docs/api-integration.template.md +12 -30
  68. package/templates/frontend/docs/components.template.md +2 -28
  69. package/templates/frontend/docs/error-handling.template.md +11 -27
  70. package/templates/frontend/docs/operations.template.md +8 -18
  71. package/templates/frontend/docs/performance.template.md +8 -18
  72. package/templates/frontend/docs/pwa.template.md +8 -18
  73. package/templates/frontend/docs/state-management.template.md +2 -28
  74. package/templates/frontend/docs/styling.template.md +2 -26
  75. package/templates/frontend/docs/testing.template.md +2 -28
  76. package/templates/frontend/project-brief.template.md +2 -16
  77. package/templates/frontend/specs/accessibility.template.md +8 -18
  78. package/templates/frontend/specs/configuration.template.md +2 -24
  79. package/templates/frontend/specs/security.template.md +10 -24
  80. package/templates/fullstack/README.template.md +17 -47
  81. package/templates/fullstack/ai-instructions.template.md +17 -45
  82. package/templates/fullstack/project-brief.template.md +16 -42
  83. package/templates/fullstack/specs/configuration.template.md +16 -42
  84. package/templates/mobile/README.template.md +11 -29
  85. package/templates/mobile/ai-instructions.template.md +11 -27
  86. package/templates/mobile/docs/app-store.template.md +11 -29
  87. package/templates/mobile/docs/architecture.template.md +14 -38
  88. package/templates/mobile/docs/native-features.template.md +16 -44
  89. package/templates/mobile/docs/navigation.template.md +9 -23
  90. package/templates/mobile/docs/offline-strategy.template.md +10 -26
  91. package/templates/mobile/docs/permissions.template.md +9 -23
  92. package/templates/mobile/docs/state-management.template.md +12 -32
  93. package/templates/mobile/docs/testing.template.md +14 -38
  94. package/templates/mobile/project-brief.template.md +12 -30
  95. package/templates/mobile/specs/build-configuration.template.md +10 -26
  96. package/templates/mobile/specs/deployment.template.md +9 -23
@@ -3,9 +3,7 @@
3
3
  **Duration:** 15-25 minutes
4
4
  **Questions:** ~12 questions
5
5
  **Output:** docs/testing.md, parts of ai-instructions.md
6
-
7
- ---
8
-
6
+ ---
9
7
  ## 🎯 Objective
10
8
 
11
9
  Define your mobile testing strategy:
@@ -15,9 +13,7 @@ Define your mobile testing strategy:
15
13
  3. How will you test on devices/emulators?
16
14
  4. What coverage targets?
17
15
  5. How will tests run in CI/CD?
18
-
19
- ---
20
-
16
+ ---
21
17
  ## 📋 Questions
22
18
 
23
19
  ### Question 6.1: Unit Testing Framework
@@ -25,6 +21,7 @@ Define your mobile testing strategy:
25
21
  **What unit test framework will you use?**
26
22
 
27
23
  **If React Native:**
24
+
28
25
  - A) ⭐ **Jest** (Recommended)
29
26
  - Built-in with React Native
30
27
  - Snapshot testing
@@ -35,60 +32,64 @@ Define your mobile testing strategy:
35
32
  - Best for: Modern setups
36
33
 
37
34
  **If Flutter:**
35
+
38
36
  - A) ⭐ **Flutter Test** (Built-in)
39
37
  - Widget testing
40
38
  - Unit testing
41
39
  - Best for: All Flutter apps
42
40
 
43
41
  **If Native iOS:**
42
+
44
43
  - A) ⭐ **XCTest** (Built-in)
45
44
  - Unit tests
46
45
  - UI tests
47
46
  - Best for: All iOS apps
48
47
 
49
48
  **If Native Android:**
49
+
50
50
  - A) ⭐ **JUnit** (Standard)
51
51
  - Unit tests
52
52
  - Best for: All Android apps
53
53
 
54
54
  **Your answer:**
55
-
56
- ---
57
-
55
+ ---
58
56
  ### Question 6.2: Component/Screen Testing
59
57
 
60
58
  **How will you test components and screens?**
61
59
 
62
60
  **If React Native:**
61
+
63
62
  - A) ⭐ **React Native Testing Library** (Recommended)
64
63
  - User-centric testing
65
64
  - Accessible queries
66
65
  - Best for: All React Native apps
67
66
 
68
67
  **If Flutter:**
68
+
69
69
  - A) ⭐ **Widget Testing** (Built-in)
70
70
  - Test widgets in isolation
71
71
  - Best for: All Flutter apps
72
72
 
73
73
  **If Native iOS:**
74
+
74
75
  - A) ⭐ **XCUITest** (Built-in)
75
76
  - UI testing framework
76
77
  - Best for: All iOS apps
77
78
 
78
79
  **If Native Android:**
80
+
79
81
  - A) ⭐ **Espresso** (Recommended)
80
82
  - UI testing framework
81
83
  - Best for: All Android apps
82
84
 
83
85
  **Your answer:**
84
-
85
- ---
86
-
86
+ ---
87
87
  ### Question 6.3: E2E Testing Framework
88
88
 
89
89
  **What E2E testing tool will you use?**
90
90
 
91
91
  **If React Native:**
92
+
92
93
  - A) ⭐ **Detox** (Recommended)
93
94
  - Gray-box E2E testing
94
95
  - Works with iOS and Android
@@ -105,6 +106,7 @@ Define your mobile testing strategy:
105
106
  - Best for: Complex E2E scenarios
106
107
 
107
108
  **If Flutter:**
109
+
108
110
  - A) ⭐ **Integration Test** (Built-in)
109
111
  - Flutter's integration testing
110
112
  - Best for: Most Flutter apps
@@ -114,88 +116,91 @@ Define your mobile testing strategy:
114
116
  - Best for: Simple E2E flows
115
117
 
116
118
  **If Native:**
119
+
117
120
  - A) ⭐ **Appium** (Recommended)
118
121
  - Cross-platform
119
122
  - Works with iOS and Android
120
123
  - Best for: Native apps
121
124
 
122
125
  **Your answer:**
123
-
124
- ---
125
-
126
+ ---
126
127
  ### Question 6.4: Testing on Physical Devices
127
128
 
128
129
  **How will you test on physical devices?**
129
130
 
130
131
  A) ⭐ **TestFlight (iOS) + Firebase App Distribution (Android)** (Recommended)
131
- - Beta testing on real devices
132
- - Best for: Most apps
132
+
133
+ - Beta testing on real devices
134
+ - Best for: Most apps
133
135
 
134
136
  B) **TestFlight (iOS) + Google Play Internal Testing (Android)**
135
- - Official store channels
136
- - Best for: Store-focused testing
137
+
138
+ - Official store channels
139
+ - Best for: Store-focused testing
137
140
 
138
141
  C) **Device Farm Services**
139
- - AWS Device Farm
140
- - BrowserStack App Automate
141
- - Sauce Labs
142
- - Best for: Multiple device testing
143
142
 
144
- D) **Manual Testing Only**
145
- - Test on personal devices
146
- - Best for: Small teams, MVPs
143
+ - AWS Device Farm
144
+ - BrowserStack App Automate
145
+ - Sauce Labs
146
+ - Best for: Multiple device testing
147
147
 
148
- **Your answer:**
148
+ D) **Manual Testing Only**
149
149
 
150
- ---
150
+ - Test on personal devices
151
+ - Best for: Small teams, MVPs
151
152
 
153
+ **Your answer:**
154
+ ---
152
155
  ### Question 6.5: Emulator/Simulator Strategy
153
156
 
154
157
  **How will you use emulators/simulators?**
155
158
 
156
159
  A) ⭐ **Local Emulators + CI Emulators** (Recommended)
157
- - Develop locally with iOS Simulator / Android Emulator
158
- - Run tests in CI with emulators
159
- - Best for: Most teams
160
+
161
+ - Develop locally with iOS Simulator / Android Emulator
162
+ - Run tests in CI with emulators
163
+ - Best for: Most teams
160
164
 
161
165
  B) **Local Only**
162
- - No CI emulator testing
163
- - Best for: Small teams
164
166
 
165
- C) **Cloud Emulators Only**
166
- - Use cloud services for all testing
167
- - Best for: Teams without local setup
167
+ - No CI emulator testing
168
+ - Best for: Small teams
168
169
 
169
- **Your answer:**
170
+ C) **Cloud Emulators Only**
170
171
 
171
- ---
172
+ - Use cloud services for all testing
173
+ - Best for: Teams without local setup
172
174
 
175
+ **Your answer:**
176
+ ---
173
177
  ### Question 6.6: Testing Pyramid Distribution
174
178
 
175
179
  **What test distribution will you target?**
176
180
 
177
181
  A) ⭐ **Standard Pyramid** (Recommended)
178
- - 70% Unit tests
179
- - 20% Integration tests
180
- - 10% E2E tests
181
- - Best for: Most apps
182
+
183
+ - 70% Unit tests
184
+ - 20% Integration tests
185
+ - 10% E2E tests
186
+ - Best for: Most apps
182
187
 
183
188
  B) **Heavy Unit**
184
- - 85% Unit tests
185
- - 10% Integration tests
186
- - 5% E2E tests
187
- - Best for: Logic-heavy apps
188
189
 
189
- C) **Heavy Integration**
190
- - 50% Unit tests
191
- - 40% Integration tests
192
- - 10% E2E tests
193
- - Best for: UI-heavy apps
190
+ - 85% Unit tests
191
+ - 10% Integration tests
192
+ - 5% E2E tests
193
+ - Best for: Logic-heavy apps
194
194
 
195
- **Your answer:**
195
+ C) **Heavy Integration**
196
196
 
197
- ---
197
+ - 50% Unit tests
198
+ - 40% Integration tests
199
+ - 10% E2E tests
200
+ - Best for: UI-heavy apps
198
201
 
202
+ **Your answer:**
203
+ ---
199
204
  #### 🎨 MOBILE TESTING PYRAMID VISUALIZATION
200
205
 
201
206
  **Use this diagram format** to visualize mobile test distribution strategy:
@@ -294,48 +299,49 @@ graph LR
294
299
  - **Cross-Platform**: Best for React Native/Flutter apps with shared logic
295
300
 
296
301
  **Diagram Guidelines:**
302
+
297
303
  - Color code by test type (E2E=pink, Integration=orange, Unit=green)
298
304
  - Show device vs emulator distinction
299
305
  - Include platform-specific considerations (iOS/Android)
300
306
  - Highlight speed/cost trade-offs
301
307
  - Update percentages based on selected strategy (A, B, or C)
302
-
303
- ---
304
-
305
- ---
306
-
308
+ ---
309
+ ---
307
310
  ### Question 6.7: Code Coverage Targets
308
311
 
309
312
  **What code coverage targets will you set?**
310
313
 
311
314
  A) ⭐ **80% Overall** (Recommended)
312
- - 80% line coverage
313
- - 70% branch coverage
314
- - Best for: Most apps
315
+
316
+ - 80% line coverage
317
+ - 70% branch coverage
318
+ - Best for: Most apps
315
319
 
316
320
  B) **90% Overall**
317
- - 90% line coverage
318
- - 80% branch coverage
319
- - Best for: Critical apps
321
+
322
+ - 90% line coverage
323
+ - 80% branch coverage
324
+ - Best for: Critical apps
320
325
 
321
326
  C) **70% Overall**
322
- - 70% line coverage
323
- - 60% branch coverage
324
- - Best for: MVPs, small apps
325
327
 
326
- D) **No Coverage Target**
327
- - Test what's important
328
- - Best for: Very small projects
328
+ - 70% line coverage
329
+ - 60% branch coverage
330
+ - Best for: MVPs, small apps
329
331
 
330
- **Your answer:**
332
+ D) **No Coverage Target**
331
333
 
332
- ---
334
+ - Test what's important
335
+ - Best for: Very small projects
333
336
 
337
+ **Your answer:**
338
+ ---
334
339
  ### Question 6.8: Snapshot Testing
335
340
 
336
341
  **Will you use snapshot testing?**
337
342
 
338
343
  **If React Native:**
344
+
339
345
  - A) ⭐ **Yes - Jest Snapshots** (Recommended)
340
346
  - Catch unintended UI changes
341
347
  - Best for: Component regression testing
@@ -345,114 +351,116 @@ D) **No Coverage Target**
345
351
  - Best for: Rapidly changing UIs
346
352
 
347
353
  **If Flutter:**
354
+
348
355
  - A) ⭐ **Yes - Golden Tests** (Recommended)
349
356
  - Flutter's snapshot testing
350
357
  - Best for: Widget regression testing
351
358
 
352
359
  **Your answer:**
353
-
354
- ---
355
-
360
+ ---
356
361
  ### Question 6.9: Performance Testing
357
362
 
358
363
  **Will you test app performance?**
359
364
 
360
365
  A) ⭐ **Yes - Basic Performance** (Recommended)
361
- - App launch time
362
- - Screen render time
363
- - Memory usage
364
- - Best for: Most apps
366
+
367
+ - App launch time
368
+ - Screen render time
369
+ - Memory usage
370
+ - Best for: Most apps
365
371
 
366
372
  B) **Yes - Comprehensive Performance**
367
- - FPS monitoring
368
- - Network performance
369
- - Battery usage
370
- - Best for: Performance-critical apps
371
373
 
372
- C) **No Performance Testing**
373
- - Manual testing only
374
- - Best for: MVPs
374
+ - FPS monitoring
375
+ - Network performance
376
+ - Battery usage
377
+ - Best for: Performance-critical apps
375
378
 
376
- **Your answer:**
379
+ C) **No Performance Testing**
377
380
 
378
- ---
381
+ - Manual testing only
382
+ - Best for: MVPs
379
383
 
384
+ **Your answer:**
385
+ ---
380
386
  ### Question 6.10: Accessibility Testing
381
387
 
382
388
  **Will you test accessibility?**
383
389
 
384
390
  A) ⭐ **Yes - Basic Accessibility** (Recommended)
385
- - Screen reader support (TalkBack/VoiceOver)
386
- - Touch target sizes
387
- - Color contrast
388
- - Best for: Most apps
391
+
392
+ - Screen reader support (TalkBack/VoiceOver)
393
+ - Touch target sizes
394
+ - Color contrast
395
+ - Best for: Most apps
389
396
 
390
397
  B) **Yes - Comprehensive Accessibility**
391
- - WCAG 2.1 AA compliance
392
- - Full accessibility audit
393
- - Best for: Public-facing apps
394
398
 
395
- C) **No Accessibility Testing**
396
- - Not a priority
397
- - Best for: Internal apps
399
+ - WCAG 2.1 AA compliance
400
+ - Full accessibility audit
401
+ - Best for: Public-facing apps
398
402
 
399
- **Your answer:**
403
+ C) **No Accessibility Testing**
400
404
 
401
- ---
405
+ - Not a priority
406
+ - Best for: Internal apps
402
407
 
408
+ **Your answer:**
409
+ ---
403
410
  ### Question 6.11: CI/CD Testing Strategy
404
411
 
405
412
  **How will tests run in CI/CD?**
406
413
 
407
414
  A) ⭐ **Run All Tests on PR** (Recommended)
408
- - Unit tests: Fast (<5 min)
409
- - Integration tests: Medium (<15 min)
410
- - E2E tests: Slow (<30 min)
411
- - Best for: Most teams
415
+
416
+ - Unit tests: Fast (<5 min)
417
+ - Integration tests: Medium (<15 min)
418
+ - E2E tests: Slow (<30 min)
419
+ - Best for: Most teams
412
420
 
413
421
  B) **Run Unit Tests on PR, E2E on Merge**
414
- - Faster PR feedback
415
- - E2E on main branch
416
- - Best for: Large teams
417
422
 
418
- C) **Run Tests Manually**
419
- - No automated testing
420
- - Best for: Very small teams
423
+ - Faster PR feedback
424
+ - E2E on main branch
425
+ - Best for: Large teams
421
426
 
422
- **Your answer:**
427
+ C) **Run Tests Manually**
423
428
 
424
- ---
429
+ - No automated testing
430
+ - Best for: Very small teams
425
431
 
432
+ **Your answer:**
433
+ ---
426
434
  ### Question 6.12: Test Data Management
427
435
 
428
436
  **How will you manage test data?**
429
437
 
430
438
  A) ⭐ **Mock Data + Test Fixtures** (Recommended)
431
- - Mock API responses
432
- - Use fixtures for consistent data
433
- - Best for: Most apps
439
+
440
+ - Mock API responses
441
+ - Use fixtures for consistent data
442
+ - Best for: Most apps
434
443
 
435
444
  B) **Test Database**
436
- - Separate test database
437
- - Best for: Integration testing
438
445
 
439
- C) **Real API (Staging)**
440
- - Use staging environment
441
- - Best for: E2E testing
446
+ - Separate test database
447
+ - Best for: Integration testing
442
448
 
443
- **Your answer:**
449
+ C) **Real API (Staging)**
444
450
 
445
- ---
451
+ - Use staging environment
452
+ - Best for: E2E testing
446
453
 
454
+ **Your answer:**
455
+ ---
447
456
  ## ✅ Phase 6 Completion
448
457
 
449
458
  After answering all questions, summarize:
450
459
 
451
460
  ```
452
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
461
+ ---
453
462
  ✅ Phase 6 Complete: Testing Strategy
454
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
455
-
463
+ ---
456
464
  Selected Testing Stack:
457
465
  - Unit Tests: Jest (React Native Testing Library)
458
466
  - E2E Tests: Detox
@@ -465,24 +473,18 @@ Selected Testing Stack:
465
473
 
466
474
  Proceed to Phase 7 (Store Deployment)? (Y/n)
467
475
  ```
468
-
469
- ---
470
-
476
+ ---
471
477
  ## 📝 Generated Documents
472
478
 
473
479
  After Phase 6, generate/update:
474
480
 
475
481
  - `docs/testing.md` - Testing strategy and setup guide
476
482
  - `ai-instructions.md` - Add testing rules
477
-
478
- ---
479
-
483
+ ---
480
484
  **Next Phase:** Phase 7 - Store Deployment
481
485
 
482
486
  Read: `.ai-flow/prompts/mobile/flow-build-phase-7-deployment.md`
483
-
484
- ---
485
-
487
+ ---
486
488
  **Last Updated:** 2025-01-XX
487
489
 
488
490
  **Version:** 1.4.0