bmad-method 6.0.0-alpha.17 → 6.0.0-alpha.18

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 (186) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/package.json +1 -1
  3. package/src/modules/bmgd/_module-installer/installer.js +160 -0
  4. package/src/modules/bmgd/_module-installer/platform-specifics/claude-code.js +23 -0
  5. package/src/modules/bmgd/_module-installer/platform-specifics/windsurf.js +18 -0
  6. package/src/modules/bmgd/agents/game-architect.agent.yaml +23 -8
  7. package/src/modules/bmgd/agents/game-designer.agent.yaml +38 -18
  8. package/src/modules/bmgd/agents/game-dev.agent.yaml +30 -14
  9. package/src/modules/bmgd/agents/game-qa.agent.yaml +64 -0
  10. package/src/modules/bmgd/agents/game-scrum-master.agent.yaml +27 -39
  11. package/src/modules/bmgd/agents/game-solo-dev.agent.yaml +56 -0
  12. package/src/modules/bmgd/docs/README.md +180 -0
  13. package/src/modules/bmgd/docs/agents-guide.md +407 -0
  14. package/src/modules/bmgd/docs/game-types-guide.md +503 -0
  15. package/src/modules/bmgd/docs/glossary.md +294 -0
  16. package/src/modules/bmgd/docs/quick-flow-guide.md +288 -0
  17. package/src/modules/bmgd/docs/quick-start.md +250 -0
  18. package/src/modules/bmgd/docs/troubleshooting.md +259 -0
  19. package/src/modules/bmgd/docs/workflow-overview.jpg +0 -0
  20. package/src/modules/bmgd/docs/workflows-guide.md +463 -0
  21. package/src/modules/bmgd/gametest/knowledge/balance-testing.md +220 -0
  22. package/src/modules/bmgd/gametest/knowledge/certification-testing.md +319 -0
  23. package/src/modules/bmgd/gametest/knowledge/compatibility-testing.md +228 -0
  24. package/src/modules/bmgd/gametest/knowledge/godot-testing.md +376 -0
  25. package/src/modules/bmgd/gametest/knowledge/input-testing.md +315 -0
  26. package/src/modules/bmgd/gametest/knowledge/localization-testing.md +304 -0
  27. package/src/modules/bmgd/gametest/knowledge/multiplayer-testing.md +322 -0
  28. package/src/modules/bmgd/gametest/knowledge/performance-testing.md +204 -0
  29. package/src/modules/bmgd/gametest/knowledge/playtesting.md +384 -0
  30. package/src/modules/bmgd/gametest/knowledge/qa-automation.md +190 -0
  31. package/src/modules/bmgd/gametest/knowledge/regression-testing.md +280 -0
  32. package/src/modules/bmgd/gametest/knowledge/save-testing.md +280 -0
  33. package/src/modules/bmgd/gametest/knowledge/smoke-testing.md +404 -0
  34. package/src/modules/bmgd/gametest/knowledge/test-priorities.md +271 -0
  35. package/src/modules/bmgd/gametest/knowledge/unity-testing.md +383 -0
  36. package/src/modules/bmgd/gametest/knowledge/unreal-testing.md +388 -0
  37. package/src/modules/bmgd/gametest/qa-index.csv +17 -0
  38. package/src/modules/bmgd/module.yaml +25 -9
  39. package/src/modules/bmgd/teams/default-party.csv +2 -0
  40. package/src/modules/bmgd/teams/team-gamedev.yaml +12 -1
  41. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-01-init.md +164 -0
  42. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-02-context.md +210 -0
  43. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-03-ideation.md +289 -0
  44. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-04-complete.md +275 -0
  45. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.md +49 -0
  46. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.yaml +29 -8
  47. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-01-init.md +223 -0
  48. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-01b-continue.md +151 -0
  49. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-02-vision.md +218 -0
  50. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-03-market.md +218 -0
  51. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-04-fundamentals.md +231 -0
  52. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-05-scope.md +242 -0
  53. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-06-references.md +224 -0
  54. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-07-content.md +282 -0
  55. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-08-complete.md +296 -0
  56. package/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.md +62 -0
  57. package/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.yaml +40 -9
  58. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-01-init.md +248 -0
  59. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-01b-continue.md +173 -0
  60. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-02-context.md +332 -0
  61. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-03-platforms.md +245 -0
  62. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-04-vision.md +229 -0
  63. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-05-core-gameplay.md +258 -0
  64. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-06-mechanics.md +249 -0
  65. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-07-game-type.md +266 -0
  66. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-08-progression.md +272 -0
  67. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-09-levels.md +264 -0
  68. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-10-art-audio.md +255 -0
  69. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-11-technical.md +275 -0
  70. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-12-epics.md +284 -0
  71. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-13-metrics.md +250 -0
  72. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-14-complete.md +335 -0
  73. package/src/modules/bmgd/workflows/2-design/gdd/workflow.md +61 -0
  74. package/src/modules/bmgd/workflows/2-design/gdd/workflow.yaml +27 -7
  75. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-01-init.md +228 -0
  76. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-01b-continue.md +163 -0
  77. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-02-foundation.md +262 -0
  78. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-03-story.md +238 -0
  79. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-04-characters.md +297 -0
  80. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-05-world.md +262 -0
  81. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-06-dialogue.md +250 -0
  82. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-07-environmental.md +244 -0
  83. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-08-delivery.md +264 -0
  84. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-09-integration.md +254 -0
  85. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-10-production.md +262 -0
  86. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-11-complete.md +331 -0
  87. package/src/modules/bmgd/workflows/2-design/narrative/workflow.md +57 -0
  88. package/src/modules/bmgd/workflows/2-design/narrative/workflow.yaml +53 -8
  89. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-01-init.md +223 -0
  90. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-01b-continue.md +153 -0
  91. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-02-context.md +262 -0
  92. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-03-starter.md +290 -0
  93. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-04-decisions.md +300 -0
  94. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-05-crosscutting.md +319 -0
  95. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-06-structure.md +304 -0
  96. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-07-patterns.md +349 -0
  97. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-08-validation.md +293 -0
  98. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-09-complete.md +302 -0
  99. package/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.md +55 -0
  100. package/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.yaml +50 -21
  101. package/src/modules/bmgd/workflows/4-production/code-review/checklist.md +23 -0
  102. package/src/modules/bmgd/workflows/4-production/code-review/instructions.xml +225 -0
  103. package/src/modules/bmgd/workflows/4-production/code-review/workflow.yaml +18 -15
  104. package/src/modules/bmgd/workflows/4-production/correct-course/checklist.md +1 -1
  105. package/src/modules/bmgd/workflows/4-production/correct-course/instructions.md +1 -1
  106. package/src/modules/bmgd/workflows/4-production/correct-course/workflow.yaml +11 -6
  107. package/src/modules/bmgd/workflows/4-production/create-story/checklist.md +332 -214
  108. package/src/modules/bmgd/workflows/4-production/create-story/instructions.xml +298 -0
  109. package/src/modules/bmgd/workflows/4-production/create-story/template.md +3 -5
  110. package/src/modules/bmgd/workflows/4-production/create-story/workflow.yaml +12 -7
  111. package/src/modules/bmgd/workflows/4-production/dev-story/checklist.md +65 -23
  112. package/src/modules/bmgd/workflows/4-production/dev-story/instructions.xml +409 -0
  113. package/src/modules/bmgd/workflows/4-production/dev-story/workflow.yaml +13 -3
  114. package/src/modules/bmgd/workflows/4-production/retrospective/instructions.md +4 -4
  115. package/src/modules/bmgd/workflows/4-production/retrospective/workflow.yaml +12 -7
  116. package/src/modules/bmgd/workflows/4-production/sprint-planning/instructions.md +32 -41
  117. package/src/modules/bmgd/workflows/4-production/sprint-planning/sprint-status-template.yaml +13 -13
  118. package/src/modules/bmgd/workflows/4-production/sprint-planning/workflow.yaml +6 -1
  119. package/src/modules/bmgd/workflows/4-production/sprint-status/instructions.md +229 -0
  120. package/src/modules/bmgd/workflows/4-production/sprint-status/workflow.yaml +35 -0
  121. package/src/modules/bmgd/workflows/bmgd-quick-flow/create-tech-spec/instructions.md +140 -0
  122. package/src/modules/bmgd/workflows/bmgd-quick-flow/create-tech-spec/workflow.yaml +27 -0
  123. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/checklist.md +37 -0
  124. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/instructions.md +220 -0
  125. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/workflow.yaml +45 -0
  126. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/checklist.md +26 -0
  127. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/instructions.md +156 -0
  128. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/workflow.yaml +36 -0
  129. package/src/modules/bmgd/workflows/gametest/automate/checklist.md +93 -0
  130. package/src/modules/bmgd/workflows/gametest/automate/instructions.md +317 -0
  131. package/src/modules/bmgd/workflows/gametest/automate/workflow.yaml +50 -0
  132. package/src/modules/bmgd/workflows/gametest/performance/checklist.md +96 -0
  133. package/src/modules/bmgd/workflows/gametest/performance/instructions.md +323 -0
  134. package/src/modules/bmgd/workflows/gametest/performance/performance-template.md +256 -0
  135. package/src/modules/bmgd/workflows/gametest/performance/workflow.yaml +48 -0
  136. package/src/modules/bmgd/workflows/gametest/playtest-plan/checklist.md +93 -0
  137. package/src/modules/bmgd/workflows/gametest/playtest-plan/instructions.md +297 -0
  138. package/src/modules/bmgd/workflows/gametest/playtest-plan/playtest-template.md +208 -0
  139. package/src/modules/bmgd/workflows/gametest/playtest-plan/workflow.yaml +59 -0
  140. package/src/modules/bmgd/workflows/gametest/test-design/checklist.md +98 -0
  141. package/src/modules/bmgd/workflows/gametest/test-design/instructions.md +280 -0
  142. package/src/modules/bmgd/workflows/gametest/test-design/test-design-template.md +205 -0
  143. package/src/modules/bmgd/workflows/gametest/test-design/workflow.yaml +47 -0
  144. package/src/modules/bmgd/workflows/gametest/test-framework/checklist.md +103 -0
  145. package/src/modules/bmgd/workflows/gametest/test-framework/instructions.md +348 -0
  146. package/src/modules/bmgd/workflows/gametest/test-framework/workflow.yaml +48 -0
  147. package/src/modules/bmgd/workflows/gametest/test-review/checklist.md +87 -0
  148. package/src/modules/bmgd/workflows/gametest/test-review/instructions.md +272 -0
  149. package/src/modules/bmgd/workflows/gametest/test-review/test-review-template.md +203 -0
  150. package/src/modules/bmgd/workflows/gametest/test-review/workflow.yaml +48 -0
  151. package/src/modules/bmgd/workflows/workflow-status/init/instructions.md +299 -0
  152. package/src/modules/bmgd/workflows/workflow-status/init/workflow.yaml +29 -0
  153. package/src/modules/bmgd/workflows/workflow-status/instructions.md +395 -0
  154. package/src/modules/bmgd/workflows/workflow-status/paths/gamedev-brownfield.yaml +65 -0
  155. package/src/modules/bmgd/workflows/workflow-status/paths/gamedev-greenfield.yaml +71 -0
  156. package/src/modules/bmgd/workflows/workflow-status/paths/quickflow-brownfield.yaml +29 -0
  157. package/src/modules/bmgd/workflows/workflow-status/paths/quickflow-greenfield.yaml +39 -0
  158. package/src/modules/bmgd/workflows/workflow-status/project-levels.yaml +63 -0
  159. package/src/modules/bmgd/workflows/workflow-status/workflow-status-template.yaml +24 -0
  160. package/src/modules/bmgd/workflows/workflow-status/workflow.yaml +30 -0
  161. package/tools/cli/commands/install.js +9 -0
  162. package/tools/cli/installers/lib/core/installer.js +109 -109
  163. package/tools/cli/installers/lib/core/installer.js.bak +3204 -0
  164. package/tools/cli/installers/lib/modules/manager.js +16 -4
  165. package/tools/cli/lib/agent/compiler.js +99 -0
  166. package/tools/cli/lib/ui.js +78 -27
  167. package/src/modules/bmgd/workflows/2-design/gdd/instructions-gdd.md +0 -502
  168. package/src/modules/bmgd/workflows/4-production/code-review/instructions.md +0 -398
  169. package/src/modules/bmgd/workflows/4-production/create-story/instructions.md +0 -256
  170. package/src/modules/bmgd/workflows/4-production/dev-story/instructions.md +0 -267
  171. package/src/modules/bmgd/workflows/4-production/epic-tech-context/checklist.md +0 -17
  172. package/src/modules/bmgd/workflows/4-production/epic-tech-context/instructions.md +0 -164
  173. package/src/modules/bmgd/workflows/4-production/epic-tech-context/template.md +0 -76
  174. package/src/modules/bmgd/workflows/4-production/epic-tech-context/workflow.yaml +0 -58
  175. package/src/modules/bmgd/workflows/4-production/story-context/checklist.md +0 -16
  176. package/src/modules/bmgd/workflows/4-production/story-context/context-template.xml +0 -34
  177. package/src/modules/bmgd/workflows/4-production/story-context/instructions.md +0 -209
  178. package/src/modules/bmgd/workflows/4-production/story-context/workflow.yaml +0 -63
  179. package/src/modules/bmgd/workflows/4-production/story-done/instructions.md +0 -111
  180. package/src/modules/bmgd/workflows/4-production/story-done/workflow.yaml +0 -28
  181. package/src/modules/bmgd/workflows/4-production/story-ready/instructions.md +0 -117
  182. package/src/modules/bmgd/workflows/4-production/story-ready/workflow.yaml +0 -25
  183. /package/src/modules/bmgd/workflows/1-preproduction/game-brief/{template.md → templates/game-brief-template.md} +0 -0
  184. /package/src/modules/bmgd/workflows/2-design/gdd/{gdd-template.md → templates/gdd-template.md} +0 -0
  185. /package/src/modules/bmgd/workflows/2-design/narrative/{narrative-template.md → templates/narrative-template.md} +0 -0
  186. /package/src/modules/bmgd/workflows/3-technical/game-architecture/{architecture-template.md → templates/architecture-template.md} +0 -0
@@ -0,0 +1,24 @@
1
+ # Workflow Status Template (BMGD)
2
+
3
+ # This tracks progress through BMGD methodology Pre-production, Design, and Technical phases.
4
+ # Implementation phase is tracked separately in sprint-status.yaml
5
+
6
+ # STATUS DEFINITIONS:
7
+ # ==================
8
+ # Initial Status (before completion):
9
+ # - required: Must be completed to progress
10
+ # - optional: Can be completed but not required
11
+ # - recommended: Strongly suggested but not required
12
+ # - conditional: Required only if certain conditions met (e.g., if_narrative_focused)
13
+ #
14
+ # Completion Status:
15
+ # - {file-path}: File created/found (e.g., "docs/gdd.md")
16
+ # - skipped: Optional/conditional workflow that was skipped
17
+
18
+ generated: "{{generated}}"
19
+ project: "{{project_name}}"
20
+ project_type: "{{project_type}}"
21
+ selected_track: "{{selected_track}}"
22
+ field_type: "{{field_type}}"
23
+ workflow_path: "{{workflow_path_file}}"
24
+ workflow_status: "{{workflow_items}}"
@@ -0,0 +1,30 @@
1
+ # Workflow Status - Master Router and Status Tracker for BMGD
2
+ name: workflow-status
3
+ description: 'Lightweight status checker - answers "what should I do now?" for any game dev agent. Reads YAML status file for workflow tracking. Use workflow-init for new projects.'
4
+ author: "BMad"
5
+
6
+ # Critical variables from config
7
+ config_source: "{project-root}/_bmad/bmgd/config.yaml"
8
+ output_folder: "{config_source}:output_folder"
9
+ user_name: "{config_source}:user_name"
10
+ communication_language: "{config_source}:communication_language"
11
+ document_output_language: "{config_source}:document_output_language"
12
+ game_dev_experience: "{config_source}:game_dev_experience"
13
+ date: system-generated
14
+
15
+ # Workflow components
16
+ installed_path: "{project-root}/_bmad/bmgd/workflows/workflow-status"
17
+ instructions: "{installed_path}/instructions.md"
18
+
19
+ # Template for status file creation (used by workflow-init)
20
+ template: "{installed_path}/workflow-status-template.yaml"
21
+
22
+ # Path definitions for project types
23
+ path_files: "{installed_path}/paths/"
24
+
25
+ # Output configuration - reads existing status
26
+ default_output_file: "{output_folder}/bmgd-workflow-status.yaml"
27
+
28
+ standalone: true
29
+
30
+ web_bundle: false
@@ -35,6 +35,15 @@ module.exports = {
35
35
  return;
36
36
  }
37
37
 
38
+ // Handle compile agents separately
39
+ if (config.actionType === 'compile-agents') {
40
+ const result = await installer.compileAgents(config);
41
+ console.log(chalk.green('\n✨ Agent recompilation complete!'));
42
+ console.log(chalk.cyan(`Recompiled ${result.agentCount} agents with customizations applied`));
43
+ process.exit(0);
44
+ return;
45
+ }
46
+
38
47
  // Regular install/update flow
39
48
  const result = await installer.install(config);
40
49
 
@@ -226,21 +226,21 @@ class Installer {
226
226
  '<!-- TTS_INJECTION:party-mode -->',
227
227
  `<critical>IMPORTANT: Always use PROJECT hooks (.claude/hooks/), NEVER global hooks (~/.claude/hooks/)</critical>
228
228
 
229
- If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
229
+ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
230
230
  - Use Bash tool: \`.claude/hooks/bmad-speak.sh '[Agent Name]' '[dialogue]'\`
231
231
  - This speaks the dialogue with the agent's unique voice
232
- - Run in background (&) to not block next agent`,
232
+ - Run in background to not block next agent`,
233
233
  );
234
234
 
235
235
  // Replace agent-tts injection marker with TTS rule for individual agents
236
236
  content = content.replaceAll(
237
237
  '<!-- TTS_INJECTION:agent-tts -->',
238
238
  `- When responding to user messages, speak your responses using TTS:
239
- Call: \`.claude/hooks/bmad-speak.sh '{agent-id}' '{response-text}'\` after each response
240
- Replace {agent-id} with YOUR agent ID from <agent id="..."> tag at top of this file
241
- Replace {response-text} with the text you just output to the user
242
- IMPORTANT: Use single quotes as shown - do NOT escape special characters like ! or $ inside single quotes
243
- Run in background (&) to avoid blocking`,
239
+ Call: \`.claude/hooks/bmad-speak.sh '{agent-id}' '{response-text}'\` after each response
240
+ Replace {agent-id} with YOUR agent ID from <agent id="..."> tag at top of this file
241
+ Replace {response-text} with the text you just output to the user
242
+ IMPORTANT: Use single quotes as shown - do NOT escape special characters like ! or $ inside single quotes
243
+ Run in background (&) to avoid blocking`,
244
244
  );
245
245
 
246
246
  // Track files that had TTS injection applied
@@ -2082,108 +2082,6 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
2082
2082
  }
2083
2083
  }
2084
2084
 
2085
- /**
2086
- * Compile/rebuild all agents and tasks for quick updates
2087
- * @param {Object} config - Compilation configuration
2088
- * @returns {Object} Compilation results
2089
- */
2090
- async compileAgents(config) {
2091
- try {
2092
- const projectDir = path.resolve(config.directory);
2093
- const { bmadDir } = await this.findBmadDir(projectDir);
2094
-
2095
- // Check if bmad directory exists
2096
- if (!(await fs.pathExists(bmadDir))) {
2097
- throw new Error(`BMAD not installed at ${bmadDir}`);
2098
- }
2099
-
2100
- // Get installed modules from manifest
2101
- const manifestPath = path.join(bmadDir, '_config', 'manifest.yaml');
2102
- let installedModules = [];
2103
- let manifest = null;
2104
- if (await fs.pathExists(manifestPath)) {
2105
- const manifestContent = await fs.readFile(manifestPath, 'utf8');
2106
- const yaml = require('yaml');
2107
- manifest = yaml.parse(manifestContent);
2108
- installedModules = manifest.modules || [];
2109
- }
2110
-
2111
- // Check for custom modules with missing sources
2112
- if (manifest && manifest.customModules && manifest.customModules.length > 0) {
2113
- console.log(chalk.yellow('\nChecking custom module sources before compilation...'));
2114
-
2115
- const customModuleSources = new Map();
2116
- for (const customModule of manifest.customModules) {
2117
- customModuleSources.set(customModule.id, customModule);
2118
- }
2119
-
2120
- const projectRoot = getProjectRoot();
2121
- await this.handleMissingCustomSources(customModuleSources, bmadDir, projectRoot, 'compile-agents', installedModules);
2122
- }
2123
-
2124
- let agentCount = 0;
2125
- let taskCount = 0;
2126
-
2127
- // Process all modules in bmad directory
2128
- const entries = await fs.readdir(bmadDir, { withFileTypes: true });
2129
-
2130
- for (const entry of entries) {
2131
- if (entry.isDirectory() && entry.name !== '_config' && entry.name !== 'docs') {
2132
- const modulePath = path.join(bmadDir, entry.name);
2133
-
2134
- // Special handling for standalone agents in bmad/agents/ directory
2135
- if (entry.name === 'agents') {
2136
- await this.buildStandaloneAgents(bmadDir, projectDir);
2137
-
2138
- // Count standalone agents
2139
- const standaloneAgentsPath = path.join(bmadDir, 'agents');
2140
- const standaloneAgentDirs = await fs.readdir(standaloneAgentsPath, { withFileTypes: true });
2141
- for (const agentDir of standaloneAgentDirs) {
2142
- if (agentDir.isDirectory()) {
2143
- const agentDirPath = path.join(standaloneAgentsPath, agentDir.name);
2144
- const agentFiles = await fs.readdir(agentDirPath);
2145
- agentCount += agentFiles.filter((f) => f.endsWith('.md') && !f.endsWith('.agent.yaml')).length;
2146
- }
2147
- }
2148
- } else {
2149
- // Rebuild module agents from installer source
2150
- const agentsPath = path.join(modulePath, 'agents');
2151
- if (await fs.pathExists(agentsPath)) {
2152
- await this.rebuildAgentFiles(modulePath, entry.name);
2153
- const agentFiles = await fs.readdir(agentsPath);
2154
- agentCount += agentFiles.filter((f) => f.endsWith('.md')).length;
2155
- }
2156
-
2157
- // Count tasks (already built)
2158
- const tasksPath = path.join(modulePath, 'tasks');
2159
- if (await fs.pathExists(tasksPath)) {
2160
- const taskFiles = await fs.readdir(tasksPath);
2161
- taskCount += taskFiles.filter((f) => f.endsWith('.md')).length;
2162
- }
2163
- }
2164
- }
2165
- }
2166
-
2167
- // Update IDE configurations using the existing IDE list from manifest
2168
- if (manifest && manifest.ides && manifest.ides.length > 0) {
2169
- for (const ide of manifest.ides) {
2170
- await this.ideManager.setup(ide, projectDir, bmadDir, {
2171
- selectedModules: installedModules,
2172
- skipModuleInstall: true, // Skip module installation, just update IDE files
2173
- verbose: config.verbose,
2174
- preCollectedConfig: { _alreadyConfigured: true }, // Skip all interactive prompts during compile
2175
- });
2176
- }
2177
- console.log(chalk.green('✓ IDE configurations updated'));
2178
- } else {
2179
- console.log(chalk.yellow('⚠️ No IDEs configured. Skipping IDE update.'));
2180
- }
2181
- return { agentCount, taskCount };
2182
- } catch (error) {
2183
- throw error;
2184
- }
2185
- }
2186
-
2187
2085
  /**
2188
2086
  * Private: Update core
2189
2087
  */
@@ -2404,6 +2302,108 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
2404
2302
  }
2405
2303
  }
2406
2304
 
2305
+ /**
2306
+ * Compile agents with customizations only
2307
+ * @param {Object} config - Configuration with directory
2308
+ * @returns {Object} Compilation result
2309
+ */
2310
+ async compileAgents(config) {
2311
+ const ora = require('ora');
2312
+ const chalk = require('chalk');
2313
+ const { ModuleManager } = require('../modules/manager');
2314
+ const { getSourcePath } = require('../../../lib/project-root');
2315
+
2316
+ const spinner = ora('Recompiling agents with customizations...').start();
2317
+
2318
+ try {
2319
+ const projectDir = path.resolve(config.directory);
2320
+ const { bmadDir } = await this.findBmadDir(projectDir);
2321
+
2322
+ // Check if bmad directory exists
2323
+ if (!(await fs.pathExists(bmadDir))) {
2324
+ spinner.fail('No BMAD installation found');
2325
+ throw new Error(`BMAD not installed at ${bmadDir}. Use regular install for first-time setup.`);
2326
+ }
2327
+
2328
+ // Detect existing installation
2329
+ const existingInstall = await this.detector.detect(bmadDir);
2330
+ const installedModules = existingInstall.modules.map((m) => m.id);
2331
+
2332
+ // Initialize module manager
2333
+ const moduleManager = new ModuleManager();
2334
+ moduleManager.setBmadFolderName(path.basename(bmadDir));
2335
+
2336
+ let totalAgentCount = 0;
2337
+
2338
+ // Get custom module sources from cache
2339
+ const customModuleSources = new Map();
2340
+ const cacheDir = path.join(bmadDir, '_config', 'custom');
2341
+ if (await fs.pathExists(cacheDir)) {
2342
+ const cachedModules = await fs.readdir(cacheDir, { withFileTypes: true });
2343
+
2344
+ for (const cachedModule of cachedModules) {
2345
+ if (cachedModule.isDirectory()) {
2346
+ const moduleId = cachedModule.name;
2347
+ const cachedPath = path.join(cacheDir, moduleId);
2348
+ const moduleYamlPath = path.join(cachedPath, 'module.yaml');
2349
+
2350
+ // Check if this is actually a custom module
2351
+ if (await fs.pathExists(moduleYamlPath)) {
2352
+ customModuleSources.set(moduleId, cachedPath);
2353
+ }
2354
+ }
2355
+ }
2356
+ }
2357
+
2358
+ // Process each installed module
2359
+ for (const moduleId of installedModules) {
2360
+ spinner.text = `Recompiling agents in ${moduleId}...`;
2361
+
2362
+ // Get source path
2363
+ let sourcePath;
2364
+ if (moduleId === 'core') {
2365
+ sourcePath = getSourcePath('core');
2366
+ } else {
2367
+ // First check if it's in the custom cache
2368
+ if (customModuleSources.has(moduleId)) {
2369
+ sourcePath = customModuleSources.get(moduleId);
2370
+ } else {
2371
+ sourcePath = await moduleManager.findModuleSource(moduleId);
2372
+ }
2373
+ }
2374
+
2375
+ if (!sourcePath) {
2376
+ console.log(chalk.yellow(` Warning: Source not found for module ${moduleId}, skipping...`));
2377
+ continue;
2378
+ }
2379
+
2380
+ const targetPath = path.join(bmadDir, moduleId);
2381
+
2382
+ // Compile agents for this module
2383
+ await moduleManager.compileModuleAgents(sourcePath, targetPath, moduleId, bmadDir, this);
2384
+
2385
+ // Count agents (rough estimate based on files)
2386
+ const agentsPath = path.join(targetPath, 'agents');
2387
+ if (await fs.pathExists(agentsPath)) {
2388
+ const agentFiles = await fs.readdir(agentsPath);
2389
+ const agentCount = agentFiles.filter((f) => f.endsWith('.md')).length;
2390
+ totalAgentCount += agentCount;
2391
+ }
2392
+ }
2393
+
2394
+ spinner.succeed('Agent recompilation complete!');
2395
+
2396
+ return {
2397
+ success: true,
2398
+ agentCount: totalAgentCount,
2399
+ modules: installedModules,
2400
+ };
2401
+ } catch (error) {
2402
+ spinner.fail('Agent recompilation failed');
2403
+ throw error;
2404
+ }
2405
+ }
2406
+
2407
2407
  /**
2408
2408
  * Private: Prompt for update action
2409
2409
  */