ai-flow-dev 2.1.8 → 2.1.9
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 +8 -7
- package/dist/cli.js +9 -8
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/prompts/backend/flow-build-phase-0.md +57 -39
- package/prompts/backend/flow-build-phase-1.md +24 -2
- package/prompts/backend/flow-build-phase-10.md +25 -9
- package/prompts/backend/flow-build-phase-2.md +20 -2
- package/prompts/backend/flow-build-phase-3.md +19 -0
- package/prompts/backend/flow-build-phase-4.md +26 -3
- package/prompts/backend/flow-build-phase-5.md +20 -1
- package/prompts/backend/flow-build-phase-6.md +22 -2
- package/prompts/backend/flow-build-phase-7.md +24 -263
- package/prompts/backend/flow-build-phase-8.md +106 -47
- package/prompts/backend/flow-build-phase-9.md +61 -12
- package/prompts/backend/flow-build.md +34 -7
- package/templates/AGENT.template.md +1 -1
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
> **Order for this phase:** 2.1 → 2.2 → 2.3 → 2.4 → 2.5 → 2.6 → 2.7
|
|
4
4
|
|
|
5
|
-
> **📌
|
|
5
|
+
> **📌 Scope-based behavior:**
|
|
6
|
+
> - **MVP/Basic Scope:** Focus only on essential entities and basic relationships.
|
|
7
|
+
> - **Production-Ready Scope:** In-depth modeling including indexes, constraints, and audit fields.
|
|
6
8
|
|
|
7
9
|
### Objective
|
|
8
10
|
|
|
@@ -531,6 +533,22 @@ Execute `read_file('docs/data-model.md')` to refresh context before continuing.
|
|
|
531
533
|
|
|
532
534
|
---
|
|
533
535
|
|
|
534
|
-
##
|
|
536
|
+
## 📝 Generated Documents
|
|
537
|
+
|
|
538
|
+
After Phase 2, generate/update:
|
|
539
|
+
- `docs/data-model.md` - Database schema and entity relationships
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
**Next Phase:** Phase 3 - System Architecture (15-20 min)
|
|
544
|
+
|
|
545
|
+
Read: `.ai-flow/prompts/backend/flow-build-phase-3.md`
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
**Last Updated:** 2025-12-20
|
|
550
|
+
**Version:** 2.1.8
|
|
551
|
+
|
|
552
|
+
---
|
|
535
553
|
|
|
536
554
|
## PHASE 3: System Architecture (15-20 min)
|
|
@@ -741,4 +741,23 @@ Execute `read_file()` for both documents to refresh context before continuing.
|
|
|
741
741
|
|
|
742
742
|
---
|
|
743
743
|
|
|
744
|
+
## 📝 Generated Documents
|
|
745
|
+
|
|
746
|
+
After Phase 3, generate/update:
|
|
747
|
+
- `docs/architecture.md` - Technical stack and patterns
|
|
748
|
+
- `ai-instructions.md` - Instructions for AI agents
|
|
749
|
+
|
|
750
|
+
---
|
|
751
|
+
|
|
752
|
+
**Next Phase:** Phase 4 - Security & Authentication (15-20 min)
|
|
753
|
+
|
|
754
|
+
Read: `.ai-flow/prompts/backend/flow-build-phase-4.md`
|
|
755
|
+
|
|
756
|
+
---
|
|
757
|
+
|
|
758
|
+
**Last Updated:** 2025-12-20
|
|
759
|
+
**Version:** 2.1.8
|
|
760
|
+
|
|
761
|
+
---
|
|
762
|
+
|
|
744
763
|
## PHASE 4: Security & Authentication (15-20 min)
|
|
@@ -461,7 +461,7 @@ Input Validation: [strategy + sanitization rules + size limits + file upload val
|
|
|
461
461
|
|
|
462
462
|
Is this correct? (Yes/No)
|
|
463
463
|
```
|
|
464
|
-
---
|
|
464
|
+
---
|
|
465
465
|
### 📄 Generate Phase 4 Documents
|
|
466
466
|
|
|
467
467
|
**Before starting generation:**
|
|
@@ -501,12 +501,35 @@ Documents have been created with all Phase 4 information.
|
|
|
501
501
|
|
|
502
502
|
**If user edits files:**
|
|
503
503
|
Re-read files to refresh context before continuing.
|
|
504
|
-
---
|
|
504
|
+
---
|
|
505
505
|
**Proceed to Phase 5 only after documents are validated.**
|
|
506
506
|
|
|
507
507
|
> ⚠️ **CRITICAL:** DO NOT generate README.md in this phase. README.md is ONLY generated in Phase 8 (step 8.5) after framework initialization.
|
|
508
|
-
---
|
|
508
|
+
---
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
## 📝 Generated Documents
|
|
514
|
+
|
|
515
|
+
After Phase 4, generate/update:
|
|
516
|
+
- `specs/security.md` - Security policies and authentication details
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
520
|
+
**Next Phase:** Phase 5 - Development Standards (15-20 min)
|
|
521
|
+
|
|
522
|
+
Read: `.ai-flow/prompts/backend/flow-build-phase-5.md`
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
**Last Updated:** 2025-12-20
|
|
527
|
+
**Version:** 2.1.8
|
|
528
|
+
|
|
529
|
+
---
|
|
530
|
+
|
|
509
531
|
## PHASE 5: Development Standards (15-20 min)
|
|
510
532
|
|
|
511
533
|
|
|
512
534
|
|
|
535
|
+
|
|
@@ -662,4 +662,23 @@ Re-read files to refresh context before continuing.
|
|
|
662
662
|
|
|
663
663
|
---
|
|
664
664
|
|
|
665
|
-
##
|
|
665
|
+
## 📝 Generated Documents
|
|
666
|
+
|
|
667
|
+
After Phase 5, generate/update:
|
|
668
|
+
- `docs/code-standards.md` - Development practices and quality rules
|
|
669
|
+
|
|
670
|
+
---
|
|
671
|
+
|
|
672
|
+
**Next Phase:** Phase 6 - Testing Strategy (15-20 min)
|
|
673
|
+
|
|
674
|
+
Read: `.ai-flow/prompts/backend/flow-build-phase-6.md`
|
|
675
|
+
|
|
676
|
+
---
|
|
677
|
+
|
|
678
|
+
**Last Updated:** 2025-12-20
|
|
679
|
+
**Version:** 2.1.8
|
|
680
|
+
|
|
681
|
+
---
|
|
682
|
+
|
|
683
|
+
## PHASE 6: Testing Strategy (15-20 min)
|
|
684
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## PHASE 6: Testing Strategy (15-
|
|
1
|
+
## PHASE 6: Testing Strategy (15-20 min)
|
|
2
2
|
|
|
3
3
|
> **Order for this phase:**
|
|
4
4
|
>
|
|
@@ -481,5 +481,25 @@ Re-read file to refresh context before continuing.
|
|
|
481
481
|
|
|
482
482
|
> ⚠️ **CRITICAL:** DO NOT generate README.md in this phase. README.md is ONLY generated in Phase 8 (step 8.5) after framework initialization.
|
|
483
483
|
---
|
|
484
|
-
|
|
484
|
+
|
|
485
|
+
## 📝 Generated Documents
|
|
486
|
+
|
|
487
|
+
After Phase 6, generate/update:
|
|
488
|
+
- `docs/testing.md` - Testing strategy and quality gates
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
**Next Phase:** Phase 7 - Operations & Deployment (10-15 min)
|
|
493
|
+
|
|
494
|
+
Read: `.ai-flow/prompts/backend/flow-build-phase-7.md`
|
|
495
|
+
|
|
496
|
+
---
|
|
497
|
+
|
|
498
|
+
**Last Updated:** 2025-12-20
|
|
499
|
+
**Version:** 2.1.8
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
## PHASE 7: Operations & Deployment (10-15 min)
|
|
504
|
+
|
|
485
505
|
````
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
## PHASE 7: Operations & Deployment (10 min)
|
|
1
|
+
## PHASE 7: Operations & Deployment (10-15 min)
|
|
2
2
|
|
|
3
|
-
> **Order for this phase:** 7.1 → 7.2 → 7.3 → 7.4 → 7.4.1 → 7.5 → 7.6 → 7.7 → 7.7.1 → 7.7.2 → 7.8 → 7.9 → 7.9.1 → 7.9.2 → 7.9.3 → 7.9.4 → 7.10
|
|
3
|
+
> **Order for this phase:** 7.1 → 7.2 → 7.3 → 7.4 → 7.4.1 → 7.5 → 7.6 → 7.7 → 7.7.1 → 7.7.2 → 7.8 → 7.9 → 7.9.1 → 7.9.2 → 7.9.3 → 7.9.4 → 7.10
|
|
4
4
|
|
|
5
5
|
> **📌 Scope-based behavior:**
|
|
6
6
|
>
|
|
7
|
-
> - **MVP:** Ask 7.1-7.4 only (deployment basics), skip 7.5-7.
|
|
8
|
-
> - **Production-Ready:** Ask 7.1-7.8, simplify 7.9-7.
|
|
9
|
-
> - **Enterprise:** Ask all questions 7.1-7.
|
|
7
|
+
> - **MVP:** Ask 7.1-7.4 only (deployment basics), skip 7.5-7.10 (monitoring, scaling, backups), mark as "TBD"
|
|
8
|
+
> - **Production-Ready:** Ask 7.1-7.8, simplify 7.9-7.10 (advanced monitoring and resilience)
|
|
9
|
+
> - **Enterprise:** Ask all questions 7.1-7.10 with emphasis on reliability and disaster recovery
|
|
10
10
|
|
|
11
11
|
### Objective
|
|
12
12
|
|
|
@@ -943,279 +943,40 @@ Re-read files to refresh context before continuing.
|
|
|
943
943
|
|
|
944
944
|
---
|
|
945
945
|
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
## FINAL STEP: Generate Remaining Documents & Tool Configs
|
|
949
|
-
|
|
950
|
-
### ⏸️ CHECKPOINT: Final Document Review
|
|
951
|
-
|
|
952
|
-
```
|
|
953
|
-
⏸️ CHECKPOINT: Review Generated Documents
|
|
954
|
-
|
|
955
|
-
We have successfully generated the following documents across all phases:
|
|
956
|
-
|
|
957
|
-
✅ project-brief.md (Phase 1)
|
|
958
|
-
✅ docs/data-model.md (Phase 2)
|
|
959
|
-
✅ docs/architecture.md (Phase 3)
|
|
960
|
-
✅ ai-instructions.md (Phase 3)
|
|
961
|
-
✅ specs/security.md (Phase 4)
|
|
962
|
-
✅ docs/code-standards.md (Phase 5)
|
|
963
|
-
✅ docs/testing.md (Phase 6)
|
|
964
|
-
✅ docs/operations.md (Phase 7)
|
|
965
|
-
✅ specs/configuration.md (Phase 7)
|
|
966
|
-
✅ .env.example (Phase 7)
|
|
967
|
-
|
|
968
|
-
Before generating the final documents (AGENT.md, README.md, API docs, etc.),
|
|
969
|
-
do you want to review or edit any of these documents?
|
|
970
|
-
|
|
971
|
-
A) ✅ All documents are correct, proceed with final generation
|
|
972
|
-
B) 📝 I need to review/edit some documents (I'll wait)
|
|
973
|
-
```
|
|
974
|
-
|
|
975
|
-
**If user selects B:**
|
|
976
|
-
|
|
977
|
-
```
|
|
978
|
-
Perfect. Please review and edit any documents you need to change.
|
|
979
|
-
When you're done, type "ready" and I'll re-read ALL documents
|
|
980
|
-
to ensure the final generation uses the most up-to-date information.
|
|
981
|
-
```
|
|
982
|
-
|
|
983
|
-
## Then execute `read_file()` for ALL previously generated documents.
|
|
984
|
-
|
|
985
|
-
### 📖 Loading Complete Context for Final Generation
|
|
986
|
-
|
|
987
|
-
```
|
|
988
|
-
📖 Re-reading all generated documents to ensure accuracy...
|
|
989
|
-
|
|
990
|
-
✅ Re-reading project-brief.md
|
|
991
|
-
✅ Re-reading docs/data-model.md
|
|
992
|
-
✅ Re-reading docs/architecture.md
|
|
993
|
-
✅ Re-reading ai-instructions.md
|
|
994
|
-
✅ Re-reading specs/security.md
|
|
995
|
-
✅ Re-reading docs/code-standards.md
|
|
996
|
-
✅ Re-reading docs/testing.md
|
|
997
|
-
✅ Re-reading docs/operations.md
|
|
998
|
-
✅ Re-reading specs/configuration.md
|
|
999
|
-
✅ Re-reading .env.example
|
|
1000
|
-
|
|
1001
|
-
✅ Context fully loaded and updated!
|
|
1002
|
-
|
|
1003
|
-
🎉 Now generating final 5 documents:
|
|
1004
|
-
|
|
1005
|
-
1. docs/business-flows.md - Business process flows and mermaid diagrams
|
|
1006
|
-
2. docs/api.md - API endpoints and conventions reference
|
|
1007
|
-
3. docs/contributing.md - Contribution guidelines
|
|
1008
|
-
4. README.md - Project overview (requires all previous context)
|
|
1009
|
-
5. AGENT.md - Universal AI configuration (aggregates all docs)
|
|
1010
|
-
|
|
1011
|
-
Plus tool-specific configurations:
|
|
1012
|
-
- .clauderules (if Claude selected)
|
|
1013
|
-
- .cursorrules (if Cursor selected)
|
|
1014
|
-
- .github/copilot-instructions.md (if Copilot selected)
|
|
1015
|
-
|
|
1016
|
-
Generating...
|
|
1017
|
-
```
|
|
1018
|
-
|
|
1019
|
-
### Transition to Phase 8
|
|
1020
|
-
|
|
1021
|
-
All information from Phases 1-7 has been collected and documented.
|
|
1022
|
-
|
|
1023
|
-
Phase 8 will handle:
|
|
1024
|
-
|
|
1025
|
-
- Project state detection
|
|
1026
|
-
- Framework initialization (if needed)
|
|
1027
|
-
- Final documentation generation
|
|
1028
|
-
- README.md creation with intelligent merge
|
|
1029
|
-
- Tool-specific configurations
|
|
1030
|
-
|
|
1031
|
-
**Phase 8 will be executed next to complete the AI Flow process.**
|
|
946
|
+
### Phase 7 Completion
|
|
1032
947
|
|
|
1033
948
|
```
|
|
1034
949
|
✅ Phase 7 Complete!
|
|
1035
950
|
|
|
1036
|
-
Generated
|
|
1037
|
-
|
|
1038
|
-
Phase 7:
|
|
951
|
+
Generated documents:
|
|
1039
952
|
✅ docs/operations.md
|
|
1040
953
|
✅ specs/configuration.md
|
|
1041
954
|
✅ .env.example
|
|
1042
|
-
---
|
|
1043
|
-
📊 Progress Summary:
|
|
1044
|
-
|
|
1045
|
-
Phases 1-7 completed:
|
|
1046
|
-
✅ project-brief.md (Phase 1)
|
|
1047
|
-
✅ docs/data-model.md (Phase 2)
|
|
1048
|
-
✅ docs/architecture.md (Phase 3)
|
|
1049
|
-
✅ ai-instructions.md (Phase 3)
|
|
1050
|
-
✅ specs/security.md (Phase 4)
|
|
1051
|
-
✅ docs/code-standards.md (Phase 5)
|
|
1052
|
-
✅ docs/testing.md (Phase 6)
|
|
1053
|
-
✅ docs/operations.md (Phase 7)
|
|
1054
|
-
✅ specs/configuration.md (Phase 7)
|
|
1055
|
-
✅ .env.example (Phase 7)
|
|
1056
|
-
|
|
1057
|
-
Remaining:
|
|
1058
|
-
⏭️ Phase 8: Project setup & final documentation
|
|
1059
|
-
---
|
|
1060
|
-
🎯 Next: Phase 8 - Project Setup & Final Documentation
|
|
1061
|
-
|
|
1062
|
-
Phase 8 will:
|
|
1063
|
-
- 🔍 Detect project state (new vs existing)
|
|
1064
|
-
- 🚀 Initialize framework (optional, for new projects)
|
|
1065
|
-
- 📝 Generate final docs (business-flows.md, api.md, contributing.md)
|
|
1066
|
-
- 📖 Generate AGENT.md (master documentation index)
|
|
1067
|
-
- 📄 Generate README.md (with intelligent merge if needed)
|
|
1068
|
-
- 🤖 Create tool-specific configs (based on AI selection)
|
|
1069
955
|
|
|
1070
|
-
|
|
956
|
+
📝 Would you like to review these documents before proceeding to Phase 8?
|
|
1071
957
|
|
|
1072
|
-
|
|
958
|
+
→ If yes: Edit the files and type "ready" when done.
|
|
959
|
+
→ If no: Type "continue" to proceed to Phase 8.
|
|
1073
960
|
```
|
|
1074
961
|
|
|
1075
962
|
---
|
|
1076
963
|
|
|
1077
|
-
##
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
-
|
|
1084
|
-
- [ ] Search for AI instruction files (copilot-instructions.md, .clauderules, .cursorrules, AGENT.md, etc.)
|
|
1085
|
-
- [ ] Search for README.md, package.json, and config files
|
|
1086
|
-
- [ ] **Perform deep code analysis:**
|
|
1087
|
-
- [ ] Recursively scan source directories (src/, app/, lib/, modules/)
|
|
1088
|
-
- [ ] Count files by type (controllers, services, entities, DTOs, etc.)
|
|
1089
|
-
- [ ] Identify architecture pattern (feature-based, layer-based, modular, hybrid)
|
|
1090
|
-
- [ ] **Parse source code files for AST-based analysis:**
|
|
1091
|
-
- [ ] Detect decorators (@Controller, @Get, @Post for NestJS; @app.get() for FastAPI)
|
|
1092
|
-
- [ ] Extract API endpoints (method, path, parameters, middleware)
|
|
1093
|
-
- [ ] Identify services and dependency injection patterns
|
|
1094
|
-
- [ ] Detect error handling patterns
|
|
1095
|
-
- [ ] **Analyze database schemas:**
|
|
1096
|
-
- [ ] Parse Prisma schema.prisma (models, relationships, indexes)
|
|
1097
|
-
- [ ] Parse TypeORM entities (@Entity, @Column, relationships)
|
|
1098
|
-
- [ ] Parse SQLAlchemy models
|
|
1099
|
-
- [ ] Extract complete entity definitions with fields and relationships
|
|
1100
|
-
- [ ] **Analyze dependencies:**
|
|
1101
|
-
- [ ] Extract exact versions from package.json/requirements.txt/etc.
|
|
1102
|
-
- [ ] Identify framework, ORM, validation, auth, testing libraries
|
|
1103
|
-
- [ ] Detect security-related packages
|
|
1104
|
-
- [ ] **Detect code patterns:**
|
|
1105
|
-
- [ ] Dependency injection usage
|
|
1106
|
-
- [ ] Error handling implementation
|
|
1107
|
-
- [ ] Validation patterns (DTOs, schemas)
|
|
1108
|
-
- [ ] Logging setup
|
|
1109
|
-
- [ ] Testing configuration
|
|
1110
|
-
- [ ] Caching strategies
|
|
1111
|
-
- [ ] Background job systems
|
|
1112
|
-
- [ ] Present detailed detection results (0.2) including:
|
|
1113
|
-
- [ ] Architecture pattern detected
|
|
1114
|
-
- [ ] Complete list of API endpoints with details
|
|
1115
|
-
- [ ] All entities with schemas and relationships
|
|
1116
|
-
- [ ] Dependencies with versions
|
|
1117
|
-
- [ ] Code quality indicators
|
|
1118
|
-
- [ ] **Generate proactive suggestions (0.2.1):**
|
|
1119
|
-
- [ ] Analyze code for security gaps (validation, rate limiting, CORS, etc.)
|
|
1120
|
-
- [ ] Identify architecture improvements
|
|
1121
|
-
- [ ] Detect documentation gaps
|
|
1122
|
-
- [ ] Suggest testing improvements
|
|
1123
|
-
- [ ] Recommend performance optimizations
|
|
1124
|
-
- [ ] Present suggestions with actions and impacts
|
|
1125
|
-
- [ ] **Offer export option (0.3):**
|
|
1126
|
-
- [ ] Ask if user wants to export analysis to JSON
|
|
1127
|
-
- [ ] If yes, create .ai-flow/cache/docs-analysis.json with complete analysis
|
|
1128
|
-
- [ ] Let user choose: A) Use detected info, B) Start fresh, C) Review/edit detected info
|
|
1129
|
-
- [ ] **Handle suggestions:**
|
|
1130
|
-
- [ ] If user selected A (address during build), integrate suggestions into relevant phases
|
|
1131
|
-
- [ ] If user selected B (save for later), create suggestions.md file
|
|
1132
|
-
- [ ] If user selected C (skip), continue without changes
|
|
1133
|
-
- [ ] Pre-populate answers based on detected information
|
|
1134
|
-
- [ ] Mark questions that still need answers
|
|
1135
|
-
|
|
1136
|
-
**PHASES 1-7 (All Projects):**
|
|
1137
|
-
|
|
1138
|
-
- [ ] Execute phases 1-7 in exact order
|
|
1139
|
-
- [ ] **SKIP questions already answered** from Phase 0 detection (existing projects)
|
|
1140
|
-
- [ ] Ask remaining questions ONE BY ONE (wait for answer)
|
|
1141
|
-
- [ ] Wait for user response before proceeding
|
|
1142
|
-
- [ ] Provide recommendations (⭐🔥⚡🏆)
|
|
1143
|
-
- [ ] Offer multiple choice where applicable
|
|
1144
|
-
- [ ] Summarize each phase for confirmation
|
|
1145
|
-
- [ ] Collect ALL required information
|
|
1146
|
-
- [ ] Generate documents **incrementally** after each phase
|
|
1147
|
-
- [ ] Ask for user validation after each document generation
|
|
1148
|
-
- [ ] Re-read generated documents at start of each new phase
|
|
1149
|
-
- [ ] Perform final checkpoint before generating AGENT.md and README.md
|
|
1150
|
-
- [ ] Re-read ALL documents before final generation to ensure accuracy
|
|
1151
|
-
- [ ] Use templates from `.ai-flow/templates/`
|
|
1152
|
-
- [ ] Create tool-specific configs based on AI selection
|
|
1153
|
-
- [ ] Validate no placeholders remain
|
|
1154
|
-
- [ ] Provide clear next steps
|
|
1155
|
-
|
|
1156
|
-
**DO NOT:**
|
|
1157
|
-
|
|
1158
|
-
- ❌ Skip Phase 0 detection for existing projects
|
|
1159
|
-
- ❌ Skip deep code analysis - always perform comprehensive AST-based parsing when code exists
|
|
1160
|
-
- ❌ Present superficial analysis - include detailed endpoints, entities, and patterns
|
|
1161
|
-
- ❌ Ignore proactive suggestions - always generate and present improvement opportunities
|
|
1162
|
-
- ❌ Ask questions already answered by detected files or code analysis
|
|
1163
|
-
- ❌ Ignore existing AI instruction files
|
|
1164
|
-
- ❌ Skip questions or phases
|
|
1165
|
-
- ❌ Assume answers without asking (when info is not detected)
|
|
1166
|
-
- ❌ Generate ALL documents at the end (generate incrementally!)
|
|
1167
|
-
- ❌ Skip document validation after generation
|
|
1168
|
-
- ❌ Forget to re-read documents before using their info
|
|
1169
|
-
- ❌ Generate final documents without re-reading all previous docs
|
|
1170
|
-
- ❌ Leave placeholder text in final documents
|
|
1171
|
-
- ❌ Skip exporting analysis JSON if user requested it
|
|
1172
|
-
- ❌ Rush through the analysis - thoroughness saves time later
|
|
1173
|
-
|
|
1174
|
-
**ESTIMATED TIME:**
|
|
1175
|
-
|
|
1176
|
-
**New Projects:**
|
|
1177
|
-
|
|
1178
|
-
- Phase 1: 15-20 min
|
|
1179
|
-
- Phase 2: 15-20 min
|
|
1180
|
-
- Phase 3: 15-20 min
|
|
1181
|
-
- Phase 4: 15-20 min
|
|
1182
|
-
- Phase 5: 15-20 min
|
|
1183
|
-
- Phase 6: 10 min
|
|
1184
|
-
- Phase 7: 10 min
|
|
1185
|
-
- **Total: 90-120 minutes**
|
|
1186
|
-
|
|
1187
|
-
**Existing Projects (with Phase 0 detection):**
|
|
1188
|
-
|
|
1189
|
-
- Phase 0: 10-20 min (deep code analysis + suggestions + review)
|
|
1190
|
-
- File detection: 2-3 min
|
|
1191
|
-
- Deep code analysis (AST parsing, schema extraction): 5-10 min
|
|
1192
|
-
- Generating suggestions: 2-3 min
|
|
1193
|
-
- User review and export: 1-4 min
|
|
1194
|
-
- Phases 1-7: 30-60 min (only missing questions)
|
|
1195
|
-
- **Total: 40-80 minutes** (40-60% time saved!)
|
|
1196
|
-
|
|
1197
|
-
## This is an investment that will save 10-20 hours over the project lifecycle.
|
|
1198
|
-
|
|
1199
|
-
**EXECUTION FLOW:**
|
|
1200
|
-
|
|
1201
|
-
1. **START:** User runs `/flow-build`
|
|
1202
|
-
2. **DETECT:** Check for existing project files (Phase 0)
|
|
1203
|
-
- If existing files found → Run Phase 0 deep analysis:
|
|
1204
|
-
- 0.1: Deep Code Analysis (file structure, AST parsing, schema extraction, pattern detection)
|
|
1205
|
-
- 0.2: Present Detailed Detection Results (architecture, endpoints, entities, dependencies, code quality)
|
|
1206
|
-
- 0.2.1: Generate Proactive Suggestions (security, architecture, documentation, testing, performance)
|
|
1207
|
-
- 0.3: Export Analysis Results (optional JSON export)
|
|
1208
|
-
- 0.4: Load Existing Context (pre-populate answers)
|
|
1209
|
-
- If no files found → Skip to Phase 1
|
|
1210
|
-
3. **EXECUTE:** Run Phases 1-7 with pre-populated answers (if any)
|
|
1211
|
-
- Integrate suggestions from Phase 0 into relevant phases if user selected option A
|
|
1212
|
-
4. **GENERATE:** Create documents incrementally with validation
|
|
1213
|
-
5. **COMPLETE:** Final checkpoint and remaining documents
|
|
964
|
+
## 📝 Generated Documents
|
|
965
|
+
|
|
966
|
+
After Phase 7, generate/update:
|
|
967
|
+
|
|
968
|
+
- `docs/operations.md` - Operations and deployment guide
|
|
969
|
+
- `specs/configuration.md` - Configuration specification
|
|
970
|
+
- `.env.example` - Environment variables template
|
|
1214
971
|
|
|
1215
972
|
---
|
|
1216
973
|
|
|
1217
|
-
**
|
|
974
|
+
**Next Phase:** Phase 8 - Project Setup & Final Documentation
|
|
1218
975
|
|
|
1219
|
-
|
|
976
|
+
Read: `.ai-flow/prompts/backend/flow-build-phase-8.md`
|
|
1220
977
|
|
|
1221
|
-
|
|
978
|
+
---
|
|
979
|
+
|
|
980
|
+
**Last Updated:** 2025-12-20
|
|
981
|
+
|
|
982
|
+
**Version:** 2.1.8
|