ai-flow-dev 2.7.0 → 2.8.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 (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 +725 -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 +725 -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 +910 -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 +725 -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 +910 -0
  70. package/prompts/frontend/flow-release.md +519 -0
  71. package/prompts/frontend/flow-work-api.md +1540 -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 +1583 -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 +725 -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 +910 -0
  95. package/prompts/mobile/flow-release.md +751 -0
  96. package/prompts/mobile/flow-work-api.md +1493 -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 +1593 -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 +47 -47
@@ -1,524 +1,524 @@
1
- ## PHASE 6: Testing Strategy (15-20 min)
2
-
3
- > **Order for this phase:**
4
- >
5
- > - **MVP:** 6.1 → 6.2 (smoke tests) → 6.7 (CI basics)
6
- > - **Production-Ready:** 6.1 → 6.1b → 6.2 → 6.3 → 6.4 → 6.5 → 6.6 → 6.7
7
- > - **Enterprise:** 6.1 → 6.1b → 6.2 → 6.3 → 6.4 → 6.5 → 6.6 → 6.7 → 6.8 → 6.9
8
-
9
- > **📌 Scope-based behavior:**
10
- >
11
- > - **MVP:** Ask 6.1 (framework), 6.2 (smoke tests only), 6.7 (CI basics) - **Target: 15-25% coverage**
12
- > - **Production-Ready:** Ask all questions 6.1-6.7 - **Target: 60-80% coverage**
13
- > - **Enterprise:** Ask all questions 6.1-6.9 - **Target: 80-95% coverage + contract/load tests**
14
-
15
- ### Objective
16
-
17
- Define testing approach, tools, and quality gates.
18
-
19
- **🚨 Important: All projects require basic testing. Scope determines depth, not whether to test.**
20
-
21
- ---
22
-
23
- ## 🔍 Pre-Flight Check (Smart Skip Logic)
24
-
25
- > 📎 **Reference:** See [prompts/shared/smart-skip-preflight.md](../../.ai-flow/prompts/shared/smart-skip-preflight.md) for the complete smart skip logic.
26
-
27
- **Execute Pre-Flight Check for Phase 6:**
28
-
29
- - **Target File**: `docs/testing.md`
30
- - **Phase Name**: "TESTING STRATEGY"
31
- - **Key Items**: Test framework, coverage targets, test types, CI/CD integration
32
- - **Typical Gaps**: E2E strategy, load testing, performance testing
33
-
34
- **Proceed with appropriate scenario based on audit data from `.ai-flow/cache/audit-data.json`**
35
-
36
- ---
37
-
38
- ## Phase 6 Questions (Full Mode)
39
-
40
- **6.1 Testing Framework**
41
-
42
- ```
43
-
44
- Which testing tools will you use?
45
-
46
- JavaScript/TypeScript:
47
- A) ⭐ Jest - Most popular, great ecosystem
48
- B) Vitest - Modern, fast, Vite-compatible
49
- C) Mocha + Chai
50
- D) AVA
51
-
52
- Python:
53
- E) ⭐ pytest - Modern, feature-rich
54
- F) unittest - Built-in
55
- G) nose2
56
-
57
- Java:
58
- H) ⭐ JUnit 5 + Mockito
59
- I) TestNG
60
-
61
- Your choice: \_\_
62
-
63
- Assertion library: **
64
- Mocking library: **
65
-
66
- ```
67
-
68
- **6.1b Testing Philosophy** (Production-Ready and Enterprise only)
69
-
70
- ```
71
- What is your testing philosophy?
72
-
73
- A) ⭐ Test-First (TDD) - Write tests before code
74
- - Red-Green-Refactor cycle
75
- - Higher initial effort, better design
76
- - Best for: Complex business logic, critical systems
77
-
78
- B) 🔥 Test-After - Write tests after implementation
79
- - Faster initial development
80
- - Risk of untested edge cases
81
- - Best for: Rapid prototyping, time-sensitive features
82
-
83
- C) ⚡ Behavior-Driven (BDD) - Write tests as specifications
84
- - Given/When/Then format
85
- - Business-readable tests
86
- - Best for: Domain-heavy applications
87
-
88
- D) 🏆 Hybrid - TDD for core logic, test-after for simple features
89
- - Balance of speed and quality
90
- - Pragmatic approach
91
-
92
- Your choice: __
93
- ```
94
-
95
- **6.2 Test Types**
96
-
97
- ```
98
- [If MVP scope selected, ask simplified version:]
99
-
100
- For MVP, we'll focus on smoke tests (critical path verification).
101
- Which critical flows should be tested?
102
-
103
- Select 3-5 most important endpoints/features:
104
- A) Authentication (login/register)
105
- B) Main business operation (e.g., create order, post article)
106
- C) User profile/account management
107
- D) Payment processing (if applicable)
108
- E) Data retrieval (main GET endpoints)
109
-
110
- Selected: __
111
-
112
- Test approach: Integration tests covering happy path of selected flows
113
- Coverage target: 15-25%
114
- Test type: Integration/E2E only (no unit tests required for MVP)
115
-
116
- [If Production-Ready or Enterprise scope selected, ask full version:]
117
-
118
- Which test types will you implement?
119
-
120
- A) ✅ Unit Tests
121
- - Test individual functions/methods in isolation
122
- - Fast, numerous
123
- - Mock all dependencies
124
-
125
- B) ✅ Integration Tests
126
- - Test multiple components together
127
- - Database, external APIs
128
- - Slower but more realistic
129
-
130
- C) ✅ E2E (End-to-End) Tests
131
- - Test full user flows
132
- - API endpoints from request to response
133
- - Tool: Supertest (Node.js), pytest with TestClient (Python)
134
-
135
- D) 🏆 Contract Tests (Advanced - Enterprise recommended)
136
- - Verify API contracts between services
137
- - Tool: Pact, Spring Cloud Contract
138
-
139
- E) ⚡ Load/Performance Tests (Enterprise recommended)
140
- - Tool: Artillery, K6, JMeter
141
-
142
- F) 🔬 Chaos Engineering (Enterprise only)
143
- - Test system resilience to failures
144
- - Tool: Chaos Monkey, Litmus, Gremlin
145
-
146
- Selected: __
147
-
148
- Pyramid distribution:
149
- - 70% Unit tests
150
- - 20% Integration tests
151
- - 10% E2E tests
152
- (Adjust as needed)
153
-
154
- ```
155
-
156
- **6.3 Test Database** [Skip if MVP scope]
157
-
158
- ```
159
- [Production-Ready/Enterprise only]
160
-
161
- How will you handle database in tests?
162
-
163
- A) ⭐ In-memory database
164
- - SQLite for testing, PostgreSQL for prod
165
- - Fast, isolated
166
-
167
- B) 🏆 Docker test database
168
- - Same DB as production
169
- - More realistic
170
- - Tool: Testcontainers
171
-
172
- C) 🔄 Shared test database
173
- - One DB for all tests
174
- - Reset between test suites
175
-
176
- D) 🎭 Mock database
177
- - Mock all DB calls
178
- - Fastest, but less realistic
179
-
180
- Your choice: __
181
-
182
- Test data strategy:
183
- A) ⭐ Factories/Fixtures - Generate test data programmatically
184
- B) Seed files - Load from JSON/SQL files
185
- C) Inline - Create data in each test
186
-
187
- ```
188
-
189
- **6.4 Test Data Management** [Skip if MVP scope]
190
-
191
- ```
192
- [Production-Ready/Enterprise only]
193
-
194
- How will you create test data?
195
-
196
- A) ⭐ Factory pattern
197
- - Libraries: factory_boy (Python), Fishery (TypeScript)
198
- - Generate realistic data on demand
199
-
200
- B) Fixtures
201
- - Predefined test data
202
- - Loaded before tests
203
-
204
- C) Faker
205
- - Random realistic data
206
- - Library: @faker-js/faker, Faker (Python)
207
-
208
- Your approach: __
209
-
210
- Example test data needs:
211
- - Users with various roles
212
- - Products with different states
213
- - Orders in different stages
214
- - Payment records
215
- - [Add your specific needs]
216
-
217
- ```
218
-
219
- **6.5 Mocking Strategy** [Skip if MVP scope]
220
-
221
- ```
222
- [Production-Ready/Enterprise only]
223
-
224
- What will you mock?
225
-
226
- A) ✅ External APIs - Third-party services
227
- B) ✅ Database - In unit tests
228
- C) ✅ File system - S3, local storage
229
- D) ✅ Time/Date - For deterministic tests
230
- E) ✅ Email/SMS - Sending services
231
- F) ✅ Payment gateways
232
-
233
- Mocking approach:
234
- A) ⭐ Manual mocks - jest.fn(), unittest.mock
235
- B) Library - MSW (Mock Service Worker), nock
236
- C) Test doubles - Stubs, spies, mocks
237
-
238
- When NOT to mock:
239
- - Internal business logic
240
- - Simple utilities
241
- - Value objects
242
-
243
- ```
244
-
245
- **6.6 Test Organization** [Skip if MVP scope]
246
-
247
- ```
248
- [Production-Ready/Enterprise only]
249
-
250
- Test file structure:
251
-
252
- A) ⭐ Co-located with source
253
- ```
254
-
255
- src/
256
- users/
257
- user.service.ts
258
- user.service.spec.ts
259
-
260
- ```
261
-
262
- B) Separate test directory
263
- ```
264
-
265
- src/users/user.service.ts
266
- tests/users/user.service.test.ts
267
-
268
- ````
269
-
270
- Test naming:
271
-
272
- ```typescript
273
- describe('UserService', () => {
274
- describe('createUser', () => {
275
- it('should create a new user with valid data', async () => {
276
- // Arrange
277
- const userData = { email: 'test@example.com', name: 'Test' };
278
-
279
- // Act
280
- const result = await userService.createUser(userData);
281
-
282
- // Assert
283
- expect(result).toBeDefined();
284
- expect(result.email).toBe(userData.email);
285
- });
286
-
287
- it('should throw error when email is duplicated', async () => {
288
- // ...
289
- });
290
- });
291
- });
292
- ````
293
-
294
- Naming pattern:
295
- A) ⭐ "should [expected behavior] when [condition]"
296
- B) "it [expected behavior]"
297
- C) Free-form
298
-
299
- ````
300
-
301
- **6.6.1 Contract Testing** [If selected in 6.2]
302
-
303
- ```
304
- [Production-Ready/Enterprise only]
305
-
306
- Contract testing tool:
307
- A) ⭐ Pact - Consumer-driven contracts
308
- B) Spring Cloud Contract - Provider contracts
309
- C) Other: __
310
-
311
- Contract strategy:
312
- A) ⭐ Consumer-driven - Frontend/consumers define contracts
313
- B) Provider-driven - Backend defines contracts
314
- C) Both - Hybrid approach
315
-
316
- Contract storage:
317
- A) ⭐ Pact Broker - Centralized contract storage
318
- B) Git repository - Version contracts in code
319
- C) Other: __
320
-
321
- Contract versioning:
322
- - Strategy: __
323
- - Breaking changes: __
324
- ```
325
-
326
- **6.6.2 Load/Performance Testing** [If selected in 6.2]
327
-
328
- ```
329
- [Production-Ready/Enterprise only]
330
-
331
- Load testing tool:
332
- A) ⭐ Artillery - Node.js, YAML-based
333
- B) K6 - Modern, JavaScript-based
334
- C) JMeter - Java-based, GUI available
335
- D) Locust - Python-based
336
- E) Other: __
337
-
338
- Test scenarios:
339
- - Normal load: __ requests/second
340
- - Peak load: __ requests/second
341
- - Stress test: __ requests/second (beyond capacity)
342
- - Duration: __ minutes
343
-
344
- Performance thresholds:
345
- - Response time p50: < __ ms
346
- - Response time p95: < __ ms
347
- - Response time p99: < __ ms
348
- - Error rate: < __%
349
- - Throughput: > __ requests/second
350
-
351
- When to run:
352
- A) ⭐ Before major releases
353
- B) Weekly automated runs
354
- C) On-demand only
355
- ```
356
-
357
- **6.6.3 Chaos Engineering** [If selected in 6.2 - Enterprise only]
358
-
359
- ```
360
- [Enterprise only]
361
-
362
- Chaos engineering tool:
363
- A) ⭐ Chaos Monkey (Netflix)
364
- B) Litmus (Kubernetes)
365
- C) Gremlin - Managed chaos platform
366
- D) Custom scripts
367
- E) Other: __
368
-
369
- Chaos experiments to run:
370
- A) Network latency injection
371
- B) Service failures
372
- C) Database connection failures
373
- D) CPU/memory exhaustion
374
- E) Disk space issues
375
- F) Network partition
376
-
377
- → Your selection (e.g., A, B, C): __
378
-
379
- Safety rules:
380
- - Run only in: [Staging, Production with approval]
381
- - Blast radius: __% of traffic/instances
382
- - Auto-rollback: [Yes/No]
383
- - Approval required: [Yes/No]
384
- ```
385
-
386
- **6.7 CI/CD Testing** [All scopes - simplified for MVP]
387
-
388
- ```
389
- [If MVP scope:]
390
- For MVP, we'll set up basic CI to run smoke tests.
391
-
392
- When will smoke tests run?
393
- A) ⭐ On pull request (GitHub Actions, GitLab CI) - Recommended
394
- B) Before deploy only
395
-
396
- Selected: __
397
-
398
- Quality gate for MVP:
399
- - ✅ All smoke tests must pass
400
- - ⚠️ Coverage tracking (no minimum required)
401
-
402
- [If Production-Ready or Enterprise scope:]
403
-
404
- When will tests run?
405
-
406
- A) ⭐ On every commit (pre-commit hook) - Catch issues early
407
- B) 🔥 On pull request (GitHub Actions, GitLab CI) - Most popular, prevents broken merges
408
- C) ⭐ Before deploy (staging pipeline) - Recommended safety check
409
- D) Nightly (comprehensive test suite) - For slow/extensive tests
410
-
411
- Selected: __
412
-
413
- Quality gates:
414
-
415
- - ✅ All tests must pass
416
- - ✅ Coverage must be >= __% (15-25% MVP, 60-80% Production, 80-95% Enterprise)
417
- - ✅ No linting errors
418
- - ⚡ Performance benchmarks met (optional, Enterprise recommended)
419
-
420
- Failing a quality gate:
421
- A) ⭐ Block merge/deploy - Force fix
422
- B) ⚠️ Warning only - Allow with justification
423
-
424
- ```
425
-
426
- ### Phase 6 Output
427
-
428
- ```
429
- 📋 PHASE 6 SUMMARY:
430
-
431
- **If MVP scope (A):**
432
- Testing Framework: [Jest/pytest/JUnit] (6.1)
433
- Test Types: Smoke tests on critical paths [selected 3-5 critical flows] (6.2)
434
- Test Approach: Integration/E2E tests covering happy path only (6.2)
435
- Coverage Target: 15-25% (6.2)
436
- CI/CD Testing: [on PR/before deploy] + quality gate: all tests must pass (6.7)
437
- Status: Basic testing implemented for MVP
438
-
439
- **If Production-Ready (B):**
440
- Testing Framework: [Jest/pytest/JUnit + assertion library + mocking library] (6.1)
441
- Test Types: [unit/integration/e2e - selected types] (6.2)
442
- Test Distribution: [pyramid percentages: 70/20/10 or custom] (6.2)
443
- Test Database: [in-memory/Docker/shared/mock + initial data strategy] (6.3)
444
- Test Data Management: [factories/fixtures/faker approach + specific test data needs] (6.4)
445
- Mocking Strategy: [what to mock (APIs/DB/files/time/email/payments) + approach] (6.5)
446
- Test Organization: [co-located/separate folder + naming pattern] (6.6)
447
- CI/CD Testing: [when tests run (commit/PR/deploy/nightly) + quality gates (pass/60-80% coverage/lint) + gate behavior (block/warn)] (6.7)
448
- Status: Comprehensive testing strategy implemented
449
-
450
- **If Enterprise (C):**
451
- Testing Framework: [Jest/pytest/JUnit + assertion library + mocking library] (6.1)
452
- Test Types: [unit/integration/e2e/contract/load/chaos - all types] (6.2)
453
- Test Distribution: [pyramid percentages: 70/20/10 or custom] (6.2)
454
- Test Database: [in-memory/Docker/shared/mock + initial data strategy] (6.3)
455
- Test Data Management: [factories/fixtures/faker approach + specific test data needs] (6.4)
456
- Mocking Strategy: [what to mock (APIs/DB/files/time/email/payments) + approach] (6.5)
457
- Test Organization: [co-located/separate folder + naming pattern] (6.6)
458
- Contract Testing: [tool (Pact/Spring Cloud Contract) + strategy + storage + versioning] (6.6.1)
459
- Load Testing: [tool (Artillery/K6/JMeter) + scenarios + thresholds + schedule] (6.6.2)
460
- Chaos Engineering: [tool (Chaos Monkey/Litmus/Gremlin) + experiments + safety rules] (6.6.3)
461
- CI/CD Testing: [when tests run (commit/PR/deploy/nightly) + quality gates (pass/80-95% coverage/lint/performance) + gate behavior (block/warn)] (6.7)
462
- Status: Exhaustive testing strategy with advanced scenarios
463
-
464
- Is this correct? (Yes/No)
465
- ```
466
- ---
467
- ### 📄 Generate Phase 6 Documents
468
-
469
- **Before starting generation:**
470
-
471
- ```
472
- 📖 Loading context from previous phases...
473
- ✅ Re-reading docs/code-standards.md
474
- ✅ Re-reading ai-instructions.md
475
- ```
476
-
477
- **Generate `docs/testing.md` automatically:**
478
-
479
- - Use template: `.ai-flow/templates/docs/testing.template.md`
480
- - **If MVP scope:** Fill with basic testing strategy: framework selection, smoke tests on critical paths, coverage 15-25%, basic CI setup. Mark advanced sections as "Not implemented yet - expand when moving to Production-Ready"
481
- - **If Production-Ready:** Fill with comprehensive testing strategy: framework, unit/integration/e2e tests, 60-80% coverage, test data management, mocking, full CI/CD
482
- - **If Enterprise:** Fill with exhaustive testing strategy: all Production-Ready items + contract tests, load tests, security tests, 80-95% coverage, performance benchmarks
483
- - Write to: `docs/testing.md`
484
-
485
- ```
486
- ✅ Generated: docs/testing.md
487
-
488
- Document has been created with all Phase 6 information.
489
-
490
- 📝 Would you like to make any corrections before continuing?
491
-
492
- → If yes: Edit the file and type "ready" when done. I'll re-read it.
493
- → If no: Type "continue" to proceed to Phase 7.
494
- ```
495
-
496
- **If user edits file:**
497
- Re-read file to refresh context before continuing.
498
- ---
499
- **Proceed to Phase 7 only after documents are validated.**
500
-
501
- > ⚠️ **CRITICAL:** DO NOT generate README.md in this phase. README.md is ONLY generated in Phase 8 (step 8.5) after framework initialization.
502
- ---
503
-
504
- ## 📝 Generated Documents
505
-
506
- After Phase 6, generate/update:
507
- - `docs/testing.md` - Testing strategy and quality gates
508
-
509
- ---
510
-
511
- **Next Phase:** Phase 7 - Operations & Deployment (10-15 min)
512
-
513
- Read: `.ai-flow/prompts/backend/flow-build-phase-7.md`
514
-
515
- ---
516
-
517
- **Last Updated:** 2025-12-20
518
- **Version:** 2.1.8
519
-
520
- ---
521
-
522
- ## PHASE 7: Operations & Deployment (10-15 min)
523
-
524
- ````
1
+ ## PHASE 6: Testing Strategy (15-20 min)
2
+
3
+ > **Order for this phase:**
4
+ >
5
+ > - **MVP:** 6.1 → 6.2 (smoke tests) → 6.7 (CI basics)
6
+ > - **Production-Ready:** 6.1 → 6.1b → 6.2 → 6.3 → 6.4 → 6.5 → 6.6 → 6.7
7
+ > - **Enterprise:** 6.1 → 6.1b → 6.2 → 6.3 → 6.4 → 6.5 → 6.6 → 6.7 → 6.8 → 6.9
8
+
9
+ > **📌 Scope-based behavior:**
10
+ >
11
+ > - **MVP:** Ask 6.1 (framework), 6.2 (smoke tests only), 6.7 (CI basics) - **Target: 15-25% coverage**
12
+ > - **Production-Ready:** Ask all questions 6.1-6.7 - **Target: 60-80% coverage**
13
+ > - **Enterprise:** Ask all questions 6.1-6.9 - **Target: 80-95% coverage + contract/load tests**
14
+
15
+ ### Objective
16
+
17
+ Define testing approach, tools, and quality gates.
18
+
19
+ **🚨 Important: All projects require basic testing. Scope determines depth, not whether to test.**
20
+
21
+ ---
22
+
23
+ ## 🔍 Pre-Flight Check (Smart Skip Logic)
24
+
25
+ > 📎 **Reference:** See [prompts/shared/smart-skip-preflight.md](../../.ai-flow/prompts/shared/smart-skip-preflight.md) for the complete smart skip logic.
26
+
27
+ **Execute Pre-Flight Check for Phase 6:**
28
+
29
+ - **Target File**: `docs/testing.md`
30
+ - **Phase Name**: "TESTING STRATEGY"
31
+ - **Key Items**: Test framework, coverage targets, test types, CI/CD integration
32
+ - **Typical Gaps**: E2E strategy, load testing, performance testing
33
+
34
+ **Proceed with appropriate scenario based on audit data from `.ai-flow/cache/audit-data.json`**
35
+
36
+ ---
37
+
38
+ ## Phase 6 Questions (Full Mode)
39
+
40
+ **6.1 Testing Framework**
41
+
42
+ ```
43
+
44
+ Which testing tools will you use?
45
+
46
+ JavaScript/TypeScript:
47
+ A) ⭐ Jest - Most popular, great ecosystem
48
+ B) Vitest - Modern, fast, Vite-compatible
49
+ C) Mocha + Chai
50
+ D) AVA
51
+
52
+ Python:
53
+ E) ⭐ pytest - Modern, feature-rich
54
+ F) unittest - Built-in
55
+ G) nose2
56
+
57
+ Java:
58
+ H) ⭐ JUnit 5 + Mockito
59
+ I) TestNG
60
+
61
+ Your choice: \_\_
62
+
63
+ Assertion library: **
64
+ Mocking library: **
65
+
66
+ ```
67
+
68
+ **6.1b Testing Philosophy** (Production-Ready and Enterprise only)
69
+
70
+ ```
71
+ What is your testing philosophy?
72
+
73
+ A) ⭐ Test-First (TDD) - Write tests before code
74
+ - Red-Green-Refactor cycle
75
+ - Higher initial effort, better design
76
+ - Best for: Complex business logic, critical systems
77
+
78
+ B) 🔥 Test-After - Write tests after implementation
79
+ - Faster initial development
80
+ - Risk of untested edge cases
81
+ - Best for: Rapid prototyping, time-sensitive features
82
+
83
+ C) ⚡ Behavior-Driven (BDD) - Write tests as specifications
84
+ - Given/When/Then format
85
+ - Business-readable tests
86
+ - Best for: Domain-heavy applications
87
+
88
+ D) 🏆 Hybrid - TDD for core logic, test-after for simple features
89
+ - Balance of speed and quality
90
+ - Pragmatic approach
91
+
92
+ Your choice: __
93
+ ```
94
+
95
+ **6.2 Test Types**
96
+
97
+ ```
98
+ [If MVP scope selected, ask simplified version:]
99
+
100
+ For MVP, we'll focus on smoke tests (critical path verification).
101
+ Which critical flows should be tested?
102
+
103
+ Select 3-5 most important endpoints/features:
104
+ A) Authentication (login/register)
105
+ B) Main business operation (e.g., create order, post article)
106
+ C) User profile/account management
107
+ D) Payment processing (if applicable)
108
+ E) Data retrieval (main GET endpoints)
109
+
110
+ Selected: __
111
+
112
+ Test approach: Integration tests covering happy path of selected flows
113
+ Coverage target: 15-25%
114
+ Test type: Integration/E2E only (no unit tests required for MVP)
115
+
116
+ [If Production-Ready or Enterprise scope selected, ask full version:]
117
+
118
+ Which test types will you implement?
119
+
120
+ A) ✅ Unit Tests
121
+ - Test individual functions/methods in isolation
122
+ - Fast, numerous
123
+ - Mock all dependencies
124
+
125
+ B) ✅ Integration Tests
126
+ - Test multiple components together
127
+ - Database, external APIs
128
+ - Slower but more realistic
129
+
130
+ C) ✅ E2E (End-to-End) Tests
131
+ - Test full user flows
132
+ - API endpoints from request to response
133
+ - Tool: Supertest (Node.js), pytest with TestClient (Python)
134
+
135
+ D) 🏆 Contract Tests (Advanced - Enterprise recommended)
136
+ - Verify API contracts between services
137
+ - Tool: Pact, Spring Cloud Contract
138
+
139
+ E) ⚡ Load/Performance Tests (Enterprise recommended)
140
+ - Tool: Artillery, K6, JMeter
141
+
142
+ F) 🔬 Chaos Engineering (Enterprise only)
143
+ - Test system resilience to failures
144
+ - Tool: Chaos Monkey, Litmus, Gremlin
145
+
146
+ Selected: __
147
+
148
+ Pyramid distribution:
149
+ - 70% Unit tests
150
+ - 20% Integration tests
151
+ - 10% E2E tests
152
+ (Adjust as needed)
153
+
154
+ ```
155
+
156
+ **6.3 Test Database** [Skip if MVP scope]
157
+
158
+ ```
159
+ [Production-Ready/Enterprise only]
160
+
161
+ How will you handle database in tests?
162
+
163
+ A) ⭐ In-memory database
164
+ - SQLite for testing, PostgreSQL for prod
165
+ - Fast, isolated
166
+
167
+ B) 🏆 Docker test database
168
+ - Same DB as production
169
+ - More realistic
170
+ - Tool: Testcontainers
171
+
172
+ C) 🔄 Shared test database
173
+ - One DB for all tests
174
+ - Reset between test suites
175
+
176
+ D) 🎭 Mock database
177
+ - Mock all DB calls
178
+ - Fastest, but less realistic
179
+
180
+ Your choice: __
181
+
182
+ Test data strategy:
183
+ A) ⭐ Factories/Fixtures - Generate test data programmatically
184
+ B) Seed files - Load from JSON/SQL files
185
+ C) Inline - Create data in each test
186
+
187
+ ```
188
+
189
+ **6.4 Test Data Management** [Skip if MVP scope]
190
+
191
+ ```
192
+ [Production-Ready/Enterprise only]
193
+
194
+ How will you create test data?
195
+
196
+ A) ⭐ Factory pattern
197
+ - Libraries: factory_boy (Python), Fishery (TypeScript)
198
+ - Generate realistic data on demand
199
+
200
+ B) Fixtures
201
+ - Predefined test data
202
+ - Loaded before tests
203
+
204
+ C) Faker
205
+ - Random realistic data
206
+ - Library: @faker-js/faker, Faker (Python)
207
+
208
+ Your approach: __
209
+
210
+ Example test data needs:
211
+ - Users with various roles
212
+ - Products with different states
213
+ - Orders in different stages
214
+ - Payment records
215
+ - [Add your specific needs]
216
+
217
+ ```
218
+
219
+ **6.5 Mocking Strategy** [Skip if MVP scope]
220
+
221
+ ```
222
+ [Production-Ready/Enterprise only]
223
+
224
+ What will you mock?
225
+
226
+ A) ✅ External APIs - Third-party services
227
+ B) ✅ Database - In unit tests
228
+ C) ✅ File system - S3, local storage
229
+ D) ✅ Time/Date - For deterministic tests
230
+ E) ✅ Email/SMS - Sending services
231
+ F) ✅ Payment gateways
232
+
233
+ Mocking approach:
234
+ A) ⭐ Manual mocks - jest.fn(), unittest.mock
235
+ B) Library - MSW (Mock Service Worker), nock
236
+ C) Test doubles - Stubs, spies, mocks
237
+
238
+ When NOT to mock:
239
+ - Internal business logic
240
+ - Simple utilities
241
+ - Value objects
242
+
243
+ ```
244
+
245
+ **6.6 Test Organization** [Skip if MVP scope]
246
+
247
+ ```
248
+ [Production-Ready/Enterprise only]
249
+
250
+ Test file structure:
251
+
252
+ A) ⭐ Co-located with source
253
+ ```
254
+
255
+ src/
256
+ users/
257
+ user.service.ts
258
+ user.service.spec.ts
259
+
260
+ ```
261
+
262
+ B) Separate test directory
263
+ ```
264
+
265
+ src/users/user.service.ts
266
+ tests/users/user.service.test.ts
267
+
268
+ ````
269
+
270
+ Test naming:
271
+
272
+ ```typescript
273
+ describe('UserService', () => {
274
+ describe('createUser', () => {
275
+ it('should create a new user with valid data', async () => {
276
+ // Arrange
277
+ const userData = { email: 'test@example.com', name: 'Test' };
278
+
279
+ // Act
280
+ const result = await userService.createUser(userData);
281
+
282
+ // Assert
283
+ expect(result).toBeDefined();
284
+ expect(result.email).toBe(userData.email);
285
+ });
286
+
287
+ it('should throw error when email is duplicated', async () => {
288
+ // ...
289
+ });
290
+ });
291
+ });
292
+ ````
293
+
294
+ Naming pattern:
295
+ A) ⭐ "should [expected behavior] when [condition]"
296
+ B) "it [expected behavior]"
297
+ C) Free-form
298
+
299
+ ````
300
+
301
+ **6.6.1 Contract Testing** [If selected in 6.2]
302
+
303
+ ```
304
+ [Production-Ready/Enterprise only]
305
+
306
+ Contract testing tool:
307
+ A) ⭐ Pact - Consumer-driven contracts
308
+ B) Spring Cloud Contract - Provider contracts
309
+ C) Other: __
310
+
311
+ Contract strategy:
312
+ A) ⭐ Consumer-driven - Frontend/consumers define contracts
313
+ B) Provider-driven - Backend defines contracts
314
+ C) Both - Hybrid approach
315
+
316
+ Contract storage:
317
+ A) ⭐ Pact Broker - Centralized contract storage
318
+ B) Git repository - Version contracts in code
319
+ C) Other: __
320
+
321
+ Contract versioning:
322
+ - Strategy: __
323
+ - Breaking changes: __
324
+ ```
325
+
326
+ **6.6.2 Load/Performance Testing** [If selected in 6.2]
327
+
328
+ ```
329
+ [Production-Ready/Enterprise only]
330
+
331
+ Load testing tool:
332
+ A) ⭐ Artillery - Node.js, YAML-based
333
+ B) K6 - Modern, JavaScript-based
334
+ C) JMeter - Java-based, GUI available
335
+ D) Locust - Python-based
336
+ E) Other: __
337
+
338
+ Test scenarios:
339
+ - Normal load: __ requests/second
340
+ - Peak load: __ requests/second
341
+ - Stress test: __ requests/second (beyond capacity)
342
+ - Duration: __ minutes
343
+
344
+ Performance thresholds:
345
+ - Response time p50: < __ ms
346
+ - Response time p95: < __ ms
347
+ - Response time p99: < __ ms
348
+ - Error rate: < __%
349
+ - Throughput: > __ requests/second
350
+
351
+ When to run:
352
+ A) ⭐ Before major releases
353
+ B) Weekly automated runs
354
+ C) On-demand only
355
+ ```
356
+
357
+ **6.6.3 Chaos Engineering** [If selected in 6.2 - Enterprise only]
358
+
359
+ ```
360
+ [Enterprise only]
361
+
362
+ Chaos engineering tool:
363
+ A) ⭐ Chaos Monkey (Netflix)
364
+ B) Litmus (Kubernetes)
365
+ C) Gremlin - Managed chaos platform
366
+ D) Custom scripts
367
+ E) Other: __
368
+
369
+ Chaos experiments to run:
370
+ A) Network latency injection
371
+ B) Service failures
372
+ C) Database connection failures
373
+ D) CPU/memory exhaustion
374
+ E) Disk space issues
375
+ F) Network partition
376
+
377
+ → Your selection (e.g., A, B, C): __
378
+
379
+ Safety rules:
380
+ - Run only in: [Staging, Production with approval]
381
+ - Blast radius: __% of traffic/instances
382
+ - Auto-rollback: [Yes/No]
383
+ - Approval required: [Yes/No]
384
+ ```
385
+
386
+ **6.7 CI/CD Testing** [All scopes - simplified for MVP]
387
+
388
+ ```
389
+ [If MVP scope:]
390
+ For MVP, we'll set up basic CI to run smoke tests.
391
+
392
+ When will smoke tests run?
393
+ A) ⭐ On pull request (GitHub Actions, GitLab CI) - Recommended
394
+ B) Before deploy only
395
+
396
+ Selected: __
397
+
398
+ Quality gate for MVP:
399
+ - ✅ All smoke tests must pass
400
+ - ⚠️ Coverage tracking (no minimum required)
401
+
402
+ [If Production-Ready or Enterprise scope:]
403
+
404
+ When will tests run?
405
+
406
+ A) ⭐ On every commit (pre-commit hook) - Catch issues early
407
+ B) 🔥 On pull request (GitHub Actions, GitLab CI) - Most popular, prevents broken merges
408
+ C) ⭐ Before deploy (staging pipeline) - Recommended safety check
409
+ D) Nightly (comprehensive test suite) - For slow/extensive tests
410
+
411
+ Selected: __
412
+
413
+ Quality gates:
414
+
415
+ - ✅ All tests must pass
416
+ - ✅ Coverage must be >= __% (15-25% MVP, 60-80% Production, 80-95% Enterprise)
417
+ - ✅ No linting errors
418
+ - ⚡ Performance benchmarks met (optional, Enterprise recommended)
419
+
420
+ Failing a quality gate:
421
+ A) ⭐ Block merge/deploy - Force fix
422
+ B) ⚠️ Warning only - Allow with justification
423
+
424
+ ```
425
+
426
+ ### Phase 6 Output
427
+
428
+ ```
429
+ 📋 PHASE 6 SUMMARY:
430
+
431
+ **If MVP scope (A):**
432
+ Testing Framework: [Jest/pytest/JUnit] (6.1)
433
+ Test Types: Smoke tests on critical paths [selected 3-5 critical flows] (6.2)
434
+ Test Approach: Integration/E2E tests covering happy path only (6.2)
435
+ Coverage Target: 15-25% (6.2)
436
+ CI/CD Testing: [on PR/before deploy] + quality gate: all tests must pass (6.7)
437
+ Status: Basic testing implemented for MVP
438
+
439
+ **If Production-Ready (B):**
440
+ Testing Framework: [Jest/pytest/JUnit + assertion library + mocking library] (6.1)
441
+ Test Types: [unit/integration/e2e - selected types] (6.2)
442
+ Test Distribution: [pyramid percentages: 70/20/10 or custom] (6.2)
443
+ Test Database: [in-memory/Docker/shared/mock + initial data strategy] (6.3)
444
+ Test Data Management: [factories/fixtures/faker approach + specific test data needs] (6.4)
445
+ Mocking Strategy: [what to mock (APIs/DB/files/time/email/payments) + approach] (6.5)
446
+ Test Organization: [co-located/separate folder + naming pattern] (6.6)
447
+ CI/CD Testing: [when tests run (commit/PR/deploy/nightly) + quality gates (pass/60-80% coverage/lint) + gate behavior (block/warn)] (6.7)
448
+ Status: Comprehensive testing strategy implemented
449
+
450
+ **If Enterprise (C):**
451
+ Testing Framework: [Jest/pytest/JUnit + assertion library + mocking library] (6.1)
452
+ Test Types: [unit/integration/e2e/contract/load/chaos - all types] (6.2)
453
+ Test Distribution: [pyramid percentages: 70/20/10 or custom] (6.2)
454
+ Test Database: [in-memory/Docker/shared/mock + initial data strategy] (6.3)
455
+ Test Data Management: [factories/fixtures/faker approach + specific test data needs] (6.4)
456
+ Mocking Strategy: [what to mock (APIs/DB/files/time/email/payments) + approach] (6.5)
457
+ Test Organization: [co-located/separate folder + naming pattern] (6.6)
458
+ Contract Testing: [tool (Pact/Spring Cloud Contract) + strategy + storage + versioning] (6.6.1)
459
+ Load Testing: [tool (Artillery/K6/JMeter) + scenarios + thresholds + schedule] (6.6.2)
460
+ Chaos Engineering: [tool (Chaos Monkey/Litmus/Gremlin) + experiments + safety rules] (6.6.3)
461
+ CI/CD Testing: [when tests run (commit/PR/deploy/nightly) + quality gates (pass/80-95% coverage/lint/performance) + gate behavior (block/warn)] (6.7)
462
+ Status: Exhaustive testing strategy with advanced scenarios
463
+
464
+ Is this correct? (Yes/No)
465
+ ```
466
+ ---
467
+ ### 📄 Generate Phase 6 Documents
468
+
469
+ **Before starting generation:**
470
+
471
+ ```
472
+ 📖 Loading context from previous phases...
473
+ ✅ Re-reading docs/code-standards.md
474
+ ✅ Re-reading ai-instructions.md
475
+ ```
476
+
477
+ **Generate `docs/testing.md` automatically:**
478
+
479
+ - Use template: `.ai-flow/templates/docs/testing.template.md`
480
+ - **If MVP scope:** Fill with basic testing strategy: framework selection, smoke tests on critical paths, coverage 15-25%, basic CI setup. Mark advanced sections as "Not implemented yet - expand when moving to Production-Ready"
481
+ - **If Production-Ready:** Fill with comprehensive testing strategy: framework, unit/integration/e2e tests, 60-80% coverage, test data management, mocking, full CI/CD
482
+ - **If Enterprise:** Fill with exhaustive testing strategy: all Production-Ready items + contract tests, load tests, security tests, 80-95% coverage, performance benchmarks
483
+ - Write to: `docs/testing.md`
484
+
485
+ ```
486
+ ✅ Generated: docs/testing.md
487
+
488
+ Document has been created with all Phase 6 information.
489
+
490
+ 📝 Would you like to make any corrections before continuing?
491
+
492
+ → If yes: Edit the file and type "ready" when done. I'll re-read it.
493
+ → If no: Type "continue" to proceed to Phase 7.
494
+ ```
495
+
496
+ **If user edits file:**
497
+ Re-read file to refresh context before continuing.
498
+ ---
499
+ **Proceed to Phase 7 only after documents are validated.**
500
+
501
+ > ⚠️ **CRITICAL:** DO NOT generate README.md in this phase. README.md is ONLY generated in Phase 8 (step 8.5) after framework initialization.
502
+ ---
503
+
504
+ ## 📝 Generated Documents
505
+
506
+ After Phase 6, generate/update:
507
+ - `docs/testing.md` - Testing strategy and quality gates
508
+
509
+ ---
510
+
511
+ **Next Phase:** Phase 7 - Operations & Deployment (10-15 min)
512
+
513
+ Read: `.ai-flow/prompts/backend/flow-build-phase-7.md`
514
+
515
+ ---
516
+
517
+ **Last Updated:** 2025-12-20
518
+ **Version:** 2.1.8
519
+
520
+ ---
521
+
522
+ ## PHASE 7: Operations & Deployment (10-15 min)
523
+
524
+ ````