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