appiq-solution 1.3.3 → 1.4.3

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 (295) hide show
  1. package/#Tools/APPIQ-METHOD/.bmad-config.json +13 -0
  2. package/#Tools/APPIQ-METHOD/.cursor/commands/analyze.md +27 -0
  3. package/#Tools/APPIQ-METHOD/.cursor/commands/appiq.md +27 -0
  4. package/#Tools/APPIQ-METHOD/.cursor/commands/help.md +27 -0
  5. package/#Tools/APPIQ-METHOD/.cursor/commands/story.md +27 -0
  6. package/#Tools/APPIQ-METHOD/CHANGELOG.md +119 -173
  7. package/#Tools/APPIQ-METHOD/DEVELOPMENT_GUIDE.md +855 -0
  8. package/#Tools/APPIQ-METHOD/NPM-README.md +138 -0
  9. package/#Tools/APPIQ-METHOD/SMART_WORKFLOW_GUIDE.md +401 -0
  10. package/#Tools/APPIQ-METHOD/activate-appiq.js +81 -0
  11. package/#Tools/APPIQ-METHOD/appiq-solution/README.md +226 -0
  12. package/#Tools/APPIQ-METHOD/bmad-core/agent-teams/team-flutter-mobile.yaml +114 -0
  13. package/#Tools/APPIQ-METHOD/bmad-core/agent-teams/team-fullstack.yaml +11 -1
  14. package/#Tools/APPIQ-METHOD/bmad-core/agents/analyst.md +7 -3
  15. package/#Tools/APPIQ-METHOD/bmad-core/agents/architect.md +6 -0
  16. package/#Tools/APPIQ-METHOD/bmad-core/agents/bmad-orchestrator.md +0 -84
  17. package/#Tools/APPIQ-METHOD/bmad-core/agents/bmad-smart-launcher.md +170 -0
  18. package/#Tools/APPIQ-METHOD/bmad-core/agents/dev.md +31 -12
  19. package/#Tools/APPIQ-METHOD/bmad-core/agents/pm.md +10 -4
  20. package/#Tools/APPIQ-METHOD/bmad-core/agents/qa.md +17 -0
  21. package/#Tools/APPIQ-METHOD/bmad-core/agents/sm.md +8 -3
  22. package/#Tools/APPIQ-METHOD/bmad-core/agents/ux-expert.md +8 -3
  23. package/#Tools/APPIQ-METHOD/bmad-core/bmad-core/user-guide.md +0 -0
  24. package/#Tools/APPIQ-METHOD/bmad-core/checklists/security-validation-checklist.md +332 -0
  25. package/#Tools/APPIQ-METHOD/bmad-core/data/backend-services-integration.md +686 -0
  26. package/#Tools/APPIQ-METHOD/bmad-core/data/shadcn-ui-integration.md +388 -0
  27. package/#Tools/APPIQ-METHOD/bmad-core/data/technical-preferences.md +147 -1
  28. package/#Tools/APPIQ-METHOD/bmad-core/enhanced-ide-development-workflow.md +43 -0
  29. package/#Tools/APPIQ-METHOD/bmad-core/tasks/create-flutter-story.md +197 -0
  30. package/#Tools/APPIQ-METHOD/bmad-core/tasks/intelligent-epic-creation.md +234 -0
  31. package/#Tools/APPIQ-METHOD/bmad-core/tasks/smart-project-analysis.md +289 -0
  32. package/#Tools/APPIQ-METHOD/bmad-core/templates/flutter-mobile-prd-tmpl.yaml +330 -0
  33. package/#Tools/APPIQ-METHOD/bmad-core/templates/flutter-story-tmpl.yaml +376 -0
  34. package/#Tools/APPIQ-METHOD/bmad-core/templates/flutter-ui-spec-tmpl.yaml +415 -0
  35. package/#Tools/APPIQ-METHOD/bmad-core/templates/fullstack-architecture-tmpl.yaml +12 -5
  36. package/#Tools/APPIQ-METHOD/bmad-core/user-guide.md +10 -9
  37. package/#Tools/APPIQ-METHOD/bmad-core/workflows/brownfield-fullstack.yaml +15 -1
  38. package/#Tools/APPIQ-METHOD/bmad-core/workflows/greenfield-fullstack.yaml +49 -5
  39. package/#Tools/APPIQ-METHOD/bmad-core/working-in-the-brownfield.md +56 -44
  40. package/#Tools/APPIQ-METHOD/commands/README.md +28 -0
  41. package/#Tools/APPIQ-METHOD/commands/analyze.md +27 -0
  42. package/#Tools/APPIQ-METHOD/commands/appiq.md +27 -0
  43. package/#Tools/APPIQ-METHOD/commands/help.md +27 -0
  44. package/#Tools/APPIQ-METHOD/commands/story.md +27 -0
  45. package/#Tools/APPIQ-METHOD/dist/agents/bmad-orchestrator.txt +0 -111
  46. package/#Tools/APPIQ-METHOD/dist/agents/pm.txt +2 -0
  47. package/#Tools/APPIQ-METHOD/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +0 -111
  48. package/#Tools/APPIQ-METHOD/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +0 -111
  49. package/#Tools/APPIQ-METHOD/dist/teams/team-all.txt +2 -111
  50. package/#Tools/APPIQ-METHOD/dist/teams/team-fullstack.txt +2 -111
  51. package/#Tools/APPIQ-METHOD/dist/teams/team-ide-minimal.txt +0 -111
  52. package/#Tools/APPIQ-METHOD/dist/teams/team-no-ui.txt +2 -111
  53. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +1 -1
  54. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-2d-unity-game-dev/config.yaml +1 -1
  55. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-flutter-mobile-dev/agent-teams/flutter-mobile-team.yaml +23 -0
  56. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-flutter-mobile-dev/agents/flutter-cubit-agent.md +133 -0
  57. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-flutter-mobile-dev/agents/flutter-data-agent.md +160 -0
  58. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-flutter-mobile-dev/agents/flutter-domain-agent.md +153 -0
  59. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-flutter-mobile-dev/agents/flutter-ui-agent.md +122 -0
  60. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-flutter-mobile-dev/agents/shared-components-agent.md +161 -0
  61. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-flutter-mobile-dev/checklists/flutter-story-dod-checklist.md +194 -0
  62. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-flutter-mobile-dev/config.yaml +41 -0
  63. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-flutter-mobile-dev/data/flutter-development-guidelines.md +551 -0
  64. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-flutter-mobile-dev/templates/flutter-mobile-architecture-tmpl.yaml +530 -0
  65. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-flutter-mobile-dev/workflows/flutter-ui-first-development.yaml +220 -0
  66. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-infrastructure-devops/config.yaml +1 -1
  67. package/#Tools/APPIQ-METHOD/install-appiq.sh +41 -0
  68. package/#Tools/APPIQ-METHOD/package-lock.json +631 -0
  69. package/#Tools/APPIQ-METHOD/package.json +20 -69
  70. package/#Tools/APPIQ-METHOD/tasks/todo.md +275 -0
  71. package/#Tools/APPIQ-METHOD/tools/appiq-installer.js +2714 -0
  72. package/#Tools/APPIQ-METHOD/tools/bmad-npx-wrapper.js +5 -7
  73. package/#Tools/APPIQ-METHOD/tools/cli.js +3 -3
  74. package/#Tools/APPIQ-METHOD/tools/epic-solution-installer.js +538 -0
  75. package/#Tools/APPIQ-METHOD/tools/flattener/main.js +570 -0
  76. package/#Tools/APPIQ-METHOD/tools/installer/bin/bmad.js +15 -14
  77. package/#Tools/APPIQ-METHOD/tools/installer/lib/installer.js +28 -2
  78. package/#Tools/APPIQ-METHOD/tools/installer/package-lock.json +906 -0
  79. package/#Tools/APPIQ-METHOD/tools/installer/package.json +1 -1
  80. package/#Tools/APPIQ-METHOD/tools/setup-ide-commands.js +345 -0
  81. package/#Tools/APPIQ-METHOD/tools/smart-installer.js +589 -0
  82. package/package.json +20 -69
  83. package/tools/appiq-installer.js +2714 -0
  84. package/tools/bmad-npx-wrapper.js +5 -7
  85. package/tools/cli.js +3 -3
  86. package/tools/epic-solution-installer.js +538 -0
  87. package/tools/flattener/main.js +570 -0
  88. package/tools/installer/bin/bmad.js +15 -14
  89. package/tools/installer/lib/installer.js +28 -2
  90. package/tools/installer/package-lock.json +89 -89
  91. package/tools/installer/package.json +1 -1
  92. package/tools/setup-ide-commands.js +345 -0
  93. package/tools/smart-installer.js +589 -0
  94. package/#Tools/APPIQ-METHOD/appiq_start.md +0 -232
  95. package/#Tools/APPIQ-METHOD/deployment/DEPLOYMENT_GUIDE.md +0 -426
  96. package/#Tools/APPIQ-METHOD/deployment/GITHUB_RELEASE_GUIDE.md +0 -326
  97. package/#Tools/APPIQ-METHOD/deployment/README.md +0 -331
  98. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agent-teams/team-all.yaml +0 -14
  99. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agent-teams/team-fullstack.yaml +0 -18
  100. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agent-teams/team-ide-minimal.yaml +0 -10
  101. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agent-teams/team-no-ui.yaml +0 -13
  102. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agents/analyst.md +0 -81
  103. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agents/architect.md +0 -84
  104. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agents/bmad-master.md +0 -108
  105. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agents/bmad-orchestrator.md +0 -234
  106. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agents/dev.md +0 -76
  107. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agents/pm.md +0 -79
  108. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agents/po.md +0 -76
  109. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agents/qa.md +0 -69
  110. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agents/sm.md +0 -62
  111. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/agents/ux-expert.md +0 -66
  112. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/checklists/architect-checklist.md +0 -443
  113. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/checklists/change-checklist.md +0 -182
  114. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/checklists/pm-checklist.md +0 -375
  115. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/checklists/po-master-checklist.md +0 -441
  116. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/checklists/story-dod-checklist.md +0 -101
  117. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/checklists/story-draft-checklist.md +0 -156
  118. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/data/bmad-kb.md +0 -803
  119. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/data/brainstorming-techniques.md +0 -36
  120. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/data/elicitation-methods.md +0 -134
  121. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/data/technical-preferences.md +0 -3
  122. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/advanced-elicitation.md +0 -117
  123. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/brownfield-create-epic.md +0 -160
  124. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/brownfield-create-story.md +0 -147
  125. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/correct-course.md +0 -70
  126. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/create-brownfield-story.md +0 -304
  127. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/create-deep-research-prompt.md +0 -289
  128. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/create-next-story.md +0 -112
  129. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/document-project.md +0 -341
  130. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/facilitate-brainstorming-session.md +0 -136
  131. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/generate-ai-frontend-prompt.md +0 -51
  132. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/index-docs.md +0 -179
  133. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/kb-mode-interaction.md +0 -75
  134. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/review-story.md +0 -145
  135. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/shard-doc.md +0 -187
  136. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/tasks/validate-next-story.md +0 -134
  137. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/architecture-tmpl.yaml +0 -650
  138. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/brainstorming-output-tmpl.yaml +0 -156
  139. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/brownfield-architecture-tmpl.yaml +0 -476
  140. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/brownfield-prd-tmpl.yaml +0 -280
  141. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/competitor-analysis-tmpl.yaml +0 -293
  142. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/front-end-architecture-tmpl.yaml +0 -206
  143. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/front-end-spec-tmpl.yaml +0 -349
  144. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/fullstack-architecture-tmpl.yaml +0 -805
  145. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/market-research-tmpl.yaml +0 -252
  146. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/prd-tmpl.yaml +0 -202
  147. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/project-brief-tmpl.yaml +0 -221
  148. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/templates/story-tmpl.yaml +0 -137
  149. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/user-guide.md +0 -250
  150. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/workflows/brownfield-fullstack.yaml +0 -297
  151. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/workflows/brownfield-service.yaml +0 -187
  152. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/workflows/brownfield-ui.yaml +0 -197
  153. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/workflows/greenfield-fullstack.yaml +0 -240
  154. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/workflows/greenfield-service.yaml +0 -206
  155. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/workflows/greenfield-ui.yaml +0 -235
  156. package/#Tools/APPIQ-METHOD/deployment/build/bmad-core/working-in-the-brownfield.md +0 -361
  157. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/README.md +0 -3
  158. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/agent-teams/phaser-2d-nodejs-game-team.yaml +0 -13
  159. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.md +0 -71
  160. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +0 -78
  161. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +0 -64
  162. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/checklists/game-design-checklist.md +0 -201
  163. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/checklists/game-story-dod-checklist.md +0 -160
  164. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +0 -8
  165. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/data/bmad-kb.md +0 -254
  166. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +0 -651
  167. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/tasks/advanced-elicitation.md +0 -111
  168. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/tasks/create-game-story.md +0 -216
  169. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/tasks/game-design-brainstorming.md +0 -308
  170. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +0 -613
  171. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +0 -356
  172. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +0 -343
  173. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +0 -253
  174. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +0 -484
  175. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-dev-greenfield.yaml +0 -183
  176. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-prototype.yaml +0 -175
  177. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/agent-teams/unity-2d-game-team.yaml +0 -14
  178. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.md +0 -80
  179. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.md +0 -77
  180. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.md +0 -78
  181. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.md +0 -65
  182. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/checklists/game-architect-checklist.md +0 -396
  183. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/checklists/game-change-checklist.md +0 -203
  184. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/checklists/game-design-checklist.md +0 -201
  185. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/checklists/game-story-dod-checklist.md +0 -132
  186. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/config.yaml +0 -6
  187. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/data/bmad-kb.md +0 -776
  188. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/data/development-guidelines.md +0 -590
  189. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/tasks/advanced-elicitation.md +0 -111
  190. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/tasks/correct-course-game.md +0 -151
  191. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/tasks/create-game-story.md +0 -184
  192. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/tasks/game-design-brainstorming.md +0 -308
  193. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/tasks/validate-game-story.md +0 -200
  194. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/templates/game-architecture-tmpl.yaml +0 -1030
  195. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/templates/game-brief-tmpl.yaml +0 -356
  196. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/templates/game-design-doc-tmpl.yaml +0 -705
  197. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml +0 -256
  198. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/templates/level-design-doc-tmpl.yaml +0 -484
  199. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/workflows/game-dev-greenfield.yaml +0 -183
  200. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-2d-unity-game-dev/workflows/game-prototype.yaml +0 -175
  201. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-infrastructure-devops/README.md +0 -147
  202. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.md +0 -71
  203. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-infrastructure-devops/checklists/infrastructure-checklist.md +0 -484
  204. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-infrastructure-devops/config.yaml +0 -9
  205. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-infrastructure-devops/data/bmad-kb.md +0 -308
  206. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-infrastructure-devops/tasks/review-infrastructure.md +0 -160
  207. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-infrastructure-devops/tasks/validate-infrastructure.md +0 -154
  208. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +0 -424
  209. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +0 -629
  210. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/agent-teams/mobile-team-cross-platform.yaml +0 -22
  211. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/agent-teams/mobile-team-flutter.yaml +0 -20
  212. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/agent-teams/mobile-team-minimal.yaml +0 -13
  213. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/agent-teams/mobile-team-react-native.yaml +0 -20
  214. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/agents/mobile-analytics.md +0 -1487
  215. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/agents/mobile-architect.md +0 -279
  216. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/agents/mobile-developer.md +0 -649
  217. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/agents/mobile-pm.md +0 -339
  218. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/agents/mobile-qa.md +0 -622
  219. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/agents/mobile-security.md +0 -1027
  220. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/agents/mobile-ux-expert.md +0 -1451
  221. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/checklists/mobile-development-checklist.md +0 -490
  222. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/config.yaml +0 -54
  223. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/data/bmad-kb.md +0 -292
  224. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/data/flutter-development-guidelines.md +0 -483
  225. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/tasks/existing-app-analysis.md +0 -645
  226. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/tasks/platform-selection.md +0 -489
  227. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/templates/mobile-architecture-tmpl.yaml +0 -437
  228. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/templates/mobile-prd-tmpl.yaml +0 -408
  229. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/workflows/mobile-app-development-init.yaml +0 -555
  230. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/workflows/mobile-brownfield-flutter.yaml +0 -336
  231. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/workflows/mobile-brownfield-react-native.yaml +0 -345
  232. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/workflows/mobile-greenfield-flutter.yaml +0 -281
  233. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/workflows/mobile-greenfield-react-native.yaml +0 -283
  234. package/#Tools/APPIQ-METHOD/deployment/build/expansion-packs/bmad-mobile-app-dev/workflows/mobile-platform-selection.yaml +0 -404
  235. package/#Tools/APPIQ-METHOD/deployment/build/slash-commands/appiq.md +0 -273
  236. package/#Tools/APPIQ-METHOD/deployment/build/slash-commands/ide-integrations/claude-appiq.md +0 -294
  237. package/#Tools/APPIQ-METHOD/deployment/build/slash-commands/ide-integrations/cursor-appiq.md +0 -516
  238. package/#Tools/APPIQ-METHOD/deployment/build/slash-commands/ide-integrations/universal-appiq.md +0 -448
  239. package/#Tools/APPIQ-METHOD/deployment/build/slash-commands/ide-integrations/windsurf-appiq.md +0 -698
  240. package/#Tools/APPIQ-METHOD/deployment/build/slash-commands/start.md +0 -211
  241. package/#Tools/APPIQ-METHOD/deployment/build-release.sh +0 -449
  242. package/#Tools/APPIQ-METHOD/deployment/create-release.sh +0 -196
  243. package/#Tools/APPIQ-METHOD/deployment/dist/appiq_installer.sh +0 -678
  244. package/#Tools/APPIQ-METHOD/deployment/docs/main_prd.md +0 -36
  245. package/#Tools/APPIQ-METHOD/deployment/init_appiq.sh +0 -805
  246. package/#Tools/APPIQ-METHOD/deployment/init_appiq_v2.sh +0 -678
  247. package/#Tools/APPIQ-METHOD/deployment/installers/appiq-global.sh +0 -91
  248. package/#Tools/APPIQ-METHOD/deployment/installers/claude-integration.sh +0 -281
  249. package/#Tools/APPIQ-METHOD/deployment/installers/cursor-integration.sh +0 -257
  250. package/#Tools/APPIQ-METHOD/deployment/installers/terminal-integration.sh +0 -645
  251. package/#Tools/APPIQ-METHOD/deployment/installers/windsurf-integration.sh +0 -350
  252. package/#Tools/APPIQ-METHOD/deployment/package-v2.sh +0 -97
  253. package/#Tools/APPIQ-METHOD/deployment/package.sh +0 -363
  254. package/#Tools/APPIQ-METHOD/deployment/quick-install.sh +0 -57
  255. package/#Tools/APPIQ-METHOD/dist/expansion-packs/bmad-mobile-app-dev/agents/mobile-analytics.txt +0 -1530
  256. package/#Tools/APPIQ-METHOD/dist/expansion-packs/bmad-mobile-app-dev/agents/mobile-architect.txt +0 -322
  257. package/#Tools/APPIQ-METHOD/dist/expansion-packs/bmad-mobile-app-dev/agents/mobile-developer.txt +0 -692
  258. package/#Tools/APPIQ-METHOD/dist/expansion-packs/bmad-mobile-app-dev/agents/mobile-pm.txt +0 -382
  259. package/#Tools/APPIQ-METHOD/dist/expansion-packs/bmad-mobile-app-dev/agents/mobile-qa.txt +0 -665
  260. package/#Tools/APPIQ-METHOD/dist/expansion-packs/bmad-mobile-app-dev/agents/mobile-security.txt +0 -1070
  261. package/#Tools/APPIQ-METHOD/dist/expansion-packs/bmad-mobile-app-dev/agents/mobile-ux-expert.txt +0 -1494
  262. package/#Tools/APPIQ-METHOD/dist/expansion-packs/bmad-mobile-app-dev/teams/mobile-team-cross-platform.txt +0 -15613
  263. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/agent-teams/mobile-team-cross-platform.yaml +0 -22
  264. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/agent-teams/mobile-team-flutter.yaml +0 -20
  265. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/agent-teams/mobile-team-minimal.yaml +0 -13
  266. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/agent-teams/mobile-team-react-native.yaml +0 -20
  267. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/agents/mobile-analytics.md +0 -1487
  268. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/agents/mobile-architect.md +0 -279
  269. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/agents/mobile-developer.md +0 -649
  270. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/agents/mobile-pm.md +0 -339
  271. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/agents/mobile-qa.md +0 -622
  272. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/agents/mobile-security.md +0 -1027
  273. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/agents/mobile-ux-expert.md +0 -1451
  274. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/checklists/mobile-development-checklist.md +0 -490
  275. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/config.yaml +0 -54
  276. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/data/bmad-kb.md +0 -292
  277. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/data/flutter-development-guidelines.md +0 -483
  278. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/tasks/existing-app-analysis.md +0 -645
  279. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/tasks/platform-selection.md +0 -489
  280. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/templates/mobile-architecture-tmpl.yaml +0 -437
  281. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/templates/mobile-prd-tmpl.yaml +0 -408
  282. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/workflows/mobile-app-development-init.yaml +0 -555
  283. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/workflows/mobile-brownfield-flutter.yaml +0 -336
  284. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/workflows/mobile-brownfield-react-native.yaml +0 -345
  285. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/workflows/mobile-greenfield-flutter.yaml +0 -281
  286. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/workflows/mobile-greenfield-react-native.yaml +0 -283
  287. package/#Tools/APPIQ-METHOD/expansion-packs/bmad-mobile-app-dev/workflows/mobile-platform-selection.yaml +0 -404
  288. package/#Tools/APPIQ-METHOD/package-bmad-backup.json +0 -78
  289. package/#Tools/APPIQ-METHOD/slash-commands/appiq.md +0 -273
  290. package/#Tools/APPIQ-METHOD/slash-commands/ide-integrations/claude-appiq.md +0 -294
  291. package/#Tools/APPIQ-METHOD/slash-commands/ide-integrations/cursor-appiq.md +0 -516
  292. package/#Tools/APPIQ-METHOD/slash-commands/ide-integrations/universal-appiq.md +0 -448
  293. package/#Tools/APPIQ-METHOD/slash-commands/ide-integrations/windsurf-appiq.md +0 -698
  294. package/#Tools/APPIQ-METHOD/slash-commands/start.md +0 -211
  295. /package/#Tools/APPIQ-METHOD/{deployment/build/bmad-core/core-config.yaml → bmad-core/core-config.yaml.bak} +0 -0
@@ -0,0 +1,2714 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Appiq Solution Smart Installer
5
+ *
6
+ * Super einfache Installation mit One-Click Workflows
7
+ * Usage: npx appiq-solution install
8
+ *
9
+ * Built with ❤️ based on the amazing Bmad-Method
10
+ * Credits: https://github.com/Viktor-Hermann/APPIQ-METHOD
11
+ */
12
+
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+ const inquirer = require('inquirer');
16
+ const chalk = require('chalk');
17
+
18
+ const MCP_SERVERS = {
19
+ // 🌍 GLOBAL SERVERS
20
+ "sequential-thinking": {
21
+ name: "Sequential Thinking",
22
+ description: "Structured thinking for complex problem solving",
23
+ command: "npx",
24
+ args: ["-y", "@modelcontextprotocol/server-sequential-thinking"],
25
+ tags: ['all', 'planning', 'architect', 'pm']
26
+ },
27
+ "puppeteer": {
28
+ name: "Puppeteer MCP Server",
29
+ description: "Browser automation and web scraping",
30
+ command: "npx",
31
+ args: ["-y", "puppeteer-mcp-server"],
32
+ tags: ['web', 'qa', 'automation']
33
+ },
34
+ "claude-continuity": {
35
+ name: "Claude Thread Continuity",
36
+ description: "Enhanced thread continuity for Claude",
37
+ command: "python3",
38
+ args: ["~/.mcp-servers/claude-continuity/server.py"],
39
+ tags: ['all', 'ide-enhancement']
40
+ },
41
+
42
+ // 📁 LOCAL SERVERS
43
+ "extended-memory": {
44
+ name: "Extended Memory MCP",
45
+ description: "Enhanced memory capabilities for AI assistants",
46
+ command: "python3",
47
+ args: ["-m", "extended_memory_mcp.server"],
48
+ env: { "LOG_LEVEL": "INFO" },
49
+ tags: ['all', 'ide-enhancement']
50
+ },
51
+ "@21st-dev/magic": {
52
+ name: "21st.dev Magic MCP",
53
+ description: "UI builder for MCP - like v0 but in your IDE",
54
+ command: "npx",
55
+ args: ["-y", "@21st-dev/magic@latest"],
56
+ tags: ['web', 'flutter', 'ui', 'ux-expert', 'flutter-ui-agent']
57
+ },
58
+ "dart": {
59
+ name: "Dart MCP Server",
60
+ description: "Dart SDK integration for Flutter/Dart projects",
61
+ command: "dart",
62
+ args: ["mcp-server", "--force-roots-fallback"],
63
+ tags: ['flutter', 'flutter-ui-agent', 'flutter-cubit-agent', 'flutter-data-agent']
64
+ },
65
+ "firebase": {
66
+ name: "Firebase MCP Server",
67
+ description: "Firebase services - Auth, Firestore, Functions",
68
+ command: "npx",
69
+ args: ["-y", "firebase-tools@latest", "experimental:mcp"],
70
+ tags: ['backend', 'fullstack', 'flutter', 'web', 'dev']
71
+ },
72
+ "supabase": {
73
+ name: "Supabase MCP Server",
74
+ description: "Supabase integration - database, auth, storage",
75
+ command: "npx",
76
+ args: ["-y", "@supabase/mcp-server-supabase@latest", "--read-only"],
77
+ tags: ['backend', 'fullstack', 'flutter', 'web', 'dev']
78
+ },
79
+ "context7": {
80
+ name: "Context7 MCP (Upstash)",
81
+ description: "Up-to-date code documentation for any library",
82
+ command: "npx",
83
+ args: ["-y", "@upstash/context7-mcp"],
84
+ tags: ['all', 'research', 'dev', 'architect']
85
+ },
86
+ "stripe": {
87
+ name: "Stripe MCP Server",
88
+ description: "Stripe payment integration",
89
+ command: "npx",
90
+ args: ["-y", "@stripe/mcp", "--tools=all"],
91
+ tags: ['backend', 'fullstack', 'web', 'payment', 'dev']
92
+ }
93
+ };
94
+
95
+ class AppiqSolutionInstaller {
96
+ constructor() {
97
+ this.projectRoot = process.cwd();
98
+ this.appiqPath = path.join(this.projectRoot, "appiq-solution");
99
+ this.config = {
100
+ version: "1.0.0",
101
+ projectType: null, // 'greenfield' or 'brownfield'
102
+ techStack: {
103
+ platform: null, // 'flutter', 'web', 'fullstack', 'api'
104
+ isFlutter: false,
105
+ hasUI: false,
106
+ database: null,
107
+ libraries: [],
108
+ },
109
+ selectedIDEs: [],
110
+ projectName: null,
111
+ projectIdea: null,
112
+ targetUsers: null,
113
+ projectPlan: null,
114
+ planApproved: false,
115
+
116
+ };
117
+ }
118
+
119
+ async install() {
120
+ console.log(chalk.bold.cyan("🚀 Appiq Solution Smart Installer v1.0.0"));
121
+ console.log(chalk.cyan("============================================"));
122
+ console.log(chalk.dim("Built with ❤️ based on Bmad-Method"));
123
+ console.log(chalk.dim("https://github.com/Viktor-Hermann/APPIQ-METHOD\n"));
124
+
125
+ try {
126
+ // Phase 1: Project Type Detection
127
+ await this.detectProjectType();
128
+
129
+ // Phase 1.5: Tech Stack Detection (Flutter, Web, etc.)
130
+ await this.detectTechStack();
131
+
132
+ // Phase 2: Project idea collection (only for greenfield projects)
133
+ if (this.config.projectType === "greenfield") {
134
+ await this.collectProjectIdea();
135
+ } else {
136
+ // For brownfield projects: auto-set project name from directory
137
+ await this.generateBrownfieldProjectConfig();
138
+ }
139
+
140
+ // Phase 3: IDE Selection (MULTISELECT)
141
+ await this.selectIDE();
142
+
143
+
144
+
145
+ // Phase 5: Create project plan
146
+ await this.createProjectPlan();
147
+
148
+ // Phase 6: Plan Approval
149
+ await this.approvePlan();
150
+
151
+ // Phase 7: Installation
152
+ await this.performInstallation();
153
+
154
+
155
+
156
+ // Phase 9: BMAD Core Configuration Setup
157
+ await this.setupBMADCoreConfig();
158
+
159
+ // Phase 10: Document Templates & Dependencies
160
+ await this.setupDocumentTemplates();
161
+
162
+ // Phase 11: Agent Dependencies System (+ Flutter Agents & MCPs)
163
+ await this.setupAgentDependencies();
164
+
165
+ // Phase 12: BMAD Orchestration (Full Flow)
166
+ await this.setupBMADOrchestration();
167
+
168
+ // Phase 13: One-Click Setup
169
+ await this.setupOneClickWorkflows();
170
+
171
+ // Phase 14: Simple Instructions
172
+ await this.showSimpleInstructions();
173
+ } catch (error) {
174
+ console.error(chalk.red("❌ Installation failed:"), error.message);
175
+ process.exit(1);
176
+ }
177
+ }
178
+
179
+ async detectProjectType() {
180
+ console.log(chalk.yellow("🔍 Project Analysis..."));
181
+
182
+ // Auto-Detection
183
+ const hasPackageJson = fs.existsSync(
184
+ path.join(this.projectRoot, "package.json")
185
+ );
186
+ const hasPubspec = fs.existsSync(
187
+ path.join(this.projectRoot, "pubspec.yaml")
188
+ );
189
+ const hasExistingCode = this.hasExistingSourceCode();
190
+ const hasDocumentation = this.hasExistingDocumentation();
191
+
192
+ let suggestedType = "greenfield";
193
+ let reason = "New project detected";
194
+
195
+ if (hasExistingCode || hasDocumentation) {
196
+ suggestedType = "brownfield";
197
+ reason = "Existing code/documentation found";
198
+ }
199
+
200
+ console.log(chalk.gray(`💡 Analysis: ${reason}`));
201
+ console.log(
202
+ chalk.gray(
203
+ `📊 Recommendation: ${
204
+ suggestedType === "greenfield"
205
+ ? "Greenfield (New Project)"
206
+ : "Brownfield (Existing Project)"
207
+ }`
208
+ )
209
+ );
210
+
211
+ // User Confirmation
212
+ const { projectType } = await inquirer.prompt([
213
+ {
214
+ type: "list",
215
+ name: "projectType",
216
+ message: "🎯 What type of project is this?",
217
+ choices: [
218
+ {
219
+ name: `✨ Greenfield - New project (Recommended: ${
220
+ suggestedType === "greenfield" ? "✅" : "❌"
221
+ })`,
222
+ value: "greenfield",
223
+ short: "Greenfield",
224
+ },
225
+ {
226
+ name: `🔧 Brownfield - Enhance existing project (Recommended: ${
227
+ suggestedType === "brownfield" ? "✅" : "❌"
228
+ })`,
229
+ value: "brownfield",
230
+ short: "Brownfield",
231
+ },
232
+ ],
233
+ default: suggestedType,
234
+ },
235
+ ]);
236
+
237
+ this.config.projectType = projectType;
238
+ console.log(
239
+ chalk.green(
240
+ `✅ Project Type: ${
241
+ projectType === "greenfield"
242
+ ? "Greenfield (New)"
243
+ : "Brownfield (Existing)"
244
+ }\n`
245
+ )
246
+ );
247
+ }
248
+
249
+ async selectIDE() {
250
+ console.log(chalk.yellow("🛠️ IDE Selection"));
251
+ console.log(
252
+ chalk.bold.yellow.bgRed(
253
+ " ⚠️ MULTISELECT: Use SPACEBAR to select multiple IDEs! "
254
+ )
255
+ );
256
+ console.log(chalk.gray("Select ALL IDEs that you use:\n"));
257
+
258
+ const { ides } = await inquirer.prompt([
259
+ {
260
+ type: "checkbox",
261
+ name: "ides",
262
+ message:
263
+ "🎯 Which IDEs do you use? (SPACEBAR = select, ENTER = confirm)",
264
+ choices: [
265
+ { name: "🔵 Cursor", value: "cursor" },
266
+ { name: "🟣 Claude Code CLI", value: "claude-code" },
267
+ { name: "🟢 Windsurf", value: "windsurf" },
268
+ { name: "🔶 VS Code + Cline", value: "cline" },
269
+ { name: "🟠 Trae", value: "trae" },
270
+ { name: "🔴 Roo Code", value: "roo" },
271
+ { name: "🟪 Gemini CLI", value: "gemini" },
272
+ { name: "⚫ GitHub Copilot", value: "github-copilot" },
273
+ ],
274
+ validate: (input) => {
275
+ if (input.length === 0) {
276
+ return "Please select at least one IDE!";
277
+ }
278
+ return true;
279
+ },
280
+ },
281
+ ]);
282
+
283
+ this.config.selectedIDEs = ides;
284
+ const ideNames = ides.map((ide) => this.getIDEName(ide)).join(", ");
285
+ console.log(chalk.green(`✅ IDEs: ${ideNames}\n`));
286
+ }
287
+
288
+
289
+
290
+ async detectTechStack() {
291
+ console.log(chalk.yellow("🔍 Tech Stack Detection"));
292
+ console.log(chalk.gray("Analyzing project environment and tech stack...\n"));
293
+
294
+ // Check for Flutter
295
+ const isFlutter = fs.existsSync(
296
+ path.join(this.projectRoot, "pubspec.yaml")
297
+ );
298
+
299
+ // Check for existing web frameworks
300
+ const hasPackageJson = fs.existsSync(
301
+ path.join(this.projectRoot, "package.json")
302
+ );
303
+ let webFramework = null;
304
+
305
+ if (hasPackageJson) {
306
+ try {
307
+ const packageJson = JSON.parse(
308
+ fs.readFileSync(path.join(this.projectRoot, "package.json"), "utf8")
309
+ );
310
+ if (packageJson.dependencies) {
311
+ const deps = Object.keys(packageJson.dependencies);
312
+ if (deps.includes("next")) webFramework = "next.js";
313
+ else if (deps.includes("react")) webFramework = "react";
314
+ else if (deps.includes("vue")) webFramework = "vue";
315
+ else if (deps.includes("@nuxt/core")) webFramework = "nuxt.js";
316
+ else if (deps.includes("@angular/core")) webFramework = "angular";
317
+ }
318
+ } catch (e) {
319
+ // ignore package.json parsing errors
320
+ }
321
+ }
322
+
323
+ // Auto-detect or ask user
324
+ if (isFlutter) {
325
+ console.log(chalk.green("✅ Flutter project detected!"));
326
+ this.config.techStack.platform = "flutter";
327
+ this.config.techStack.isFlutter = true;
328
+ this.config.techStack.hasUI = true;
329
+ console.log(chalk.cyan(" → Dart MCP Server will be configured"));
330
+ console.log(
331
+ chalk.cyan(" → Flutter Clean Architecture Agents will be loaded\n")
332
+ );
333
+ } else if (webFramework) {
334
+ console.log(chalk.green(`✅ ${webFramework} project detected!`));
335
+ this.config.techStack.platform = "web";
336
+ this.config.techStack.hasUI = true;
337
+ console.log(
338
+ chalk.cyan(" → shadcn/ui + v0.dev integration will be configured\n")
339
+ );
340
+ } else {
341
+ // Ask user for platform
342
+ const { platform } = await inquirer.prompt([
343
+ {
344
+ type: "list",
345
+ name: "platform",
346
+ message: "🎯 Which tech stack are you using?",
347
+ choices: [
348
+ { name: "📱 Flutter Mobile App", value: "flutter" },
349
+ { name: "🌐 Web App (React/Next.js/Vue)", value: "web" },
350
+ { name: "🚀 Fullstack (Frontend + Backend)", value: "fullstack" },
351
+ { name: "⚡ API/Backend Only", value: "api" },
352
+ { name: "🤷 Not sure yet", value: "unknown" },
353
+ ],
354
+ },
355
+ ]);
356
+
357
+ this.config.techStack.platform = platform;
358
+ this.config.techStack.isFlutter = platform === "flutter";
359
+ this.config.techStack.hasUI = ["flutter", "web", "fullstack"].includes(
360
+ platform
361
+ );
362
+
363
+ if (platform === "flutter") {
364
+ console.log(chalk.cyan(" → Dart MCP Server will be configured"));
365
+ console.log(
366
+ chalk.cyan(" → Flutter Clean Architecture Agents will be loaded")
367
+ );
368
+ } else if (platform === "web" || platform === "fullstack") {
369
+ console.log(
370
+ chalk.cyan(" → shadcn/ui + v0.dev integration will be configured")
371
+ );
372
+ }
373
+ console.log("");
374
+ }
375
+ }
376
+
377
+ async collectProjectIdea() {
378
+ console.log(chalk.yellow("💡 Collecting Project Information"));
379
+
380
+ // For brownfield projects, skip detailed project idea collection
381
+ if (this.config.projectType === "brownfield") {
382
+ console.log(
383
+ chalk.gray("📁 Detected existing project - using current directory\n")
384
+ );
385
+
386
+ const dirName = path.basename(this.projectRoot);
387
+ this.config.projectName = dirName;
388
+ this.config.projectIdea = `Brownfield project: ${dirName}`;
389
+ this.config.targetUsers = "Existing project users";
390
+
391
+ console.log(chalk.green(`✅ Project identified: "${dirName}"\n`));
392
+ return;
393
+ }
394
+
395
+ // For greenfield projects, collect detailed information
396
+ console.log(chalk.gray("Describe your project concept:\n"));
397
+
398
+ const { projectIdea, projectName, targetUsers } = await inquirer.prompt([
399
+ {
400
+ type: "input",
401
+ name: "projectName",
402
+ message: "🏷️ What should your project be called?",
403
+ validate: (input) =>
404
+ input.length > 0 ? true : "Please enter a project name!",
405
+ },
406
+ {
407
+ type: "editor",
408
+ name: "projectIdea",
409
+ message: "💡 Describe your project idea (detailed):",
410
+ validate: (input) =>
411
+ input.length > 10
412
+ ? true
413
+ : "Please describe your project in more detail!",
414
+ },
415
+ {
416
+ type: "input",
417
+ name: "targetUsers",
418
+ message: "👥 Who are your target groups/users?",
419
+ validate: (input) =>
420
+ input.length > 0 ? true : "Please describe your target audience!",
421
+ },
422
+ ]);
423
+
424
+ this.config.projectName = projectName;
425
+ this.config.projectIdea = projectIdea;
426
+ this.config.targetUsers = targetUsers;
427
+
428
+ console.log(chalk.green(`✅ Project idea captured: "${projectName}"\n`));
429
+ }
430
+
431
+ async generateBrownfieldProjectConfig() {
432
+ console.log(chalk.yellow("📋 Configuring brownfield project..."));
433
+
434
+ // Auto-set project name from directory name
435
+ const dirName = path.basename(this.projectRoot);
436
+ this.config.projectName = dirName;
437
+
438
+ console.log(chalk.cyan(`🏷️ Project name: ${dirName}`));
439
+ console.log(chalk.gray(" → Using directory name as project name"));
440
+
441
+ // Set default values for brownfield projects
442
+ this.config.projectIdea = `Enhancing existing ${dirName} project with AI agents`;
443
+ this.config.targetUsers = "Existing project stakeholders and development team";
444
+
445
+ // Auto-create docs/prd.md if it doesn't exist
446
+ const docsDir = path.join(this.projectRoot, "docs");
447
+ const prdPath = path.join(docsDir, "prd.md");
448
+
449
+ if (!fs.existsSync(prdPath)) {
450
+ if (!fs.existsSync(docsDir)) {
451
+ fs.mkdirSync(docsDir, { recursive: true });
452
+ }
453
+
454
+ const prdTemplate = this.config.techStack?.isFlutter ?
455
+ "flutter-mobile-prd-tmpl.yaml" : "prd-tmpl.yaml";
456
+
457
+ console.log(chalk.cyan("📄 Creating docs/prd.md automatically"));
458
+ console.log(chalk.gray(` → Using template: ${prdTemplate}`));
459
+
460
+ const prdContent = `# Product Requirements Document - ${dirName}
461
+
462
+ ## Project Overview
463
+ This is a brownfield project enhancement for ${dirName}.
464
+
465
+ **Note:** Please fill in your specific requirements, features, and objectives below.
466
+
467
+ ## Current State Analysis
468
+ - [ ] Document existing functionality
469
+ - [ ] Identify technical debt
470
+ - [ ] List current features
471
+ - [ ] Note architecture patterns
472
+
473
+ ## Enhancement Goals
474
+ - [ ] Define new features to add
475
+ - [ ] List improvements to make
476
+ - [ ] Specify performance goals
477
+ - [ ] Document user experience improvements
478
+
479
+ ## Technical Requirements
480
+ - [ ] Document current tech stack
481
+ - [ ] List required integrations
482
+ - [ ] Define API requirements
483
+ - [ ] Specify database changes
484
+
485
+ ## Next Steps
486
+ 1. Fill in the requirements above
487
+ 2. Run \`@architect\` to analyze current architecture
488
+ 3. Use \`@sm\` to create feature stories
489
+ 4. Start implementation with \`@dev\`
490
+ `;
491
+
492
+ fs.writeFileSync(prdPath, prdContent);
493
+ console.log(chalk.green("✅ docs/prd.md created successfully"));
494
+ } else {
495
+ console.log(chalk.cyan("📄 docs/prd.md already exists"));
496
+ }
497
+
498
+ console.log(chalk.green(`✅ Brownfield project configured: "${dirName}"\n`));
499
+ }
500
+
501
+ async createProjectPlan() {
502
+ console.log(chalk.yellow("📋 Creating project plan..."));
503
+ console.log(chalk.gray("Based on your idea and project type\n"));
504
+
505
+ // Normally team-fullstack.yaml would be used here
506
+ const plan = this.generateProjectPlan();
507
+ this.config.projectPlan = plan;
508
+
509
+ console.log(chalk.cyan("📋 Your Project Plan:"));
510
+ console.log(chalk.white("─".repeat(50)));
511
+ console.log(plan);
512
+ console.log(chalk.white("─".repeat(50) + "\n"));
513
+ }
514
+
515
+ async approvePlan() {
516
+ const { approved, changes } = await inquirer.prompt([
517
+ {
518
+ type: "confirm",
519
+ name: "approved",
520
+ message: "✅ Are you satisfied with this plan?",
521
+ default: true,
522
+ },
523
+ {
524
+ type: "input",
525
+ name: "changes",
526
+ message:
527
+ "📝 What changes would you like? (or ENTER for no changes)",
528
+ when: (answers) => !answers.approved,
529
+ },
530
+ ]);
531
+
532
+ if (!approved && changes) {
533
+ console.log(chalk.yellow("📝 Adapting plan..."));
534
+ this.config.planChanges = changes;
535
+ // Plan would be adapted here
536
+ console.log(chalk.green("✅ Plan has been adapted!\n"));
537
+ } else {
538
+ console.log(
539
+ chalk.green("✅ Plan approved - development can start!\n")
540
+ );
541
+ }
542
+
543
+ this.config.planApproved = true;
544
+ }
545
+
546
+ generateProjectPlan() {
547
+ const { projectType, projectName, projectIdea, targetUsers } = this.config;
548
+
549
+ return `🎯 PROJECT PLAN: ${projectName}
550
+
551
+ 📊 PROJECT TYPE: ${
552
+ projectType === "greenfield"
553
+ ? "Greenfield (New Project)"
554
+ : "Brownfield (Existing Project)"
555
+ }
556
+ 👥 TARGET AUDIENCE: ${targetUsers}
557
+
558
+ 💡 PROJECT IDEA:
559
+ ${projectIdea}
560
+
561
+ 🚀 DEVELOPMENT PIPELINE:
562
+ ${
563
+ projectType === "greenfield"
564
+ ? `
565
+ 1. 📋 PO (Product Owner) → Create PRD
566
+ 2. 🏗️ Architect → Design system architecture
567
+ 3. 🎨 UX Expert → UI/UX Design
568
+ 4. 📝 Story Master → Break down user stories
569
+ 5. 💻 Developer → Implement features
570
+ 6. ✅ QA Expert → Testing & validation
571
+ 7. 📊 SM (Scrum Master) → Sprint coordination
572
+ `
573
+ : `
574
+ 1. 📋 PO → Analyze existing documentation
575
+ 2. 🏗️ Architect → Architecture review
576
+ 3. 📝 Story Master → Plan new features
577
+ 4. 💻 Developer → Integrate features into existing base
578
+ 5. ✅ QA Expert → Regression testing
579
+ 6. 📊 SM → Change management
580
+ `
581
+ }
582
+
583
+ 🎮 ONE-CLICK COMMANDS:
584
+ - /start → Start entire workflow
585
+ - /plan → Detailed planning
586
+ - /develop → Begin development
587
+ - /review → Code review
588
+ - /deploy → Prepare deployment`;
589
+ }
590
+
591
+ async setupBMADCoreConfig() {
592
+ console.log(chalk.yellow("⚙️ Setting up BMAD Core Configuration..."));
593
+
594
+ // Create .bmad-core directory
595
+ const bmadCoreDir = path.join(this.appiqPath, ".bmad-core");
596
+ if (!fs.existsSync(bmadCoreDir)) {
597
+ fs.mkdirSync(bmadCoreDir, { recursive: true });
598
+ }
599
+
600
+ // Create core-config.yaml
601
+ const coreConfigPath = path.join(bmadCoreDir, "core-config.yaml");
602
+ fs.writeFileSync(coreConfigPath, this.generateCoreConfig());
603
+
604
+ // Create technical-preferences.md
605
+ const techPrefsPath = path.join(bmadCoreDir, "data");
606
+ if (!fs.existsSync(techPrefsPath)) {
607
+ fs.mkdirSync(techPrefsPath, { recursive: true });
608
+ }
609
+ fs.writeFileSync(
610
+ path.join(techPrefsPath, "technical-preferences.md"),
611
+ this.generateTechnicalPreferences()
612
+ );
613
+
614
+ console.log(chalk.green("✅ BMAD Core Configuration bereit!\n"));
615
+ }
616
+
617
+ async setupDocumentTemplates() {
618
+ console.log(chalk.yellow("📄 Document Templates & Struktur einrichten..."));
619
+
620
+ // Create docs directory structure
621
+ const docsDir = path.join(this.projectRoot, "docs");
622
+ const archDir = path.join(docsDir, "architecture");
623
+ const storiesDir = path.join(docsDir, "stories");
624
+
625
+ [docsDir, archDir, storiesDir].forEach((dir) => {
626
+ if (!fs.existsSync(dir)) {
627
+ fs.mkdirSync(dir, { recursive: true });
628
+ }
629
+ });
630
+
631
+ // Create templates
632
+ const templatesDir = path.join(this.appiqPath, "templates");
633
+ if (!fs.existsSync(templatesDir)) {
634
+ fs.mkdirSync(templatesDir, { recursive: true });
635
+ }
636
+
637
+ // PRD Template
638
+ fs.writeFileSync(
639
+ path.join(templatesDir, "prd-template.md"),
640
+ this.generatePRDTemplate()
641
+ );
642
+
643
+ // Architecture Template
644
+ fs.writeFileSync(
645
+ path.join(templatesDir, "architecture-template.md"),
646
+ this.generateArchitectureTemplate()
647
+ );
648
+
649
+ // Story Template
650
+ fs.writeFileSync(
651
+ path.join(templatesDir, "story-template.md"),
652
+ this.generateStoryTemplate()
653
+ );
654
+
655
+ // Create initial PRD if planning is complete
656
+ if (this.config.planApproved) {
657
+ fs.writeFileSync(path.join(docsDir, "prd.md"), this.generateInitialPRD());
658
+ }
659
+
660
+ console.log(chalk.green("✅ Document Templates created!\n"));
661
+ }
662
+
663
+ async setupAgentDependencies() {
664
+ console.log(chalk.yellow("🔗 Setting up Agent Dependencies System..."));
665
+
666
+ const agentsDir = path.join(this.appiqPath, "agents");
667
+ const tasksDir = path.join(this.appiqPath, "tasks");
668
+ const dataDir = path.join(this.appiqPath, "data");
669
+
670
+ // Create directories
671
+ [tasksDir, dataDir].forEach((dir) => {
672
+ if (!fs.existsSync(dir)) {
673
+ fs.mkdirSync(dir, { recursive: true });
674
+ }
675
+ });
676
+
677
+ // Create BMAD Knowledge Base
678
+ fs.writeFileSync(
679
+ path.join(dataDir, "bmad-kb.md"),
680
+ this.generateBMADKnowledgeBase()
681
+ );
682
+
683
+ // Create essential tasks
684
+ fs.writeFileSync(
685
+ path.join(tasksDir, "create-doc.md"),
686
+ this.generateCreateDocTask()
687
+ );
688
+ fs.writeFileSync(
689
+ path.join(tasksDir, "shard-doc.md"),
690
+ this.generateShardDocTask()
691
+ );
692
+ fs.writeFileSync(
693
+ path.join(tasksDir, "validate-story.md"),
694
+ this.generateValidateStoryTask()
695
+ );
696
+
697
+ // Add Flutter-specific agents if Flutter project
698
+ if (this.config.techStack.isFlutter) {
699
+ await this.addFlutterAgents();
700
+ }
701
+
702
+ // Update agents with proper dependencies
703
+ await this.updateAgentsWithDependencies();
704
+
705
+ console.log(chalk.green("✅ Agent Dependencies System bereit!\n"));
706
+ }
707
+
708
+ async setupBMADOrchestration() {
709
+ console.log(chalk.yellow("🎭 BMAD Full Orchestration einrichten..."));
710
+
711
+ // Create orchestration config based on BMAD Flow
712
+ const orchestrationConfig = {
713
+ planningPhase: {
714
+ agents: ["analyst", "pm", "ux-expert", "architect", "po"],
715
+ workflow:
716
+ this.config.projectType === "greenfield"
717
+ ? "greenfield-planning"
718
+ : "brownfield-planning",
719
+ },
720
+ developmentPhase: {
721
+ agents: ["sm", "po", "dev", "qa"],
722
+ workflow: "core-development-cycle",
723
+ },
724
+ transitions: {
725
+ planningToIDE: "document-sharding",
726
+ criticalCommitPoints: ["before-next-story", "after-qa-approval"],
727
+ },
728
+ };
729
+
730
+ // Generate BMAD Orchestration
731
+ const orchestrationPath = path.join(
732
+ this.appiqPath,
733
+ "bmad-orchestration.yaml"
734
+ );
735
+ fs.writeFileSync(
736
+ orchestrationPath,
737
+ this.generateBMADOrchestration(orchestrationConfig)
738
+ );
739
+
740
+ // Create workflow guides
741
+ const workflowsDir = path.join(this.appiqPath, "workflows");
742
+ if (!fs.existsSync(workflowsDir)) {
743
+ fs.mkdirSync(workflowsDir, { recursive: true });
744
+ }
745
+
746
+ fs.writeFileSync(
747
+ path.join(workflowsDir, "planning-workflow.md"),
748
+ this.generatePlanningWorkflow()
749
+ );
750
+ fs.writeFileSync(
751
+ path.join(workflowsDir, "development-cycle.md"),
752
+ this.generateDevelopmentCycle()
753
+ );
754
+ fs.writeFileSync(
755
+ path.join(workflowsDir, "document-sharding.md"),
756
+ this.generateDocumentSharding()
757
+ );
758
+
759
+ console.log(chalk.green("✅ BMAD Full Orchestration bereit!\n"));
760
+ }
761
+
762
+ generateCoreConfig() {
763
+ return `# BMAD Core Configuration
764
+ # Built with ❤️ based on Bmad-Method
765
+
766
+ project:
767
+ name: ${this.config.projectName || "Unbenanntes Projekt"}
768
+ type: ${this.config.projectType}
769
+ created: ${new Date().toISOString()}
770
+
771
+ # Files that dev agent should ALWAYS load into context
772
+ devLoadAlwaysFiles:
773
+ - docs/architecture/coding-standards.md
774
+ - docs/architecture/tech-stack.md
775
+ - docs/architecture/project-structure.md
776
+
777
+ # Document paths configuration
778
+ documentPaths:
779
+ prd: "docs/prd.md"
780
+ architecture: "docs/architecture.md"
781
+ stories: "docs/stories/"
782
+ templates: "appiq-solution/templates/"
783
+
784
+ # Agent dependencies configuration
785
+ dependencies:
786
+ templates:
787
+ - prd-template.md
788
+ - architecture-template.md
789
+ - story-template.md
790
+ tasks:
791
+ - create-doc.md
792
+ - shard-doc.md
793
+ - validate-story.md
794
+ data:
795
+ - bmad-kb.md
796
+ - technical-preferences.md
797
+ `;
798
+ }
799
+
800
+ generateTechnicalPreferences() {
801
+ return `# Technical Preferences
802
+
803
+ *Diese Datei hilft PM und Architect dabei, Ihre bevorzugten Design-Patterns und Technologien zu berücksichtigen.*
804
+
805
+ ## Projekt: ${this.config.projectName || "Unbenanntes Projekt"}
806
+ **Platform:** ${this.config.techStack.platform || "nicht definiert"}
807
+
808
+ ### Bevorzugte Technologien
809
+
810
+ ${
811
+ this.config.techStack.isFlutter
812
+ ? `
813
+ **📱 Flutter Mobile Development:**
814
+ - **Framework:** Flutter 3.35+ (beta), Dart 3.9+
815
+ - **Architecture:** Clean Architecture with Feature-based structure
816
+ - **State Management:** Cubit/BLoC pattern (preferred), Riverpod (alternative)
817
+ - **Dependency Injection:** GetIt + Injectable
818
+ - **Code Generation:** Freezed, Build Runner
819
+ - **Backend Integration:** Firebase, Supabase, REST APIs, GraphQL
820
+ - **Testing:** Unit Testing, Widget Testing, Integration Testing, Golden Tests
821
+
822
+ **🔌 Flutter MCP Integration:**
823
+ - **Dart MCP Server:** Automatisch konfiguriert für AI-Assistenten
824
+ - **Hot Reload:** Via MCP für Live-Development
825
+ - **Package Management:** pub.dev Integration via MCP
826
+ - **Error Analysis:** Automatische Fehlererkennung via MCP
827
+
828
+ **📦 Recommended Packages:**
829
+ - **UI:** Material 3, Cupertino (iOS-style)
830
+ - **Navigation:** go_router
831
+ - **HTTP:** dio
832
+ - **Local Storage:** shared_preferences, hive
833
+ - **Image:** cached_network_image
834
+ `
835
+ : ""
836
+ }
837
+
838
+ ${
839
+ this.config.techStack.platform === "web" ||
840
+ this.config.techStack.platform === "fullstack"
841
+ ? `
842
+ **🌐 Web Development:**
843
+ - **Framework:** React/Next.js, Vue/Nuxt, Angular
844
+ - **UI Library:** shadcn/ui (preferred), v0.dev components, Material-UI, Chakra UI
845
+ - **Styling:** Tailwind CSS, CSS-in-JS, SCSS
846
+ - **AI Design:** v0.dev für Rapid Prototyping
847
+
848
+ **🎨 shadcn/ui + v0.dev Integration:**
849
+ - **Design System:** shadcn/ui als Basis-Komponenten
850
+ - **AI-Generated Components:** v0.dev für schnelle UI-Erstellung
851
+ - **Customization:** Tailwind CSS für individuelle Anpassungen
852
+ - **Accessibility:** Radix-UI Primitives als Basis
853
+ `
854
+ : ""
855
+ }
856
+
857
+ ${
858
+ this.config.projectType === "greenfield" && !this.config.techStack.isFlutter
859
+ ? `
860
+ **Backend:**
861
+ - Runtime: Node.js, Python, Go
862
+ - Framework: Express, FastAPI, Gin
863
+ - Database: PostgreSQL, MongoDB, Redis
864
+
865
+ **DevOps:**
866
+ - Deployment: Vercel, Railway, AWS
867
+ - CI/CD: GitHub Actions, GitLab CI
868
+ - Monitoring: Sentry, LogRocket
869
+ `
870
+ : ""
871
+ }
872
+
873
+ ${
874
+ this.config.projectType === "brownfield"
875
+ ? `
876
+ **Bestehende Technologien erweitern:**
877
+ - Kompatibilität mit bestehender Code-Basis beachten
878
+ - Minimale neue Dependencies
879
+ - Schrittweise Migration wenn nötig
880
+ `
881
+ : ""
882
+ }
883
+
884
+ ### Design Patterns
885
+ ${
886
+ this.config.techStack.isFlutter
887
+ ? `
888
+ - **Clean Architecture** (Presentation → Domain → Data)
889
+ - **Feature-based Structure** (/features/auth, /features/dashboard)
890
+ - **Repository Pattern** für Datenaccess
891
+ - **Cubit Pattern** für State Management
892
+ - **SOLID Principles** anwenden
893
+ `
894
+ : `
895
+ - **Architektur:** Clean Architecture, Hexagonal, MVC
896
+ - **Code Style:** DRY, SOLID Principles, KISS
897
+ ${
898
+ this.config.techStack.hasUI
899
+ ? "- **Design System:** shadcn/ui für konsistente UI"
900
+ : ""
901
+ }
902
+ `
903
+ }
904
+
905
+ ### Testing & Quality
906
+ ${
907
+ this.config.techStack.isFlutter
908
+ ? `
909
+ - **Dart Analysis:** Very strict linting rules
910
+ - **Flutter Lints:** Official Flutter linting package
911
+ - **Testing:** Minimum 80% code coverage
912
+ - **Golden Tests:** UI consistency tests
913
+ - **Integration Tests:** End-to-end testing
914
+ `
915
+ : `
916
+ - **Testing:** TDD/BDD, Unit + Integration Tests
917
+ - **Documentation:** README-driven, Inline Comments
918
+ - **Code Quality:** ESLint + Prettier (wenn applicable)
919
+ ${
920
+ this.config.techStack.hasUI
921
+ ? "- **Component Testing:** Storybook für Component Documentation"
922
+ : ""
923
+ }
924
+ `
925
+ }
926
+
927
+ ### AI-Integration & MCP
928
+ ${
929
+ this.config.techStack.isFlutter
930
+ ? `
931
+ - **Dart MCP Server:** Für direkten AI-Zugriff auf Flutter Tools
932
+ - **Flutter DevTools:** MCP-basierte AI-Assistenz
933
+ - **Package Discovery:** AI-gestützte pub.dev Suche
934
+ - **Code Analysis:** Automatische Fehlererkennung und -behebung
935
+ `
936
+ : ""
937
+ }
938
+ ${
939
+ this.config.techStack.hasUI && !this.config.techStack.isFlutter
940
+ ? `
941
+ - **v0.dev Integration:** AI-generierte UI-Komponenten
942
+ - **shadcn/ui Library:** KI-optimierte Component Library
943
+ - **Design Tokens:** Konsistente AI-generierte Designs
944
+ `
945
+ : ""
946
+ }
947
+
948
+ ### Coding Standards
949
+ - **Naming:** ${
950
+ this.config.techStack.isFlutter
951
+ ? "lowerCamelCase für Variablen, PascalCase für Classes"
952
+ : "camelCase für Variablen, PascalCase für Components"
953
+ }
954
+ - **Files:** ${
955
+ this.config.techStack.isFlutter
956
+ ? "snake_case für Dart Dateien"
957
+ : "kebab-case für Dateien, PascalCase für Components"
958
+ }
959
+ - **Functions:** Kleine, fokussierte Funktionen (<50 Zeilen)
960
+ - **Comments:** Erkläre WARUM, nicht WAS
961
+
962
+ ### Präferenzen
963
+ - **Performance:** Optimierung vor Abstraktion
964
+ - **Security:** Security-by-Design
965
+ - **Accessibility:** ${
966
+ this.config.techStack.isFlutter
967
+ ? "Flutter Accessibility Widget support"
968
+ : "WCAG 2.1 AA Standard"
969
+ }
970
+ - **Mobile:** Mobile-First Approach
971
+
972
+ ---
973
+ *Platform: ${this.config.techStack.platform}*
974
+ *MCP Configured: ${
975
+ this.config.techStack.isFlutter ? "Dart MCP ✅" : "Standard"
976
+ }*
977
+ *Aktualisiert: ${new Date().toLocaleDateString("de-DE")}*
978
+ `;
979
+ }
980
+
981
+ generatePRDTemplate() {
982
+ return `# Product Requirements Document (PRD)
983
+
984
+ ## Projekt: [PROJECT_NAME]
985
+
986
+ ### 1. Problem Statement
987
+ *Welches Problem lösen wir?*
988
+
989
+ ### 2. Solution Overview
990
+ *Wie lösen wir das Problem?*
991
+
992
+ ### 3. Target Users
993
+ *Wer sind unsere Zielgruppen?*
994
+
995
+ ### 4. Functional Requirements (FRs)
996
+ *Was muss das System können?*
997
+
998
+ #### 4.1 Core Features
999
+ - [ ] Feature 1
1000
+ - [ ] Feature 2
1001
+
1002
+ #### 4.2 Advanced Features
1003
+ - [ ] Advanced Feature 1
1004
+ - [ ] Advanced Feature 2
1005
+
1006
+ ### 5. Non-Functional Requirements (NFRs)
1007
+ *Wie gut muss das System funktionieren?*
1008
+
1009
+ #### 5.1 Performance
1010
+ - Response Time: < 200ms
1011
+ - Throughput: [SPECIFY]
1012
+
1013
+ #### 5.2 Security
1014
+ - Authentication: [METHOD]
1015
+ - Authorization: [RBAC/ABAC]
1016
+
1017
+ #### 5.3 Scalability
1018
+ - Users: [NUMBER]
1019
+ - Data: [VOLUME]
1020
+
1021
+ ### 6. User Stories & Epics
1022
+
1023
+ #### Epic 1: [EPIC_NAME]
1024
+ - **Story 1.1:** Als [USER] möchte ich [ACTION] um [BENEFIT]
1025
+ - **Story 1.2:** Als [USER] möchte ich [ACTION] um [BENEFIT]
1026
+
1027
+ #### Epic 2: [EPIC_NAME]
1028
+ - **Story 2.1:** Als [USER] möchte ich [ACTION] um [BENEFIT]
1029
+ - **Story 2.2:** Als [USER] möchte ich [ACTION] um [BENEFIT]
1030
+
1031
+ ### 7. Success Metrics
1032
+ *Wie messen wir Erfolg?*
1033
+
1034
+ - Metric 1: [DEFINITION]
1035
+ - Metric 2: [DEFINITION]
1036
+
1037
+ ---
1038
+ *Erstellt mit Appiq Solution - Built with ❤️ based on Bmad-Method*
1039
+ `;
1040
+ }
1041
+
1042
+ generateArchitectureTemplate() {
1043
+ return `# System Architecture
1044
+
1045
+ ## Projekt: [PROJECT_NAME]
1046
+
1047
+ ### 1. Architecture Overview
1048
+ *High-level Systemübersicht*
1049
+
1050
+ ### 2. Technology Stack
1051
+
1052
+ #### Frontend
1053
+ - Framework: [FRAMEWORK]
1054
+ - State Management: [STATE_MANAGEMENT]
1055
+ - Styling: [STYLING_SOLUTION]
1056
+
1057
+ #### Backend
1058
+ - Runtime: [RUNTIME]
1059
+ - Framework: [FRAMEWORK]
1060
+ - Database: [DATABASE]
1061
+
1062
+ #### Infrastructure
1063
+ - Hosting: [HOSTING_PLATFORM]
1064
+ - CI/CD: [CI_CD_SOLUTION]
1065
+
1066
+ ### 3. System Components
1067
+
1068
+ #### 3.1 Frontend Components
1069
+ - Component Library
1070
+ - State Management
1071
+ - Routing
1072
+ - API Layer
1073
+
1074
+ #### 3.2 Backend Services
1075
+ - API Layer
1076
+ - Business Logic
1077
+ - Data Access Layer
1078
+ - External Integrations
1079
+
1080
+ ### 4. Data Models
1081
+
1082
+ #### User Model
1083
+ \`\`\`
1084
+ {
1085
+ id: string
1086
+ email: string
1087
+ name: string
1088
+ createdAt: Date
1089
+ }
1090
+ \`\`\`
1091
+
1092
+ ### 5. API Design
1093
+
1094
+ #### Authentication
1095
+ - POST /api/auth/login
1096
+ - POST /api/auth/register
1097
+ - POST /api/auth/logout
1098
+
1099
+ #### Core Resources
1100
+ - GET /api/[resource]
1101
+ - POST /api/[resource]
1102
+ - PUT /api/[resource]/:id
1103
+ - DELETE /api/[resource]/:id
1104
+
1105
+ ### 6. Security Considerations
1106
+ - Authentication Strategy
1107
+ - Authorization Model
1108
+ - Data Validation
1109
+ - Rate Limiting
1110
+
1111
+ ### 7. Performance Considerations
1112
+ - Caching Strategy
1113
+ - Database Optimization
1114
+ - CDN Usage
1115
+ - Lazy Loading
1116
+
1117
+ ### 8. Deployment Architecture
1118
+ - Development Environment
1119
+ - Staging Environment
1120
+ - Production Environment
1121
+
1122
+ ---
1123
+ *Erstellt mit Appiq Solution - Built with ❤️ based on Bmad-Method*
1124
+ `;
1125
+ }
1126
+
1127
+ generateStoryTemplate() {
1128
+ return `# User Story: [STORY_TITLE]
1129
+
1130
+ ## Story Details
1131
+ **Als** [USER_TYPE]
1132
+ **möchte ich** [ACTION]
1133
+ **um** [BENEFIT]
1134
+
1135
+ ## Acceptance Criteria
1136
+ - [ ] Criterion 1
1137
+ - [ ] Criterion 2
1138
+ - [ ] Criterion 3
1139
+
1140
+ ## Technical Tasks
1141
+ - [ ] Task 1: [DESCRIPTION]
1142
+ - [ ] Task 2: [DESCRIPTION]
1143
+ - [ ] Task 3: [DESCRIPTION]
1144
+
1145
+ ## Definition of Done
1146
+ - [ ] Code implemented and tested
1147
+ - [ ] Unit tests written and passing
1148
+ - [ ] Integration tests passing
1149
+ - [ ] Code reviewed and approved
1150
+ - [ ] Documentation updated
1151
+ - [ ] Deployed to staging
1152
+ - [ ] User acceptance testing completed
1153
+
1154
+ ## Dependencies
1155
+ - [ ] Dependency 1
1156
+ - [ ] Dependency 2
1157
+
1158
+ ## Estimation
1159
+ **Story Points:** [POINTS]
1160
+ **Estimated Hours:** [HOURS]
1161
+
1162
+ ## Notes
1163
+ *Zusätzliche Notizen und Überlegungen*
1164
+
1165
+ ---
1166
+ **Sprint:** [SPRINT_NUMBER]
1167
+ **Assigned to:** [DEVELOPER]
1168
+ **Status:** [TODO/IN_PROGRESS/REVIEW/DONE]
1169
+
1170
+ ---
1171
+ *Erstellt mit Appiq Solution - Built with ❤️ based on Bmad-Method*
1172
+ `;
1173
+ }
1174
+
1175
+ generateInitialPRD() {
1176
+ const { projectName, projectIdea, targetUsers, projectType } = this.config;
1177
+
1178
+ return `# Product Requirements Document (PRD)
1179
+
1180
+ ## Projekt: ${projectName}
1181
+
1182
+ ### 1. Problem Statement
1183
+ ${projectIdea}
1184
+
1185
+ ### 2. Target Users
1186
+ ${targetUsers}
1187
+
1188
+ ### 3. Project Type
1189
+ ${
1190
+ projectType === "greenfield"
1191
+ ? "✨ Greenfield (Neues Projekt)"
1192
+ : "🔧 Brownfield (Bestehendes Projekt)"
1193
+ }
1194
+
1195
+ ### 4. Functional Requirements (FRs)
1196
+ *Diese Sektion wird durch den PM Agent vervollständigt*
1197
+
1198
+ #### 4.1 Core Features
1199
+ - [ ] Feature wird durch PM definiert
1200
+
1201
+ ### 5. Non-Functional Requirements (NFRs)
1202
+ *Diese Sektion wird durch den Architect Agent vervollständigt*
1203
+
1204
+ ### 6. User Stories & Epics
1205
+ *Diese Sektion wird durch den Story Master Agent vervollständigt*
1206
+
1207
+ ---
1208
+ **Status:** 📋 Planning Phase Complete - Ready for PM Agent
1209
+ **Nächster Schritt:** PM Agent für detaillierte Requirements
1210
+ **Created:** ${new Date().toLocaleDateString("de-DE")}
1211
+
1212
+ ---
1213
+ *Erstellt mit Appiq Solution - Built with ❤️ based on Bmad-Method*
1214
+ `;
1215
+ }
1216
+
1217
+ generateBMADKnowledgeBase() {
1218
+ return `# BMAD Knowledge Base
1219
+
1220
+ ## The BMad Planning + Execution Workflow
1221
+
1222
+ ### Planning Workflow (Web UI or Powerful IDE Agents)
1223
+ 1. **Analyst** (Optional): Market Research, Competitor Analysis, Project Brief
1224
+ 2. **PM**: Create PRD from Brief with FRs, NFRs, Epics & Stories
1225
+ 3. **UX Expert** (Optional): Create Front End Spec, Generate UI Prompts
1226
+ 4. **Architect**: Create Architecture from PRD + UX Spec
1227
+ 5. **PO**: Run Master Checklist, validate document alignment
1228
+
1229
+ ### Critical Transition: Web UI → IDE
1230
+ - Copy documents to project (docs/prd.md, docs/architecture.md)
1231
+ - Switch to IDE
1232
+ - **PO**: Shard Documents (CRITICAL STEP)
1233
+ - Begin Development Cycle
1234
+
1235
+ ### Core Development Cycle (IDE)
1236
+ 1. **SM**: Review previous story dev/QA notes
1237
+ 2. **SM**: Draft next story from sharded epic + architecture
1238
+ 3. **PO**: Validate story draft (optional)
1239
+ 4. **User Approval** of story
1240
+ 5. **Dev**: Sequential task execution, implement tasks + tests
1241
+ 6. **Dev**: Run all validations, mark ready for review
1242
+ 7. **User Verification**: Request QA or approve
1243
+ 8. **QA**: Senior dev review + active refactoring (if requested)
1244
+ 9. **IMPORTANT**: Verify all regression tests and linting pass
1245
+ 10. **IMPORTANT**: COMMIT CHANGES BEFORE PROCEEDING
1246
+ 11. Mark story as done, loop back to SM
1247
+
1248
+ ### Key Principles
1249
+ - **Document Sharding**: Critical step after planning phase
1250
+ - **Context Management**: Keep files lean and focused
1251
+ - **Commit Regularly**: Save work frequently, especially after QA
1252
+ - **Agent Selection**: Use appropriate agent for each task
1253
+ - **Dependencies**: Each agent loads only what it needs
1254
+
1255
+ ### Special Agents
1256
+ - **BMad-Master**: Can do any task except story implementation
1257
+ - **BMad-Orchestrator**: Heavy-weight agent for web bundles only
1258
+
1259
+ ### Technical Configuration
1260
+ - **core-config.yaml**: devLoadAlwaysFiles configuration
1261
+ - **technical-preferences.md**: Bias PM/Architect recommendations
1262
+ - **Dependencies**: templates, tasks, data for each agent
1263
+
1264
+ ---
1265
+ *Built with ❤️ based on Bmad-Method*
1266
+ `;
1267
+ }
1268
+
1269
+ generateCreateDocTask() {
1270
+ return `# Create Document Task
1271
+
1272
+ ## Purpose
1273
+ Create structured documents following BMAD templates and standards.
1274
+
1275
+ ## Usage
1276
+ This task helps agents create consistent, well-structured documents.
1277
+
1278
+ ## Process
1279
+ 1. **Identify Document Type**: PRD, Architecture, Story, etc.
1280
+ 2. **Load Template**: Use appropriate template from templates/
1281
+ 3. **Gather Requirements**: Collect all necessary information
1282
+ 4. **Fill Template**: Replace placeholders with actual content
1283
+ 5. **Validate Structure**: Ensure all sections are complete
1284
+ 6. **Save Document**: Store in correct location (docs/)
1285
+
1286
+ ## Templates Available
1287
+ - prd-template.md
1288
+ - architecture-template.md
1289
+ - story-template.md
1290
+
1291
+ ## Best Practices
1292
+ - Follow template structure exactly
1293
+ - Replace ALL placeholders
1294
+ - Include creation date and status
1295
+ - Link to related documents
1296
+ - Use consistent formatting
1297
+
1298
+ ## Output Location
1299
+ - PRD: docs/prd.md
1300
+ - Architecture: docs/architecture.md
1301
+ - Stories: docs/stories/[story-name].md
1302
+
1303
+ ---
1304
+ *Built with ❤️ based on Bmad-Method*
1305
+ `;
1306
+ }
1307
+
1308
+ generateShardDocTask() {
1309
+ return `# Document Sharding Task
1310
+
1311
+ ## Purpose
1312
+ **CRITICAL STEP**: Break down large documents into focused, manageable pieces for agents.
1313
+
1314
+ ## When to Use
1315
+ - After planning phase completion
1316
+ - Before beginning development cycle
1317
+ - When switching from Web UI to IDE
1318
+
1319
+ ## Process
1320
+ 1. **Identify Source Document**: Usually PRD or Architecture
1321
+ 2. **Analyze Structure**: Find natural breaking points
1322
+ 3. **Create Focused Files**: Each file serves one purpose
1323
+ 4. **Maintain References**: Link shards together
1324
+ 5. **Update devLoadAlwaysFiles**: Configure core-config.yaml
1325
+
1326
+ ## Sharding Strategy
1327
+
1328
+ ### PRD Sharding
1329
+ - **Core Requirements**: docs/requirements/core.md
1330
+ - **User Stories**: docs/stories/ (individual files)
1331
+ - **Success Metrics**: docs/metrics.md
1332
+
1333
+ ### Architecture Sharding
1334
+ - **Tech Stack**: docs/architecture/tech-stack.md
1335
+ - **Coding Standards**: docs/architecture/coding-standards.md
1336
+ - **Project Structure**: docs/architecture/project-structure.md
1337
+ - **API Design**: docs/architecture/api-design.md
1338
+ - **Data Models**: docs/architecture/data-models.md
1339
+
1340
+ ## Critical Points
1341
+ - **Lean Files**: Each shard should be focused and minimal
1342
+ - **Dev Context**: Sharded files go into devLoadAlwaysFiles
1343
+ - **Agent Performance**: Smaller context = better performance
1344
+ - **Maintainability**: Easier to update specific aspects
1345
+
1346
+ ## Post-Sharding
1347
+ 1. Update core-config.yaml devLoadAlwaysFiles
1348
+ 2. Verify all shards are accessible
1349
+ 3. Test agent context loading
1350
+ 4. Begin development cycle
1351
+
1352
+ ---
1353
+ *Built with ❤️ based on Bmad-Method*
1354
+ `;
1355
+ }
1356
+
1357
+ generateValidateStoryTask() {
1358
+ return `# Validate Story Task
1359
+
1360
+ ## Purpose
1361
+ Ensure user stories align with PRD, architecture, and project goals.
1362
+
1363
+ ## When to Use
1364
+ - Before story implementation begins
1365
+ - When SM drafts new stories
1366
+ - When stories are modified
1367
+
1368
+ ## Validation Checklist
1369
+
1370
+ ### Story Structure
1371
+ - [ ] Clear user role defined
1372
+ - [ ] Specific action described
1373
+ - [ ] Business value stated
1374
+ - [ ] Acceptance criteria present
1375
+
1376
+ ### Technical Alignment
1377
+ - [ ] Aligns with architecture decisions
1378
+ - [ ] Fits within tech stack constraints
1379
+ - [ ] Dependencies identified
1380
+ - [ ] Implementation feasible
1381
+
1382
+ ### Business Alignment
1383
+ - [ ] Supports PRD objectives
1384
+ - [ ] Addresses user needs
1385
+ - [ ] Measurable outcomes
1386
+ - [ ] Priority justified
1387
+
1388
+ ### Quality Gates
1389
+ - [ ] Testable acceptance criteria
1390
+ - [ ] Definition of done complete
1391
+ - [ ] Effort estimation reasonable
1392
+ - [ ] Risk assessment done
1393
+
1394
+ ## Process
1395
+ 1. **Load References**: PRD, Architecture, related stories
1396
+ 2. **Check Structure**: Verify story template compliance
1397
+ 3. **Validate Alignment**: Against PRD and architecture
1398
+ 4. **Assess Dependencies**: Identify blockers or prerequisites
1399
+ 5. **Review Quality**: Ensure story is ready for development
1400
+ 6. **Provide Feedback**: Clear recommendations for improvements
1401
+
1402
+ ## Common Issues
1403
+ - Vague acceptance criteria
1404
+ - Missing technical dependencies
1405
+ - Misalignment with architecture
1406
+ - Unrealistic scope or effort
1407
+
1408
+ ## Output
1409
+ - **Validation Status**: Pass/Fail with reasons
1410
+ - **Recommendations**: Specific improvements needed
1411
+ - **Dependencies**: List of prerequisites
1412
+ - **Risk Assessment**: Potential implementation challenges
1413
+
1414
+ ---
1415
+ *Built with ❤️ based on Bmad-Method*
1416
+ `;
1417
+ }
1418
+
1419
+ async addFlutterAgents() {
1420
+ console.log(chalk.cyan(" 📱 Adding Flutter-specific agents..."));
1421
+
1422
+ const agentsDir = path.join(this.appiqPath, "agents");
1423
+ const flutterExpansionPath = path.join(
1424
+ __dirname,
1425
+ "..",
1426
+ "expansion-packs",
1427
+ "bmad-flutter-mobile-dev",
1428
+ "agents"
1429
+ );
1430
+
1431
+ // Check if Flutter expansion pack exists
1432
+ if (!fs.existsSync(flutterExpansionPath)) {
1433
+ console.log(
1434
+ chalk.yellow(
1435
+ " ⚠️ Flutter expansion pack not found - creating basic Flutter agents"
1436
+ )
1437
+ );
1438
+ await this.createBasicFlutterAgents();
1439
+ return;
1440
+ }
1441
+
1442
+ // Copy Flutter agents from expansion pack
1443
+ const flutterAgents = [
1444
+ "flutter-ui-agent.md",
1445
+ "flutter-cubit-agent.md",
1446
+ "flutter-data-agent.md",
1447
+ "flutter-domain-agent.md",
1448
+ "shared-components-agent.md",
1449
+ ];
1450
+
1451
+ for (const agentFile of flutterAgents) {
1452
+ const sourcePath = path.join(flutterExpansionPath, agentFile);
1453
+ const targetPath = path.join(agentsDir, agentFile);
1454
+
1455
+ if (fs.existsSync(sourcePath)) {
1456
+ fs.copyFileSync(sourcePath, targetPath);
1457
+ console.log(chalk.green(` ✅ ${agentFile} hinzugefügt`));
1458
+ }
1459
+ }
1460
+
1461
+ // Create Flutter-specific data files
1462
+ const dataDir = path.join(this.appiqPath, "data");
1463
+ const flutterDataPath = path.join(
1464
+ __dirname,
1465
+ "..",
1466
+ "expansion-packs",
1467
+ "bmad-flutter-mobile-dev",
1468
+ "data"
1469
+ );
1470
+
1471
+ if (
1472
+ fs.existsSync(
1473
+ path.join(flutterDataPath, "flutter-development-guidelines.md")
1474
+ )
1475
+ ) {
1476
+ fs.copyFileSync(
1477
+ path.join(flutterDataPath, "flutter-development-guidelines.md"),
1478
+ path.join(dataDir, "flutter-development-guidelines.md")
1479
+ );
1480
+ console.log(
1481
+ chalk.green(" ✅ Flutter development guidelines hinzugefügt")
1482
+ );
1483
+ }
1484
+ }
1485
+
1486
+ async createBasicFlutterAgents() {
1487
+ console.log(chalk.gray(" 🔨 Creating basic Flutter agents..."));
1488
+
1489
+ const agentsDir = path.join(this.appiqPath, "agents");
1490
+
1491
+ // Basic Flutter UI Agent
1492
+ const flutterUIAgent = this.generateBasicFlutterUIAgent();
1493
+ fs.writeFileSync(
1494
+ path.join(agentsDir, "flutter-ui-agent.md"),
1495
+ flutterUIAgent
1496
+ );
1497
+
1498
+ // Basic Flutter State Management Agent
1499
+ const flutterStateAgent = this.generateBasicFlutterStateAgent();
1500
+ fs.writeFileSync(
1501
+ path.join(agentsDir, "flutter-cubit-agent.md"),
1502
+ flutterStateAgent
1503
+ );
1504
+
1505
+ console.log(chalk.green(" ✅ Basic Flutter agents created"));
1506
+ }
1507
+
1508
+ generateBasicFlutterUIAgent() {
1509
+ return `# Flutter UI Agent
1510
+
1511
+ Du bist ein spezialisierter Flutter UI Agent, der sich auf die Erstellung von benutzerfreundlichen und responsive Mobile UI-Komponenten fokussiert.
1512
+
1513
+ ## Rolle & Verantwortung
1514
+
1515
+ - **UI Design & Implementation:** Erstelle schöne, Material 3 konforme Flutter UIs
1516
+ - **Widget Composition:** Verwende effiziente Widget-Hierarchien
1517
+ - **Responsive Design:** Sichere Kompatibilität für verschiedene Bildschirmgrößen
1518
+ - **Accessibility:** Implementiere barrierefreie UI-Komponenten
1519
+
1520
+ ## Expertise
1521
+
1522
+ ### Flutter UI Frameworks
1523
+ - **Material 3:** Modernes Material Design
1524
+ - **Cupertino:** iOS-native Looks
1525
+ - **Custom Widgets:** Individuelle UI-Komponenten
1526
+
1527
+ ### Best Practices
1528
+ - **Widget Keys:** Für Testability und Performance
1529
+ - **Const Constructors:** Memory-Optimierung
1530
+ - **Build Method Optimization:** Verhindere unnecessary rebuilds
1531
+ - **Theme Integration:** Konsistente Design Systems
1532
+
1533
+ ## Tech Stack Integration
1534
+
1535
+ **Platform:** ${this.config.techStack.platform}
1536
+ **MCP:** ${this.config.techStack.isFlutter ? "Dart MCP Server ✅" : "Standard"}
1537
+
1538
+ ### Dart MCP Tools
1539
+ - Hot Reload via MCP
1540
+ - Widget Inspection via AI
1541
+ - pub.dev Package Discovery
1542
+ - Runtime Error Analysis
1543
+
1544
+ ## Workflow Integration
1545
+
1546
+ **Planning Phase:** Arbeite mit UX Expert an UI Specs
1547
+ **Development Phase:** Implementiere UI basierend auf Cubit State
1548
+ **Testing Phase:** Golden Tests für UI Consistency
1549
+
1550
+ ---
1551
+ *Built with ❤️ based on Bmad-Method*
1552
+ *Flutter Clean Architecture + Dart MCP Integration*
1553
+ `;
1554
+ }
1555
+
1556
+ generateBasicFlutterStateAgent() {
1557
+ return `# Flutter Cubit State Management Agent
1558
+
1559
+ Du bist ein spezialisierter Flutter State Management Agent mit Fokus auf Cubit/BLoC Pattern und Clean Architecture.
1560
+
1561
+ ## Rolle & Verantwortung
1562
+
1563
+ - **State Management:** Implementiere Cubit/BLoC Pattern
1564
+ - **Clean Architecture:** Separation of Concerns (Presentation → Domain → Data)
1565
+ - **Dependency Injection:** GetIt + Injectable Setup
1566
+ - **Event Handling:** User Interactions und API Calls
1567
+
1568
+ ## Expertise
1569
+
1570
+ ### State Management
1571
+ - **Cubit:** Simple State Management für UI
1572
+ - **BLoC:** Complex Business Logic mit Events
1573
+ - **Riverpod:** Alternative State Management (if needed)
1574
+
1575
+ ### Architecture Patterns
1576
+ - **Clean Architecture:** Feature-based Structure
1577
+ - **Repository Pattern:** Data Access Layer
1578
+ - **Use Cases:** Business Logic Layer
1579
+ - **Dependency Injection:** Loose Coupling
1580
+
1581
+ ## Tech Stack Integration
1582
+
1583
+ **Platform:** ${this.config.techStack.platform}
1584
+ **MCP:** ${this.config.techStack.isFlutter ? "Dart MCP Server ✅" : "Standard"}
1585
+
1586
+ ### Code Generation
1587
+ - **Freezed:** Immutable Data Classes
1588
+ - **Injectable:** Dependency Injection Setup
1589
+ - **Build Runner:** Code Generation Pipeline
1590
+
1591
+ ## Workflow Integration
1592
+
1593
+ **Planning Phase:** Definiere State Structure mit Domain Agent
1594
+ **Development Phase:** Implementiere Business Logic
1595
+ **Testing Phase:** Unit Tests für Cubits und Use Cases
1596
+
1597
+ ---
1598
+ *Built with ❤️ based on Bmad-Method*
1599
+ *Flutter Clean Architecture + Dart MCP Integration*
1600
+ `;
1601
+ }
1602
+
1603
+ async updateAgentsWithDependencies() {
1604
+ console.log(chalk.gray(" 🔗 Updating agents with BMAD dependencies..."));
1605
+
1606
+ const agentsDir = path.join(this.appiqPath, "agents");
1607
+ const agents = fs.readdirSync(agentsDir);
1608
+
1609
+ for (const agentFile of agents) {
1610
+ const agentPath = path.join(agentsDir, agentFile);
1611
+ let content = fs.readFileSync(agentPath, "utf8");
1612
+
1613
+ // Add BMAD dependencies section to each agent
1614
+ const dependenciesSection = `
1615
+
1616
+ ## 🔗 BMAD Dependencies
1617
+
1618
+ ### Templates
1619
+ - prd-template.md
1620
+ - architecture-template.md
1621
+ - story-template.md
1622
+
1623
+ ### Tasks
1624
+ - create-doc.md
1625
+ - shard-doc.md
1626
+ - validate-story.md
1627
+
1628
+ ### Data
1629
+ - bmad-kb.md
1630
+ - technical-preferences.md
1631
+
1632
+ ### Configuration
1633
+ - core-config.yaml (devLoadAlwaysFiles)
1634
+
1635
+ ## 🎯 BMAD Workflow Integration
1636
+
1637
+ **Planning Phase:** Web UI → IDE Transition → Document Sharding
1638
+ **Development Phase:** SM → PO → Dev → QA → Loop
1639
+ **Critical Points:** Commit before proceeding, verify tests passing
1640
+
1641
+ `;
1642
+
1643
+ // Add MCP integration section
1644
+ const mcpSection = this.generateMCPAgentSection(agentFile);
1645
+
1646
+ // Add dependencies and MCP section before the final line
1647
+ const lines = content.split("\n");
1648
+ const lastLine = lines.pop(); // Remove last line
1649
+ lines.push(dependenciesSection);
1650
+ lines.push(mcpSection);
1651
+ lines.push(lastLine); // Add last line back
1652
+
1653
+ fs.writeFileSync(agentPath, lines.join("\n"));
1654
+ }
1655
+ }
1656
+
1657
+ generateMCPAgentSection(agentFile) {
1658
+ // Bestimme Agent-Typ basierend auf Dateiname
1659
+ const agentName = agentFile.replace('.md', '').toLowerCase();
1660
+
1661
+ // Bestimme welche MCPs für diesen Agent relevant sind
1662
+ const relevantMCPs = Object.keys(MCP_SERVERS).filter(mcpKey => {
1663
+ const server = MCP_SERVERS[mcpKey];
1664
+ return server.tags.includes('all') ||
1665
+ server.tags.some(tag => agentName.includes(tag)) ||
1666
+ (agentName.includes('architect') && server.tags.includes('architect')) ||
1667
+ (agentName.includes('pm') && server.tags.includes('pm')) ||
1668
+ (agentName.includes('qa') && server.tags.includes('qa')) ||
1669
+ (agentName.includes('dev') && server.tags.includes('dev')) ||
1670
+ (agentName.includes('ux') && server.tags.includes('ux-expert')) ||
1671
+ (agentName.includes('flutter') && server.tags.includes('flutter')) ||
1672
+ ((agentName.includes('web') || agentName.includes('ui')) && server.tags.includes('ui'));
1673
+ });
1674
+
1675
+ if (relevantMCPs.length === 0) {
1676
+ return '';
1677
+ }
1678
+
1679
+ let section = `\n## 🔌 MCP Server Integration\n\nDu hast Zugriff auf folgende MCP Server, um deine Fähigkeiten zu erweitern:\n\n`;
1680
+
1681
+ relevantMCPs.forEach(mcpKey => {
1682
+ const server = MCP_SERVERS[mcpKey];
1683
+ section += `- **${server.name}:** ${server.description}\n`;
1684
+ });
1685
+
1686
+ section += `\n**Beispiel-Anwendung:**\n`;
1687
+
1688
+ // Spezifische Beispiele basierend auf Agent-Typ
1689
+ if (agentName.includes('flutter')) {
1690
+ section += `- "Nutze den Dart MCP, um mein Flutter Widget zu analysieren."\n`;
1691
+ section += `- "Verwende den 21st.dev Magic MCP, um eine neue UI-Komponente zu erstellen."\n`;
1692
+ } else if (agentName.includes('architect')) {
1693
+ section += `- "Nutze den Context7 MCP, um die neueste Dokumentation für React Hooks zu finden."\n`;
1694
+ section += `- "Verwende Sequential Thinking MCP für die komplexe Architektur-Planung."\n`;
1695
+ } else if (agentName.includes('qa')) {
1696
+ section += `- "Nutze den Puppeteer MCP, um automatisierte Browser-Tests zu erstellen."\n`;
1697
+ } else if (agentName.includes('dev')) {
1698
+ section += `- "Verwende den Firebase MCP, um Firestore-Daten abzurufen."\n`;
1699
+ section += `- "Nutze den Supabase MCP für Datenbankoperationen."\n`;
1700
+ } else {
1701
+ section += `- "Nutze den Context7 MCP für aktuelle Dokumentation."\n`;
1702
+ section += `- "Verwende Sequential Thinking MCP für komplexe Problemlösungen."\n`;
1703
+ }
1704
+
1705
+ section += `\n**Wichtig:** Die MCPs müssen in deiner IDE konfiguriert sein. Siehe mcp-setup-instructions.md für Details.\n`;
1706
+
1707
+ return section;
1708
+ }
1709
+
1710
+ generateBMADOrchestration(config) {
1711
+ return `# BMAD Full Orchestration
1712
+ # Built with ❤️ based on Bmad-Method
1713
+
1714
+ project:
1715
+ name: ${this.config.projectName}
1716
+ type: ${this.config.projectType}
1717
+ plan_approved: ${this.config.planApproved}
1718
+ created: ${new Date().toISOString()}
1719
+
1720
+ # BMAD Planning Phase (Web UI/Powerful IDE)
1721
+ planning_phase:
1722
+ workflow: ${config.planningPhase.workflow}
1723
+ agents:
1724
+ ${config.planningPhase.agents.map((agent) => ` - ${agent}`).join("\n")}
1725
+
1726
+ flow:
1727
+ 1: "analyst → research & project brief (optional)"
1728
+ 2: "pm → create PRD from brief"
1729
+ 3: "ux-expert → create frontend spec (optional)"
1730
+ 4: "architect → create architecture from PRD + UX"
1731
+ 5: "po → run master checklist & validate alignment"
1732
+
1733
+ # Critical Transition: Web UI → IDE
1734
+ transition:
1735
+ type: ${config.transitions.planningToIDE}
1736
+ requirements:
1737
+ - "Copy docs/prd.md and docs/architecture.md to project"
1738
+ - "Switch to IDE"
1739
+ - "PO: Shard documents (CRITICAL)"
1740
+ - "Update core-config.yaml devLoadAlwaysFiles"
1741
+
1742
+ # BMAD Development Phase (IDE Only)
1743
+ development_phase:
1744
+ workflow: ${config.developmentPhase.workflow}
1745
+ agents:
1746
+ ${config.developmentPhase.agents.map((agent) => ` - ${agent}`).join("\n")}
1747
+
1748
+ cycle:
1749
+ 1: "sm → review previous story dev/QA notes"
1750
+ 2: "sm → draft next story from sharded epic + architecture"
1751
+ 3: "po → validate story draft (optional)"
1752
+ 4: "user → approve story"
1753
+ 5: "dev → sequential task execution + implementation"
1754
+ 6: "dev → run all validations, mark ready for review"
1755
+ 7: "user → verify (request QA or approve)"
1756
+ 8: "qa → senior dev review + active refactoring (if requested)"
1757
+ 9: "CRITICAL → verify regression tests + linting pass"
1758
+ 10: "CRITICAL → COMMIT CHANGES BEFORE PROCEEDING"
1759
+ 11: "mark story done → loop back to sm"
1760
+
1761
+ # Critical Commit Points
1762
+ commit_points:
1763
+ ${config.transitions.criticalCommitPoints
1764
+ .map((point) => ` - ${point}`)
1765
+ .join("\n")}
1766
+
1767
+ # IDE Integration
1768
+ ides:
1769
+ ${this.config.selectedIDEs
1770
+ .map(
1771
+ (ide) => ` - name: ${this.getIDEName(ide)}
1772
+ config_path: ${this.getIDEConfig(ide).dir}
1773
+ file_format: ${this.getIDEConfig(ide).suffix}`
1774
+ )
1775
+ .join("\n")}
1776
+
1777
+ # Context Management
1778
+ context:
1779
+ dev_always_files:
1780
+ - docs/architecture/coding-standards.md
1781
+ - docs/architecture/tech-stack.md
1782
+ - docs/architecture/project-structure.md
1783
+
1784
+ agent_dependencies:
1785
+ templates: ["prd-template.md", "architecture-template.md", "story-template.md"]
1786
+ tasks: ["create-doc.md", "shard-doc.md", "validate-story.md"]
1787
+ data: ["bmad-kb.md", "technical-preferences.md"]
1788
+
1789
+ ---
1790
+ *Powered by Appiq Solution - Built with ❤️ based on Bmad-Method*
1791
+ `;
1792
+ }
1793
+
1794
+ generatePlanningWorkflow() {
1795
+ return `# BMAD Planning Workflow
1796
+
1797
+ ## Übersicht
1798
+ Die Planungsphase folgt einem strukturierten Workflow, idealerweise in Web UI für Kosteneffizienz.
1799
+
1800
+ ## Planning Flow
1801
+
1802
+ ### 1. Start: Projektidee
1803
+ - Grundlegendes Konzept definiert
1804
+ - Problem identifiziert
1805
+
1806
+ ### 2. Analyst (Optional)
1807
+ **Brainstorming:**
1808
+ - Marktforschung
1809
+ - Konkurrenzanalyse
1810
+ - Projekt Brief erstellen
1811
+
1812
+ ### 3. Project Manager (PM)
1813
+ **PRD Erstellung:**
1814
+ - PRD aus Brief erstellen (Fast Track)
1815
+ - ODER interaktive PRD Erstellung (mehr Fragen)
1816
+ - Functional Requirements (FRs)
1817
+ - Non-Functional Requirements (NFRs)
1818
+ - Epics & Stories definieren
1819
+
1820
+ ### 4. UX Expert (Optional)
1821
+ **Frontend Specification:**
1822
+ - Frontend Spec erstellen
1823
+ - UI Prompts für Lovable/V0 generieren (optional)
1824
+
1825
+ ### 5. System Architect
1826
+ **Architektur Design:**
1827
+ - Architektur aus PRD erstellen
1828
+ - ODER aus PRD + UX Spec erstellen
1829
+ - Tech Stack definieren
1830
+ - System Components planen
1831
+
1832
+ ### 6. Product Owner (PO)
1833
+ **Master Checklist:**
1834
+ - Dokumenten-Alignment prüfen
1835
+ - Epics & Stories aktualisieren (falls nötig)
1836
+ - PRD/Architektur anpassen (falls nötig)
1837
+
1838
+ ## Kritischer Übergang: Web UI → IDE
1839
+
1840
+ ### ⚠️ WICHTIG: Transition Point
1841
+ Sobald PO Dokumenten-Alignment bestätigt:
1842
+
1843
+ 1. **Dokumente kopieren**: docs/prd.md und docs/architecture.md
1844
+ 2. **IDE wechseln**: Projekt in bevorzugter Agentic IDE öffnen
1845
+ 3. **Document Sharding**: PO Agent zum Shard der Dokumente verwenden
1846
+ 4. **Development beginnen**: Core Development Cycle starten
1847
+
1848
+ ## Qualitäts-Gates
1849
+
1850
+ ### Planning Complete Criteria
1851
+ - [ ] PRD vollständig und genehmigt
1852
+ - [ ] Architektur vollständig und genehmigt
1853
+ - [ ] UX Spec (falls erforderlich) genehmigt
1854
+ - [ ] Alle Dokumente sind aligned
1855
+ - [ ] Epics und Stories definiert
1856
+ - [ ] Übergang zu IDE vorbereitet
1857
+
1858
+ ## Nächste Schritte
1859
+ Nach Planning Complete → **Document Sharding** → **Development Cycle**
1860
+
1861
+ ---
1862
+ *Built with ❤️ based on Bmad-Method*
1863
+ `;
1864
+ }
1865
+
1866
+ generateDevelopmentCycle() {
1867
+ return `# BMAD Core Development Cycle
1868
+
1869
+ ## Übersicht
1870
+ Strukturierter Entwicklungsworkflow in der IDE nach abgeschlossener Planungsphase.
1871
+
1872
+ ## Voraussetzungen
1873
+ - ✅ Planning Phase abgeschlossen
1874
+ - ✅ Dokumente in Projekt kopiert (docs/prd.md, docs/architecture.md)
1875
+ - ✅ **Document Sharding** durch PO Agent durchgeführt
1876
+ - ✅ IDE-Setup komplett
1877
+
1878
+ ## Development Cycle Flow
1879
+
1880
+ ### 1. Scrum Master (SM)
1881
+ **Story Vorbereitung:**
1882
+ - Review previous story dev/QA notes
1883
+ - Draft next story from sharded epic + architecture
1884
+ - Berücksichtigt technical dependencies
1885
+ - Erstellt realistische task breakdown
1886
+
1887
+ ### 2. Product Owner (PO) - Optional
1888
+ **Story Validation:**
1889
+ - Validate story draft against artifacts
1890
+ - Überprüft alignment mit PRD
1891
+ - Bestätigt business value
1892
+ - Kann übersprungen werden bei erfahrenen Teams
1893
+
1894
+ ### 3. User Approval
1895
+ **Story Freigabe:**
1896
+ - ✅ **Approved**: Weiter zu Development
1897
+ - ❌ **Needs Changes**: Zurück zu SM für Anpassungen
1898
+
1899
+ ### 4. Developer (Dev)
1900
+ **Implementation:**
1901
+ - Sequential task execution
1902
+ - Implement tasks + tests
1903
+ - Run all validations
1904
+ - Mark ready for review + add notes
1905
+ - Dokumentiert implementation decisions
1906
+
1907
+ ### 5. User Verification
1908
+ **Review Decision:**
1909
+ - 🔍 **Request QA Review**: Weiter zu QA Agent
1910
+ - ✅ **Approve Without QA**: Direkt zu Final Checks
1911
+ - ❌ **Needs Fixes**: Zurück zu Dev
1912
+
1913
+ ### 6. QA Agent (Optional)
1914
+ **Quality Assurance:**
1915
+ - Senior dev review + active refactoring
1916
+ - Review code, refactor, add tests
1917
+ - Document notes and improvements
1918
+ - **Decision**: Needs Dev Work OR Approved
1919
+
1920
+ ### 7. Final Checks - ⚠️ CRITICAL
1921
+ **Vor dem Abschluss:**
1922
+ - ✅ Verify ALL regression tests passing
1923
+ - ✅ Verify ALL linting passing
1924
+ - ✅ Code review completed (if QA was used)
1925
+ - ✅ Documentation updated
1926
+
1927
+ ### 8. Commit - ⚠️ SUPER CRITICAL
1928
+ **WICHTIG: COMMIT YOUR CHANGES BEFORE PROCEEDING!**
1929
+ - Git add & commit all changes
1930
+ - Include meaningful commit message
1931
+ - Push to repository
1932
+
1933
+ ### 9. Story Complete
1934
+ **Mark als Done:**
1935
+ - Story status → DONE
1936
+ - Loop back to SM for next story
1937
+
1938
+ ## Critical Points
1939
+
1940
+ ### ⚠️ Commit Points
1941
+ - **After QA Approval**: Always commit before marking done
1942
+ - **Before Next Story**: Clean state for next iteration
1943
+
1944
+ ### 🎯 Quality Gates
1945
+ - All tests passing
1946
+ - Linting clean
1947
+ - Code reviewed (if QA used)
1948
+ - Documentation current
1949
+
1950
+ ### 📊 Context Management
1951
+ - Keep relevant files only in context
1952
+ - Use sharded documents
1953
+ - Maintain lean, focused files
1954
+
1955
+ ## Best Practices
1956
+ - **Small Stories**: Keep stories manageable (< 1 week)
1957
+ - **Regular Commits**: Commit frequently during development
1958
+ - **Test First**: Write tests before or with implementation
1959
+ - **Document Decisions**: Record architectural decisions
1960
+
1961
+ ---
1962
+ *Built with ❤️ based on Bmad-Method*
1963
+ `;
1964
+ }
1965
+
1966
+ generateDocumentSharding() {
1967
+ return `# Document Sharding Guide
1968
+
1969
+ ## ⚠️ CRITICAL STEP
1970
+ Document Sharding ist ein **essentieller Schritt** im BMAD Flow nach der Planungsphase.
1971
+
1972
+ ## Wann Document Sharding durchführen?
1973
+ - ✅ Nach Planning Phase Completion
1974
+ - ✅ Beim Übergang von Web UI zu IDE
1975
+ - ✅ Vor Beginn des Development Cycles
1976
+ - ✅ Wenn Dokumente zu groß für Agent-Context werden
1977
+
1978
+ ## Warum Document Sharding?
1979
+ - **Performance**: Kleinere Context = bessere Agent-Performance
1980
+ - **Focus**: Jede Datei dient einem spezifischen Zweck
1981
+ - **Maintainability**: Einfacher zu aktualisieren und zu verwalten
1982
+ - **Agent Efficiency**: Agents laden nur was sie brauchen
1983
+
1984
+ ## Sharding Process
1985
+
1986
+ ### 1. PRD Sharding
1987
+ **Source**: docs/prd.md
1988
+ **Target Structure**:
1989
+ \`\`\`
1990
+ docs/
1991
+ ├── requirements/
1992
+ │ ├── core.md # Core functional requirements
1993
+ │ ├── non-functional.md # NFRs (performance, security)
1994
+ │ └── success-metrics.md # KPIs and success criteria
1995
+ ├── stories/
1996
+ │ ├── epic-1-auth/
1997
+ │ │ ├── story-1-1-login.md
1998
+ │ │ └── story-1-2-register.md
1999
+ │ └── epic-2-dashboard/
2000
+ │ └── story-2-1-overview.md
2001
+ \`\`\`
2002
+
2003
+ ### 2. Architecture Sharding
2004
+ **Source**: docs/architecture.md
2005
+ **Target Structure**:
2006
+ \`\`\`
2007
+ docs/architecture/
2008
+ ├── tech-stack.md # Technology decisions
2009
+ ├── coding-standards.md # Code style and patterns
2010
+ ├── project-structure.md # File/folder organization
2011
+ ├── api-design.md # REST/GraphQL API specs
2012
+ ├── data-models.md # Database schema
2013
+ ├── security.md # Security considerations
2014
+ └── deployment.md # Deployment architecture
2015
+ \`\`\`
2016
+
2017
+ ## Sharding Guidelines
2018
+
2019
+ ### File Size
2020
+ - **Target**: < 50 lines per sharded file
2021
+ - **Maximum**: < 100 lines per sharded file
2022
+ - **Focus**: One concern per file
2023
+
2024
+ ### Naming Convention
2025
+ - **kebab-case**: tech-stack.md, coding-standards.md
2026
+ - **Descriptive**: Clear purpose from filename
2027
+ - **Consistent**: Follow project conventions
2028
+
2029
+ ### Content Rules
2030
+ - **Atomic**: Each file covers one topic completely
2031
+ - **Self-contained**: Can be understood independently
2032
+ - **Linked**: Reference related files when needed
2033
+ - **Lean**: Remove fluff, keep essentials
2034
+
2035
+ ## Post-Sharding Configuration
2036
+
2037
+ ### 1. Update core-config.yaml
2038
+ \`\`\`yaml
2039
+ devLoadAlwaysFiles:
2040
+ - docs/architecture/coding-standards.md
2041
+ - docs/architecture/tech-stack.md
2042
+ - docs/architecture/project-structure.md
2043
+ \`\`\`
2044
+
2045
+ ### 2. Verify Agent Access
2046
+ - Test that agents can load sharded files
2047
+ - Ensure all references are correct
2048
+ - Validate file paths in configuration
2049
+
2050
+ ### 3. Update Templates
2051
+ - Modify templates to reference sharded structure
2052
+ - Update agent prompts to use sharded files
2053
+ - Test template generation
2054
+
2055
+ ## Quality Checks
2056
+
2057
+ ### ✅ Sharding Complete Criteria
2058
+ - [ ] All large documents sharded
2059
+ - [ ] Each shard < 100 lines
2060
+ - [ ] devLoadAlwaysFiles updated
2061
+ - [ ] Agent dependencies resolved
2062
+ - [ ] File references working
2063
+ - [ ] Templates updated
2064
+
2065
+ ### 🚨 Common Mistakes
2066
+ - **Too Large**: Shards still too big (>100 lines)
2067
+ - **Too Small**: Over-sharding (many 5-line files)
2068
+ - **Broken Links**: References to old unified files
2069
+ - **Missing Config**: devLoadAlwaysFiles not updated
2070
+
2071
+ ## After Sharding
2072
+ 1. **Test Agent Loading**: Verify agents can access all needed files
2073
+ 2. **Begin Development**: Start Core Development Cycle
2074
+ 3. **Monitor Performance**: Watch for context issues
2075
+ 4. **Refine as Needed**: Adjust sharding based on usage
2076
+
2077
+ ---
2078
+ *Built with ❤️ based on Bmad-Method*
2079
+ `;
2080
+ }
2081
+
2082
+
2083
+
2084
+
2085
+
2086
+ async performInstallation() {
2087
+ console.log(chalk.yellow("📦 Installation läuft..."));
2088
+
2089
+ // Create appiq-solution directory
2090
+ if (!fs.existsSync(this.appiqPath)) {
2091
+ fs.mkdirSync(this.appiqPath, { recursive: true });
2092
+ }
2093
+
2094
+ // Install optimized agents
2095
+ await this.installOptimizedAgents();
2096
+
2097
+ // Install project-specific configs
2098
+ await this.installProjectConfig();
2099
+
2100
+ // Setup IDE integration
2101
+ await this.setupIDEIntegration();
2102
+
2103
+ console.log(chalk.green("✅ Installation abgeschlossen!\n"));
2104
+ }
2105
+
2106
+ async installOptimizedAgents() {
2107
+ console.log(chalk.gray(" 📄 Optimierte Agents installieren..."));
2108
+
2109
+ const agentsDir = path.join(this.appiqPath, "agents");
2110
+ if (!fs.existsSync(agentsDir)) {
2111
+ fs.mkdirSync(agentsDir, { recursive: true });
2112
+ }
2113
+
2114
+ // Core optimized agents
2115
+ const agents = [
2116
+ "smart-launcher",
2117
+ "project-manager",
2118
+ "architect",
2119
+ "story-master",
2120
+ "developer",
2121
+ "qa-expert",
2122
+ ];
2123
+
2124
+ for (const agent of agents) {
2125
+ await this.createOptimizedAgent(agent);
2126
+ }
2127
+ }
2128
+
2129
+ async createOptimizedAgent(agentName) {
2130
+ const agentContent = this.generateOptimizedAgentContent(agentName);
2131
+ const filePath = path.join(this.appiqPath, "agents", `${agentName}.md`);
2132
+ fs.writeFileSync(filePath, agentContent);
2133
+ }
2134
+
2135
+ generateOptimizedAgentContent(agentName) {
2136
+ const agentConfigs = {
2137
+ "smart-launcher": {
2138
+ name: "Appiq Launcher",
2139
+ role: "Intelligenter Projekt-Starter",
2140
+ commands: ["/start", "/quick-setup", "/help"],
2141
+ description:
2142
+ "Startet automatisch den optimalen Workflow basierend auf Ihrem Projekt-Typ",
2143
+ },
2144
+ "project-manager": {
2145
+ name: "Project Manager",
2146
+ role: "PRD & Projekt-Planung",
2147
+ commands: ["/prd", "/plan", "/epic"],
2148
+ description: "Erstellt PRD und Projekt-Dokumentation",
2149
+ },
2150
+ architect: {
2151
+ name: "System Architect",
2152
+ role: "Technische Architektur",
2153
+ commands: ["/architecture", "/tech-stack", "/design"],
2154
+ description: "Entwickelt System-Architektur und Tech-Stack",
2155
+ },
2156
+ "story-master": {
2157
+ name: "Story Master",
2158
+ role: "User Stories & Sprint Planning",
2159
+ commands: ["/story", "/sprint", "/tasks"],
2160
+ description: "Erstellt User Stories und Sprint-Planung",
2161
+ },
2162
+ developer: {
2163
+ name: "Senior Developer",
2164
+ role: "Code Implementation",
2165
+ commands: ["/code", "/implement", "/fix"],
2166
+ description: "Implementiert Features und behebt Bugs",
2167
+ },
2168
+ "qa-expert": {
2169
+ name: "QA Expert",
2170
+ role: "Testing & Qualität",
2171
+ commands: ["/test", "/review", "/validate"],
2172
+ description: "Führt Tests durch und validiert Code-Qualität",
2173
+ },
2174
+ };
2175
+
2176
+ const config = agentConfigs[agentName];
2177
+
2178
+ return `# ${config.name}
2179
+
2180
+ ## 🎯 Rolle
2181
+ ${config.role}
2182
+
2183
+ ## 📋 Verfügbare Kommandos
2184
+ ${config.commands
2185
+ .map((cmd) => `- **${cmd}** - ${config.description}`)
2186
+ .join("\n")}
2187
+
2188
+ ## 🚀 One-Click Workflows
2189
+
2190
+ ### Für ${
2191
+ this.config.projectType === "greenfield" ? "NEUE" : "BESTEHENDE"
2192
+ } Projekte:
2193
+
2194
+ ${
2195
+ this.config.projectType === "greenfield"
2196
+ ? this.generateGreenfieldWorkflow(config)
2197
+ : this.generateBrownfieldWorkflow(config)
2198
+ }
2199
+
2200
+ ## 🎮 Einfache Nutzung
2201
+
2202
+ 1. **Laden Sie diesen Agent in Ihre IDE**
2203
+ 2. **Sagen Sie:** "Agiere als ${config.name}"
2204
+ 3. **Verwenden Sie:** ${config.commands[0]} für Quick-Start
2205
+
2206
+ ---
2207
+ *Automatisch optimiert für ${this.config.selectedIDEs
2208
+ .map((ide) => this.getIDEName(ide))
2209
+ .join(", ")}*
2210
+ *Powered by Appiq - Based on Bmad-Method*
2211
+ `;
2212
+ }
2213
+
2214
+ generateGreenfieldWorkflow(config) {
2215
+ const workflows = {
2216
+ "Appiq Launcher": `
2217
+ **🚀 Schnell-Start für neues Projekt:**
2218
+ 1. \`/start\` - Automatische Projekt-Analyse
2219
+ 2. Erstellt automatisch: PRD-Vorlage, Architektur-Basis, erste Stories
2220
+ 3. **Wo alles hingehört:** Alle Dateien werden automatisch in \`docs/\` erstellt`,
2221
+
2222
+ "Project Manager": `
2223
+ **📋 PRD Erstellung:**
2224
+ 1. \`/prd\` - Startet PRD-Assistent
2225
+ 2. **Datei wird erstellt:** \`docs/prd.md\`
2226
+ 3. **Nächster Schritt:** Architect für Architektur`,
2227
+
2228
+ "System Architect": `
2229
+ **🏗️ Architektur erstellen:**
2230
+ 1. \`/architecture\` - Basierend auf PRD
2231
+ 2. **Datei wird erstellt:** \`docs/architecture.md\`
2232
+ 3. **Nächster Schritt:** Story Master für erste Stories`,
2233
+
2234
+ "Story Master": `
2235
+ **📝 Erste Stories:**
2236
+ 1. \`/story\` - Erstellt erste User Story
2237
+ 2. **Datei wird erstellt:** \`docs/stories/story-001.md\`
2238
+ 3. **Nächster Schritt:** Developer für Implementation`,
2239
+
2240
+ "Senior Developer": `
2241
+ **💻 Implementation:**
2242
+ 1. \`/implement\` - Implementiert aktuelle Story
2243
+ 2. **Erstellt/bearbeitet:** Entsprechende Code-Dateien
2244
+ 3. **Nächster Schritt:** QA Expert für Review`,
2245
+
2246
+ "QA Expert": `
2247
+ **✅ Testing & Review:**
2248
+ 1. \`/review\` - Reviewed aktuellen Code
2249
+ 2. **Erstellt:** Test-Dateien und Reports
2250
+ 3. **Nächster Schritt:** Zurück zu Story Master für nächste Story`,
2251
+ };
2252
+
2253
+ return workflows[config.name] || "Standard Greenfield Workflow";
2254
+ }
2255
+
2256
+ generateBrownfieldWorkflow(config) {
2257
+ const workflows = {
2258
+ "Appiq Launcher": `
2259
+ **🔧 Quick Start for Existing Project:**
2260
+ 1. \`/analyze\` - Analyzes existing project
2261
+ 2. **Finds:** Existing docs, code structure, tech stack
2262
+ 3. **Creates:** Customized workflows for your project`,
2263
+
2264
+ "Project Manager": `
2265
+ **📋 Automatic PRD Creation:**
2266
+ 1. **Creates automatically:** \`docs/prd.md\` (if not present)
2267
+ 2. **For Flutter Projects:** Uses flutter-mobile-prd-tmpl.yaml
2268
+ 3. **No project name prompt** - Uses directory name
2269
+ 4. **Next Step:** Architect for architecture review`,
2270
+
2271
+ "System Architect": `
2272
+ **🏗️ Architecture Review:**
2273
+ 1. \`/review-architecture\` - Analyzes existing structure
2274
+ 2. **Creates/updates:** \`docs/architecture.md\`
2275
+ 3. **Next Step:** Story Master for new features`,
2276
+
2277
+ "Story Master": `
2278
+ **📝 Feature Stories:**
2279
+ 1. \`/new-feature\` - New story for existing project
2280
+ 2. **File created:** \`docs/stories/feature-XXX.md\`
2281
+ 3. **Considers:** Existing code base`,
2282
+
2283
+ "Senior Developer": `
2284
+ **💻 Feature Implementation:**
2285
+ 1. \`/add-feature\` - Implements in existing code
2286
+ 2. **Edits:** Existing files safely
2287
+ 3. **Creates:** New files where needed`,
2288
+
2289
+ "QA Expert": `
2290
+ **✅ Regression Testing:**
2291
+ 1. \`/regression-test\` - Tests new features
2292
+ 2. **Validates:** No breaking changes
2293
+ 3. **Creates:** Test reports for existing + new features`,
2294
+ };
2295
+
2296
+ return workflows[config.name] || "Standard Brownfield Workflow";
2297
+ }
2298
+
2299
+ async setupOneClickWorkflows() {
2300
+ console.log(chalk.yellow("⚡ Setting up One-Click Workflows..."));
2301
+
2302
+ // Create quick commands
2303
+ const commandsDir = path.join(this.appiqPath, "commands");
2304
+ if (!fs.existsSync(commandsDir)) {
2305
+ fs.mkdirSync(commandsDir, { recursive: true });
2306
+ }
2307
+
2308
+ // Project-type specific quick starts
2309
+ const quickStartContent = this.generateQuickStartScript();
2310
+ fs.writeFileSync(
2311
+ path.join(commandsDir, "quick-start.md"),
2312
+ quickStartContent
2313
+ );
2314
+
2315
+ console.log(chalk.green("✅ One-Click Workflows bereit!\n"));
2316
+ }
2317
+
2318
+ generateQuickStartScript() {
2319
+ return `# 🚀 Appiq Solution - BMAD Workflow Guide
2320
+
2321
+ ## Projekt: ${this.config.projectName || "Unbenanntes Projekt"}
2322
+ **Typ:** ${
2323
+ this.config.projectType === "greenfield"
2324
+ ? "✨ Greenfield (Neues Projekt)"
2325
+ : "🔧 Brownfield (Bestehendes Projekt)"
2326
+ }
2327
+
2328
+ ## 📋 BMAD Planning Workflow (Phase 1)
2329
+
2330
+ ### Option A: Web UI Planning (Kosteneffizient)
2331
+ 1. Claude/Gemini/GPT mit team-fullstack Bundle verwenden
2332
+ 2. **Flow:** Analyst → PM → UX Expert → Architect → PO
2333
+ 3. **Output:** docs/prd.md, docs/architecture.md
2334
+
2335
+ ### Option B: IDE Planning (Leistungsstark)
2336
+ \`\`\`
2337
+ @analyst → Market Research & Project Brief
2338
+ @pm → PRD mit FRs, NFRs, Epics & Stories erstellen
2339
+ @ux-expert → Frontend Spec (optional)
2340
+ @architect → System Architecture design
2341
+ @po → Master Checklist & Document Alignment
2342
+ \`\`\`
2343
+
2344
+ ## ⚠️ KRITISCHER ÜBERGANG: Document Sharding
2345
+
2346
+ **ESSENTIAL STEP:**
2347
+ \`\`\`
2348
+ @po bitte shard die PRD und Architecture Dokumente in fokussierte Dateien
2349
+ \`\`\`
2350
+
2351
+ **Das erstellt:**
2352
+ - docs/architecture/tech-stack.md ← Dev lädt immer
2353
+ - docs/architecture/coding-standards.md ← Dev lädt immer
2354
+ - docs/architecture/project-structure.md ← Dev lädt immer
2355
+ - docs/requirements/core.md
2356
+ - docs/stories/ (individual story files)
2357
+
2358
+ ## 🚀 BMAD Development Cycle (Phase 2)
2359
+
2360
+ ### Core Development Loop:
2361
+ \`\`\`
2362
+ 1. @sm → Review previous notes, draft next story from sharded epic
2363
+ 2. @po → Validate story draft (optional)
2364
+ 3. User → Approve story
2365
+ 4. @dev → Sequential tasks, implement + tests, mark ready
2366
+ 5. User → Verify (request QA or approve)
2367
+ 6. @qa → Senior dev review + refactoring (optional)
2368
+ 7. ⚠️ CRITICAL: Verify tests + linting pass
2369
+ 8. ⚠️ SUPER CRITICAL: COMMIT CHANGES BEFORE PROCEEDING!
2370
+ 9. Mark story done → Loop back to @sm
2371
+ \`\`\`
2372
+
2373
+ ## 🎯 One-Click Commands
2374
+
2375
+ ### Planning:
2376
+ - \`/plan\` → Start planning workflow
2377
+ - \`/prd\` → Generate PRD
2378
+ - \`/arch\` → Design architecture
2379
+
2380
+ ### Critical Transition:
2381
+ - \`/shard\` → Document sharding (ESSENTIAL!)
2382
+
2383
+ ### Development:
2384
+ - \`/story\` → Draft next story
2385
+ - \`/dev\` → Start development
2386
+ - \`/test\` → Run tests
2387
+ - \`/qa\` → Request review
2388
+ - \`/commit\` → Commit changes
2389
+
2390
+ ### ${
2391
+ this.config.projectType === "greenfield" ? "Greenfield" : "Brownfield"
2392
+ } Specific:
2393
+ ${
2394
+ this.config.projectType === "greenfield"
2395
+ ? `
2396
+ - \`/start\` → Fresh project setup
2397
+ - \`/design\` → Create from scratch
2398
+ - \`/build\` → Build step by step
2399
+ `
2400
+ : `
2401
+ - \`/analyze\` → Analyze existing code
2402
+ - \`/document\` → Document current state
2403
+ - \`/improve\` → Plan improvements
2404
+ `
2405
+ }
2406
+
2407
+ ## 📊 File Structure
2408
+
2409
+ \`\`\`
2410
+ your-project/
2411
+ ├── docs/
2412
+ │ ├── prd.md ← Initial PRD
2413
+ │ ├── architecture.md ← Initial Architecture
2414
+ │ ├── architecture/ ← Sharded files
2415
+ │ │ ├── tech-stack.md
2416
+ │ │ ├── coding-standards.md
2417
+ │ │ └── project-structure.md
2418
+ │ ├── requirements/
2419
+ │ │ └── core.md
2420
+ │ └── stories/
2421
+ │ ├── epic-1-auth/
2422
+ │ └── epic-2-features/
2423
+ ├── appiq-solution/
2424
+ │ ├── agents/ ← AI-Agents
2425
+ │ ├── templates/ ← Document templates
2426
+ │ ├── workflows/ ← Workflow guides
2427
+ │ └── .bmad-core/ ← BMAD configuration
2428
+ └── .cursor/rules/ ← IDE integration
2429
+ \`\`\`
2430
+
2431
+ ## ⚠️ Critical Success Factors
2432
+
2433
+ ### Document Sharding (ESSENTIAL):
2434
+ - **MUST DO** after planning phase
2435
+ - Creates focused, lean files for agents
2436
+ - Improves agent performance dramatically
2437
+
2438
+ ### Commit Points:
2439
+ - After QA approval (always!)
2440
+ - Before next story (clean state)
2441
+ - Regular commits during development
2442
+
2443
+ ### Quality Gates:
2444
+ - All tests passing ✅
2445
+ - Linting clean ✅
2446
+ - Code reviewed (if QA used) ✅
2447
+ - Documentation updated ✅
2448
+
2449
+ ## 🆘 Help & Support
2450
+
2451
+ - \`/help\` → Show all commands
2452
+ - \`/workflow\` → Current workflow step
2453
+ - \`/agents\` → Available agents
2454
+ - \`/docs\` → Documentation
2455
+
2456
+ ### Workflow Files:
2457
+ - appiq-solution/workflows/planning-workflow.md
2458
+ - appiq-solution/workflows/development-cycle.md
2459
+ - appiq-solution/workflows/document-sharding.md
2460
+
2461
+ ---
2462
+ **IDEs:** ${this.config.selectedIDEs
2463
+ .map((ide) => this.getIDEName(ide))
2464
+ .join(", ")}
2465
+ **Created:** ${new Date().toLocaleDateString("de-DE")}
2466
+ **Powered by Appiq Solution - Built with ❤️ based on Bmad-Method**
2467
+ `;
2468
+ }
2469
+
2470
+ async setupIDEIntegration() {
2471
+ if (
2472
+ this.config.selectedIDEs.includes("manual") &&
2473
+ this.config.selectedIDEs.length === 1
2474
+ )
2475
+ return;
2476
+
2477
+ console.log(chalk.gray(" 🔧 Mehrere IDE-Integrationen..."));
2478
+
2479
+ for (const ide of this.config.selectedIDEs) {
2480
+ if (ide === "manual") continue;
2481
+
2482
+ console.log(
2483
+ chalk.gray(` 📝 ${this.getIDEName(ide)} wird konfiguriert...`)
2484
+ );
2485
+
2486
+ const ideConfig = this.getIDEConfig(ide);
2487
+ const ideDir = path.join(this.projectRoot, ideConfig.dir);
2488
+
2489
+ if (!fs.existsSync(ideDir)) {
2490
+ fs.mkdirSync(ideDir, { recursive: true });
2491
+ }
2492
+
2493
+ // Copy agents to IDE-specific format
2494
+ const agentsPath = path.join(this.appiqPath, "agents");
2495
+ const agents = fs.readdirSync(agentsPath);
2496
+
2497
+ for (const agent of agents) {
2498
+ const sourcePath = path.join(agentsPath, agent);
2499
+ const targetPath = path.join(
2500
+ ideDir,
2501
+ agent.replace(".md", ideConfig.suffix)
2502
+ );
2503
+ fs.copyFileSync(sourcePath, targetPath);
2504
+ }
2505
+
2506
+ console.log(chalk.green(` ✅ ${this.getIDEName(ide)} konfiguriert`));
2507
+ }
2508
+
2509
+ console.log(chalk.green(" ✅ Alle IDE-Integrationen abgeschlossen!"));
2510
+ }
2511
+
2512
+ getIDEConfig(ide) {
2513
+ const configs = {
2514
+ cursor: { dir: ".cursor/rules", suffix: ".mdc" },
2515
+ "claude-code": { dir: ".claude/commands/Appiq", suffix: ".md" },
2516
+ windsurf: { dir: ".windsurf/rules", suffix: ".md" },
2517
+ cline: { dir: ".clinerules", suffix: ".md" },
2518
+ trae: { dir: ".trae/rules", suffix: ".md" },
2519
+ roo: { dir: ".roo/agents", suffix: ".md" },
2520
+ gemini: { dir: ".gemini/commands", suffix: ".md" },
2521
+ "github-copilot": { dir: ".github/copilot", suffix: ".md" },
2522
+ };
2523
+ return configs[ide] || { dir: ".appiq-solution", suffix: ".md" };
2524
+ }
2525
+
2526
+ getIDEName(ide) {
2527
+ const names = {
2528
+ cursor: "Cursor",
2529
+ "claude-code": "Claude Code CLI",
2530
+ windsurf: "Windsurf",
2531
+ cline: "VS Code + Cline",
2532
+ trae: "Trae",
2533
+ roo: "Roo Code",
2534
+ gemini: "Gemini CLI",
2535
+ "github-copilot": "GitHub Copilot",
2536
+ manual: "Manuell",
2537
+ };
2538
+ return names[ide] || ide;
2539
+ }
2540
+
2541
+ async showSimpleInstructions() {
2542
+ console.log(chalk.bold.green("🎉 Appiq Installation Erfolgreich!\n"));
2543
+ console.log(chalk.dim("Built with ❤️ based on the amazing Bmad-Method"));
2544
+ console.log(chalk.dim("https://github.com/Viktor-Hermann/APPIQ-METHOD\n"));
2545
+
2546
+ console.log(chalk.cyan("📋 Nächste Schritte (Super einfach):"));
2547
+ console.log(chalk.white("════════════════════════════════════\n"));
2548
+
2549
+ if (
2550
+ this.config.selectedIDEs.length > 0 &&
2551
+ !this.config.selectedIDEs.includes("manual")
2552
+ ) {
2553
+ console.log(
2554
+ chalk.yellow(
2555
+ `1. Ihre IDEs öffnen: ${this.config.selectedIDEs
2556
+ .map((ide) => this.getIDEName(ide))
2557
+ .join(", ")}`
2558
+ )
2559
+ );
2560
+ console.log(
2561
+ chalk.gray(` → Agents sind bereits in allen IDEs installiert!\n`)
2562
+ );
2563
+ }
2564
+
2565
+ console.log(chalk.yellow("2. 📋 BMAD Planning Workflow:"));
2566
+ if (this.config.planApproved) {
2567
+ console.log(
2568
+ chalk.green(` ✅ Planning Complete - Ready for Development!`)
2569
+ );
2570
+ console.log(chalk.cyan(` → Ihre initial PRD: docs/prd.md`));
2571
+ } else {
2572
+ console.log(chalk.cyan(` Option A: Web UI (kosteneffizient)`));
2573
+ console.log(chalk.gray(` → Claude/Gemini/GPT mit Agents verwenden`));
2574
+ console.log(chalk.cyan(` Option B: Direkt in IDE`));
2575
+ console.log(chalk.gray(` → @pm für PRD, @architect für Architecture`));
2576
+ }
2577
+ console.log("");
2578
+
2579
+ console.log(chalk.yellow("3. ⚠️ KRITISCHER ÜBERGANG: Document Sharding"));
2580
+ console.log(
2581
+ chalk.red(
2582
+ ` → Sagen Sie Ihrer IDE: ${chalk.bold(
2583
+ '"@po bitte shard die PRD und Architecture Dokumente"'
2584
+ )}`
2585
+ )
2586
+ );
2587
+ console.log(
2588
+ chalk.gray(` → Dokumente werden in fokussierte Teile aufgeteilt\n`)
2589
+ );
2590
+
2591
+ console.log(chalk.yellow("4. 🚀 BMAD Development Cycle:"));
2592
+ console.log(chalk.cyan(` 1. @sm → Story Draft von Sharded Epic`));
2593
+ console.log(chalk.cyan(` 2. @po → Story Validation (optional)`));
2594
+ console.log(chalk.cyan(` 3. User → Story Approval`));
2595
+ console.log(chalk.cyan(` 4. @dev → Implementation + Tests`));
2596
+ console.log(chalk.cyan(` 5. @qa → Code Review (optional)`));
2597
+ console.log(chalk.red(` 6. ⚠️ COMMIT CHANGES BEFORE PROCEEDING!`));
2598
+ console.log(chalk.gray(` → Loop zurück zu @sm für nächste Story\n`));
2599
+
2600
+ console.log(chalk.yellow("5. 🎯 Quick Commands (in quick-start.md):"));
2601
+ console.log(chalk.cyan(` /plan → Planning starten`));
2602
+ console.log(chalk.cyan(` /shard → Document Sharding`));
2603
+ console.log(chalk.cyan(` /story → Nächste Story`));
2604
+ console.log(chalk.cyan(` /dev → Development`));
2605
+ console.log(chalk.cyan(` /qa → Quality Review`));
2606
+ console.log(chalk.gray(` → Alle Details in appiq-solution/workflows/\n`));
2607
+
2608
+ console.log(chalk.cyan("🎯 Das war's! Kein komplizierter Setup mehr."));
2609
+ console.log(chalk.green("🚀 Viel Erfolg mit Appiq!\n"));
2610
+
2611
+ // Quick reference
2612
+ console.log(chalk.dim("━".repeat(50)));
2613
+ console.log(chalk.dim("📁 Quick Reference:"));
2614
+ console.log(chalk.dim(` • Agents: appiq-solution/agents/`));
2615
+ console.log(
2616
+ chalk.dim(` • Quick Start: appiq-solution/commands/quick-start.md`)
2617
+ );
2618
+ console.log(chalk.dim(` • Projekt-Typ: ${this.config.projectType}`));
2619
+ console.log(
2620
+ chalk.dim(
2621
+ ` • IDEs: ${this.config.selectedIDEs
2622
+ .map((ide) => this.getIDEName(ide))
2623
+ .join(", ")}`
2624
+ )
2625
+ );
2626
+ }
2627
+
2628
+ // Helper methods
2629
+ hasExistingSourceCode() {
2630
+ const sourceDirs = ["src", "lib", "app", "components", "pages"];
2631
+ return sourceDirs.some(
2632
+ (dir) =>
2633
+ fs.existsSync(path.join(this.projectRoot, dir)) &&
2634
+ fs.readdirSync(path.join(this.projectRoot, dir)).length > 0
2635
+ );
2636
+ }
2637
+
2638
+ hasExistingDocumentation() {
2639
+ const docFiles = ["README.md", "docs", "documentation"];
2640
+ return docFiles.some((file) =>
2641
+ fs.existsSync(path.join(this.projectRoot, file))
2642
+ );
2643
+ }
2644
+
2645
+ async installProjectConfig() {
2646
+ const configContent = this.generateProjectConfig();
2647
+ fs.writeFileSync(
2648
+ path.join(this.appiqPath, "project-config.yaml"),
2649
+ configContent
2650
+ );
2651
+ }
2652
+
2653
+ generateProjectConfig() {
2654
+ return `# Appiq Solution Project Configuration
2655
+ # Built with ❤️ based on Bmad-Method
2656
+ version: "1.0.0"
2657
+ project:
2658
+ type: ${this.config.projectType}
2659
+ created: ${new Date().toISOString()}
2660
+ name: ${this.config.projectName || path.basename(this.projectRoot)}
2661
+ plan_approved: ${this.config.planApproved}
2662
+
2663
+ # Wo die wichtigen Dateien liegen
2664
+ paths:
2665
+ prd: "docs/prd.md"
2666
+ architecture: "docs/architecture.md"
2667
+ stories: "docs/stories/"
2668
+ agents: "appiq-solution/agents/"
2669
+ orchestration: "appiq-solution/orchestration.yaml"
2670
+
2671
+ # One-Click Workflows
2672
+ workflows:
2673
+ ${this.config.projectType === "greenfield" ? "greenfield" : "brownfield"}:
2674
+ start_command: "${
2675
+ this.config.projectType === "greenfield" ? "/start" : "/analyze"
2676
+ }"
2677
+ agents_sequence:
2678
+ - smart-launcher
2679
+ - project-manager
2680
+ - architect
2681
+ - story-master
2682
+ - developer
2683
+ - qa-expert
2684
+
2685
+ # IDE Integration (Mehrere IDEs)
2686
+ ides:
2687
+ ${this.config.selectedIDEs
2688
+ .map(
2689
+ (ide) => ` - name: ${this.getIDEName(ide)}
2690
+ config_path: ${this.getIDEConfig(ide).dir}
2691
+ file_format: ${this.getIDEConfig(ide).suffix}`
2692
+ )
2693
+ .join("\n")}
2694
+ `;
2695
+ }
2696
+ }
2697
+
2698
+ // Run installer if called directly
2699
+ if (require.main === module) {
2700
+ // Check if 'install' command is provided
2701
+ const args = process.argv.slice(2);
2702
+
2703
+ if (args.length === 0 || args[0] === "install") {
2704
+ const installer = new AppiqSolutionInstaller();
2705
+ installer.install().catch(console.error);
2706
+ } else {
2707
+ console.log(
2708
+ chalk.red("❌ Unknown command. Use: npx appiq-solution install")
2709
+ );
2710
+ process.exit(1);
2711
+ }
2712
+ }
2713
+
2714
+ module.exports = AppiqSolutionInstaller;