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.
Files changed (40) hide show
  1. package/README.md +60 -35
  2. package/dist/cli.js +201 -232
  3. package/dist/cli.js.map +1 -1
  4. package/dist/fs-utils.js +3 -39
  5. package/dist/fs-utils.js.map +1 -1
  6. package/package.json +11 -12
  7. package/prompts/backend/{flow-docs-gen-phase-7.md → flow-bootstrap-phase-7.md} +41 -108
  8. package/prompts/backend/flow-bootstrap-phase-8.md +911 -0
  9. package/prompts/backend/{flow-project-roadmap.md → flow-bootstrap-phase-9.md} +255 -344
  10. package/prompts/backend/{flow-docs-gen.md → flow-bootstrap.md} +102 -37
  11. package/prompts/frontend/{flow-docs-gen-phase-0.md → flow-bootstrap-phase-0.md} +2 -1
  12. package/prompts/frontend/{flow-docs-gen-phase-1.md → flow-bootstrap-phase-1.md} +2 -1
  13. package/prompts/frontend/{flow-docs-gen-phase-3.md → flow-bootstrap-phase-3.md} +2 -1
  14. package/prompts/frontend/{flow-docs-gen-phase-4.md → flow-bootstrap-phase-4.md} +2 -1
  15. package/prompts/frontend/{flow-docs-gen-phase-5.md → flow-bootstrap-phase-5.md} +2 -1
  16. package/prompts/frontend/{flow-docs-gen-phase-6.md → flow-bootstrap-phase-6.md} +2 -1
  17. package/prompts/frontend/{flow-docs-gen-phase-7.md → flow-bootstrap-phase-7.md} +225 -200
  18. package/prompts/frontend/flow-bootstrap-phase-8.md +670 -0
  19. package/prompts/frontend/{flow-docs-gen.md → flow-bootstrap.md} +47 -20
  20. package/prompts/frontend/flow-docs-sync.md +2 -1
  21. package/prompts/mobile/{flow-docs-gen-phase-0.md → flow-bootstrap-phase-0.md} +2 -1
  22. package/prompts/mobile/{flow-docs-gen-phase-1.md → flow-bootstrap-phase-1.md} +2 -1
  23. package/prompts/mobile/{flow-docs-gen-phase-2.md → flow-bootstrap-phase-2.md} +2 -1
  24. package/prompts/mobile/{flow-docs-gen-phase-3.md → flow-bootstrap-phase-3.md} +2 -1
  25. package/prompts/mobile/{flow-docs-gen-phase-4.md → flow-bootstrap-phase-4.md} +2 -1
  26. package/prompts/mobile/{flow-docs-gen-phase-5.md → flow-bootstrap-phase-5.md} +2 -1
  27. package/prompts/mobile/{flow-docs-gen-phase-6.md → flow-bootstrap-phase-6.md} +2 -1
  28. package/prompts/mobile/{flow-docs-gen-phase-7.md → flow-bootstrap-phase-7.md} +174 -132
  29. package/prompts/mobile/flow-bootstrap-phase-8.md +676 -0
  30. package/prompts/mobile/{flow-docs-gen.md → flow-bootstrap.md} +47 -20
  31. package/prompts/mobile/flow-docs-sync.md +2 -1
  32. package/prompts/backend/flow-project-init.md +0 -248
  33. /package/prompts/backend/{flow-docs-gen-phase-0.md → flow-bootstrap-phase-0.md} +0 -0
  34. /package/prompts/backend/{flow-docs-gen-phase-1.md → flow-bootstrap-phase-1.md} +0 -0
  35. /package/prompts/backend/{flow-docs-gen-phase-2.md → flow-bootstrap-phase-2.md} +0 -0
  36. /package/prompts/backend/{flow-docs-gen-phase-3.md → flow-bootstrap-phase-3.md} +0 -0
  37. /package/prompts/backend/{flow-docs-gen-phase-4.md → flow-bootstrap-phase-4.md} +0 -0
  38. /package/prompts/backend/{flow-docs-gen-phase-5.md → flow-bootstrap-phase-5.md} +0 -0
  39. /package/prompts/backend/{flow-docs-gen-phase-6.md → flow-bootstrap-phase-6.md} +0 -0
  40. /package/prompts/frontend/{flow-docs-gen-phase-2.md → flow-bootstrap-phase-2.md} +0 -0
@@ -301,21 +301,22 @@ This documentation is **modularized** for better maintainability and performance
301
301
 
302
302
  Execute phases sequentially by reading each file in order:
303
303
 
304
- 1. **Phase 0 (Optional - Existing Projects Only):** Read `.ai-flow/prompts/backend/flow-docs-gen-phase-0-context.md`
305
- 2. **Phase 1 (Discovery & Business):** Read `.ai-flow/prompts/backend/flow-docs-gen-phase-1-business.md`
306
- 3. **Phase 2 (Data Architecture):** Read `.ai-flow/prompts/backend/flow-docs-gen-phase-2-data.md`
307
- 4. **Phase 3 (System Architecture):** Read `.ai-flow/prompts/backend/flow-docs-gen-phase-3-architecture.md`
308
- 5. **Phase 4 (Security & Authentication):** Read `.ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md`
309
- 6. **Phase 5 (Code Standards):** Read `.ai-flow/prompts/backend/flow-docs-gen-phase-5-standards.md`
310
- 7. **Phase 6 (Testing Strategy):** Read `.ai-flow/prompts/backend/flow-docs-gen-phase-6-testing.md`
311
- 8. **Phase 7 (Operations & Deployment):** Read `.ai-flow/prompts/backend/flow-docs-gen-phase-7-operations.md`
304
+ 1. **Phase 0 (Optional - Existing Projects Only):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-0-context.md`
305
+ 2. **Phase 1 (Discovery & Business):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-1-business.md`
306
+ 3. **Phase 2 (Data Architecture):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-2-data.md`
307
+ 4. **Phase 3 (System Architecture):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-3-architecture.md`
308
+ 5. **Phase 4 (Security & Authentication):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md`
309
+ 6. **Phase 5 (Code Standards):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-5-standards.md`
310
+ 7. **Phase 6 (Testing Strategy):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-6-testing.md`
311
+ 8. **Phase 7 (Operations & Deployment):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-7-operations.md`
312
+ 9. **Phase 8 (Project Setup & Final Documentation):** Read `.ai-flow/prompts/backend/flow-bootstrap-phase-8.md`
312
313
 
313
314
  ### For Individual Phases
314
315
 
315
316
  You can execute any phase independently by reading its file. For example:
316
317
 
317
318
  ```
318
- Read .ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md and execute only Phase 4
319
+ Read .ai-flow/prompts/backend/flow-bootstrap-phase-4-security.md and execute only Phase 4
319
320
  ```
320
321
 
321
322
  ---
@@ -324,7 +325,7 @@ Read .ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md and execute only
324
325
 
325
326
  ### Phase 0: Context Discovery (Optional)
326
327
 
327
- **File:** `backend/flow-docs-gen-phase-0-context.md`
328
+ **File:** `backend/flow-bootstrap-phase-0-context.md`
328
329
  **For:** Existing projects with code/documentation
329
330
  **Duration:** 1-5 minutes (automated analysis)
330
331
  **Output:** Pre-populated answers, project analysis
@@ -344,7 +345,7 @@ Read .ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md and execute only
344
345
 
345
346
  ### Phase 1: Discovery & Business
346
347
 
347
- **File:** `backend/flow-docs-gen-phase-1-business.md`
348
+ **File:** `backend/flow-bootstrap-phase-1-business.md`
348
349
  **Duration:** 15-20 minutes
349
350
  **Key Questions:**
350
351
 
@@ -362,7 +363,7 @@ Read .ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md and execute only
362
363
 
363
364
  ### Phase 2: Data Architecture
364
365
 
365
- **File:** `backend/flow-docs-gen-phase-2-data.md`
366
+ **File:** `backend/flow-bootstrap-phase-2-data.md`
366
367
  **Duration:** 15-20 minutes
367
368
  **Key Questions:**
368
369
 
@@ -380,7 +381,7 @@ Read .ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md and execute only
380
381
 
381
382
  ### Phase 3: System Architecture
382
383
 
383
- **File:** `backend/flow-docs-gen-phase-3-architecture.md`
384
+ **File:** `backend/flow-bootstrap-phase-3-architecture.md`
384
385
  **Duration:** 15-20 minutes
385
386
  **Key Questions:**
386
387
 
@@ -400,7 +401,7 @@ Read .ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md and execute only
400
401
 
401
402
  ### Phase 4: Security & Authentication
402
403
 
403
- **File:** `backend/flow-docs-gen-phase-4-security.md`
404
+ **File:** `backend/flow-bootstrap-phase-4-security.md`
404
405
  **Duration:** 15-20 minutes
405
406
  **Key Questions:**
406
407
 
@@ -418,7 +419,7 @@ Read .ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md and execute only
418
419
 
419
420
  ### Phase 5: Code Standards
420
421
 
421
- **File:** `backend/flow-docs-gen-phase-5-standards.md`
422
+ **File:** `backend/flow-bootstrap-phase-5-standards.md`
422
423
  **Duration:** 15-20 minutes
423
424
  **Key Questions:**
424
425
 
@@ -436,7 +437,7 @@ Read .ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md and execute only
436
437
 
437
438
  ### Phase 6: Testing Strategy
438
439
 
439
- **File:** `backend/flow-docs-gen-phase-6-testing.md`
440
+ **File:** `backend/flow-bootstrap-phase-6-testing.md`
440
441
  **Duration:** 15-25 minutes
441
442
  **Key Questions:**
442
443
 
@@ -454,7 +455,7 @@ Read .ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md and execute only
454
455
 
455
456
  ### Phase 7: Operations & Deployment
456
457
 
457
- **File:** `backend/flow-docs-gen-phase-7-operations.md`
458
+ **File:** `backend/flow-bootstrap-phase-7-operations.md`
458
459
  **Duration:** 10 minutes
459
460
  **Key Questions:**
460
461
 
@@ -468,7 +469,63 @@ Read .ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md and execute only
468
469
  - `docs/operations.md`
469
470
  - `specs/configuration.md`
470
471
  - `.env.example`
471
- - Final `AGENT.md`, `.clauderules`, `README.md`, `docs/contributing.md`
472
+
473
+ **Next:** Transitions to Phase 8 for project setup and final documentation
474
+
475
+ ---
476
+
477
+ ### Phase 8: Project Setup & Final Documentation
478
+
479
+ **File:** `backend/flow-bootstrap-phase-8.md`
480
+ **Duration:** 10-15 minutes
481
+ **Key Steps:**
482
+
483
+ - Detect project state (new vs existing)
484
+ - Initialize framework (optional, for new projects)
485
+ - Generate final documentation
486
+ - Create master index (AGENT.md)
487
+ - Generate README.md with intelligent merge
488
+
489
+ **Generates:**
490
+
491
+ - `docs/business-flows.md`
492
+ - `docs/api.md`
493
+ - `docs/contributing.md`
494
+ - `AGENT.md` (master index)
495
+ - `README.md`
496
+ - Tool-specific configs (`.clauderules`, `.cursorrules`, `.github/copilot-instructions.md`)
497
+
498
+ **Next:** Offers optional Phase 9 for implementation roadmap generation
499
+
500
+ ---
501
+
502
+ ### Phase 9: Implementation Roadmap (Optional)
503
+
504
+ **File:** `backend/flow-bootstrap-phase-9.md`
505
+ **Duration:** 15-30 minutes
506
+ **Key Steps:**
507
+
508
+ - Analyze all generated documentation
509
+ - Define Epics by domain
510
+ - Break down Features with Story Points (Fibonacci scale)
511
+ - Generate dependency graph and execution order
512
+ - Identify parallelization opportunities
513
+ - Create production readiness checklist
514
+
515
+ **Generates:**
516
+
517
+ - `.ai-flow/roadmap.md` (complete implementation plan)
518
+
519
+ **Output includes:**
520
+
521
+ - Epics organized by priority
522
+ - Features with Story Point estimations
523
+ - Task breakdown with acceptance criteria
524
+ - Ready-to-execute `/feature` commands
525
+ - Dependency graph (Mermaid)
526
+ - Time estimates (1 dev, 2 devs, 3 devs)
527
+
528
+ **Skip if:** You prefer to start coding immediately without a detailed roadmap
472
529
 
473
530
  ---
474
531
 
@@ -486,7 +543,7 @@ Read .ai-flow/prompts/backend/flow-docs-gen-phase-4-security.md and execute only
486
543
  **Command:**
487
544
 
488
545
  ```
489
- Read .ai-flow/prompts/backend/flow-docs-gen-phase-1-business.md and execute Phase 1
546
+ Read .ai-flow/prompts/backend/flow-bootstrap-phase-1-business.md and execute Phase 1
490
547
  ```
491
548
 
492
549
  ---
@@ -508,7 +565,7 @@ Read .ai-flow/prompts/backend/flow-docs-gen-phase-1-business.md and execute Phas
508
565
  **Command:**
509
566
 
510
567
  ```
511
- Read .ai-flow/prompts/backend/flow-docs-gen-phase-0-context.md and execute Phase 0
568
+ Read .ai-flow/prompts/backend/flow-bootstrap-phase-0-context.md and execute Phase 0
512
569
  ```
513
570
 
514
571
  ---
@@ -644,8 +701,8 @@ As your project evolves, your documentation may become out of sync with your cod
644
701
  2. **Then:**
645
702
  - 🆕 **New Project + Mode A:** Execute all phases sequentially, ask all questions
646
703
  - 🆕 **New Project + Mode B:** Ask 6 critical questions, auto-suggest the rest, show summary
647
- - 📁 **Existing Project + Mode A:** Read `flow-docs-gen-phase-0-context.md` first, then proceed with all phases
648
- - 📁 **Existing Project + Mode B:** Read `flow-docs-gen-phase-0-context.md` first, then ask remaining critical questions
704
+ - 📁 **Existing Project + Mode A:** Read `flow-bootstrap-phase-0-context.md` first, then proceed with all phases
705
+ - 📁 **Existing Project + Mode B:** Read `flow-bootstrap-phase-0-context.md` first, then ask remaining critical questions
649
706
  - 🔄 **Update Docs:** Use `/flow-docs-sync` command
650
707
 
651
708
  ---
@@ -760,7 +817,7 @@ git add .ai-flow/
760
817
  # Create initial commit with documentation metadata
761
818
  git commit -m "docs: initial project documentation
762
819
 
763
- Generated by AI Flow /flow-docs-gen command:
820
+ Generated by AI Flow /flow-bootstrap command:
764
821
  - 17 documentation files (backend)
765
822
  - Architecture: {{ARCHITECTURE_PATTERN}}
766
823
  - Tech stack: {{FRAMEWORK}}, {{DATABASE}}, {{ORM}}
@@ -777,24 +834,28 @@ Commit hash: {{COMMIT_HASH}}
777
834
  Files tracked: 17 documentation files
778
835
 
779
836
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
780
- 🎯 Next Step: Initialize Project
837
+ 🎯 Next Step: Initialize Project & Optional Roadmap
781
838
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
782
839
 
783
- Your documentation is ready! Now let's initialize your project with the selected framework.
840
+ Your documentation is ready! Now let's initialize your project.
841
+
842
+ Continue with Phase 8?
784
843
 
785
- Continue with project initialization?
844
+ A) Yes, continue to Phase 8 (recommended) - 10-15 min
845
+ → Initialize project + Generate final docs
846
+ → Then option to continue to Phase 9 (roadmap)
786
847
 
787
- A) ✅ Yes, initialize now (recommended) - 5-10 min
788
848
  B) No, I'll review documentation first
789
849
 
790
850
  Your choice (A): __
791
851
  ```
792
852
 
793
- **If choice A:** Execute the content of `/flow-project-init` automatically
853
+ **If choice A:** Automatically transitions to Phase 8
794
854
 
795
- - Read `.ai-flow/templates/ai-instructions.md` to detect framework
796
- - Run framework initialization command in current directory
797
- - Display success message with generated files
855
+ - Phase 8 will detect project state and offer framework initialization
856
+ - Generates final documentation (business-flows, api, contributing)
857
+ - Creates AGENT.md and README.md
858
+ - Sets up AI tool configs
798
859
 
799
860
  **If choice B:** Show manual workflow:
800
861
 
@@ -802,19 +863,23 @@ Your choice (A): __
802
863
  **Manual Workflow (resume anytime):**
803
864
 
804
865
  1. Review documentation in .ai-flow/templates/
805
- 2. When ready, run: /flow-project-init (5-10 min)
806
- Initializes project with framework CLI
807
- 3. Then run: /flow-project-roadmap (15-30 min)
808
- Generates implementation plan with Story Points
866
+ 2. When ready, run Phase 8:
867
+ Read .ai-flow/prompts/backend/flow-bootstrap-phase-8.md
868
+ Detects project state, initializes framework (optional), generates final docs
869
+ 3. (Optional) Continue to Phase 9: Implementation Roadmap (15-30 min)
870
+ → Generates complete implementation plan with Story Points
871
+ → Includes Epics, Features, Tasks, and execution order
809
872
  4. Start implementing: /feature <feature-name>
810
873
  → Implements features following your architecture
811
874
 
812
- 💡 Tip: All commands are independent and re-executable.
875
+ 💡 Tip: All phases are independent and re-executable.
813
876
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
814
877
  ```
815
878
 
816
879
  ---
817
880
 
881
+ _Version: 4.0 (Phase 9 integrated - Implementation Roadmap with Story Points)_
818
882
  _Last Updated: 2025-12-09_
819
- _Version: 2.2 (Integrated flow-project-init automation + renamed from project-scaffold)_
883
+ _Version: 3.0 (Unified workflow: Phase 8 integrates project setup + final docs generation)_
820
884
  _AI Flow - Transform your idea into production-ready code in minutes_
885
+
@@ -483,7 +483,7 @@ After Phase 0 completes:
483
483
 
484
484
  Next: Proceed to Phase 1 (Discovery & UX)
485
485
 
486
- Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-1-discovery.md
486
+ Read: .ai-flow/prompts/frontend/flow-bootstrap-phase-1-discovery.md
487
487
  ```
488
488
 
489
489
  ---
@@ -492,3 +492,4 @@ Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-1-discovery.md
492
492
 
493
493
  **Version:** 1.2.0
494
494
 
495
+
@@ -438,7 +438,7 @@ Documents Generated:
438
438
 
439
439
  Next: Phase 2 - Components & Framework
440
440
 
441
- Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-2-components.md
441
+ Read: .ai-flow/prompts/frontend/flow-bootstrap-phase-2-components.md
442
442
  ```
443
443
 
444
444
  ---
@@ -447,3 +447,4 @@ Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-2-components.md
447
447
 
448
448
  **Version:** 1.2.0
449
449
 
450
+
@@ -674,7 +674,7 @@ Documents Generated:
674
674
 
675
675
  Next: Phase 4 - Styling & Design
676
676
 
677
- Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-4-styling.md
677
+ Read: .ai-flow/prompts/frontend/flow-bootstrap-phase-4-styling.md
678
678
  ```
679
679
 
680
680
  ---
@@ -683,3 +683,4 @@ Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-4-styling.md
683
683
 
684
684
  **Version:** 1.2.0
685
685
 
686
+
@@ -469,7 +469,7 @@ Documents Generated:
469
469
 
470
470
  Next: Phase 5 - Code Standards
471
471
 
472
- Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-5-standards.md
472
+ Read: .ai-flow/prompts/frontend/flow-bootstrap-phase-5-standards.md
473
473
  ```
474
474
 
475
475
  ---
@@ -478,3 +478,4 @@ Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-5-standards.md
478
478
 
479
479
  **Version:** 1.2.0
480
480
 
481
+
@@ -472,7 +472,7 @@ Documents Generated:
472
472
 
473
473
  Next: Phase 6 - Testing Strategy
474
474
 
475
- Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-6-testing.md
475
+ Read: .ai-flow/prompts/frontend/flow-bootstrap-phase-6-testing.md
476
476
  ```
477
477
 
478
478
  ---
@@ -481,3 +481,4 @@ Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-6-testing.md
481
481
 
482
482
  **Version:** 1.2.0
483
483
 
484
+
@@ -559,7 +559,7 @@ Documents Generated:
559
559
 
560
560
  Next: Phase 7 - Performance & Deployment
561
561
 
562
- Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-7-deployment.md
562
+ Read: .ai-flow/prompts/frontend/flow-bootstrap-phase-7-deployment.md
563
563
  ```
564
564
 
565
565
  ---
@@ -568,3 +568,4 @@ Read: .ai-flow/prompts/frontend/flow-docs-gen-phase-7-deployment.md
568
568
 
569
569
  **Version:** 1.2.0
570
570
 
571
+