ai-flow-dev 1.0.2 → 1.1.1
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 +60 -35
- package/dist/cli.js +201 -232
- package/dist/cli.js.map +1 -1
- package/dist/fs-utils.js +3 -39
- package/dist/fs-utils.js.map +1 -1
- package/package.json +11 -12
- package/prompts/backend/{flow-docs-gen-phase-7.md → flow-bootstrap-phase-7.md} +41 -108
- package/prompts/backend/flow-bootstrap-phase-8.md +911 -0
- package/prompts/backend/{flow-project-roadmap.md → flow-bootstrap-phase-9.md} +255 -344
- package/prompts/backend/{flow-docs-gen.md → flow-bootstrap.md} +102 -37
- package/prompts/frontend/{flow-docs-gen-phase-0.md → flow-bootstrap-phase-0.md} +2 -1
- package/prompts/frontend/{flow-docs-gen-phase-1.md → flow-bootstrap-phase-1.md} +2 -1
- package/prompts/frontend/{flow-docs-gen-phase-3.md → flow-bootstrap-phase-3.md} +2 -1
- package/prompts/frontend/{flow-docs-gen-phase-4.md → flow-bootstrap-phase-4.md} +2 -1
- package/prompts/frontend/{flow-docs-gen-phase-5.md → flow-bootstrap-phase-5.md} +2 -1
- package/prompts/frontend/{flow-docs-gen-phase-6.md → flow-bootstrap-phase-6.md} +2 -1
- package/prompts/frontend/{flow-docs-gen-phase-7.md → flow-bootstrap-phase-7.md} +225 -200
- package/prompts/frontend/flow-bootstrap-phase-8.md +670 -0
- package/prompts/frontend/{flow-docs-gen.md → flow-bootstrap.md} +47 -20
- package/prompts/frontend/flow-docs-sync.md +2 -1
- package/prompts/mobile/{flow-docs-gen-phase-0.md → flow-bootstrap-phase-0.md} +2 -1
- package/prompts/mobile/{flow-docs-gen-phase-1.md → flow-bootstrap-phase-1.md} +2 -1
- package/prompts/mobile/{flow-docs-gen-phase-2.md → flow-bootstrap-phase-2.md} +2 -1
- package/prompts/mobile/{flow-docs-gen-phase-3.md → flow-bootstrap-phase-3.md} +2 -1
- package/prompts/mobile/{flow-docs-gen-phase-4.md → flow-bootstrap-phase-4.md} +2 -1
- package/prompts/mobile/{flow-docs-gen-phase-5.md → flow-bootstrap-phase-5.md} +2 -1
- package/prompts/mobile/{flow-docs-gen-phase-6.md → flow-bootstrap-phase-6.md} +2 -1
- package/prompts/mobile/{flow-docs-gen-phase-7.md → flow-bootstrap-phase-7.md} +174 -132
- package/prompts/mobile/flow-bootstrap-phase-8.md +676 -0
- package/prompts/mobile/{flow-docs-gen.md → flow-bootstrap.md} +47 -20
- package/prompts/mobile/flow-docs-sync.md +2 -1
- package/prompts/backend/flow-project-init.md +0 -248
- /package/prompts/backend/{flow-docs-gen-phase-0.md → flow-bootstrap-phase-0.md} +0 -0
- /package/prompts/backend/{flow-docs-gen-phase-1.md → flow-bootstrap-phase-1.md} +0 -0
- /package/prompts/backend/{flow-docs-gen-phase-2.md → flow-bootstrap-phase-2.md} +0 -0
- /package/prompts/backend/{flow-docs-gen-phase-3.md → flow-bootstrap-phase-3.md} +0 -0
- /package/prompts/backend/{flow-docs-gen-phase-4.md → flow-bootstrap-phase-4.md} +0 -0
- /package/prompts/backend/{flow-docs-gen-phase-5.md → flow-bootstrap-phase-5.md} +0 -0
- /package/prompts/backend/{flow-docs-gen-phase-6.md → flow-bootstrap-phase-6.md} +0 -0
- /package/prompts/frontend/{flow-docs-gen-phase-2.md → flow-bootstrap-phase-2.md} +0 -0
|
@@ -0,0 +1,676 @@
|
|
|
1
|
+
# 🏆 Phase 8: Project Setup & Final Documentation
|
|
2
|
+
|
|
3
|
+
**Context:** Phases 1-7 have collected all project information. Now we'll initialize the framework (if needed) and generate all final documentation.
|
|
4
|
+
|
|
5
|
+
**Duration:** 10-15 minutes
|
|
6
|
+
|
|
7
|
+
**Goal:** Set up the project structure and create comprehensive documentation that consolidates all information from previous phases.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 📋 Phase 8 Overview
|
|
12
|
+
|
|
13
|
+
This final phase will:
|
|
14
|
+
|
|
15
|
+
1. **Detect project state** (new vs existing project)
|
|
16
|
+
2. **Initialize framework** (optional, for new projects)
|
|
17
|
+
3. **Generate final documentation** (platform guides, deployment, app store)
|
|
18
|
+
4. **Generate master index** (AGENT.md)
|
|
19
|
+
5. **Generate README.md** (with intelligent merge if needed)
|
|
20
|
+
6. **Create tool-specific configs** (based on AI tool selection)
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 8.1: Project State Detection
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
🔍 Detecting current project state...
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Auto-detect:**
|
|
31
|
+
|
|
32
|
+
- [ ] Check for existing source code (`src/`, `app/`, `ios/`, `android/`, `lib/`, etc.)
|
|
33
|
+
- [ ] Check for framework files (`package.json`, `pubspec.yaml`, `Podfile`, `build.gradle`, etc.)
|
|
34
|
+
- [ ] Check for platform directories (`ios/`, `android/`, `lib/` for Flutter)
|
|
35
|
+
- [ ] Check for existing README.md (framework-generated or custom)
|
|
36
|
+
|
|
37
|
+
**Classification:**
|
|
38
|
+
|
|
39
|
+
- **New Project**: No source code, no framework files
|
|
40
|
+
- **Initialized Framework**: Has framework files, has source code
|
|
41
|
+
- **Existing Project**: Has source code but AI Flow docs were just created
|
|
42
|
+
|
|
43
|
+
**Present Detection Results:**
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
📊 Project State Detection:
|
|
47
|
+
|
|
48
|
+
Type: [New Project | Initialized Framework | Existing Project]
|
|
49
|
+
|
|
50
|
+
Found:
|
|
51
|
+
- Source directories: [list or none]
|
|
52
|
+
- Framework files: [list or none]
|
|
53
|
+
- Platform directories: [ios/, android/, or none]
|
|
54
|
+
- Package manager: [npm/yarn/flutter/etc. or none]
|
|
55
|
+
- README.md: [exists: yes/no]
|
|
56
|
+
|
|
57
|
+
Recommendation: [Next action based on state]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 8.2: Framework Initialization (Optional)
|
|
63
|
+
|
|
64
|
+
**Only if:** Project state = "New Project"
|
|
65
|
+
|
|
66
|
+
### 8.2.1: Ask User Preference
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
🎯 Your project appears to be new.
|
|
70
|
+
|
|
71
|
+
Would you like me to initialize the [FRAMEWORK_NAME] project structure now?
|
|
72
|
+
|
|
73
|
+
Options:
|
|
74
|
+
A) ✅ Yes, initialize [FRAMEWORK_NAME] (recommended)
|
|
75
|
+
B) ⏭️ Skip for now (manual setup later)
|
|
76
|
+
|
|
77
|
+
→ Your choice:
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**If user chooses A (initialize):**
|
|
81
|
+
|
|
82
|
+
### 8.2.2: Pre-initialization Backup
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
📦 Preparing for framework initialization...
|
|
86
|
+
|
|
87
|
+
Creating backup of AI Flow documentation:
|
|
88
|
+
→ Moving .ai-flow/ docs to .ai-flow/temp-backup/
|
|
89
|
+
|
|
90
|
+
Files to backup:
|
|
91
|
+
✅ project-brief.md
|
|
92
|
+
✅ docs/app-structure.md
|
|
93
|
+
✅ docs/architecture.md
|
|
94
|
+
✅ ai-instructions.md
|
|
95
|
+
✅ docs/code-standards.md
|
|
96
|
+
✅ docs/testing.md
|
|
97
|
+
✅ docs/app-store.md
|
|
98
|
+
✅ specs/build-configuration.md
|
|
99
|
+
✅ specs/deployment.md
|
|
100
|
+
✅ .env.example
|
|
101
|
+
|
|
102
|
+
Backup complete! Safe to initialize framework.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 8.2.3: Execute Framework CLI
|
|
106
|
+
|
|
107
|
+
**Based on framework detected in Phase 1:**
|
|
108
|
+
|
|
109
|
+
**React Native:**
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# React Native CLI
|
|
113
|
+
npx react-native@latest init ProjectName --skip-git
|
|
114
|
+
|
|
115
|
+
# Expo (managed workflow)
|
|
116
|
+
npx create-expo-app@latest . --template blank-typescript
|
|
117
|
+
|
|
118
|
+
# Expo (bare workflow)
|
|
119
|
+
npx create-expo-app@latest . --template bare-typescript
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Flutter:**
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Flutter CLI
|
|
126
|
+
flutter create . --org com.yourcompany --platforms ios,android
|
|
127
|
+
|
|
128
|
+
# Flutter with specific template
|
|
129
|
+
flutter create . --template app --org com.yourcompany
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Native iOS:**
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# SwiftUI app
|
|
136
|
+
xcodegen generate
|
|
137
|
+
# Or manually create Xcode project
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Native Android:**
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Android Studio template
|
|
144
|
+
# Create manually through Android Studio or use Gradle
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Other cross-platform:**
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Ionic
|
|
151
|
+
ionic start . blank --type=angular --capacitor
|
|
152
|
+
|
|
153
|
+
# Capacitor
|
|
154
|
+
npm init @capacitor/app
|
|
155
|
+
|
|
156
|
+
# NativeScript
|
|
157
|
+
ns create . --template @nativescript/template-blank-ts
|
|
158
|
+
|
|
159
|
+
# Kotlin Multiplatform Mobile
|
|
160
|
+
# Create through IntelliJ IDEA or Android Studio
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Show progress:**
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
🚀 Initializing [FRAMEWORK_NAME]...
|
|
167
|
+
|
|
168
|
+
[Framework CLI output]
|
|
169
|
+
|
|
170
|
+
✅ Framework initialized successfully!
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### 8.2.4: Restore AI Flow Documentation
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
📥 Restoring AI Flow documentation...
|
|
177
|
+
|
|
178
|
+
Moving files from .ai-flow/temp-backup/ back to .ai-flow/
|
|
179
|
+
|
|
180
|
+
✅ All AI Flow docs restored!
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### 8.2.5: Handle README.md Conflict
|
|
184
|
+
|
|
185
|
+
**If framework created README.md:**
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
⚠️ Framework generated its own README.md
|
|
189
|
+
|
|
190
|
+
I'll merge it with AI Flow's comprehensive README:
|
|
191
|
+
|
|
192
|
+
Strategy:
|
|
193
|
+
1. Keep framework's quick start section (if valuable)
|
|
194
|
+
2. Replace with AI Flow's comprehensive content
|
|
195
|
+
3. Preserve any framework-specific setup instructions
|
|
196
|
+
|
|
197
|
+
Merging...
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Merge Logic:**
|
|
201
|
+
|
|
202
|
+
- Extract framework's "Getting Started" or "Installation" section
|
|
203
|
+
- Use AI Flow's README template as base
|
|
204
|
+
- Insert framework's quick start in appropriate section
|
|
205
|
+
- Ensure no duplication
|
|
206
|
+
- Keep AI Flow's structure (overview, features, tech stack, etc.)
|
|
207
|
+
|
|
208
|
+
**If user chooses B (skip):**
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
⏭️ Skipping framework initialization.
|
|
212
|
+
|
|
213
|
+
You can initialize manually later with:
|
|
214
|
+
[Show appropriate CLI command]
|
|
215
|
+
|
|
216
|
+
Proceeding to documentation generation...
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## 8.3: Generate Final Documentation
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
📖 Re-reading all generated documents to ensure accuracy...
|
|
225
|
+
|
|
226
|
+
✅ Re-reading project-brief.md
|
|
227
|
+
✅ Re-reading docs/app-structure.md
|
|
228
|
+
✅ Re-reading docs/architecture.md
|
|
229
|
+
✅ Re-reading ai-instructions.md
|
|
230
|
+
✅ Re-reading docs/code-standards.md
|
|
231
|
+
✅ Re-reading docs/testing.md
|
|
232
|
+
✅ Re-reading docs/app-store.md
|
|
233
|
+
✅ Re-reading specs/build-configuration.md
|
|
234
|
+
✅ Re-reading specs/deployment.md
|
|
235
|
+
✅ Re-reading .env.example
|
|
236
|
+
|
|
237
|
+
✅ Context fully loaded and updated!
|
|
238
|
+
|
|
239
|
+
🎉 Now generating final 4 documents:
|
|
240
|
+
|
|
241
|
+
1. docs/platform-guides.md - iOS and Android specific implementations
|
|
242
|
+
2. docs/navigation-guide.md - Navigation patterns and screen flow
|
|
243
|
+
3. docs/contributing.md - Contribution guidelines
|
|
244
|
+
4. AGENT.md - Universal AI configuration (master index)
|
|
245
|
+
5. README.md - Project overview (consolidates all phases)
|
|
246
|
+
|
|
247
|
+
Generating...
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### 8.3.1: Generate docs/platform-guides.md
|
|
251
|
+
|
|
252
|
+
- **Template:** `.ai-flow/templates/docs/platform-guides.template.md`
|
|
253
|
+
- **Content from:** Phase 2 (app structure) + Phase 4 (platform permissions)
|
|
254
|
+
- **Requirements:**
|
|
255
|
+
- iOS-specific implementations
|
|
256
|
+
- Android-specific implementations
|
|
257
|
+
- Platform-specific APIs usage
|
|
258
|
+
- Native module integration (if any)
|
|
259
|
+
- Platform permissions setup
|
|
260
|
+
|
|
261
|
+
### 8.3.2: Generate docs/navigation-guide.md
|
|
262
|
+
|
|
263
|
+
- **Template:** `.ai-flow/templates/docs/navigation-guide.template.md`
|
|
264
|
+
- **Content from:** Phase 2 (navigation) + Phase 3 (architecture)
|
|
265
|
+
- **Requirements:**
|
|
266
|
+
- Navigation strategy (stack, tabs, drawer)
|
|
267
|
+
- Screen hierarchy
|
|
268
|
+
- Deep linking setup
|
|
269
|
+
- Navigation parameters
|
|
270
|
+
- Authentication flow
|
|
271
|
+
|
|
272
|
+
### 8.3.3: Generate docs/contributing.md
|
|
273
|
+
|
|
274
|
+
- **Template:** `.ai-flow/templates/docs/contributing.template.md`
|
|
275
|
+
- **Content from:** Phase 5 (code standards) + Phase 7 (deployment)
|
|
276
|
+
- **Requirements:**
|
|
277
|
+
- Git workflow from Phase 5
|
|
278
|
+
- Commit message format
|
|
279
|
+
- Code review process
|
|
280
|
+
- Setup instructions
|
|
281
|
+
- Testing requirements from Phase 6
|
|
282
|
+
- Build and release process
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## 8.4: Generate AGENT.md (Master Index)
|
|
287
|
+
|
|
288
|
+
- **Template:** `.ai-flow/templates/AGENT.template.md`
|
|
289
|
+
- **Content from:** ALL phases (this is the aggregator)
|
|
290
|
+
- **Requirements:**
|
|
291
|
+
- **CRITICAL:** Re-read ALL previously generated documents before filling
|
|
292
|
+
- List all documents with descriptions
|
|
293
|
+
- Provide quick reference to tech stack
|
|
294
|
+
- Include critical architecture rules
|
|
295
|
+
- Link to all specs and docs
|
|
296
|
+
- Summarize key decisions from each phase
|
|
297
|
+
- Include common commands
|
|
298
|
+
|
|
299
|
+
**Structure:**
|
|
300
|
+
|
|
301
|
+
```markdown
|
|
302
|
+
# 🤖 AGENT.md - Universal AI Assistant Configuration
|
|
303
|
+
|
|
304
|
+
## 📚 Documentation Index
|
|
305
|
+
|
|
306
|
+
### Core Documents
|
|
307
|
+
|
|
308
|
+
1. **project-brief.md** - [1-sentence description]
|
|
309
|
+
2. **ai-instructions.md** - [1-sentence description]
|
|
310
|
+
|
|
311
|
+
### Documentation
|
|
312
|
+
|
|
313
|
+
3. **docs/app-structure.md** - [1-sentence description]
|
|
314
|
+
4. **docs/architecture.md** - [1-sentence description]
|
|
315
|
+
5. **docs/platform-guides.md** - [1-sentence description]
|
|
316
|
+
6. **docs/navigation-guide.md** - [1-sentence description]
|
|
317
|
+
7. **docs/code-standards.md** - [1-sentence description]
|
|
318
|
+
8. **docs/testing.md** - [1-sentence description]
|
|
319
|
+
9. **docs/app-store.md** - [1-sentence description]
|
|
320
|
+
10. **docs/contributing.md** - [1-sentence description]
|
|
321
|
+
|
|
322
|
+
### Specifications
|
|
323
|
+
|
|
324
|
+
11. **specs/build-configuration.md** - [1-sentence description]
|
|
325
|
+
12. **specs/deployment.md** - [1-sentence description]
|
|
326
|
+
13. **.env.example** - Environment variables template
|
|
327
|
+
14. **README.md** - Project overview and setup
|
|
328
|
+
|
|
329
|
+
## 🎯 Quick Reference
|
|
330
|
+
|
|
331
|
+
### Tech Stack
|
|
332
|
+
|
|
333
|
+
[List from Phase 1 & 3]
|
|
334
|
+
|
|
335
|
+
### Critical Rules
|
|
336
|
+
|
|
337
|
+
[Key rules from code-standards.md and ai-instructions.md]
|
|
338
|
+
|
|
339
|
+
### Common Commands
|
|
340
|
+
|
|
341
|
+
[From deployment.md and contributing.md]
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## 8.5: Generate README.md (Intelligent Merge)
|
|
347
|
+
|
|
348
|
+
- **Template:** `.ai-flow/templates/README.template.md`
|
|
349
|
+
- **Content from:** ALL phases (most comprehensive document)
|
|
350
|
+
- **Requirements:**
|
|
351
|
+
- **CRITICAL:** Re-read ALL documents before generating
|
|
352
|
+
- Include project overview from Phase 1
|
|
353
|
+
- List features from Phase 1
|
|
354
|
+
- Show tech stack from Phase 1 & 3
|
|
355
|
+
- Include quick start from Phase 7
|
|
356
|
+
- Link to all documentation
|
|
357
|
+
- Include deployment info from Phase 7
|
|
358
|
+
- Add app store links placeholders
|
|
359
|
+
|
|
360
|
+
**Merge Strategy (if framework README exists):**
|
|
361
|
+
|
|
362
|
+
1. **Read framework's README.md** (if exists from step 8.2)
|
|
363
|
+
2. **Extract valuable sections:**
|
|
364
|
+
- Installation commands specific to framework
|
|
365
|
+
- Framework-specific setup instructions
|
|
366
|
+
- Running on iOS/Android commands
|
|
367
|
+
- Troubleshooting tips
|
|
368
|
+
3. **Use AI Flow template as base structure:**
|
|
369
|
+
- Project name and description (from Phase 1)
|
|
370
|
+
- Features (from Phase 1)
|
|
371
|
+
- Tech stack (from Phase 1 & 3)
|
|
372
|
+
- Architecture overview (link to docs/architecture.md)
|
|
373
|
+
- Getting started (merge with framework's instructions)
|
|
374
|
+
- Platform setup (iOS/Android requirements)
|
|
375
|
+
- Testing (link to docs/testing.md)
|
|
376
|
+
- Deployment (from Phase 7)
|
|
377
|
+
- Contributing (link to docs/contributing.md)
|
|
378
|
+
4. **Insert framework-specific content** in "Getting Started" section
|
|
379
|
+
5. **Ensure no duplication**
|
|
380
|
+
6. **Validate all links** work correctly
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## 8.6: Create Tool-Specific Configs
|
|
385
|
+
|
|
386
|
+
**Based on AI tool selection from Phase 1:**
|
|
387
|
+
|
|
388
|
+
### If Claude selected:
|
|
389
|
+
|
|
390
|
+
**Create `.clauderules`:**
|
|
391
|
+
|
|
392
|
+
```markdown
|
|
393
|
+
# Claude AI Configuration
|
|
394
|
+
|
|
395
|
+
This project uses AI Flow documentation structure.
|
|
396
|
+
|
|
397
|
+
## Primary Reference
|
|
398
|
+
|
|
399
|
+
Read `.ai-flow/AGENT.md` first for complete documentation index.
|
|
400
|
+
|
|
401
|
+
## Key Documents
|
|
402
|
+
|
|
403
|
+
- Project overview: `.ai-flow/project-brief.md`
|
|
404
|
+
- AI instructions: `.ai-flow/ai-instructions.md`
|
|
405
|
+
- Architecture: `.ai-flow/docs/architecture.md`
|
|
406
|
+
- App Structure: `.ai-flow/docs/app-structure.md`
|
|
407
|
+
- Platform Guides: `.ai-flow/docs/platform-guides.md`
|
|
408
|
+
- Navigation: `.ai-flow/docs/navigation-guide.md`
|
|
409
|
+
- Code standards: `.ai-flow/docs/code-standards.md`
|
|
410
|
+
|
|
411
|
+
## Working Instructions
|
|
412
|
+
|
|
413
|
+
When writing code:
|
|
414
|
+
|
|
415
|
+
1. Follow patterns in `.ai-flow/docs/code-standards.md`
|
|
416
|
+
2. Reference app structure in `.ai-flow/docs/app-structure.md`
|
|
417
|
+
3. Follow platform guidelines from `.ai-flow/docs/platform-guides.md`
|
|
418
|
+
4. Implement navigation per `.ai-flow/docs/navigation-guide.md`
|
|
419
|
+
5. Write tests per `.ai-flow/docs/testing.md`
|
|
420
|
+
|
|
421
|
+
## Critical Rules
|
|
422
|
+
|
|
423
|
+
[Extract top 5-10 rules from ai-instructions.md]
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### If Cursor selected:
|
|
427
|
+
|
|
428
|
+
**Create `.cursorrules`:**
|
|
429
|
+
|
|
430
|
+
```markdown
|
|
431
|
+
# Cursor AI Configuration
|
|
432
|
+
|
|
433
|
+
Project uses AI Flow documentation in `.ai-flow/` directory.
|
|
434
|
+
|
|
435
|
+
## Documentation Index
|
|
436
|
+
|
|
437
|
+
See `.ai-flow/AGENT.md` for complete document list.
|
|
438
|
+
|
|
439
|
+
## Quick Reference
|
|
440
|
+
|
|
441
|
+
- Tech Stack: [from Phase 1 & 3]
|
|
442
|
+
- Architecture: `.ai-flow/docs/architecture.md`
|
|
443
|
+
- Platform Guides: `.ai-flow/docs/platform-guides.md`
|
|
444
|
+
- Code Standards: `.ai-flow/docs/code-standards.md`
|
|
445
|
+
|
|
446
|
+
## Code Generation Rules
|
|
447
|
+
|
|
448
|
+
[Extract key rules from ai-instructions.md]
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### If GitHub Copilot selected:
|
|
452
|
+
|
|
453
|
+
**Create `.github/copilot-instructions.md`:**
|
|
454
|
+
|
|
455
|
+
```markdown
|
|
456
|
+
# GitHub Copilot Instructions
|
|
457
|
+
|
|
458
|
+
## Project Context
|
|
459
|
+
|
|
460
|
+
[Project description from Phase 1]
|
|
461
|
+
|
|
462
|
+
## Documentation Structure
|
|
463
|
+
|
|
464
|
+
This project uses AI Flow. All documentation is in `.ai-flow/` directory.
|
|
465
|
+
|
|
466
|
+
Master index: `.ai-flow/AGENT.md`
|
|
467
|
+
|
|
468
|
+
## Key References
|
|
469
|
+
|
|
470
|
+
- Architecture: `.ai-flow/docs/architecture.md`
|
|
471
|
+
- App Structure: `.ai-flow/docs/app-structure.md`
|
|
472
|
+
- Platform Guides: `.ai-flow/docs/platform-guides.md`
|
|
473
|
+
- Navigation: `.ai-flow/docs/navigation-guide.md`
|
|
474
|
+
- Code Standards: `.ai-flow/docs/code-standards.md`
|
|
475
|
+
- Testing: `.ai-flow/docs/testing.md`
|
|
476
|
+
|
|
477
|
+
## Code Generation Guidelines
|
|
478
|
+
|
|
479
|
+
[Extract guidelines from ai-instructions.md and code-standards.md]
|
|
480
|
+
|
|
481
|
+
## Tech Stack
|
|
482
|
+
|
|
483
|
+
[From Phase 1 & 3]
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
---
|
|
487
|
+
|
|
488
|
+
## 8.7: Final Validation & Success Message
|
|
489
|
+
|
|
490
|
+
```
|
|
491
|
+
🔍 Validating all generated files...
|
|
492
|
+
|
|
493
|
+
✅ Checking for placeholder text...
|
|
494
|
+
✅ Validating file references...
|
|
495
|
+
✅ Ensuring all links work...
|
|
496
|
+
✅ Verifying template completeness...
|
|
497
|
+
|
|
498
|
+
All validations passed!
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
**Show complete summary:**
|
|
502
|
+
|
|
503
|
+
```
|
|
504
|
+
🎉 AI Flow Complete!
|
|
505
|
+
|
|
506
|
+
Generated 14 documents successfully:
|
|
507
|
+
|
|
508
|
+
Phase 1:
|
|
509
|
+
✅ project-brief.md
|
|
510
|
+
|
|
511
|
+
Phase 2:
|
|
512
|
+
✅ docs/app-structure.md
|
|
513
|
+
|
|
514
|
+
Phase 3:
|
|
515
|
+
✅ docs/architecture.md
|
|
516
|
+
✅ ai-instructions.md
|
|
517
|
+
|
|
518
|
+
Phase 5:
|
|
519
|
+
✅ docs/code-standards.md
|
|
520
|
+
|
|
521
|
+
Phase 6:
|
|
522
|
+
✅ docs/testing.md
|
|
523
|
+
|
|
524
|
+
Phase 7:
|
|
525
|
+
✅ docs/app-store.md
|
|
526
|
+
✅ specs/build-configuration.md
|
|
527
|
+
✅ specs/deployment.md
|
|
528
|
+
✅ .env.example
|
|
529
|
+
|
|
530
|
+
Phase 8:
|
|
531
|
+
✅ docs/platform-guides.md
|
|
532
|
+
✅ docs/navigation-guide.md
|
|
533
|
+
✅ docs/contributing.md
|
|
534
|
+
✅ README.md
|
|
535
|
+
✅ AGENT.md
|
|
536
|
+
|
|
537
|
+
[If framework initialized:]
|
|
538
|
+
✅ [FRAMEWORK_NAME] project initialized
|
|
539
|
+
|
|
540
|
+
[If README merged:]
|
|
541
|
+
✅ README.md merged with framework's setup instructions
|
|
542
|
+
|
|
543
|
+
Tool-specific configs:
|
|
544
|
+
✅ [List generated configs]
|
|
545
|
+
|
|
546
|
+
---
|
|
547
|
+
|
|
548
|
+
📁 Project Structure:
|
|
549
|
+
|
|
550
|
+
your-app/
|
|
551
|
+
├── .ai-flow/ # AI Flow documentation
|
|
552
|
+
│ ├── AGENT.md ⭐ Start here!
|
|
553
|
+
│ ├── project-brief.md
|
|
554
|
+
│ ├── ai-instructions.md
|
|
555
|
+
│ ├── docs/
|
|
556
|
+
│ │ ├── app-structure.md
|
|
557
|
+
│ │ ├── architecture.md
|
|
558
|
+
│ │ ├── platform-guides.md
|
|
559
|
+
│ │ ├── navigation-guide.md
|
|
560
|
+
│ │ ├── code-standards.md
|
|
561
|
+
│ │ ├── testing.md
|
|
562
|
+
│ │ ├── app-store.md
|
|
563
|
+
│ │ └── contributing.md
|
|
564
|
+
│ ├── specs/
|
|
565
|
+
│ │ ├── build-configuration.md
|
|
566
|
+
│ │ └── deployment.md
|
|
567
|
+
│ └── templates/ # Original templates
|
|
568
|
+
├── ios/ # iOS platform (if initialized)
|
|
569
|
+
├── android/ # Android platform (if initialized)
|
|
570
|
+
├── src/ or lib/ # Source code (if initialized)
|
|
571
|
+
├── README.md
|
|
572
|
+
├── .env.example
|
|
573
|
+
└── [tool configs] # .clauderules, .cursorrules, etc.
|
|
574
|
+
|
|
575
|
+
---
|
|
576
|
+
|
|
577
|
+
Next steps:
|
|
578
|
+
|
|
579
|
+
1. ⭐ **Read `.ai-flow/AGENT.md`** - Master index of all documentation
|
|
580
|
+
2. 📖 **Review generated documents** - Customize as needed
|
|
581
|
+
3. 🔧 **Set up environment** - Copy `.env.example` to `.env` and configure
|
|
582
|
+
[If NOT initialized:]
|
|
583
|
+
4. 🚀 **Initialize framework** - Run: `[show command from Phase 1]`
|
|
584
|
+
[If initialized:]
|
|
585
|
+
4. 🚀 **Install dependencies** - Run platform-specific setup:
|
|
586
|
+
• React Native: `npm install && cd ios && pod install`
|
|
587
|
+
• Flutter: `flutter pub get`
|
|
588
|
+
• Expo: `npm install`
|
|
589
|
+
5. 📱 **Run on device/simulator**:
|
|
590
|
+
• iOS: `npm run ios` or `flutter run`
|
|
591
|
+
• Android: `npm run android` or `flutter run`
|
|
592
|
+
6. 💾 **Initialize git** (if not done) - `git init && git add . && git commit -m "Initial commit with AI Flow docs"`
|
|
593
|
+
7. 🧪 **Start developing!** - Your AI assistant now has complete project context
|
|
594
|
+
|
|
595
|
+
---
|
|
596
|
+
|
|
597
|
+
💡 **Remember:**
|
|
598
|
+
- Documents are **living artifacts** - update them as project evolves
|
|
599
|
+
- All AI assistants will reference these docs for future work
|
|
600
|
+
- AGENT.md is the **single source of truth** for AI context
|
|
601
|
+
|
|
602
|
+
🤖 **AI Assistant Usage:**
|
|
603
|
+
Your AI assistant (Claude, Cursor, Copilot) will now:
|
|
604
|
+
- ✅ Understand complete project context
|
|
605
|
+
- ✅ Follow your architecture patterns
|
|
606
|
+
- ✅ Generate code matching your standards
|
|
607
|
+
- ✅ Reference your app structure
|
|
608
|
+
- ✅ Apply platform-specific best practices
|
|
609
|
+
- ✅ Write tests per your guidelines
|
|
610
|
+
|
|
611
|
+
Happy building! 🎉📱
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
---
|
|
615
|
+
|
|
616
|
+
## EXECUTION CHECKLIST FOR AI ASSISTANT
|
|
617
|
+
|
|
618
|
+
When executing Phase 8:
|
|
619
|
+
|
|
620
|
+
**8.1 Project State Detection:**
|
|
621
|
+
|
|
622
|
+
- [ ] Scan for source directories (src/, lib/, app/)
|
|
623
|
+
- [ ] Check for platform directories (ios/, android/)
|
|
624
|
+
- [ ] Check for framework files (package.json, pubspec.yaml, etc.)
|
|
625
|
+
- [ ] Check for existing README.md
|
|
626
|
+
- [ ] Classify project: New / Initialized / Existing
|
|
627
|
+
- [ ] Present detection results
|
|
628
|
+
|
|
629
|
+
**8.2 Framework Initialization (if new project):**
|
|
630
|
+
|
|
631
|
+
- [ ] Ask user if they want to initialize
|
|
632
|
+
- [ ] If yes:
|
|
633
|
+
- [ ] Backup .ai-flow/ docs
|
|
634
|
+
- [ ] Execute framework CLI command
|
|
635
|
+
- [ ] Restore .ai-flow/ docs
|
|
636
|
+
- [ ] Handle README.md conflict
|
|
637
|
+
- [ ] If no: Show manual command and continue
|
|
638
|
+
|
|
639
|
+
**8.3 Generate Final Documentation:**
|
|
640
|
+
|
|
641
|
+
- [ ] Re-read ALL previously generated documents
|
|
642
|
+
- [ ] Generate docs/platform-guides.md
|
|
643
|
+
- [ ] Generate docs/navigation-guide.md
|
|
644
|
+
- [ ] Generate docs/contributing.md
|
|
645
|
+
|
|
646
|
+
**8.4 Generate AGENT.md:**
|
|
647
|
+
|
|
648
|
+
- [ ] Re-read ALL documents again
|
|
649
|
+
- [ ] Create master index
|
|
650
|
+
- [ ] Include quick reference
|
|
651
|
+
- [ ] Validate all links
|
|
652
|
+
|
|
653
|
+
**8.5 Generate README.md:**
|
|
654
|
+
|
|
655
|
+
- [ ] Re-read ALL documents
|
|
656
|
+
- [ ] If framework README exists: merge intelligently
|
|
657
|
+
- [ ] If no framework README: create from template
|
|
658
|
+
- [ ] Validate all internal links
|
|
659
|
+
|
|
660
|
+
**8.6 Create Tool-Specific Configs:**
|
|
661
|
+
|
|
662
|
+
- [ ] Create configs based on AI tool selection
|
|
663
|
+
|
|
664
|
+
**8.7 Final Validation:**
|
|
665
|
+
|
|
666
|
+
- [ ] Check for placeholders
|
|
667
|
+
- [ ] Validate file references
|
|
668
|
+
- [ ] Show success message
|
|
669
|
+
|
|
670
|
+
**ESTIMATED TIME:** 10-15 minutes
|
|
671
|
+
|
|
672
|
+
---
|
|
673
|
+
|
|
674
|
+
**CONTINUE TO:** End (Phase 8 is final phase)
|
|
675
|
+
|
|
676
|
+
**SUCCESS:** Mobile app fully documented and ready for development! 🚀📱
|