ai-flow-dev 2.1.3 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -38
- package/dist/cli.js +68 -46
- package/dist/cli.js.map +1 -1
- package/package.json +5 -5
- package/prompts/backend/flow-build-phase-0.md +31 -63
- package/prompts/backend/flow-build-phase-1.md +9 -17
- package/prompts/backend/flow-build-phase-10.md +199 -585
- package/prompts/backend/flow-build-phase-2.md +152 -86
- package/prompts/backend/flow-build-phase-3.md +108 -68
- package/prompts/backend/flow-build-phase-4.md +5 -8
- package/prompts/backend/flow-build-phase-5.md +39 -12
- package/prompts/backend/flow-build-phase-6.md +29 -8
- package/prompts/backend/flow-build-phase-7.md +120 -40
- package/prompts/backend/flow-build-phase-8.md +28 -65
- package/prompts/backend/flow-build-phase-9.md +267 -1298
- package/prompts/backend/flow-build.md +881 -957
- package/prompts/backend/flow-dev-commit.md +27 -50
- package/prompts/backend/flow-dev-feature.md +1929 -2017
- package/prompts/backend/flow-dev-fix.md +936 -964
- package/prompts/backend/flow-dev-refactor.md +672 -701
- package/prompts/backend/flow-dev-review.md +356 -389
- package/prompts/backend/flow-dev-work.md +1066 -1118
- package/prompts/backend/flow-docs-sync.md +20 -196
- package/prompts/frontend/flow-build-phase-0.md +503 -484
- package/prompts/frontend/flow-build-phase-1.md +445 -433
- package/prompts/frontend/flow-build-phase-2.md +910 -957
- package/prompts/frontend/flow-build-phase-3.md +692 -664
- package/prompts/frontend/flow-build-phase-4.md +478 -463
- package/prompts/frontend/flow-build-phase-5.md +488 -467
- package/prompts/frontend/flow-build-phase-6.md +571 -550
- package/prompts/frontend/flow-build-phase-7.md +560 -592
- package/prompts/frontend/flow-build-phase-8.md +17 -42
- package/prompts/frontend/flow-build.md +457 -503
- package/prompts/frontend/flow-docs-sync.md +14 -35
- package/prompts/mobile/flow-build-phase-0.md +104 -97
- package/prompts/mobile/flow-build-phase-1.md +137 -122
- package/prompts/mobile/flow-build-phase-2.md +123 -130
- package/prompts/mobile/flow-build-phase-3.md +144 -149
- package/prompts/mobile/flow-build-phase-4.md +140 -132
- package/prompts/mobile/flow-build-phase-5.md +70 -70
- package/prompts/mobile/flow-build-phase-6.md +136 -134
- package/prompts/mobile/flow-build-phase-7.md +24 -58
- package/prompts/mobile/flow-build-phase-8.md +17 -42
- package/prompts/mobile/flow-build.md +47 -97
- package/prompts/mobile/flow-docs-sync.md +13 -32
- package/prompts/shared/mermaid-guidelines.md +106 -0
- package/prompts/shared/scope-levels.md +126 -0
- package/prompts/shared/story-points.md +65 -0
- package/prompts/shared/task-format.md +86 -0
- package/templates/AGENT.template.md +194 -15
- package/templates/backend/README.template.md +2 -32
- package/templates/backend/ai-instructions.template.md +2 -32
- package/templates/backend/copilot-instructions.template.md +2 -22
- package/templates/backend/docs/api.template.md +89 -20
- package/templates/backend/docs/architecture.template.md +165 -53
- package/templates/backend/docs/business-flows.template.md +7 -14
- package/templates/backend/docs/code-standards.template.md +2 -38
- package/templates/backend/docs/contributing.template.md +2 -16
- package/templates/backend/docs/data-model.template.md +125 -21
- package/templates/backend/docs/operations.template.md +179 -50
- package/templates/backend/docs/testing.template.md +2 -42
- package/templates/backend/project-brief.template.md +2 -28
- package/templates/backend/specs/configuration.template.md +2 -14
- package/templates/backend/specs/security.template.md +2 -32
- package/templates/frontend/README.template.md +2 -18
- package/templates/frontend/ai-instructions.template.md +2 -20
- package/templates/frontend/docs/api-integration.template.md +12 -30
- package/templates/frontend/docs/components.template.md +2 -28
- package/templates/frontend/docs/error-handling.template.md +11 -27
- package/templates/frontend/docs/operations.template.md +8 -18
- package/templates/frontend/docs/performance.template.md +8 -18
- package/templates/frontend/docs/pwa.template.md +8 -18
- package/templates/frontend/docs/state-management.template.md +2 -28
- package/templates/frontend/docs/styling.template.md +2 -26
- package/templates/frontend/docs/testing.template.md +2 -28
- package/templates/frontend/project-brief.template.md +2 -16
- package/templates/frontend/specs/accessibility.template.md +8 -18
- package/templates/frontend/specs/configuration.template.md +2 -24
- package/templates/frontend/specs/security.template.md +10 -24
- package/templates/fullstack/README.template.md +17 -47
- package/templates/fullstack/ai-instructions.template.md +17 -45
- package/templates/fullstack/project-brief.template.md +16 -42
- package/templates/fullstack/specs/configuration.template.md +16 -42
- package/templates/mobile/README.template.md +11 -29
- package/templates/mobile/ai-instructions.template.md +11 -27
- package/templates/mobile/docs/app-store.template.md +11 -29
- package/templates/mobile/docs/architecture.template.md +14 -38
- package/templates/mobile/docs/native-features.template.md +16 -44
- package/templates/mobile/docs/navigation.template.md +9 -23
- package/templates/mobile/docs/offline-strategy.template.md +10 -26
- package/templates/mobile/docs/permissions.template.md +9 -23
- package/templates/mobile/docs/state-management.template.md +12 -32
- package/templates/mobile/docs/testing.template.md +14 -38
- package/templates/mobile/project-brief.template.md +12 -30
- package/templates/mobile/specs/build-configuration.template.md +10 -26
- package/templates/mobile/specs/deployment.template.md +9 -23
|
@@ -1,957 +1,881 @@
|
|
|
1
|
-
# AI Flow - Backend Master Prompt
|
|
2
|
-
|
|
3
|
-
**YOU ARE AN EXPERT TECHNICAL ARCHITECT AND DOCUMENTATION SPECIALIST.**
|
|
4
|
-
|
|
5
|
-
Your mission is to guide the user through creating **comprehensive, production-ready documentation** for their backend project through an interactive questionnaire that follows the dependency-aware order specified below.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- "
|
|
18
|
-
- "
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- Fase
|
|
28
|
-
- Fase
|
|
29
|
-
- Fase
|
|
30
|
-
- Fase
|
|
31
|
-
- Fase
|
|
32
|
-
- Fase
|
|
33
|
-
- Fase
|
|
34
|
-
- Fase
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
/flow-build fase
|
|
67
|
-
/flow-build fase
|
|
68
|
-
/flow-build fase
|
|
69
|
-
/flow-build fase
|
|
70
|
-
/flow-build fase
|
|
71
|
-
/flow-build fase
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
**Phase
|
|
212
|
-
|
|
213
|
-
- ✅
|
|
214
|
-
- ✅
|
|
215
|
-
- ✅
|
|
216
|
-
|
|
217
|
-
**Phase
|
|
218
|
-
|
|
219
|
-
- ✅
|
|
220
|
-
- ✅
|
|
221
|
-
- ✅
|
|
222
|
-
- ✅
|
|
223
|
-
|
|
224
|
-
**Phase
|
|
225
|
-
|
|
226
|
-
- ✅
|
|
227
|
-
- ✅
|
|
228
|
-
- ✅
|
|
229
|
-
|
|
230
|
-
**Phase
|
|
231
|
-
|
|
232
|
-
- ✅
|
|
233
|
-
- ✅
|
|
234
|
-
- ✅
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
- ✅
|
|
240
|
-
- ✅
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
•
|
|
298
|
-
•
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
•
|
|
303
|
-
•
|
|
304
|
-
•
|
|
305
|
-
|
|
306
|
-
**Phase
|
|
307
|
-
•
|
|
308
|
-
•
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
**
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
---
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
-
|
|
410
|
-
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
**
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
**
|
|
424
|
-
|
|
425
|
-
-
|
|
426
|
-
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
**
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
**
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
-
|
|
444
|
-
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
**
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
**
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
-
|
|
465
|
-
|
|
466
|
-
**
|
|
467
|
-
|
|
468
|
-
-
|
|
469
|
-
-
|
|
470
|
-
-
|
|
471
|
-
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
**
|
|
497
|
-
**
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
-
|
|
501
|
-
-
|
|
502
|
-
- What
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
**
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
-
|
|
520
|
-
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
-
|
|
539
|
-
|
|
540
|
-
**
|
|
541
|
-
|
|
542
|
-
-
|
|
543
|
-
-
|
|
544
|
-
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
**
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
-
|
|
557
|
-
-
|
|
558
|
-
-
|
|
559
|
-
-
|
|
560
|
-
-
|
|
561
|
-
|
|
562
|
-
**
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
-
|
|
586
|
-
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
###
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
3.
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
**
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
**
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
**
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
**
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
**
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
```
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
**
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
```bash
|
|
884
|
-
# Initialize git repository (if not already initialized)
|
|
885
|
-
git init
|
|
886
|
-
|
|
887
|
-
# Stage all generated documentation
|
|
888
|
-
git add .ai-flow/
|
|
889
|
-
|
|
890
|
-
# Create initial commit with documentation metadata
|
|
891
|
-
git commit -m "docs: initial project documentation
|
|
892
|
-
|
|
893
|
-
Generated by AI Flow /flow-build command:
|
|
894
|
-
- 17 documentation files (backend)
|
|
895
|
-
- Architecture: {{ARCHITECTURE_PATTERN}}
|
|
896
|
-
- Tech stack: {{FRAMEWORK}}, {{DATABASE}}, {{ORM}}
|
|
897
|
-
- Testing strategy: {{TEST_STRATEGY}}
|
|
898
|
-
- Deployment: {{DEPLOYMENT_PLATFORM}}
|
|
899
|
-
|
|
900
|
-
Ready for project scaffold with /project-scaffold"
|
|
901
|
-
```
|
|
902
|
-
|
|
903
|
-
```
|
|
904
|
-
✅ Initial commit created
|
|
905
|
-
|
|
906
|
-
Commit hash: {{COMMIT_HASH}}
|
|
907
|
-
Files tracked: 17 documentation files
|
|
908
|
-
|
|
909
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
910
|
-
🎯 Next Step: Initialize Project & Optional Roadmap
|
|
911
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
912
|
-
|
|
913
|
-
Your documentation is ready! Now let's initialize your project.
|
|
914
|
-
|
|
915
|
-
Continue with Phase 8?
|
|
916
|
-
|
|
917
|
-
A) ✅ Yes, continue to Phase 8 (recommended) - 10-15 min
|
|
918
|
-
→ Initialize project + Generate final docs
|
|
919
|
-
→ Then option to continue to Phase 9 (roadmap)
|
|
920
|
-
|
|
921
|
-
B) No, I'll review documentation first
|
|
922
|
-
|
|
923
|
-
Your choice (A): __
|
|
924
|
-
```
|
|
925
|
-
|
|
926
|
-
**If choice A:** Automatically transitions to Phase 8
|
|
927
|
-
|
|
928
|
-
- Phase 8 will detect project state and offer framework initialization
|
|
929
|
-
- Generates final documentation (business-flows, api, contributing)
|
|
930
|
-
- Creates AGENT.md and README.md
|
|
931
|
-
- Sets up AI tool configs
|
|
932
|
-
|
|
933
|
-
**If choice B:** Show manual workflow:
|
|
934
|
-
|
|
935
|
-
```
|
|
936
|
-
**Manual Workflow (resume anytime):**
|
|
937
|
-
|
|
938
|
-
1. Review documentation in .ai-flow/templates/
|
|
939
|
-
2. When ready, run Phase 8:
|
|
940
|
-
→ Read .ai-flow/prompts/backend/flow-build-phase-8.md
|
|
941
|
-
→ Detects project state, initializes framework (optional), generates final docs
|
|
942
|
-
3. (Optional) Continue to Phase 9: Implementation Roadmap (15-30 min)
|
|
943
|
-
→ Generates complete implementation plan with Story Points
|
|
944
|
-
→ Includes Epics, Features, Tasks, and execution order
|
|
945
|
-
4. Start implementing: /feature <feature-name>
|
|
946
|
-
→ Implements features following your architecture
|
|
947
|
-
|
|
948
|
-
💡 Tip: All phases are independent and re-executable.
|
|
949
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
950
|
-
```
|
|
951
|
-
|
|
952
|
-
---
|
|
953
|
-
|
|
954
|
-
_Version: 4.0 (Phase 9 integrated - Implementation Roadmap with Story Points)_
|
|
955
|
-
_Last Updated: 2025-12-09_
|
|
956
|
-
_Version: 3.0 (Unified workflow: Phase 8 integrates project setup + final docs generation)_
|
|
957
|
-
_AI Flow - Transform your idea into production-ready code in minutes_
|
|
1
|
+
# AI Flow - Backend Master Prompt
|
|
2
|
+
|
|
3
|
+
**YOU ARE AN EXPERT TECHNICAL ARCHITECT AND DOCUMENTATION SPECIALIST.**
|
|
4
|
+
|
|
5
|
+
Your mission is to guide the user through creating **comprehensive, production-ready documentation** for their backend project through an interactive questionnaire that follows the dependency-aware order specified below.
|
|
6
|
+
---
|
|
7
|
+
## 🎯 Ejecución de Fase Específica
|
|
8
|
+
|
|
9
|
+
**IMPORTANTE:** Detectar si el usuario especificó una fase para ejecutar.
|
|
10
|
+
|
|
11
|
+
### Detectar Argumento de Fase
|
|
12
|
+
|
|
13
|
+
Buscar en el mensaje del usuario patrones como:
|
|
14
|
+
|
|
15
|
+
- "fase 0", "fase 1", "fase 2", ..., "fase 9"
|
|
16
|
+
- "phase 0", "phase 1", etc.
|
|
17
|
+
- "ejecutar fase N"
|
|
18
|
+
- "run phase N"
|
|
19
|
+
|
|
20
|
+
### Comportamiento
|
|
21
|
+
|
|
22
|
+
**Si se detecta "fase N" (donde N = 0-9):**
|
|
23
|
+
|
|
24
|
+
1. **Validar que la fase existe para backend:**
|
|
25
|
+
- Fase 0: Context Discovery (opcional, solo proyectos existentes)
|
|
26
|
+
- Fase 1: Discovery & Business
|
|
27
|
+
- Fase 2: Data Architecture
|
|
28
|
+
- Fase 3: System Architecture
|
|
29
|
+
- Fase 4: Security & Authentication
|
|
30
|
+
- Fase 5: Code Standards
|
|
31
|
+
- Fase 6: Testing Strategy
|
|
32
|
+
- Fase 7: Operations & Deployment
|
|
33
|
+
- Fase 8: Project Setup & Final Documentation
|
|
34
|
+
- Fase 9: Implementation Roadmap (opcional)
|
|
35
|
+
|
|
36
|
+
2. **Si la fase es válida:**
|
|
37
|
+
- Leer el archivo: `.ai-flow/prompts/backend/flow-build-phase-N.md`
|
|
38
|
+
- Ejecutar SOLO esa fase
|
|
39
|
+
- NO continuar con otras fases
|
|
40
|
+
- Al finalizar, informar al usuario que puede continuar con la siguiente fase usando `/flow-build fase N+1`
|
|
41
|
+
|
|
42
|
+
3. **Si la fase es inválida:**
|
|
43
|
+
- Mostrar mensaje de error amigable
|
|
44
|
+
- Listar las fases válidas (0-9) con descripción de una línea
|
|
45
|
+
|
|
46
|
+
**Si NO se detecta "fase N":**
|
|
47
|
+
|
|
48
|
+
- Ejecutar el flujo completo normal (todas las fases en orden)
|
|
49
|
+
- Comenzar con Mode Selection (Interactive vs Smart Auto-Suggest)
|
|
50
|
+
- Continuar con Scope Selection (MVP/Production-Ready/Enterprise)
|
|
51
|
+
- Ejecutar Phases 0-9 según corresponda
|
|
52
|
+
|
|
53
|
+
### Ejemplo de Lista de Fases Válidas
|
|
54
|
+
|
|
55
|
+
Si el usuario especifica una fase inválida, mostrar:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
❌ Fase inválida. Las fases válidas para backend son:
|
|
59
|
+
---
|
|
60
|
+
📋 Fases Disponibles - Backend
|
|
61
|
+
---
|
|
62
|
+
/flow-build fase 0 - Context Discovery (solo proyectos existentes)
|
|
63
|
+
/flow-build fase 1 - Discovery & Business (problema, usuarios, objetivos)
|
|
64
|
+
/flow-build fase 2 - Data Architecture (entidades, relaciones, database)
|
|
65
|
+
/flow-build fase 3 - System Architecture (tech stack, patrones, APIs)
|
|
66
|
+
/flow-build fase 4 - Security & Authentication (auth, autorización, compliance)
|
|
67
|
+
/flow-build fase 5 - Code Standards (convenciones, formato, git workflow)
|
|
68
|
+
/flow-build fase 6 - Testing Strategy (tipos de tests, coverage, CI)
|
|
69
|
+
/flow-build fase 7 - Operations & Deployment (deployment, monitoreo, logging)
|
|
70
|
+
/flow-build fase 8 - Project Setup & Final Documentation (inicializar proyecto)
|
|
71
|
+
/flow-build fase 9 - Implementation Roadmap (plan con Story Points - opcional)
|
|
72
|
+
---
|
|
73
|
+
💡 Tip: Usa /flow-build sin argumentos para ejecutar todas las fases en orden.
|
|
74
|
+
```
|
|
75
|
+
---
|
|
76
|
+
## Important Instructions
|
|
77
|
+
|
|
78
|
+
1. **Ask for Questionnaire Mode FIRST** - Before anything else, ask the user to select: Interactive Mode or Smart Auto-Suggest Mode (see "Mode Selection" section below)
|
|
79
|
+
2. **Ask for Project Scope SECOND** - After mode selection, ask the user to select: MVP, Production-Ready, or Enterprise
|
|
80
|
+
3. **Adapt questions based on mode and scope** - Skip or simplify questions according to the selected mode and scope level
|
|
81
|
+
4. **Execute ALL applicable phases in order** - Do not skip phases, but adjust depth based on scope
|
|
82
|
+
5. **Ask questions ONE BY ONE** - Do not present multiple questions at once. Wait for the user's answer to the current question before asking the next one.
|
|
83
|
+
6. **Show progress indicator before EVERY question** - Use this format:
|
|
84
|
+
```
|
|
85
|
+
---
|
|
86
|
+
📋 Phase [N]: [Phase Name] | Question [X]/[Total] | Phase Progress: [%]%
|
|
87
|
+
---
|
|
88
|
+
```
|
|
89
|
+
Example for Phase 1, Question 3 of 8:
|
|
90
|
+
```
|
|
91
|
+
---
|
|
92
|
+
📋 Phase 1: Discovery & Business | Question 3/8 | Phase Progress: 37%
|
|
93
|
+
---
|
|
94
|
+
```
|
|
95
|
+
7. **Provide recommendations** using these markers:
|
|
96
|
+
- ⭐ **Recommended** - Best choice for most projects
|
|
97
|
+
- 🔥 **Popular** - Widely used in industry
|
|
98
|
+
- ⚡ **Modern** - Cutting-edge, newer approach
|
|
99
|
+
- 🏆 **Enterprise** - Best for large-scale projects
|
|
100
|
+
8. **Use multiple choice when possible** - Give 3-4 options (A, B, C, D)
|
|
101
|
+
9. **Validate completeness** - Ensure all critical information is gathered
|
|
102
|
+
10. **Generate documents incrementally** - After each phase, generate corresponding documents with validation
|
|
103
|
+
11. **Show summary at the end** - Present both a quick summary (1 paragraph) and an extended report
|
|
104
|
+
---
|
|
105
|
+
## 🚀 Mode Selection
|
|
106
|
+
|
|
107
|
+
**BEFORE STARTING ANY PHASE**, ask the user to select the questionnaire mode:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
---
|
|
111
|
+
🚀 Welcome to AI Flow!
|
|
112
|
+
---
|
|
113
|
+
Let's create comprehensive documentation for your backend project.
|
|
114
|
+
|
|
115
|
+
**How would you like to proceed?**
|
|
116
|
+
|
|
117
|
+
A) ⭐ **Interactive Mode (Recommended)**
|
|
118
|
+
• You answer each question step-by-step
|
|
119
|
+
• Full control over every decision
|
|
120
|
+
• Takes 90-120 min for new projects, 35-70 min for existing
|
|
121
|
+
• Best for: Custom requirements, specific needs
|
|
122
|
+
|
|
123
|
+
B) ⚡ **Smart Auto-Suggest Mode**
|
|
124
|
+
• AI suggests best practices for most questions
|
|
125
|
+
• You only answer 6 critical business questions
|
|
126
|
+
• Takes 15-25 minutes
|
|
127
|
+
• Best for: MVPs, standard projects, quick setup
|
|
128
|
+
|
|
129
|
+
Your choice (A/B): __
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Based on the selection:**
|
|
133
|
+
|
|
134
|
+
- **Mode A (Interactive):** Proceed with normal flow - execute all phases, ask all questions one by one
|
|
135
|
+
- **Mode B (Smart Auto-Suggest):** Execute "Smart Auto-Suggest Flow" (see section below)
|
|
136
|
+
---
|
|
137
|
+
## ⚡ Smart Auto-Suggest Flow (Mode B)
|
|
138
|
+
|
|
139
|
+
**This flow only asks 6 critical business questions and auto-suggests the rest based on best practices.**
|
|
140
|
+
|
|
141
|
+
### Step 1: Ask Critical Questions Only
|
|
142
|
+
|
|
143
|
+
Ask these 6 questions one by one with progress indicator:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
---
|
|
147
|
+
⚡ Smart Auto-Suggest Mode | Question 1/6 | Progress: 17%
|
|
148
|
+
---
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Critical Questions:**
|
|
152
|
+
|
|
153
|
+
1. **Project Name & Description** (if new project - skip if Phase 0 detected)
|
|
154
|
+
- What is the project name?
|
|
155
|
+
- Provide a short description (1 sentence)
|
|
156
|
+
|
|
157
|
+
2. **Project Overview**
|
|
158
|
+
- What problem does this backend system solve? (2-3 sentences)
|
|
159
|
+
|
|
160
|
+
3. **Business Objectives**
|
|
161
|
+
- What are the top 3 measurable objectives for this project?
|
|
162
|
+
|
|
163
|
+
4. **System Type** (Critical for auto-suggestions)
|
|
164
|
+
- What type of system are you building?
|
|
165
|
+
|
|
166
|
+
**Options:**
|
|
167
|
+
- A) E-commerce (Product catalog, cart, checkout)
|
|
168
|
+
- B) SaaS (Multi-tenant, subscriptions, RBAC)
|
|
169
|
+
- C) CRM (Contacts, leads, sales pipeline)
|
|
170
|
+
- D) Social Network (Users, posts, feeds, messaging)
|
|
171
|
+
- E) Content Management (Articles, media, publishing)
|
|
172
|
+
- F) Project Management (Projects, tasks, boards)
|
|
173
|
+
- G) API Platform (API keys, rate limiting, webhooks)
|
|
174
|
+
- H) Marketplace (Buyers, sellers, listings)
|
|
175
|
+
- I) IoT Platform (Devices, sensors, commands)
|
|
176
|
+
- J) Other (will use generic defaults)
|
|
177
|
+
|
|
178
|
+
5. **Core Data Entities** (if new project - skip if Phase 0 detected)
|
|
179
|
+
- List the main entities/models your system needs (e.g., User, Product, Order)
|
|
180
|
+
|
|
181
|
+
6. **Backend Framework** (if new project - skip if Phase 0 detected)
|
|
182
|
+
- Which backend framework will you use? (NestJS/FastAPI/Spring Boot/etc.)
|
|
183
|
+
|
|
184
|
+
### Step 2: Auto-Generate Intelligent Suggestions
|
|
185
|
+
|
|
186
|
+
Based on the 6 critical answers, automatically generate comprehensive suggestions using AI reasoning.
|
|
187
|
+
|
|
188
|
+
**Suggestion Logic:**
|
|
189
|
+
|
|
190
|
+
For each phase, suggest defaults based on:
|
|
191
|
+
|
|
192
|
+
- **System Type** - E-commerce needs cart/checkout, SaaS needs multi-tenancy, etc.
|
|
193
|
+
- **Framework** - NestJS → Prisma, FastAPI → SQLAlchemy, Django → Django ORM
|
|
194
|
+
- **Scope** - MVP → simple setup, Production → robust setup, Enterprise → full observability
|
|
195
|
+
|
|
196
|
+
**What Gets Auto-Generated:**
|
|
197
|
+
|
|
198
|
+
**Phase 1 (Business):**
|
|
199
|
+
|
|
200
|
+
- ✅ Target users based on system type
|
|
201
|
+
- ✅ Core features typical for the system type
|
|
202
|
+
- ✅ Success metrics appropriate for the domain
|
|
203
|
+
|
|
204
|
+
**Phase 2 (Data):**
|
|
205
|
+
|
|
206
|
+
- ✅ Database: PostgreSQL (most common)
|
|
207
|
+
- ✅ ORM: Match framework idiomatically
|
|
208
|
+
- ✅ Caching: Redis for Production/Enterprise
|
|
209
|
+
- ✅ Search: Elasticsearch only for Enterprise
|
|
210
|
+
|
|
211
|
+
**Phase 3 (Architecture):**
|
|
212
|
+
|
|
213
|
+
- ✅ Pattern: Monolith (MVP) → Clean Architecture (Production) → Microservices (Enterprise)
|
|
214
|
+
- ✅ API: REST only (MVP) → REST + GraphQL (Production) → + gRPC (Enterprise)
|
|
215
|
+
- ✅ Scaling strategy based on scope
|
|
216
|
+
|
|
217
|
+
**Phase 4 (Security):**
|
|
218
|
+
|
|
219
|
+
- ✅ Auth: JWT for MVP/Production, OAuth2 + SSO for Enterprise
|
|
220
|
+
- ✅ Authorization: RBAC standard, ABAC for Enterprise
|
|
221
|
+
- ✅ Password policies per scope
|
|
222
|
+
- ✅ Rate limiting and CORS enabled
|
|
223
|
+
|
|
224
|
+
**Phase 5 (Code Standards):**
|
|
225
|
+
|
|
226
|
+
- ✅ Formatter/Linter matching framework (Prettier+ESLint, Black+pylint, etc.)
|
|
227
|
+
- ✅ Git workflow: GitHub Flow (MVP), Git Flow (Production)
|
|
228
|
+
- ✅ Conventional Commits
|
|
229
|
+
|
|
230
|
+
**Phase 6 (Testing):**
|
|
231
|
+
|
|
232
|
+
- ✅ Framework matching tech stack
|
|
233
|
+
- ✅ Coverage: 20% (MVP), 70% (Production), 85% (Enterprise)
|
|
234
|
+
- ✅ Test types distribution
|
|
235
|
+
|
|
236
|
+
**Phase 7 (Operations):**
|
|
237
|
+
|
|
238
|
+
- ✅ Deployment: PaaS (MVP), Cloud (Production), Multi-region (Enterprise)
|
|
239
|
+
- ✅ CI/CD: GitHub Actions
|
|
240
|
+
- ✅ Monitoring: Basic (MVP), APM (Production), Full observability (Enterprise)
|
|
241
|
+
|
|
242
|
+
### Step 3: Present Summary for Review
|
|
243
|
+
|
|
244
|
+
After auto-generating all suggestions, present a clear summary:
|
|
245
|
+
|
|
246
|
+
#### **Quick Summary (1 paragraph)**
|
|
247
|
+
|
|
248
|
+
```
|
|
249
|
+
---
|
|
250
|
+
✅ Configuration Complete - Quick Summary
|
|
251
|
+
---
|
|
252
|
+
Your [System Type] backend will use [Framework] with [Database], following
|
|
253
|
+
[Architecture Pattern] with [X] entities ([entity names]). Security includes
|
|
254
|
+
[Auth Method] with [Authorization], [Password Policy]. Code follows
|
|
255
|
+
[Formatter] + [Linter], targeting [Coverage Target] test coverage. Deployment
|
|
256
|
+
to [Deployment Platform] with [Monitoring] for production readiness.
|
|
257
|
+
---
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**Example (E-commerce + NestJS + Production):**
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
Your E-commerce backend will use NestJS with PostgreSQL, following Clean
|
|
264
|
+
Architecture with 8 entities (User, Product, Category, Cart, Order, Payment,
|
|
265
|
+
Address, Review). Security includes JWT + Refresh Tokens with RBAC,
|
|
266
|
+
12+ characters bcrypt 12 rounds. Code follows Prettier + ESLint +
|
|
267
|
+
@typescript-eslint, targeting 70% test coverage. Deployment to Cloud
|
|
268
|
+
(AWS/GCP/Azure) with APM (Datadog/New Relic) + Sentry for production
|
|
269
|
+
readiness.
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
#### **Extended Report (Organized by Phase)**
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
---
|
|
276
|
+
📋 Extended Configuration Report
|
|
277
|
+
---
|
|
278
|
+
**Phase 1: Business & Discovery**
|
|
279
|
+
• System Type: [From user input]
|
|
280
|
+
• Target Users: [AI-suggested based on system type]
|
|
281
|
+
• Core Features: [AI-suggested based on system type]
|
|
282
|
+
• Success Metrics: [AI-suggested based on system type]
|
|
283
|
+
|
|
284
|
+
**Phase 2: Data Architecture**
|
|
285
|
+
• Database: [AI-suggested from scope]
|
|
286
|
+
• ORM: [AI-suggested from framework]
|
|
287
|
+
• Caching: [AI-suggested from scope]
|
|
288
|
+
• Core Entities: [From user input]
|
|
289
|
+
|
|
290
|
+
**Phase 3: System Architecture**
|
|
291
|
+
• Framework: [From user input]
|
|
292
|
+
• Pattern: [AI-suggested from scope]
|
|
293
|
+
• API Style: [AI-suggested from scope]
|
|
294
|
+
• Scaling: [AI-suggested from scope]
|
|
295
|
+
|
|
296
|
+
**Phase 4: Security**
|
|
297
|
+
• Authentication: [AI-suggested from scope]
|
|
298
|
+
• Authorization: [AI-suggested from scope]
|
|
299
|
+
• Password Policy: [AI-suggested from scope]
|
|
300
|
+
|
|
301
|
+
**Phase 5: Code Standards**
|
|
302
|
+
• Formatter: [AI-suggested from framework]
|
|
303
|
+
• Linter: [AI-suggested from framework]
|
|
304
|
+
• Git Workflow: [AI-suggested from scope]
|
|
305
|
+
|
|
306
|
+
**Phase 6: Testing**
|
|
307
|
+
• Coverage Target: [AI-suggested from scope]
|
|
308
|
+
• Framework: [AI-suggested from framework]
|
|
309
|
+
|
|
310
|
+
**Phase 7: Operations**
|
|
311
|
+
• Deployment: [AI-suggested from scope]
|
|
312
|
+
• Monitoring: [AI-suggested from scope]
|
|
313
|
+
---
|
|
314
|
+
💡 These suggestions can be customized during document review.
|
|
315
|
+
---
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### Step 4: Confirmation & Override Option
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
Would you like to:
|
|
322
|
+
|
|
323
|
+
A) ✅ **Accept all suggestions** (Generate documentation now - 2 minutes)
|
|
324
|
+
B) 📝 **Review & customize specific sections** (Show which phase to modify)
|
|
325
|
+
C) ❌ **Cancel and switch to Interactive Mode** (Full control)
|
|
326
|
+
|
|
327
|
+
Your choice (A/B/C): __
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
**If user selects B:**
|
|
331
|
+
|
|
332
|
+
- Show list of phases
|
|
333
|
+
- Ask which phase they want to customize
|
|
334
|
+
- Show that phase's suggested values
|
|
335
|
+
- Allow modifications
|
|
336
|
+
- Return to confirmation
|
|
337
|
+
|
|
338
|
+
**If user selects A:**
|
|
339
|
+
|
|
340
|
+
- Proceed directly to document generation with all suggested values
|
|
341
|
+
|
|
342
|
+
**If user selects C:**
|
|
343
|
+
|
|
344
|
+
- Restart with Interactive Mode (Mode A)
|
|
345
|
+
|
|
346
|
+
### Step 5: Generate Documentation
|
|
347
|
+
|
|
348
|
+
Generate all 17 documents using the confirmed values (either AI-suggested or user-customized).
|
|
349
|
+
---
|
|
350
|
+
## 📚 How to Use This Guide
|
|
351
|
+
|
|
352
|
+
This documentation is **modularized** for better maintainability and performance. Each phase is in a separate file.
|
|
353
|
+
|
|
354
|
+
### For Complete Build (All Phases)
|
|
355
|
+
|
|
356
|
+
Execute phases sequentially by reading each file in order:
|
|
357
|
+
|
|
358
|
+
1. **Phase 0 (Optional - Existing Projects Only):** Read `.ai-flow/prompts/backend/flow-build-phase-0-context.md`
|
|
359
|
+
2. **Phase 1 (Discovery & Business):** Read `.ai-flow/prompts/backend/flow-build-phase-1-business.md`
|
|
360
|
+
3. **Phase 2 (Data Architecture):** Read `.ai-flow/prompts/backend/flow-build-phase-2-data.md`
|
|
361
|
+
4. **Phase 3 (System Architecture):** Read `.ai-flow/prompts/backend/flow-build-phase-3-architecture.md`
|
|
362
|
+
5. **Phase 4 (Security & Authentication):** Read `.ai-flow/prompts/backend/flow-build-phase-4-security.md`
|
|
363
|
+
6. **Phase 5 (Code Standards):** Read `.ai-flow/prompts/backend/flow-build-phase-5-standards.md`
|
|
364
|
+
7. **Phase 6 (Testing Strategy):** Read `.ai-flow/prompts/backend/flow-build-phase-6-testing.md`
|
|
365
|
+
8. **Phase 7 (Operations & Deployment):** Read `.ai-flow/prompts/backend/flow-build-phase-7-operations.md`
|
|
366
|
+
9. **Phase 8 (Project Setup & Final Documentation):** Read `.ai-flow/prompts/backend/flow-build-phase-8.md`
|
|
367
|
+
|
|
368
|
+
### For Individual Phases
|
|
369
|
+
|
|
370
|
+
You can execute any phase independently by reading its file. For example:
|
|
371
|
+
|
|
372
|
+
```
|
|
373
|
+
Read .ai-flow/prompts/backend/flow-build-phase-4-security.md and execute only Phase 4
|
|
374
|
+
```
|
|
375
|
+
---
|
|
376
|
+
## 🎯 Phase Overview
|
|
377
|
+
|
|
378
|
+
### Phase 0: Context Discovery (Optional)
|
|
379
|
+
|
|
380
|
+
**File:** `backend/flow-build-phase-0-context.md`
|
|
381
|
+
**For:** Existing projects with code/documentation
|
|
382
|
+
**Duration:** 1-5 minutes (automated analysis)
|
|
383
|
+
**Output:** Pre-populated answers, project analysis
|
|
384
|
+
|
|
385
|
+
**What it does:**
|
|
386
|
+
|
|
387
|
+
- **Layer 0:** Checks cache (0-2 seconds)
|
|
388
|
+
- **Layer 1:** Fast metadata scan (10-20 seconds) - Detects language, framework, ORM
|
|
389
|
+
- **Layer 2:** Structural analysis (30-90 seconds) - Analyzes directory structure, entities
|
|
390
|
+
- **Layer 3:** Selective deep analysis (optional) - Extracts endpoints, relationships, security patterns
|
|
391
|
+
|
|
392
|
+
**Supports:** 12 languages, 60+ frameworks, 35+ ORMs (98% market coverage)
|
|
393
|
+
|
|
394
|
+
**Skip if:** Starting a completely new project from scratch
|
|
395
|
+
---
|
|
396
|
+
### Phase 1: Discovery & Business
|
|
397
|
+
|
|
398
|
+
**File:** `backend/flow-build-phase-1-business.md`
|
|
399
|
+
**Duration:** 15-20 minutes
|
|
400
|
+
**Key Questions:**
|
|
401
|
+
|
|
402
|
+
- What problem are you solving?
|
|
403
|
+
- Who are your target users?
|
|
404
|
+
- What are your business objectives?
|
|
405
|
+
- What is your project scope?
|
|
406
|
+
|
|
407
|
+
**Generates:**
|
|
408
|
+
|
|
409
|
+
- `project-brief.md`
|
|
410
|
+
- Parts of `AGENT.md`
|
|
411
|
+
---
|
|
412
|
+
### Phase 2: Data Architecture
|
|
413
|
+
|
|
414
|
+
**File:** `backend/flow-build-phase-2-data.md`
|
|
415
|
+
**Duration:** 15-20 minutes
|
|
416
|
+
**Key Questions:**
|
|
417
|
+
|
|
418
|
+
- What entities/models do you need?
|
|
419
|
+
- How are they related?
|
|
420
|
+
- What database will you use?
|
|
421
|
+
- What are the data ownership rules?
|
|
422
|
+
|
|
423
|
+
**Generates:**
|
|
424
|
+
|
|
425
|
+
- `docs/data-model.md`
|
|
426
|
+
- Parts of `ai-instructions.md`
|
|
427
|
+
---
|
|
428
|
+
### Phase 3: System Architecture
|
|
429
|
+
|
|
430
|
+
**File:** `backend/flow-build-phase-3-architecture.md`
|
|
431
|
+
**Duration:** 15-20 minutes
|
|
432
|
+
**Key Questions:**
|
|
433
|
+
|
|
434
|
+
- What tech stack will you use?
|
|
435
|
+
- How will you structure your code?
|
|
436
|
+
- What external services do you need?
|
|
437
|
+
- How will you handle caching and background jobs?
|
|
438
|
+
|
|
439
|
+
**Generates:**
|
|
440
|
+
|
|
441
|
+
- `docs/architecture.md`
|
|
442
|
+
- `docs/business-flows.md`
|
|
443
|
+
- `docs/api.md`
|
|
444
|
+
- Parts of `ai-instructions.md`
|
|
445
|
+
---
|
|
446
|
+
### Phase 4: Security & Authentication
|
|
447
|
+
|
|
448
|
+
**File:** `backend/flow-build-phase-4-security.md`
|
|
449
|
+
**Duration:** 15-20 minutes
|
|
450
|
+
**Key Questions:**
|
|
451
|
+
|
|
452
|
+
- How will users authenticate?
|
|
453
|
+
- What authorization model will you use?
|
|
454
|
+
- What compliance requirements do you have?
|
|
455
|
+
- How will you handle sensitive data?
|
|
456
|
+
|
|
457
|
+
**Generates:**
|
|
458
|
+
|
|
459
|
+
- `specs/security.md`
|
|
460
|
+
- Parts of `ai-instructions.md`
|
|
461
|
+
---
|
|
462
|
+
### Phase 5: Code Standards
|
|
463
|
+
|
|
464
|
+
**File:** `backend/flow-build-phase-5-standards.md`
|
|
465
|
+
**Duration:** 15-20 minutes
|
|
466
|
+
**Key Questions:**
|
|
467
|
+
|
|
468
|
+
- What naming conventions will you use?
|
|
469
|
+
- How will you handle errors?
|
|
470
|
+
- What logging strategy will you use?
|
|
471
|
+
- What validation approach will you use?
|
|
472
|
+
|
|
473
|
+
**Generates:**
|
|
474
|
+
|
|
475
|
+
- `docs/code-standards.md`
|
|
476
|
+
- Parts of `ai-instructions.md`
|
|
477
|
+
---
|
|
478
|
+
### Phase 6: Testing Strategy
|
|
479
|
+
|
|
480
|
+
**File:** `backend/flow-build-phase-6-testing.md`
|
|
481
|
+
**Duration:** 15-25 minutes
|
|
482
|
+
**Key Questions:**
|
|
483
|
+
|
|
484
|
+
- What types of tests will you write?
|
|
485
|
+
- What coverage targets do you have?
|
|
486
|
+
- How will you structure your tests?
|
|
487
|
+
- What testing tools will you use?
|
|
488
|
+
|
|
489
|
+
**Generates:**
|
|
490
|
+
|
|
491
|
+
- `docs/testing.md`
|
|
492
|
+
- Parts of `ai-instructions.md`
|
|
493
|
+
---
|
|
494
|
+
### Phase 7: Operations & Deployment
|
|
495
|
+
|
|
496
|
+
**File:** `backend/flow-build-phase-7-operations.md`
|
|
497
|
+
**Duration:** 10 minutes
|
|
498
|
+
**Key Questions:**
|
|
499
|
+
|
|
500
|
+
- Where will you deploy?
|
|
501
|
+
- How will you handle environments?
|
|
502
|
+
- What monitoring will you use?
|
|
503
|
+
- How will you handle logging and errors?
|
|
504
|
+
|
|
505
|
+
**Generates:**
|
|
506
|
+
|
|
507
|
+
- `docs/operations.md`
|
|
508
|
+
- `specs/configuration.md`
|
|
509
|
+
- `.env.example`
|
|
510
|
+
|
|
511
|
+
**Next:** Transitions to Phase 8 for project setup and final documentation
|
|
512
|
+
---
|
|
513
|
+
### Phase 8: Project Setup & Final Documentation
|
|
514
|
+
|
|
515
|
+
**File:** `backend/flow-build-phase-8.md`
|
|
516
|
+
**Duration:** 10-15 minutes
|
|
517
|
+
**Key Steps:**
|
|
518
|
+
|
|
519
|
+
- Detect project state (new vs existing)
|
|
520
|
+
- Initialize framework (optional, for new projects)
|
|
521
|
+
- Generate final documentation
|
|
522
|
+
- Create master index (AGENT.md)
|
|
523
|
+
- Generate README.md with intelligent merge
|
|
524
|
+
|
|
525
|
+
**Generates:**
|
|
526
|
+
|
|
527
|
+
- `docs/business-flows.md`
|
|
528
|
+
- `docs/api.md`
|
|
529
|
+
- `docs/contributing.md`
|
|
530
|
+
- `AGENT.md` (master index)
|
|
531
|
+
- `README.md`
|
|
532
|
+
- Tool-specific configs (`.clauderules`, `.cursorrules`, `.github/copilot-instructions.md`)
|
|
533
|
+
|
|
534
|
+
**Next:** Offers optional Phase 9 for implementation roadmap generation
|
|
535
|
+
---
|
|
536
|
+
### Phase 9: Implementation Roadmap (Optional)
|
|
537
|
+
|
|
538
|
+
**File:** `backend/flow-build-phase-9.md`
|
|
539
|
+
**Duration:** 15-30 minutes
|
|
540
|
+
**Key Steps:**
|
|
541
|
+
|
|
542
|
+
- Analyze all generated documentation
|
|
543
|
+
- Define Epics by domain
|
|
544
|
+
- Break down Features with Story Points (Fibonacci scale)
|
|
545
|
+
- Generate dependency graph and execution order
|
|
546
|
+
- Identify parallelization opportunities
|
|
547
|
+
- Create production readiness checklist
|
|
548
|
+
|
|
549
|
+
**Generates:**
|
|
550
|
+
|
|
551
|
+
- `docs/roadmap.md` (complete implementation plan)
|
|
552
|
+
|
|
553
|
+
**Output includes:**
|
|
554
|
+
|
|
555
|
+
- Epics organized by priority
|
|
556
|
+
- Features with Story Point estimations
|
|
557
|
+
- Task breakdown with acceptance criteria
|
|
558
|
+
- Ready-to-execute `/feature` commands
|
|
559
|
+
- Dependency graph (Mermaid)
|
|
560
|
+
- Time estimates (1 dev, 2 devs, 3 devs)
|
|
561
|
+
|
|
562
|
+
**Skip if:** You prefer to start coding immediately without a detailed roadmap
|
|
563
|
+
---
|
|
564
|
+
## 🚀 Quick Start Guide
|
|
565
|
+
|
|
566
|
+
### For New Projects
|
|
567
|
+
|
|
568
|
+
```
|
|
569
|
+
1. Skip Phase 0
|
|
570
|
+
2. Start with Phase 1 (Discovery & Business)
|
|
571
|
+
3. Continue through Phases 2-7 sequentially
|
|
572
|
+
4. Review and refine generated documentation
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
**Command:**
|
|
576
|
+
|
|
577
|
+
```
|
|
578
|
+
Read .ai-flow/prompts/backend/flow-build-phase-1-business.md and execute Phase 1
|
|
579
|
+
```
|
|
580
|
+
---
|
|
581
|
+
### For Existing Projects
|
|
582
|
+
|
|
583
|
+
```
|
|
584
|
+
1. START with Phase 0 (Context Discovery)
|
|
585
|
+
- AI will analyze your code and pre-populate answers
|
|
586
|
+
- Saves 40-60% of time
|
|
587
|
+
|
|
588
|
+
2. Continue with Phases 1-7
|
|
589
|
+
- Skip questions already answered in Phase 0
|
|
590
|
+
- Only fill gaps in documentation
|
|
591
|
+
|
|
592
|
+
3. Review and refine generated documentation
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
**Command:**
|
|
596
|
+
|
|
597
|
+
```
|
|
598
|
+
Read .ai-flow/prompts/backend/flow-build-phase-0-context.md and execute Phase 0
|
|
599
|
+
```
|
|
600
|
+
---
|
|
601
|
+
## 📋 Scope Selection
|
|
602
|
+
|
|
603
|
+
Before starting Phase 1, you'll select a scope level:
|
|
604
|
+
|
|
605
|
+
> 📎 **Reference:** See [prompts/shared/scope-levels.md](../shared/scope-levels.md) for detailed scope definitions (MVP, Production-Ready, Enterprise).
|
|
606
|
+
|
|
607
|
+
### A) ⭐ MVP / Prototype
|
|
608
|
+
|
|
609
|
+
**Focus:** Core functionality + basic tests. Best for POCs and internal tools.
|
|
610
|
+
|
|
611
|
+
### B) 🚀 Production-Ready
|
|
612
|
+
|
|
613
|
+
**Focus:** Production-grade with best practices. Best for SaaS and customer-facing APIs.
|
|
614
|
+
|
|
615
|
+
### C) 🏢 Enterprise / Mission-Critical
|
|
616
|
+
|
|
617
|
+
**Focus:** Enterprise governance, compliance, and high scalability.
|
|
618
|
+
---
|
|
619
|
+
## 📊 Benefits of Modular Structure
|
|
620
|
+
|
|
621
|
+
✅ **Faster Loading** - Load only the phase you need (~8-50 KB vs 140 KB)
|
|
622
|
+
✅ **Better Maintainability** - Changes to one phase don't affect others
|
|
623
|
+
✅ **Independent Execution** - Run individual phases without loading entire file
|
|
624
|
+
✅ **Reduced Context Usage** - AI assistants use 50-70% less context
|
|
625
|
+
✅ **Clearer Git Diffs** - Changes are isolated to specific phase files
|
|
626
|
+
✅ **Easier Collaboration** - Multiple people can work on different phases
|
|
627
|
+
✅ **Better Performance** - Smaller files process faster in AI tools
|
|
628
|
+
---
|
|
629
|
+
## 🎓 Best Practices
|
|
630
|
+
|
|
631
|
+
### Before Starting
|
|
632
|
+
|
|
633
|
+
1. Have a clear problem statement
|
|
634
|
+
2. Know your approximate tech stack (or let Phase 0 detect it)
|
|
635
|
+
3. Understand your target users
|
|
636
|
+
4. Choose your scope (MVP/Production-Ready/Enterprise)
|
|
637
|
+
5. Set aside appropriate time based on scope
|
|
638
|
+
|
|
639
|
+
### During Execution
|
|
640
|
+
|
|
641
|
+
1. Take your time with each question
|
|
642
|
+
2. Use recommendations (⭐🔥⚡🏆) as guides
|
|
643
|
+
3. Be specific - more detail = better docs
|
|
644
|
+
4. Confirm each phase before proceeding
|
|
645
|
+
5. Review generated docs after each phase
|
|
646
|
+
|
|
647
|
+
### After Completion
|
|
648
|
+
|
|
649
|
+
1. Review all generated documents
|
|
650
|
+
2. Customize as needed for your specific project
|
|
651
|
+
3. Share `AGENT.md` with your team
|
|
652
|
+
4. Update documents as your project evolves
|
|
653
|
+
5. Use `/flow-build-phase-[N]` commands to regenerate individual sections
|
|
654
|
+
---
|
|
655
|
+
## 💡 Tips
|
|
656
|
+
|
|
657
|
+
- **Use cache:** If you run Phase 0, it saves results for instant re-runs
|
|
658
|
+
- **Start selective:** For quick updates, run only the phases you need
|
|
659
|
+
- **Iterate:** You can re-run phases to refine documentation
|
|
660
|
+
- **Universal support:** Works with 12 languages, 60+ frameworks, 35+ ORMs
|
|
661
|
+
- **AI-agnostic:** Works with Claude, Copilot, Cursor, Gemini, any AI tool
|
|
662
|
+
---
|
|
663
|
+
## 🔄 Maintaining Documentation
|
|
664
|
+
|
|
665
|
+
As your project evolves, your documentation may become out of sync with your code. Use the `/flow-docs-sync` command to keep documentation synchronized.
|
|
666
|
+
|
|
667
|
+
### Command: `/flow-docs-sync`
|
|
668
|
+
|
|
669
|
+
**Purpose:** Detect code changes and automatically update affected documentation files.
|
|
670
|
+
|
|
671
|
+
**How it works:**
|
|
672
|
+
|
|
673
|
+
1. Compares current code state with last documented state (`.ai-flow/cache/docs-analysis.json`)
|
|
674
|
+
2. Detects changes in endpoints, entities, dependencies, architecture, configuration
|
|
675
|
+
3. Shows report of documents that need updating
|
|
676
|
+
4. Asks for confirmation to update all detected documents
|
|
677
|
+
5. Updates documents incrementally (only changed sections)
|
|
678
|
+
6. Updates `docs-analysis.json` with new state
|
|
679
|
+
|
|
680
|
+
**When to use:**
|
|
681
|
+
|
|
682
|
+
- After adding new API endpoints
|
|
683
|
+
- After modifying database entities
|
|
684
|
+
- After adding new dependencies
|
|
685
|
+
- After changing project structure
|
|
686
|
+
- After adding new environment variables
|
|
687
|
+
- Periodically to ensure documentation stays current
|
|
688
|
+
|
|
689
|
+
**Usage:**
|
|
690
|
+
|
|
691
|
+
```
|
|
692
|
+
/flow-docs-sync
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
**For detailed instructions:** Read `.ai-flow/prompts/backend/flow-docs-sync.md`
|
|
696
|
+
---
|
|
697
|
+
## 📞 Need Help?
|
|
698
|
+
|
|
699
|
+
- **Issues:** [GitHub Issues](https://github.com/victorvelazquez/ai-flow/issues)
|
|
700
|
+
- **Documentation:** [README.md](../../README.md)
|
|
701
|
+
- **Contributing:** [CONTRIBUTING.md](../../CONTRIBUTING.md)
|
|
702
|
+
- **Maintaining Docs:** Use `/flow-docs-sync` command (see AI Flow README for details)
|
|
703
|
+
---
|
|
704
|
+
**Ready to start?** Choose your path:
|
|
705
|
+
|
|
706
|
+
1. **First:** Ask user to select Mode (A: Interactive or B: Smart Auto-Suggest)
|
|
707
|
+
2. **Then:**
|
|
708
|
+
- 🆕 **New Project + Mode A:** Execute all phases sequentially, ask all questions
|
|
709
|
+
- 🆕 **New Project + Mode B:** Ask 6 critical questions, auto-suggest the rest, show summary
|
|
710
|
+
- 📁 **Existing Project + Mode A:** Read `flow-build-phase-0-context.md` first, then proceed with all phases
|
|
711
|
+
- 📁 **Existing Project + Mode B:** Read `flow-build-phase-0-context.md` first, then ask remaining critical questions
|
|
712
|
+
- 🔄 **Update Docs:** Use `/flow-docs-sync` command
|
|
713
|
+
---
|
|
714
|
+
## 📊 Final Summary (After Completion)
|
|
715
|
+
|
|
716
|
+
**CRITICAL:** After generating all documentation, ALWAYS present a two-tier summary:
|
|
717
|
+
|
|
718
|
+
### **Tier 1: Quick Summary (1 paragraph max)**
|
|
719
|
+
|
|
720
|
+
Present a concise overview in 1-2 sentences covering:
|
|
721
|
+
|
|
722
|
+
- System type and framework
|
|
723
|
+
- Database and main entities (count + examples)
|
|
724
|
+
- Key architectural decisions
|
|
725
|
+
- Security approach
|
|
726
|
+
- Deployment platform
|
|
727
|
+
|
|
728
|
+
**Format:**
|
|
729
|
+
|
|
730
|
+
```
|
|
731
|
+
---
|
|
732
|
+
✅ Configuration Complete - Quick Summary
|
|
733
|
+
---
|
|
734
|
+
Your [System Type] backend will use [Framework] with [Database], following [Architecture] with [X] entities ([list 2-3 main ones]). Security includes [Auth Method] with [Authorization], and deployment to [Platform] with [Monitoring].
|
|
735
|
+
---
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
### **Tier 2: Extended Report (Organized, Not Too Long)**
|
|
739
|
+
|
|
740
|
+
Present a structured report covering each phase's key decisions (3-5 bullets per phase max):
|
|
741
|
+
|
|
742
|
+
```
|
|
743
|
+
---
|
|
744
|
+
📋 Extended Configuration Report
|
|
745
|
+
---
|
|
746
|
+
**Phase 1: Business**
|
|
747
|
+
• System Type: [Type]
|
|
748
|
+
• Target Users: [Who]
|
|
749
|
+
• Core Features: [3-5 main features]
|
|
750
|
+
• Success Metrics: [Key goals]
|
|
751
|
+
|
|
752
|
+
**Phase 2: Data Architecture**
|
|
753
|
+
• Database: [Type + Version]
|
|
754
|
+
• ORM: [Tool]
|
|
755
|
+
• Entities: [List main entities]
|
|
756
|
+
• Relationships: [Key patterns]
|
|
757
|
+
|
|
758
|
+
**Phase 3: System Architecture**
|
|
759
|
+
• Framework: [Name + Version]
|
|
760
|
+
• Language: [Name + Version]
|
|
761
|
+
• API Style: [REST/GraphQL/etc.]
|
|
762
|
+
• Architecture: [Pattern]
|
|
763
|
+
• External Services: [List]
|
|
764
|
+
|
|
765
|
+
**Phase 4: Security**
|
|
766
|
+
• Auth: [Method + token config]
|
|
767
|
+
• Authorization: [Model + roles]
|
|
768
|
+
• Password: [Policy]
|
|
769
|
+
• Rate Limiting: [Strategy]
|
|
770
|
+
|
|
771
|
+
**Phase 5: Code Standards**
|
|
772
|
+
• Formatter: [Tool + config]
|
|
773
|
+
• Naming: [Conventions]
|
|
774
|
+
• Structure: [Pattern]
|
|
775
|
+
• Git Workflow: [Strategy]
|
|
776
|
+
|
|
777
|
+
**Phase 6: Testing**
|
|
778
|
+
• Framework: [Tool]
|
|
779
|
+
• Coverage: [Target %]
|
|
780
|
+
• Types: [Unit/Integration/E2E split]
|
|
781
|
+
• CI: [Platform]
|
|
782
|
+
|
|
783
|
+
**Phase 7: Operations**
|
|
784
|
+
• Platform: [Deployment]
|
|
785
|
+
• Containerization: [Docker/etc.]
|
|
786
|
+
• Environments: [Dev/Staging/Prod]
|
|
787
|
+
• Monitoring: [Tools]
|
|
788
|
+
---
|
|
789
|
+
✅ **Documentation Generated Successfully!**
|
|
790
|
+
|
|
791
|
+
Created 17 professional documents in your project:
|
|
792
|
+
• AGENT.md, ai-instructions.md, project-brief.md, README.md
|
|
793
|
+
• 9 technical docs (architecture, data-model, api, etc.)
|
|
794
|
+
• 2 specs (security, configuration)
|
|
795
|
+
• .env.example
|
|
796
|
+
---
|
|
797
|
+
Ready to commit the documentation?
|
|
798
|
+
|
|
799
|
+
A) ✅ Yes, create initial commit now
|
|
800
|
+
B) No, I'll review first and commit manually later
|
|
801
|
+
|
|
802
|
+
Your choice (A): __
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
**If choice A (recommended):**
|
|
806
|
+
|
|
807
|
+
```bash
|
|
808
|
+
# Initialize git repository (if not already initialized)
|
|
809
|
+
git init
|
|
810
|
+
|
|
811
|
+
# Stage all generated documentation
|
|
812
|
+
git add .ai-flow/
|
|
813
|
+
|
|
814
|
+
# Create initial commit with documentation metadata
|
|
815
|
+
git commit -m "docs: initial project documentation
|
|
816
|
+
|
|
817
|
+
Generated by AI Flow /flow-build command:
|
|
818
|
+
- 17 documentation files (backend)
|
|
819
|
+
- Architecture: {{ARCHITECTURE_PATTERN}}
|
|
820
|
+
- Tech stack: {{FRAMEWORK}}, {{DATABASE}}, {{ORM}}
|
|
821
|
+
- Testing strategy: {{TEST_STRATEGY}}
|
|
822
|
+
- Deployment: {{DEPLOYMENT_PLATFORM}}
|
|
823
|
+
|
|
824
|
+
Ready for project scaffold with /project-scaffold"
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
```
|
|
828
|
+
✅ Initial commit created
|
|
829
|
+
|
|
830
|
+
Commit hash: {{COMMIT_HASH}}
|
|
831
|
+
Files tracked: 17 documentation files
|
|
832
|
+
---
|
|
833
|
+
🎯 Next Step: Initialize Project & Optional Roadmap
|
|
834
|
+
---
|
|
835
|
+
Your documentation is ready! Now let's initialize your project.
|
|
836
|
+
|
|
837
|
+
Continue with Phase 8?
|
|
838
|
+
|
|
839
|
+
A) ✅ Yes, continue to Phase 8 (recommended) - 10-15 min
|
|
840
|
+
→ Initialize project + Generate final docs
|
|
841
|
+
→ Then option to continue to Phase 9 (roadmap)
|
|
842
|
+
|
|
843
|
+
B) No, I'll review documentation first
|
|
844
|
+
|
|
845
|
+
Your choice (A): __
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
**If choice A:** Automatically transitions to Phase 8
|
|
849
|
+
|
|
850
|
+
- Phase 8 will detect project state and offer framework initialization
|
|
851
|
+
- Generates final documentation (business-flows, api, contributing)
|
|
852
|
+
- Creates AGENT.md and README.md
|
|
853
|
+
- Sets up AI tool configs
|
|
854
|
+
|
|
855
|
+
**If choice B:** Show manual workflow:
|
|
856
|
+
|
|
857
|
+
```
|
|
858
|
+
**Manual Workflow (resume anytime):**
|
|
859
|
+
|
|
860
|
+
1. Review documentation in .ai-flow/templates/
|
|
861
|
+
2. When ready, run Phase 8:
|
|
862
|
+
→ Read .ai-flow/prompts/backend/flow-build-phase-8.md
|
|
863
|
+
→ Detects project state, initializes framework (optional), generates final docs
|
|
864
|
+
3. (Optional) Continue to Phase 9: Implementation Roadmap (15-30 min)
|
|
865
|
+
→ Generates complete implementation plan with Story Points
|
|
866
|
+
→ Includes Epics, Features, Tasks, and execution order
|
|
867
|
+
4. Start implementing: /feature <feature-name>
|
|
868
|
+
→ Implements features following your architecture
|
|
869
|
+
|
|
870
|
+
💡 Tip: All phases are independent and re-executable.
|
|
871
|
+
---
|
|
872
|
+
```
|
|
873
|
+
---
|
|
874
|
+
_Version: 4.0 (Phase 9 integrated - Implementation Roadmap with Story Points)_
|
|
875
|
+
_Last Updated: 2025-12-09_
|
|
876
|
+
_Version: 3.0 (Unified workflow: Phase 8 integrates project setup + final docs generation)_
|
|
877
|
+
_AI Flow - Transform your idea into production-ready code in minutes_
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
|