ai-flow-dev 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -8
- package/dist/cli.js +16 -7
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/prompts/backend/flow-bootstrap-phase-8.md +290 -34
- package/prompts/backend/flow-bootstrap-phase-9.md +441 -58
- package/prompts/backend/flow-bootstrap.md +108 -107
- package/prompts/backend/flow-dev-feature.md +447 -68
- package/prompts/backend/flow-dev-fix.md +81 -8
- package/templates/{shared/AGENT.template.md → AGENT.template.md} +1 -1
- package/templates/mobile/AGENT.template.md +0 -251
|
@@ -103,69 +103,97 @@ Backup complete! Safe to initialize framework.
|
|
|
103
103
|
|
|
104
104
|
### 8.2.3: Execute Framework CLI
|
|
105
105
|
|
|
106
|
-
**
|
|
106
|
+
**IMPORTANT:** Use Bash tool to execute the framework's official CLI command. This ensures the project gets the latest stable versions and official project structure.
|
|
107
107
|
|
|
108
|
-
**
|
|
108
|
+
**Based on framework detected in Phase 3, execute ONE of these commands:**
|
|
109
|
+
|
|
110
|
+
**NestJS:**
|
|
109
111
|
|
|
110
112
|
```bash
|
|
111
|
-
# NestJS
|
|
112
113
|
npx @nestjs/cli new . --skip-git --package-manager npm
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Express:**
|
|
113
117
|
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
```bash
|
|
119
|
+
# Initialize package.json
|
|
120
|
+
npm init -y
|
|
121
|
+
|
|
122
|
+
# Install core dependencies with latest versions
|
|
123
|
+
npm install express cors helmet dotenv
|
|
116
124
|
|
|
117
|
-
#
|
|
118
|
-
npm
|
|
125
|
+
# Install dev dependencies
|
|
126
|
+
npm install -D typescript @types/node @types/express ts-node nodemon
|
|
119
127
|
|
|
120
|
-
#
|
|
121
|
-
npx create-next-app@latest . --typescript --eslint --tailwind --app --src-dir --import-alias "@/*"
|
|
128
|
+
# Create src/app.ts from template (see section 8.2.6.4)
|
|
122
129
|
```
|
|
123
130
|
|
|
124
|
-
**
|
|
131
|
+
**Django:**
|
|
125
132
|
|
|
126
133
|
```bash
|
|
127
|
-
# Django
|
|
128
134
|
django-admin startproject config .
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**FastAPI:**
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# Install FastAPI with latest stable
|
|
141
|
+
pip install "fastapi[standard]" uvicorn[standard]
|
|
142
|
+
|
|
143
|
+
# Create app/main.py from template (see section 8.2.6.4)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Spring Boot:**
|
|
129
147
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
148
|
+
```bash
|
|
149
|
+
spring init --dependencies=web,data-jpa --build=maven --name=[ProjectName] .
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Laravel:**
|
|
135
153
|
|
|
136
|
-
|
|
137
|
-
|
|
154
|
+
```bash
|
|
155
|
+
composer create-project laravel/laravel .
|
|
138
156
|
```
|
|
139
157
|
|
|
140
|
-
**
|
|
158
|
+
**Go (Gin):**
|
|
141
159
|
|
|
142
160
|
```bash
|
|
143
|
-
# Go
|
|
144
161
|
go mod init [module-name]
|
|
162
|
+
go get -u github.com/gin-gonic/gin
|
|
163
|
+
```
|
|
145
164
|
|
|
146
|
-
|
|
147
|
-
dotnet new webapi -n [ProjectName]
|
|
165
|
+
**Ruby on Rails:**
|
|
148
166
|
|
|
149
|
-
|
|
150
|
-
rails new . --api --skip-git
|
|
167
|
+
```bash
|
|
168
|
+
rails new . --api --skip-git --database=postgresql
|
|
169
|
+
```
|
|
151
170
|
|
|
152
|
-
|
|
153
|
-
composer create-project laravel/laravel .
|
|
171
|
+
**.NET Core:**
|
|
154
172
|
|
|
155
|
-
|
|
156
|
-
|
|
173
|
+
```bash
|
|
174
|
+
dotnet new webapi -n [ProjectName] -o .
|
|
157
175
|
```
|
|
158
176
|
|
|
159
|
-
**Show progress:**
|
|
177
|
+
**Show progress as command executes:**
|
|
160
178
|
|
|
161
179
|
```
|
|
162
|
-
🚀
|
|
180
|
+
🚀 Executing: npx @nestjs/cli new . --skip-git
|
|
163
181
|
|
|
164
|
-
[
|
|
182
|
+
[Real CLI output from Bash tool]
|
|
165
183
|
|
|
166
184
|
✅ Framework initialized successfully!
|
|
167
185
|
```
|
|
168
186
|
|
|
187
|
+
**Result:** Framework CLI creates:
|
|
188
|
+
|
|
189
|
+
- ✅ package.json / requirements.txt / pom.xml (with latest versions)
|
|
190
|
+
- ✅ tsconfig.json / pyproject.toml (optimized configs)
|
|
191
|
+
- ✅ Basic src/ structure
|
|
192
|
+
- ✅ Test setup
|
|
193
|
+
- ✅ Linting/formatting configs
|
|
194
|
+
|
|
195
|
+
**Next:** Only add what framework doesn't include (see 8.2.6)
|
|
196
|
+
|
|
169
197
|
### 8.2.4: Restore AI Flow Documentation
|
|
170
198
|
|
|
171
199
|
```
|
|
@@ -212,6 +240,235 @@ You can initialize manually later with:
|
|
|
212
240
|
Proceeding to documentation generation...
|
|
213
241
|
```
|
|
214
242
|
|
|
243
|
+
### 8.2.6: Minimal Post-Init Enhancements
|
|
244
|
+
|
|
245
|
+
**IMPORTANT:** Only add what the framework CLI doesn't include. **DO NOT** create business logic, entity modules, or complete features.
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
📦 Adding minimal enhancements...
|
|
249
|
+
|
|
250
|
+
Framework base created by CLI ✅
|
|
251
|
+
Now adding only essential files that framework doesn't include...
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**Based on selected framework and database from previous phases:**
|
|
255
|
+
|
|
256
|
+
### 8.2.6.1: Environment Variables Template
|
|
257
|
+
|
|
258
|
+
**Copy `.env.example` template to project root:**
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# Copy from .ai-flow/templates/.env.example.template to .env.example
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Template content (adapt based on framework and database):**
|
|
265
|
+
|
|
266
|
+
```env
|
|
267
|
+
# Database
|
|
268
|
+
DATABASE_URL="postgresql://postgres:password@localhost:5432/{{PROJECT_NAME}}_dev?schema=public"
|
|
269
|
+
|
|
270
|
+
# JWT Authentication
|
|
271
|
+
JWT_SECRET="your-secret-key-here-change-in-production"
|
|
272
|
+
JWT_EXPIRES_IN="24h"
|
|
273
|
+
|
|
274
|
+
# Application
|
|
275
|
+
NODE_ENV="development"
|
|
276
|
+
PORT=3000
|
|
277
|
+
API_PREFIX="/api"
|
|
278
|
+
|
|
279
|
+
# CORS
|
|
280
|
+
CORS_ORIGIN="http://localhost:3000"
|
|
281
|
+
|
|
282
|
+
# Redis (if using)
|
|
283
|
+
REDIS_HOST="localhost"
|
|
284
|
+
REDIS_PORT=6379
|
|
285
|
+
|
|
286
|
+
# Email (if using)
|
|
287
|
+
SMTP_HOST=""
|
|
288
|
+
SMTP_PORT=587
|
|
289
|
+
SMTP_USER=""
|
|
290
|
+
SMTP_PASS=""
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**User must copy to `.env` manually:**
|
|
294
|
+
|
|
295
|
+
```
|
|
296
|
+
📝 Created .env.example template
|
|
297
|
+
⚠️ User must copy to .env and configure: cp .env.example .env
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### 8.2.6.2: Docker Compose (Optional)
|
|
301
|
+
|
|
302
|
+
**Only if user selected Docker in Phase 7.**
|
|
303
|
+
|
|
304
|
+
**Copy appropriate docker-compose template based on database:**
|
|
305
|
+
|
|
306
|
+
**PostgreSQL:**
|
|
307
|
+
|
|
308
|
+
```yaml
|
|
309
|
+
# Copy from templates/docker-compose/postgres.template.yml
|
|
310
|
+
version: "3.8"
|
|
311
|
+
|
|
312
|
+
services:
|
|
313
|
+
postgres:
|
|
314
|
+
image: postgres:15-alpine
|
|
315
|
+
restart: unless-stopped
|
|
316
|
+
environment:
|
|
317
|
+
POSTGRES_DB: ${DB_NAME:-myapp_dev}
|
|
318
|
+
POSTGRES_USER: ${DB_USER:-postgres}
|
|
319
|
+
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
|
|
320
|
+
ports:
|
|
321
|
+
- "${DB_PORT:-5432}:5432"
|
|
322
|
+
volumes:
|
|
323
|
+
- postgres_data:/var/lib/postgresql/data
|
|
324
|
+
healthcheck:
|
|
325
|
+
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
326
|
+
interval: 10s
|
|
327
|
+
timeout: 5s
|
|
328
|
+
retries: 5
|
|
329
|
+
|
|
330
|
+
volumes:
|
|
331
|
+
postgres_data:
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
**MySQL:**
|
|
335
|
+
|
|
336
|
+
```yaml
|
|
337
|
+
# Copy from templates/docker-compose/mysql.template.yml
|
|
338
|
+
version: "3.8"
|
|
339
|
+
|
|
340
|
+
services:
|
|
341
|
+
mysql:
|
|
342
|
+
image: mysql:8-oracle
|
|
343
|
+
restart: unless-stopped
|
|
344
|
+
environment:
|
|
345
|
+
MYSQL_DATABASE: ${DB_NAME:-myapp_dev}
|
|
346
|
+
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-password}
|
|
347
|
+
ports:
|
|
348
|
+
- "${DB_PORT:-3306}:3306"
|
|
349
|
+
volumes:
|
|
350
|
+
- mysql_data:/var/lib/mysql
|
|
351
|
+
|
|
352
|
+
volumes:
|
|
353
|
+
mysql_data:
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**MongoDB:**
|
|
357
|
+
|
|
358
|
+
```yaml
|
|
359
|
+
# Copy from templates/docker-compose/mongodb.template.yml
|
|
360
|
+
version: "3.8"
|
|
361
|
+
|
|
362
|
+
services:
|
|
363
|
+
mongodb:
|
|
364
|
+
image: mongo:7
|
|
365
|
+
restart: unless-stopped
|
|
366
|
+
environment:
|
|
367
|
+
MONGO_INITDB_DATABASE: ${DB_NAME:-myapp_dev}
|
|
368
|
+
MONGO_INITDB_ROOT_USERNAME: ${DB_USER:-root}
|
|
369
|
+
MONGO_INITDB_ROOT_PASSWORD: ${DB_PASSWORD:-password}
|
|
370
|
+
ports:
|
|
371
|
+
- "${DB_PORT:-27017}:27017"
|
|
372
|
+
volumes:
|
|
373
|
+
- mongodb_data:/data/db
|
|
374
|
+
|
|
375
|
+
volumes:
|
|
376
|
+
mongodb_data:
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### 8.2.6.3: ORM Setup (If Framework Doesn't Include)
|
|
380
|
+
|
|
381
|
+
**Only for frameworks that don't auto-configure ORM:**
|
|
382
|
+
|
|
383
|
+
**NestJS + Prisma:**
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
npx prisma init
|
|
387
|
+
# Creates prisma/schema.prisma automatically with DATABASE_URL from .env
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
**Express + Prisma:**
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
npm install prisma @prisma/client
|
|
394
|
+
npx prisma init
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
**FastAPI + SQLAlchemy:**
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
# SQLAlchemy setup (create app/core/database.py)
|
|
401
|
+
# Follow FastAPI documentation: https://fastapi.tiangolo.com/tutorial/sql-databases/
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
**Django:**
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
# ORM already configured by django-admin startproject
|
|
408
|
+
# Just configure DATABASE settings in config/settings/base.py
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
**Result:**
|
|
412
|
+
|
|
413
|
+
```
|
|
414
|
+
✅ ORM initialized
|
|
415
|
+
✅ schema.prisma created (or equivalent)
|
|
416
|
+
✅ Migrations ready to run
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### 8.2.6.4: Starter Files for Express/FastAPI (Optional)
|
|
420
|
+
|
|
421
|
+
**Only if user needs a basic starting point. Otherwise, skip and let them follow official docs.**
|
|
422
|
+
|
|
423
|
+
**Express:**
|
|
424
|
+
|
|
425
|
+
- Create `src/app.ts` with basic Express setup (middleware, health endpoint)
|
|
426
|
+
- Reference: https://expressjs.com/en/starter/hello-world.html
|
|
427
|
+
|
|
428
|
+
**FastAPI:**
|
|
429
|
+
|
|
430
|
+
- Create `app/main.py` with basic FastAPI setup (CORS, health endpoint)
|
|
431
|
+
- Reference: https://fastapi.tiangolo.com/tutorial/first-steps/
|
|
432
|
+
|
|
433
|
+
**Docker Compose (if needed):**
|
|
434
|
+
|
|
435
|
+
- Reference official Docker Hub documentation:
|
|
436
|
+
- PostgreSQL: https://hub.docker.com/_/postgres
|
|
437
|
+
- MySQL: https://hub.docker.com/_/mysql
|
|
438
|
+
- MongoDB: https://hub.docker.com/_/mongo
|
|
439
|
+
|
|
440
|
+
### 8.2.6.5: Final Summary
|
|
441
|
+
|
|
442
|
+
```
|
|
443
|
+
✅ Minimal enhancements complete!
|
|
444
|
+
|
|
445
|
+
Files created (2-3 max):
|
|
446
|
+
✅ .env.example (environment template)
|
|
447
|
+
✅ docker-compose.yml (if Docker selected)
|
|
448
|
+
✅ prisma/schema.prisma (if Prisma ORM)
|
|
449
|
+
|
|
450
|
+
🎯 Total: 2-3 files (vs 40-60 files in old approach)
|
|
451
|
+
📚 For Express/FastAPI starter code, refer to official documentation
|
|
452
|
+
|
|
453
|
+
Next steps:
|
|
454
|
+
1. Copy .env.example to .env and configure
|
|
455
|
+
2. Start database: docker-compose up -d (if applicable)
|
|
456
|
+
3. Run migrations: npm run db:migrate or equivalent
|
|
457
|
+
4. Start dev server: npm run start:dev or equivalent
|
|
458
|
+
5. Create features with /feature command
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
**CRITICAL RULES:**
|
|
462
|
+
|
|
463
|
+
- ❌ **DO NOT** create entity modules (User, Product, Order, etc.)
|
|
464
|
+
- ❌ **DO NOT** create controllers/routes for business logic
|
|
465
|
+
- ❌ **DO NOT** create authentication endpoints
|
|
466
|
+
- ❌ **DO NOT** create complete folder structures
|
|
467
|
+
- ❌ **DO NOT** install 40+ packages manually
|
|
468
|
+
- ✅ **ONLY** create .env.example, docker-compose (optional), ORM init
|
|
469
|
+
- ✅ **LET** framework CLI handle structure, configs, dependencies
|
|
470
|
+
- ✅ **REFER** to official docs for starter code when needed
|
|
471
|
+
|
|
215
472
|
---
|
|
216
473
|
|
|
217
474
|
## 8.3: Generate Final Documentation
|
|
@@ -511,7 +768,7 @@ The API will be available at `http://localhost:3000`
|
|
|
511
768
|
|
|
512
769
|
---
|
|
513
770
|
|
|
514
|
-
## 8.
|
|
771
|
+
## 8.7: Create Tool-Specific Configs
|
|
515
772
|
|
|
516
773
|
**Based on AI tool selection from Phase 3 (question 3.8):**
|
|
517
774
|
|
|
@@ -623,7 +880,7 @@ Generate all three files above.
|
|
|
623
880
|
|
|
624
881
|
---
|
|
625
882
|
|
|
626
|
-
## 8.
|
|
883
|
+
## 8.8: Final Validation & Success Message
|
|
627
884
|
|
|
628
885
|
```
|
|
629
886
|
🔍 Validating all generated files...
|
|
@@ -908,4 +1165,3 @@ Happy coding! 🚀
|
|
|
908
1165
|
|
|
909
1166
|
**SUCCESS:** Project fully documented and ready for development! 🚀
|
|
910
1167
|
```
|
|
911
|
-
|