ai-flow-dev 2.1.7 → 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 +18 -13
- 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 +209 -18
- 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/prompts/frontend/flow-build-phase-1.md +187 -53
- package/prompts/mobile/flow-build-phase-1.md +196 -62
- package/templates/AGENT.template.md +1 -1
|
@@ -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
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
## PHASE 8: Project Setup & Final Documentation (10-15 min)
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
> **Order for this phase:** MUST be executed after Phase 7.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **📌 Scope-based behavior:**
|
|
6
|
+
> - **All Scopes:** Detect project state, initialize optional framework, and generate final documentation.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
### Objective
|
|
9
|
+
Initialize the project structure (if starting from scratch) and consolidate all collected information into comprehensive documentation (README, API specs, contributing guides).
|
|
9
10
|
## 📋 Phase 8 Overview
|
|
10
11
|
|
|
11
12
|
This final phase will:
|
|
@@ -16,7 +17,7 @@ This final phase will:
|
|
|
16
17
|
4. **Generate master index** (AGENT.md)
|
|
17
18
|
5. **Generate README.md** (with intelligent merge if needed)
|
|
18
19
|
6. **Create tool-specific configs** (based on AI tool selection)
|
|
19
|
-
---
|
|
20
|
+
---
|
|
20
21
|
## 8.1: Project State Detection
|
|
21
22
|
|
|
22
23
|
> ⚠️ **PRE-REQUISITE CHECK:** Before proceeding, verify that README.md does NOT exist yet (unless it's a framework-generated one from previous initialization). If README.md exists and was NOT generated by a framework, this indicates an error in previous phases.
|
|
@@ -25,18 +26,26 @@ This final phase will:
|
|
|
25
26
|
🔍 Detecting current project state...
|
|
26
27
|
```
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
**⚠️ CRITICAL: Ignore AI Flow documentation files during detection:**
|
|
30
|
+
- Files: `project-brief.md`, `ai-instructions.md`, `.env.example`
|
|
31
|
+
- Directories: `.ai-flow/`, `docs/`, `specs/`
|
|
29
32
|
|
|
30
|
-
-
|
|
31
|
-
- [ ] Check for framework files (`nest-cli.json`, `manage.py`, `go.mod`, etc.)
|
|
32
|
-
- [ ] Check for package managers (`package.json`, `requirements.txt`, `go.mod`, etc.)
|
|
33
|
-
- [ ] Check for existing README.md (framework-generated or custom)
|
|
33
|
+
**Auto-detect Checklist:**
|
|
34
34
|
|
|
35
|
-
**
|
|
35
|
+
- [ ] **Functional Source Code:** Check for business logic files (`.ts`, `.py`, `.go`, `.js`, etc.) in `src/`, `app/`, `internal/` or root.
|
|
36
|
+
- [ ] **Framework Configuration:** Check for `nest-cli.json`, `manage.py`, `go.mod`, `pom.xml`, `package.json`, etc.
|
|
37
|
+
- [ ] **Package Manager Lockfiles:** Check for `package-lock.json`, `pnpm-lock.yaml`, `poetry.lock`, etc.
|
|
38
|
+
- [ ] **Existing README.md:** Is there a README.md that was NOT created by AI Flow?
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
**Classification Rules (Strict Order):**
|
|
41
|
+
|
|
42
|
+
1. **New Project** (Offer Initialization):
|
|
43
|
+
- root contains ONLY AI Flow docs and/or hidden folders like `.git`, `.github`, `.vscode`.
|
|
44
|
+
- NO `package.json`, NO `src/`, NO functional code files.
|
|
45
|
+
2. **Initialized Framework** (Skip Initialization):
|
|
46
|
+
- Root contains framework configs (`package.json`, `go.mod`, etc.) but `src/` is empty or only contains framework boilerplate.
|
|
47
|
+
3. **Existing Project** (Skip Initialization):
|
|
48
|
+
- Substantial functional source code already exists in the project.
|
|
40
49
|
|
|
41
50
|
**Present Detection Results:**
|
|
42
51
|
|
|
@@ -46,14 +55,14 @@ This final phase will:
|
|
|
46
55
|
Type: [New Project | Initialized Framework | Existing Project]
|
|
47
56
|
|
|
48
57
|
Found:
|
|
49
|
-
-
|
|
58
|
+
- Functional code: [list non-AI Flow source files or none]
|
|
50
59
|
- Framework files: [list or none]
|
|
51
60
|
- Package manager: [npm/pip/go/etc. or none]
|
|
52
61
|
- README.md: [exists: yes/no]
|
|
53
62
|
|
|
54
63
|
Recommendation: [Next action based on state]
|
|
55
64
|
```
|
|
56
|
-
---
|
|
65
|
+
---
|
|
57
66
|
## 8.2: Framework Initialization (Optional)
|
|
58
67
|
|
|
59
68
|
**Only if:** Project state = "New Project"
|
|
@@ -465,7 +474,7 @@ Next steps:
|
|
|
465
474
|
- ✅ **ONLY** create .env.example, .gitignore, docker-compose (optional), ORM init
|
|
466
475
|
- ✅ **LET** framework CLI handle structure, configs, dependencies
|
|
467
476
|
- ✅ **REFER** to official docs for starter code when needed
|
|
468
|
-
---
|
|
477
|
+
---
|
|
469
478
|
## 8.2.7: Generate .gitignore (Always)
|
|
470
479
|
|
|
471
480
|
**IMPORTANT:** This step runs for ALL projects, regardless of framework initialization choice.
|
|
@@ -619,7 +628,7 @@ docker-compose.override.yml
|
|
|
619
628
|
✅ Generated: .gitignore
|
|
620
629
|
Patterns included: [Node.js | Python | Go] + [Prisma] + [Docker]
|
|
621
630
|
```
|
|
622
|
-
---
|
|
631
|
+
---
|
|
623
632
|
## 8.3: Generate Final Documentation
|
|
624
633
|
|
|
625
634
|
```
|
|
@@ -686,7 +695,7 @@ Generating...
|
|
|
686
695
|
```
|
|
687
696
|
✅ Generated: docs/business-flows.md
|
|
688
697
|
```
|
|
689
|
-
---
|
|
698
|
+
---
|
|
690
699
|
### 8.3.2: Generate docs/api.md
|
|
691
700
|
|
|
692
701
|
- **Template:** `.ai-flow/templates/docs/api.template.md`
|
|
@@ -768,7 +777,7 @@ We use [workflow from Phase 5]
|
|
|
768
777
|
```
|
|
769
778
|
✅ Generated: docs/contributing.md
|
|
770
779
|
```
|
|
771
|
-
---
|
|
780
|
+
---
|
|
772
781
|
## 8.4: Generate AGENT.md (Master Index)
|
|
773
782
|
|
|
774
783
|
- **Template:** `.ai-flow/templates/AGENT.template.md`
|
|
@@ -829,7 +838,7 @@ We use [workflow from Phase 5]
|
|
|
829
838
|
|
|
830
839
|
[From operations.md and contributing.md]
|
|
831
840
|
```
|
|
832
|
-
---
|
|
841
|
+
---
|
|
833
842
|
## 8.5: Generate README.md (Intelligent Merge)
|
|
834
843
|
|
|
835
844
|
- **Template:** `.ai-flow/templates/README.template.md`
|
|
@@ -916,13 +925,13 @@ The API will be available at `http://localhost:3000`
|
|
|
916
925
|
|
|
917
926
|
````
|
|
918
927
|
|
|
919
|
-
**📝 Action:** Write the complete file to
|
|
928
|
+
**📝 Action:** Write the complete file to `README.md` (project root)
|
|
920
929
|
|
|
921
930
|
```
|
|
922
|
-
✅ Generated:
|
|
931
|
+
✅ Generated: README.md
|
|
923
932
|
[If merged] Merged with framework's setup instructions
|
|
924
933
|
```
|
|
925
|
-
---
|
|
934
|
+
---
|
|
926
935
|
## 8.6: Generate AGENT.md (Master Index)
|
|
927
936
|
|
|
928
937
|
**CRITICAL:** Before generating AGENT.md, re-read ALL previously generated documents to have complete context.
|
|
@@ -955,7 +964,7 @@ Now generate AGENT.md with complete information from all documents.
|
|
|
955
964
|
```
|
|
956
965
|
✅ Generated: .ai-flow/AGENT.md (Master Index)
|
|
957
966
|
```
|
|
958
|
-
---
|
|
967
|
+
---
|
|
959
968
|
## 8.7: Create Tool-Specific Configs
|
|
960
969
|
|
|
961
970
|
**Based on AI tool selection from Phase 3 (question 3.8):**
|
|
@@ -1062,18 +1071,55 @@ Master index: `.ai-flow/AGENT.md`
|
|
|
1062
1071
|
[Extract from code-standards.md]
|
|
1063
1072
|
```
|
|
1064
1073
|
|
|
1074
|
+
### If Antigravity selected:
|
|
1075
|
+
|
|
1076
|
+
**Create `.antigravityrules`:**
|
|
1077
|
+
|
|
1078
|
+
```markdown
|
|
1079
|
+
# Antigravity AI Configuration
|
|
1080
|
+
|
|
1081
|
+
Project uses AI Flow documentation in `.ai-flow/` directory.
|
|
1082
|
+
|
|
1083
|
+
## Documentation Index
|
|
1084
|
+
|
|
1085
|
+
See `.ai-flow/AGENT.md` for complete document list.
|
|
1086
|
+
|
|
1087
|
+
## Quick Reference
|
|
1088
|
+
|
|
1089
|
+
- Tech Stack: [from Phase 3]
|
|
1090
|
+
- Architecture: `docs/architecture.md`
|
|
1091
|
+
- Code Standards: `docs/code-standards.md`
|
|
1092
|
+
- API Conventions: `docs/api.md`
|
|
1093
|
+
|
|
1094
|
+
## Workflow Commands
|
|
1095
|
+
|
|
1096
|
+
- `/flow-build` - Generate documentation
|
|
1097
|
+
- `/flow-dev-feature` - Create new features
|
|
1098
|
+
- `/flow-dev-fix` - Fix bugs
|
|
1099
|
+
- `/flow-dev-commit` - Automate commits
|
|
1100
|
+
|
|
1101
|
+
## Code Generation Rules
|
|
1102
|
+
|
|
1103
|
+
[Extract key rules from ai-instructions.md]
|
|
1104
|
+
|
|
1105
|
+
## Testing Requirements
|
|
1106
|
+
|
|
1107
|
+
[Extract from docs/testing.md]
|
|
1108
|
+
```
|
|
1109
|
+
|
|
1065
1110
|
**📝 Action:** Generate the tool-specific config files based on selection:
|
|
1066
1111
|
|
|
1067
1112
|
- If Claude → Write `.clauderules`
|
|
1068
1113
|
- If Cursor → Write `.cursorrules`
|
|
1069
1114
|
- If Copilot → Write `.github/copilot-instructions.md`
|
|
1070
|
-
- If
|
|
1115
|
+
- If Antigravity → Write `.antigravityrules`
|
|
1116
|
+
- If "All" → Write all four files
|
|
1071
1117
|
|
|
1072
1118
|
```
|
|
1073
1119
|
✅ Generated tool-specific configs:
|
|
1074
1120
|
[List generated files based on selection]
|
|
1075
1121
|
```
|
|
1076
|
-
---
|
|
1122
|
+
---
|
|
1077
1123
|
## 8.8: Final Validation & Success Message
|
|
1078
1124
|
|
|
1079
1125
|
```
|
|
@@ -1133,8 +1179,8 @@ Phase 8:
|
|
|
1133
1179
|
✅ README.md merged with framework's setup instructions
|
|
1134
1180
|
|
|
1135
1181
|
Tool-specific configs:
|
|
1136
|
-
✅ [List generated configs: .clauderules, .cursorrules, .github/copilot-instructions.md]
|
|
1137
|
-
---
|
|
1182
|
+
✅ [List generated configs: .clauderules, .cursorrules, .github/copilot-instructions.md, .antigravityrules]
|
|
1183
|
+
---
|
|
1138
1184
|
📁 Project Structure:
|
|
1139
1185
|
```
|
|
1140
1186
|
|
|
@@ -1163,7 +1209,7 @@ your-project/
|
|
|
1163
1209
|
└── [tool configs] # .clauderules, .cursorrules, etc.
|
|
1164
1210
|
|
|
1165
1211
|
````
|
|
1166
|
-
---
|
|
1212
|
+
---
|
|
1167
1213
|
Next steps:
|
|
1168
1214
|
|
|
1169
1215
|
1. ⭐ **Read `.ai-flow/AGENT.md`** - Master index of all documentation
|
|
@@ -1175,7 +1221,7 @@ Next steps:
|
|
|
1175
1221
|
5. 🚀 **Install dependencies** - Run: `[show command from Phase 7]`
|
|
1176
1222
|
6. 💾 **Initialize git** (if not done) - `git init && git add . && git commit -m "Initial commit with AI Flow docs"`
|
|
1177
1223
|
7. 🧪 **Start building!** - Your AI assistant now has complete project context
|
|
1178
|
-
---
|
|
1224
|
+
---
|
|
1179
1225
|
💡 **Remember:**
|
|
1180
1226
|
|
|
1181
1227
|
- Documents are **living artifacts** - update them as project evolves
|
|
@@ -1183,7 +1229,7 @@ Next steps:
|
|
|
1183
1229
|
- AGENT.md is the **single source of truth** for AI context
|
|
1184
1230
|
|
|
1185
1231
|
🤖 **AI Assistant Usage:**
|
|
1186
|
-
Your AI assistant (Claude, Cursor, Copilot) will now:
|
|
1232
|
+
Your AI assistant (Claude, Cursor, Copilot, Antigravity) will now:
|
|
1187
1233
|
|
|
1188
1234
|
- ✅ Understand complete project context
|
|
1189
1235
|
- ✅ Follow your architecture patterns
|
|
@@ -1195,7 +1241,7 @@ Your AI assistant (Claude, Cursor, Copilot) will now:
|
|
|
1195
1241
|
Happy building! 🎉
|
|
1196
1242
|
|
|
1197
1243
|
```
|
|
1198
|
-
---
|
|
1244
|
+
---
|
|
1199
1245
|
## EXECUTION CHECKLIST FOR AI ASSISTANT
|
|
1200
1246
|
|
|
1201
1247
|
When executing Phase 8:
|
|
@@ -1248,7 +1294,8 @@ When executing Phase 8:
|
|
|
1248
1294
|
- [ ] Create .clauderules (if Claude)
|
|
1249
1295
|
- [ ] Create .cursorrules (if Cursor)
|
|
1250
1296
|
- [ ] Create .github/copilot-instructions.md (if Copilot)
|
|
1251
|
-
- [ ] Create
|
|
1297
|
+
- [ ] Create .antigravityrules (if Antigravity)
|
|
1298
|
+
- [ ] Create all four (if "All")
|
|
1252
1299
|
|
|
1253
1300
|
**8.7 Final Validation:**
|
|
1254
1301
|
|
|
@@ -1278,20 +1325,20 @@ When executing Phase 8:
|
|
|
1278
1325
|
- 8.6: Tool configs - 1 min
|
|
1279
1326
|
- 8.7: Validation - 1 min
|
|
1280
1327
|
- **Total: 10-15 minutes**
|
|
1281
|
-
---
|
|
1328
|
+
---
|
|
1282
1329
|
**FINAL STEP: Offer Phase 9 (Implementation Roadmap)**
|
|
1283
1330
|
|
|
1284
1331
|
```
|
|
1285
|
-
---
|
|
1332
|
+
---
|
|
1286
1333
|
✅ PHASE 8 COMPLETE: PROJECT READY FOR DEVELOPMENT
|
|
1287
|
-
---
|
|
1334
|
+
---
|
|
1288
1335
|
🎯 All documentation generated and validated!
|
|
1289
1336
|
📁 Project initialized and ready
|
|
1290
1337
|
📖 AGENT.md and README.md created
|
|
1291
1338
|
⚙️ AI tool configurations in place
|
|
1292
|
-
---
|
|
1339
|
+
---
|
|
1293
1340
|
🗺️ Optional: Generate Implementation Roadmap?
|
|
1294
|
-
---
|
|
1341
|
+
---
|
|
1295
1342
|
Phase 9 will analyze all your documentation and generate a complete
|
|
1296
1343
|
implementation roadmap with:
|
|
1297
1344
|
|
|
@@ -1324,9 +1371,9 @@ Your choice (A/B): \_\_
|
|
|
1324
1371
|
**If choice B:** Show completion message:
|
|
1325
1372
|
|
|
1326
1373
|
```
|
|
1327
|
-
---
|
|
1374
|
+
---
|
|
1328
1375
|
✅ DOCUMENTATION COMPLETE - READY TO BUILD
|
|
1329
|
-
---
|
|
1376
|
+
---
|
|
1330
1377
|
Your project is fully documented and initialized! 🎉
|
|
1331
1378
|
|
|
1332
1379
|
📖 Next steps:
|
|
@@ -1336,14 +1383,26 @@ Your project is fully documented and initialized! 🎉
|
|
|
1336
1383
|
3. Generate roadmap anytime by asking "Continue to Phase 9"
|
|
1337
1384
|
|
|
1338
1385
|
Happy coding! 🚀
|
|
1339
|
-
---
|
|
1386
|
+
---
|
|
1340
1387
|
```
|
|
1341
|
-
---
|
|
1342
|
-
**CONTINUE TO:** Phase 9 (optional) or End
|
|
1388
|
+
---
|
|
1343
1389
|
|
|
1344
|
-
|
|
1345
|
-
|
|
1390
|
+
## 📝 Generated Documents
|
|
1391
|
+
|
|
1392
|
+
After Phase 8, generate/update:
|
|
1393
|
+
|
|
1394
|
+
- `README.md` - Main project documentation
|
|
1395
|
+
- `docs/api.md` - API reference
|
|
1396
|
+
- `docs/contributing.md` - Contribution guidelines
|
|
1397
|
+
- `docs/business-flows.md` - Visualized business logic
|
|
1398
|
+
|
|
1399
|
+
---
|
|
1346
1400
|
|
|
1401
|
+
**Next Phase:** Phase 9 - Project Roadmap (Post-Documentation)
|
|
1347
1402
|
|
|
1403
|
+
Read: `.ai-flow/prompts/backend/flow-build-phase-9.md`
|
|
1348
1404
|
|
|
1405
|
+
---
|
|
1349
1406
|
|
|
1407
|
+
**Last Updated:** 2025-12-20
|
|
1408
|
+
**Version:** 2.1.8
|