bmad-method 6.0.0-alpha.4 → 6.0.0-alpha.6

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 (225) hide show
  1. package/.claude/agents/bmad-analysis/api-documenter.md +102 -0
  2. package/.claude/agents/bmad-analysis/codebase-analyzer.md +82 -0
  3. package/.claude/agents/bmad-analysis/data-analyst.md +101 -0
  4. package/.claude/agents/bmad-analysis/pattern-detector.md +84 -0
  5. package/.claude/agents/bmad-planning/dependency-mapper.md +83 -0
  6. package/.claude/agents/bmad-planning/epic-optimizer.md +81 -0
  7. package/.claude/agents/bmad-planning/requirements-analyst.md +61 -0
  8. package/.claude/agents/bmad-planning/technical-decisions-curator.md +168 -0
  9. package/.claude/agents/bmad-planning/trend-spotter.md +115 -0
  10. package/.claude/agents/bmad-planning/user-journey-mapper.md +123 -0
  11. package/.claude/agents/bmad-planning/user-researcher.md +72 -0
  12. package/.claude/agents/bmad-research/market-researcher.md +51 -0
  13. package/.claude/agents/bmad-research/tech-debt-auditor.md +106 -0
  14. package/.claude/agents/bmad-review/document-reviewer.md +102 -0
  15. package/.claude/agents/bmad-review/technical-evaluator.md +68 -0
  16. package/.claude/agents/bmad-review/test-coverage-analyzer.md +108 -0
  17. package/.claude/commands/bmad/bmm/agents/architect.md +0 -1
  18. package/.claude/commands/bmad/bmm/agents/sm.md +1 -1
  19. package/.claude/commands/bmad/bmm/agents/{paige.md → tech-writer.md} +3 -3
  20. package/.claude/commands/bmad/bmm/workflows/README.md +3 -3
  21. package/.claude/commands/bmad/bmm/workflows/epic-tech-context.md +15 -0
  22. package/.claude/commands/bmad/bmm/workflows/prd.md +1 -1
  23. package/.claude/commands/bmad/bmm/workflows/tech-spec.md +3 -3
  24. package/.claude/settings.local.json +3 -8
  25. package/CHANGELOG.md +305 -0
  26. package/CONTRIBUTING.md +1 -13
  27. package/README.md +88 -39
  28. package/bmad/_cfg/agent-manifest.csv +1 -6
  29. package/bmad/_cfg/files-manifest.csv +40 -114
  30. package/bmad/_cfg/ides/claude-code.yaml +4 -3
  31. package/bmad/_cfg/manifest.yaml +3 -4
  32. package/bmad/_cfg/task-manifest.csv +0 -1
  33. package/bmad/_cfg/workflow-manifest.csv +3 -7
  34. package/bmad/bmb/config.yaml +2 -2
  35. package/bmad/bmb/workflows/audit-workflow/instructions.md +1 -1
  36. package/bmad/bmm/README.md +79 -120
  37. package/bmad/bmm/agents/architect.md +0 -1
  38. package/bmad/bmm/agents/sm.md +1 -1
  39. package/bmad/bmm/agents/{paige.md → tech-writer.md} +3 -3
  40. package/bmad/bmm/config.yaml +4 -3
  41. package/bmad/bmm/tasks/daily-standup.xml +1 -1
  42. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +1 -19
  43. package/bmad/bmm/workflows/2-plan-workflows/prd/checklist.md +10 -9
  44. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md +23 -34
  45. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +105 -331
  46. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +23 -11
  47. package/bmad/bmm/workflows/2-plan-workflows/prd/instructions.md +23 -38
  48. package/bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml +1 -1
  49. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +38 -16
  50. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +1 -19
  51. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +35 -32
  52. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +2 -2
  53. package/bmad/bmm/workflows/3-solutioning/architecture/instructions.md +7 -18
  54. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +1 -18
  55. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +6 -6
  56. package/bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +1 -1
  57. package/bmad/bmm/workflows/techdoc/documentation-standards.md +26 -2
  58. package/bmad/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
  59. package/bmad/bmm/workflows/workflow-status/init/instructions.md +623 -242
  60. package/bmad/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +120 -0
  61. package/bmad/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +108 -0
  62. package/bmad/bmm/workflows/workflow-status/paths/{brownfield-level-3.yaml → method-brownfield.yaml} +33 -31
  63. package/{src/modules/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml → bmad/bmm/workflows/workflow-status/paths/method-greenfield.yaml} +31 -21
  64. package/bmad/bmm/workflows/workflow-status/paths/{brownfield-level-1.yaml → quick-flow-brownfield.yaml} +18 -18
  65. package/bmad/bmm/workflows/workflow-status/paths/{greenfield-level-1.yaml → quick-flow-greenfield.yaml} +16 -18
  66. package/bmad/bmm/workflows/workflow-status/workflow-status-template.yaml +4 -4
  67. package/bmad/core/config.yaml +2 -2
  68. package/bmad/core/tasks/workflow.xml +1 -11
  69. package/package.json +1 -1
  70. package/src/core/tasks/workflow.xml +1 -11
  71. package/src/modules/bmb/workflows/audit-workflow/instructions.md +1 -1
  72. package/src/modules/bmm/README.md +1 -1
  73. package/src/modules/bmm/_module-installer/install-config.yaml +5 -0
  74. package/src/modules/bmm/agents/architect.agent.yaml +0 -4
  75. package/src/modules/bmm/agents/game-dev.agent.yaml +8 -12
  76. package/src/modules/bmm/agents/sm.agent.yaml +1 -1
  77. package/src/modules/bmm/agents/{paige.agent.yaml → tech-writer.agent.yaml} +4 -4
  78. package/src/modules/bmm/docs/README.md +19 -18
  79. package/src/modules/bmm/docs/agents-guide.md +47 -99
  80. package/src/modules/bmm/docs/brownfield-guide.md +216 -96
  81. package/src/modules/bmm/docs/enterprise-agentic-development.md +380 -740
  82. package/src/modules/bmm/docs/faq.md +16 -16
  83. package/src/modules/bmm/docs/glossary.md +44 -50
  84. package/src/modules/bmm/docs/party-mode.md +110 -1122
  85. package/src/modules/bmm/docs/quick-spec-flow.md +36 -36
  86. package/src/modules/bmm/docs/quick-start.md +34 -34
  87. package/src/modules/bmm/docs/scale-adaptive-system.md +304 -454
  88. package/{bmad/bmm/testarch/README.md → src/modules/bmm/docs/test-architecture.md} +56 -38
  89. package/src/modules/bmm/docs/troubleshooting.md +7 -7
  90. package/src/modules/bmm/docs/workflows-analysis.md +64 -28
  91. package/src/modules/bmm/docs/workflows-implementation.md +196 -1671
  92. package/src/modules/bmm/docs/workflows-planning.md +74 -35
  93. package/src/modules/bmm/docs/workflows-solutioning.md +47 -17
  94. package/src/modules/bmm/tasks/daily-standup.xml +1 -1
  95. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +1 -19
  96. package/src/modules/bmm/workflows/2-plan-workflows/prd/checklist.md +10 -9
  97. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md +23 -34
  98. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +105 -331
  99. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +23 -11
  100. package/src/modules/bmm/workflows/2-plan-workflows/prd/instructions.md +23 -38
  101. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.yaml +2 -2
  102. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +38 -16
  103. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +1 -19
  104. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +35 -32
  105. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +2 -2
  106. package/src/modules/bmm/workflows/3-solutioning/architecture/instructions.md +7 -18
  107. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +1 -18
  108. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +6 -6
  109. package/src/modules/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +1 -1
  110. package/src/modules/bmm/workflows/techdoc/documentation-standards.md +25 -2
  111. package/src/modules/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
  112. package/src/modules/bmm/workflows/workflow-status/init/instructions.md +623 -242
  113. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +120 -0
  114. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +108 -0
  115. package/src/modules/bmm/workflows/workflow-status/paths/{brownfield-level-3.yaml → method-brownfield.yaml} +33 -31
  116. package/{bmad/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml → src/modules/bmm/workflows/workflow-status/paths/method-greenfield.yaml} +31 -21
  117. package/src/modules/bmm/workflows/workflow-status/paths/{brownfield-level-1.yaml → quick-flow-brownfield.yaml} +18 -18
  118. package/src/modules/bmm/workflows/workflow-status/paths/{greenfield-level-1.yaml → quick-flow-greenfield.yaml} +16 -18
  119. package/src/modules/bmm/workflows/workflow-status/workflow-status-template.yaml +4 -4
  120. package/tools/cli/installers/lib/core/config-collector.js +39 -11
  121. package/tools/cli/installers/lib/core/ide-config-manager.js +3 -1
  122. package/tools/cli/installers/lib/core/installer.js +20 -9
  123. package/tools/cli/installers/lib/core/manifest-generator.js +3 -1
  124. package/tools/cli/installers/lib/core/manifest.js +6 -2
  125. package/tools/cli/installers/lib/modules/manager.js +6 -0
  126. package/tools/cli/lib/config.js +3 -1
  127. package/tools/cli/lib/ui.js +5 -5
  128. package/tools/cli/lib/yaml-format.js +2 -1
  129. package/tools/schema/agent.js +2 -0
  130. package/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md +0 -15
  131. package/bmad/_cfg/agents/cis-brainstorming-coach.customize.yaml +0 -42
  132. package/bmad/_cfg/agents/cis-creative-problem-solver.customize.yaml +0 -42
  133. package/bmad/_cfg/agents/cis-design-thinking-coach.customize.yaml +0 -42
  134. package/bmad/_cfg/agents/cis-innovation-strategist.customize.yaml +0 -42
  135. package/bmad/_cfg/agents/cis-storyteller.customize.yaml +0 -42
  136. package/bmad/bmb/agents/bmad-builder.md.bak +0 -70
  137. package/bmad/bmb/workflows/audit-workflow/workflow.yaml.bak +0 -23
  138. package/bmad/bmb/workflows/create-module/workflow.yaml.bak +0 -42
  139. package/bmad/bmb/workflows/create-workflow/workflow-template/workflow.yaml.bak +0 -39
  140. package/bmad/bmb/workflows/create-workflow/workflow.yaml.bak +0 -40
  141. package/bmad/bmb/workflows/edit-agent/workflow.yaml.bak +0 -33
  142. package/bmad/bmb/workflows/edit-module/workflow.yaml.bak +0 -34
  143. package/bmad/bmb/workflows/edit-workflow/workflow.yaml.bak +0 -27
  144. package/bmad/bmb/workflows/module-brief/workflow.yaml.bak +0 -29
  145. package/bmad/bmb/workflows/redoc/workflow.yaml.bak +0 -32
  146. package/bmad/bmm/docs/brownfield-guide.md +0 -1260
  147. package/bmad/bmm/docs/quick-spec-flow.md +0 -645
  148. package/bmad/bmm/docs/quick-start.md +0 -341
  149. package/bmad/bmm/docs/scale-adaptive-system.md +0 -1045
  150. package/bmad/bmm/tasks/retrospective.xml +0 -104
  151. package/bmad/bmm/workflows/1-analysis/brainstorm-project/README.md +0 -113
  152. package/bmad/bmm/workflows/1-analysis/product-brief/README.md +0 -180
  153. package/bmad/bmm/workflows/1-analysis/research/README.md +0 -454
  154. package/bmad/bmm/workflows/2-plan-workflows/README.md +0 -258
  155. package/bmad/bmm/workflows/3-solutioning/README.md +0 -1
  156. package/bmad/bmm/workflows/3-solutioning/architecture/README.md +0 -318
  157. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/README.md +0 -177
  158. package/bmad/bmm/workflows/4-implementation/README.md +0 -221
  159. package/bmad/bmm/workflows/4-implementation/code-review/README.md +0 -69
  160. package/bmad/bmm/workflows/4-implementation/correct-course/README.md +0 -73
  161. package/bmad/bmm/workflows/4-implementation/create-story/README.md +0 -146
  162. package/bmad/bmm/workflows/4-implementation/dev-story/README.md +0 -206
  163. package/bmad/bmm/workflows/4-implementation/epic-tech-context/README.md +0 -195
  164. package/bmad/bmm/workflows/4-implementation/retrospective/README.md +0 -77
  165. package/bmad/bmm/workflows/4-implementation/sprint-planning/README.md +0 -156
  166. package/bmad/bmm/workflows/4-implementation/story-context/README.md +0 -234
  167. package/bmad/bmm/workflows/README.md +0 -256
  168. package/bmad/bmm/workflows/document-project/README.md +0 -444
  169. package/bmad/bmm/workflows/document-project/templates/README.md +0 -38
  170. package/bmad/bmm/workflows/testarch/README.md +0 -26
  171. package/bmad/bmm/workflows/testarch/atdd/README.md +0 -672
  172. package/bmad/bmm/workflows/testarch/automate/README.md +0 -869
  173. package/bmad/bmm/workflows/testarch/ci/README.md +0 -493
  174. package/bmad/bmm/workflows/testarch/framework/README.md +0 -340
  175. package/bmad/bmm/workflows/testarch/nfr-assess/README.md +0 -469
  176. package/bmad/bmm/workflows/testarch/test-design/README.md +0 -493
  177. package/bmad/bmm/workflows/testarch/test-review/README.md +0 -775
  178. package/bmad/bmm/workflows/testarch/trace/README.md +0 -802
  179. package/bmad/bmm/workflows/workflow-status/README.md +0 -260
  180. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml +0 -54
  181. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml +0 -76
  182. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml +0 -88
  183. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml +0 -45
  184. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml +0 -73
  185. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml +0 -75
  186. package/bmad/cis/README.md +0 -153
  187. package/bmad/cis/agents/README.md +0 -104
  188. package/bmad/cis/agents/brainstorming-coach.md +0 -62
  189. package/bmad/cis/agents/creative-problem-solver.md +0 -62
  190. package/bmad/cis/agents/design-thinking-coach.md +0 -62
  191. package/bmad/cis/agents/innovation-strategist.md +0 -62
  192. package/bmad/cis/agents/storyteller.md +0 -59
  193. package/bmad/cis/config.yaml +0 -10
  194. package/bmad/cis/teams/creative-squad.yaml +0 -6
  195. package/bmad/cis/workflows/README.md +0 -139
  196. package/bmad/cis/workflows/design-thinking/README.md +0 -56
  197. package/bmad/cis/workflows/design-thinking/design-methods.csv +0 -31
  198. package/bmad/cis/workflows/design-thinking/instructions.md +0 -200
  199. package/bmad/cis/workflows/design-thinking/template.md +0 -111
  200. package/bmad/cis/workflows/design-thinking/workflow.yaml +0 -32
  201. package/bmad/cis/workflows/innovation-strategy/README.md +0 -56
  202. package/bmad/cis/workflows/innovation-strategy/innovation-frameworks.csv +0 -31
  203. package/bmad/cis/workflows/innovation-strategy/instructions.md +0 -274
  204. package/bmad/cis/workflows/innovation-strategy/template.md +0 -189
  205. package/bmad/cis/workflows/innovation-strategy/workflow.yaml +0 -32
  206. package/bmad/cis/workflows/problem-solving/README.md +0 -56
  207. package/bmad/cis/workflows/problem-solving/instructions.md +0 -250
  208. package/bmad/cis/workflows/problem-solving/solving-methods.csv +0 -31
  209. package/bmad/cis/workflows/problem-solving/template.md +0 -165
  210. package/bmad/cis/workflows/problem-solving/workflow.yaml +0 -32
  211. package/bmad/cis/workflows/storytelling/README.md +0 -58
  212. package/bmad/cis/workflows/storytelling/instructions.md +0 -291
  213. package/bmad/cis/workflows/storytelling/story-types.csv +0 -26
  214. package/bmad/cis/workflows/storytelling/template.md +0 -113
  215. package/bmad/cis/workflows/storytelling/workflow.yaml +0 -32
  216. package/bmad/core/agents/bmad-master.md.bak +0 -69
  217. package/src/modules/bmm/docs/brownfield-guide.md.backup +0 -1324
  218. package/src/modules/bmm/docs/workflows-testing.md +0 -1572
  219. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml +0 -54
  220. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml +0 -76
  221. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml +0 -88
  222. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml +0 -45
  223. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml +0 -73
  224. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml +0 -75
  225. /package/bmad/_cfg/agents/{bmm-paige.customize.yaml → bmm-tech-writer.customize.yaml} +0 -0
@@ -491,21 +491,49 @@ class ConfigCollector {
491
491
  // Handle different question types
492
492
  if (item['single-select']) {
493
493
  questionType = 'list';
494
- choices = item['single-select'];
495
- if (existingValue && choices.includes(existingValue)) {
494
+ choices = item['single-select'].map((choice) => {
495
+ // If choice is an object with label and value
496
+ if (typeof choice === 'object' && choice.label && choice.value !== undefined) {
497
+ return {
498
+ name: choice.label,
499
+ value: choice.value,
500
+ };
501
+ }
502
+ // Otherwise it's a simple string choice
503
+ return {
504
+ name: choice,
505
+ value: choice,
506
+ };
507
+ });
508
+ if (existingValue) {
496
509
  defaultValue = existingValue;
497
510
  }
498
511
  } else if (item['multi-select']) {
499
512
  questionType = 'checkbox';
500
- choices = item['multi-select'].map((choice) => ({
501
- name: choice,
502
- value: choice,
503
- checked: existingValue
504
- ? existingValue.includes(choice)
505
- : item.default && Array.isArray(item.default)
506
- ? item.default.includes(choice)
507
- : false,
508
- }));
513
+ choices = item['multi-select'].map((choice) => {
514
+ // If choice is an object with label and value
515
+ if (typeof choice === 'object' && choice.label && choice.value !== undefined) {
516
+ return {
517
+ name: choice.label,
518
+ value: choice.value,
519
+ checked: existingValue
520
+ ? existingValue.includes(choice.value)
521
+ : item.default && Array.isArray(item.default)
522
+ ? item.default.includes(choice.value)
523
+ : false,
524
+ };
525
+ }
526
+ // Otherwise it's a simple string choice
527
+ return {
528
+ name: choice,
529
+ value: choice,
530
+ checked: existingValue
531
+ ? existingValue.includes(choice)
532
+ : item.default && Array.isArray(item.default)
533
+ ? item.default.includes(choice)
534
+ : false,
535
+ };
536
+ });
509
537
  } else if (typeof defaultValue === 'boolean') {
510
538
  questionType = 'confirm';
511
539
  }
@@ -68,7 +68,9 @@ class IdeConfigManager {
68
68
  sortKeys: false,
69
69
  });
70
70
 
71
- await fs.writeFile(configPath, yamlContent, 'utf8');
71
+ // Ensure POSIX-compliant final newline
72
+ const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n';
73
+ await fs.writeFile(configPath, content, 'utf8');
72
74
  }
73
75
 
74
76
  /**
@@ -906,8 +906,9 @@ class Installer {
906
906
  }
907
907
  }
908
908
 
909
- // Write the clean config file
910
- await fs.writeFile(configPath, header + yamlContent, 'utf8');
909
+ // Write the clean config file with POSIX-compliant final newline
910
+ const content = header + yamlContent;
911
+ await fs.writeFile(configPath, content.endsWith('\n') ? content : content + '\n', 'utf8');
911
912
 
912
913
  // Track the config file in installedFiles
913
914
  this.installedFiles.push(configPath);
@@ -1195,8 +1196,9 @@ class Installer {
1195
1196
  // DO NOT replace {project-root} - LLMs understand this placeholder at runtime
1196
1197
  // const processedContent = xmlContent.replaceAll('{project-root}', projectDir);
1197
1198
 
1198
- // Write the built .md file to bmad/{module}/agents/
1199
- await fs.writeFile(mdPath, xmlContent, 'utf8');
1199
+ // Write the built .md file to bmad/{module}/agents/ with POSIX-compliant final newline
1200
+ const content = xmlContent.endsWith('\n') ? xmlContent : xmlContent + '\n';
1201
+ await fs.writeFile(mdPath, content, 'utf8');
1200
1202
  this.installedFiles.push(mdPath);
1201
1203
 
1202
1204
  // Remove the source YAML file - we can regenerate from installer source if needed
@@ -1213,7 +1215,9 @@ class Installer {
1213
1215
  if (content.includes('<agent') && !content.includes('<activation')) {
1214
1216
  // Inject the activation block using XML handler
1215
1217
  content = this.xmlHandler.injectActivationSimple(content);
1216
- await fs.writeFile(agentPath, content, 'utf8');
1218
+ // Ensure POSIX-compliant final newline
1219
+ const finalContent = content.endsWith('\n') ? content : content + '\n';
1220
+ await fs.writeFile(agentPath, finalContent, 'utf8');
1217
1221
  }
1218
1222
  }
1219
1223
  }
@@ -1294,8 +1298,9 @@ class Installer {
1294
1298
  // DO NOT replace {project-root} - LLMs understand this placeholder at runtime
1295
1299
  // const processedContent = xmlContent.replaceAll('{project-root}', projectDir);
1296
1300
 
1297
- // Write the built .md file
1298
- await fs.writeFile(targetMdPath, xmlContent, 'utf8');
1301
+ // Write the built .md file with POSIX-compliant final newline
1302
+ const content = xmlContent.endsWith('\n') ? xmlContent : xmlContent + '\n';
1303
+ await fs.writeFile(targetMdPath, content, 'utf8');
1299
1304
 
1300
1305
  // Display result
1301
1306
  if (customizedFields.length > 0) {
@@ -1387,8 +1392,9 @@ class Installer {
1387
1392
  // DO NOT replace {project-root} - LLMs understand this placeholder at runtime
1388
1393
  // const processedContent = xmlContent.replaceAll('{project-root}', projectDir);
1389
1394
 
1390
- // Write the rebuilt .md file
1391
- await fs.writeFile(targetMdPath, xmlContent, 'utf8');
1395
+ // Write the rebuilt .md file with POSIX-compliant final newline
1396
+ const content = xmlContent.endsWith('\n') ? xmlContent : xmlContent + '\n';
1397
+ await fs.writeFile(targetMdPath, content, 'utf8');
1392
1398
 
1393
1399
  // Display result with customizations if any
1394
1400
  if (customizedFields.length > 0) {
@@ -2005,6 +2011,11 @@ class Installer {
2005
2011
 
2006
2012
  configContent += processedTemplate;
2007
2013
 
2014
+ // Ensure POSIX-compliant final newline
2015
+ if (!configContent.endsWith('\n')) {
2016
+ configContent += '\n';
2017
+ }
2018
+
2008
2019
  await fs.writeFile(configPath, configContent, 'utf8');
2009
2020
  this.installedFiles.push(configPath); // Track agent config files
2010
2021
  createdCount++;
@@ -469,7 +469,9 @@ class ManifestGenerator {
469
469
  sortKeys: false,
470
470
  });
471
471
 
472
- await fs.writeFile(manifestPath, yamlStr);
472
+ // Ensure POSIX-compliant final newline
473
+ const content = yamlStr.endsWith('\n') ? yamlStr : yamlStr + '\n';
474
+ await fs.writeFile(manifestPath, content);
473
475
  return manifestPath;
474
476
  }
475
477
 
@@ -35,7 +35,9 @@ class Manifest {
35
35
  sortKeys: false,
36
36
  });
37
37
 
38
- await fs.writeFile(manifestPath, yamlContent, 'utf8');
38
+ // Ensure POSIX-compliant final newline
39
+ const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n';
40
+ await fs.writeFile(manifestPath, content, 'utf8');
39
41
  return { success: true, path: manifestPath, filesTracked: 0 };
40
42
  }
41
43
 
@@ -104,7 +106,9 @@ class Manifest {
104
106
  sortKeys: false,
105
107
  });
106
108
 
107
- await fs.writeFile(manifestPath, yamlContent, 'utf8');
109
+ // Ensure POSIX-compliant final newline
110
+ const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n';
111
+ await fs.writeFile(manifestPath, content, 'utf8');
108
112
 
109
113
  return manifest;
110
114
  }
@@ -267,6 +267,12 @@ class ModuleManager {
267
267
  continue;
268
268
  }
269
269
 
270
+ // Skip user documentation if install_user_docs is false
271
+ if (moduleConfig.install_user_docs === false && (file.startsWith('docs/') || file.startsWith('docs\\'))) {
272
+ console.log(chalk.dim(` Skipping user documentation: ${file}`));
273
+ continue;
274
+ }
275
+
270
276
  // Skip game development content if include_game_planning is false
271
277
  if (moduleConfig.include_game_planning === false) {
272
278
  const shouldSkipGameDev = gameDevFiles.some((gamePath) => {
@@ -33,7 +33,9 @@ class Config {
33
33
  });
34
34
 
35
35
  await fs.ensureDir(path.dirname(configPath));
36
- await fs.writeFile(configPath, yamlContent, 'utf8');
36
+ // Ensure POSIX-compliant final newline
37
+ const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n';
38
+ await fs.writeFile(configPath, content, 'utf8');
37
39
  }
38
40
 
39
41
  /**
@@ -82,15 +82,15 @@ class UI {
82
82
  // If actionType === 'update' or 'reinstall', continue with normal flow below
83
83
  }
84
84
 
85
- // Collect IDE tool selection EARLY (before module configuration)
86
- // This allows users to make all decisions upfront before file copying begins
87
- const toolSelection = await this.promptToolSelection(confirmedDirectory, []);
88
-
89
85
  const { installedModuleIds } = await this.getExistingInstallation(confirmedDirectory);
90
86
  const coreConfig = await this.collectCoreConfig(confirmedDirectory);
91
87
  const moduleChoices = await this.getModuleChoices(installedModuleIds);
92
88
  const selectedModules = await this.selectModules(moduleChoices);
93
89
 
90
+ // Collect IDE tool selection AFTER configuration prompts (fixes Windows/PowerShell hang)
91
+ // This allows text-based prompts to complete before the checkbox prompt
92
+ const toolSelection = await this.promptToolSelection(confirmedDirectory, selectedModules);
93
+
94
94
  console.clear();
95
95
  CLIUtils.displayLogo();
96
96
  CLIUtils.displayModuleComplete('core', false); // false = don't clear the screen again
@@ -100,7 +100,7 @@ class UI {
100
100
  directory: confirmedDirectory,
101
101
  installCore: true, // Always install core
102
102
  modules: selectedModules,
103
- // IDE selection collected early, will be configured later
103
+ // IDE selection collected after config, will be configured later
104
104
  ides: toolSelection.ides,
105
105
  skipIde: toolSelection.skipIde,
106
106
  coreConfig: coreConfig, // Pass collected core config to installer
@@ -64,7 +64,8 @@ async function formatYamlContent(content, filename) {
64
64
  noRefs: true,
65
65
  sortKeys: false, // Preserve key order
66
66
  });
67
- return formatted;
67
+ // Ensure POSIX-compliant final newline
68
+ return formatted.endsWith('\n') ? formatted : formatted + '\n';
68
69
  } catch (error) {
69
70
  console.error(chalk.red(`❌ YAML syntax error in ${filename}:`), error.message);
70
71
  console.error(chalk.yellow(`💡 Try manually fixing the YAML structure first`));
@@ -176,6 +176,8 @@ function buildMenuItemSchema() {
176
176
  tmpl: createNonEmptyString('agent.menu[].tmpl').optional(),
177
177
  data: createNonEmptyString('agent.menu[].data').optional(),
178
178
  'run-workflow': createNonEmptyString('agent.menu[].run-workflow').optional(),
179
+ checklist: createNonEmptyString('agent.menu[].checklist').optional(),
180
+ document: createNonEmptyString('agent.menu[].document').optional(),
179
181
  })
180
182
  .strict()
181
183
  .superRefine((value, ctx) => {
@@ -1,15 +0,0 @@
1
- ---
2
- description: 'Technical specification workflow for Level 0 projects (single atomic changes). Creates focused tech spec for bug fixes, single endpoint additions, or small isolated changes. Tech-spec only - no PRD needed.'
3
- ---
4
-
5
- # tech-spec-sm
6
-
7
- IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
8
-
9
- <steps CRITICAL="TRUE">
10
- 1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
11
- 2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml
12
- 3. Pass the yaml path bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
13
- 4. Follow workflow.xml instructions EXACTLY as written
14
- 5. Save outputs after EACH section when generating any documents from templates
15
- </steps>
@@ -1,42 +0,0 @@
1
- # Agent Customization
2
- # Customize any section below - all are optional
3
- # After editing: npx bmad-method build <agent-name>
4
-
5
- # Override agent name
6
- agent:
7
- metadata:
8
- name: ""
9
-
10
- # Replace entire persona (not merged)
11
- persona:
12
- role: ""
13
- identity: ""
14
- communication_style: ""
15
- principles: []
16
-
17
- # Add custom critical actions (appended after standard config loading)
18
- critical_actions: []
19
-
20
- # Add persistent memories for the agent
21
- memories: []
22
- # Example:
23
- # memories:
24
- # - "User prefers detailed technical explanations"
25
- # - "Current project uses React and TypeScript"
26
-
27
- # Add custom menu items (appended to base menu)
28
- # Don't include * prefix or help/exit - auto-injected
29
- menu: []
30
- # Example:
31
- # menu:
32
- # - trigger: my-workflow
33
- # workflow: "{project-root}/custom/my.yaml"
34
- # description: My custom workflow
35
-
36
- # Add custom prompts (for action="#id" handlers)
37
- prompts: []
38
- # Example:
39
- # prompts:
40
- # - id: my-prompt
41
- # content: |
42
- # Prompt instructions here
@@ -1,42 +0,0 @@
1
- # Agent Customization
2
- # Customize any section below - all are optional
3
- # After editing: npx bmad-method build <agent-name>
4
-
5
- # Override agent name
6
- agent:
7
- metadata:
8
- name: ""
9
-
10
- # Replace entire persona (not merged)
11
- persona:
12
- role: ""
13
- identity: ""
14
- communication_style: ""
15
- principles: []
16
-
17
- # Add custom critical actions (appended after standard config loading)
18
- critical_actions: []
19
-
20
- # Add persistent memories for the agent
21
- memories: []
22
- # Example:
23
- # memories:
24
- # - "User prefers detailed technical explanations"
25
- # - "Current project uses React and TypeScript"
26
-
27
- # Add custom menu items (appended to base menu)
28
- # Don't include * prefix or help/exit - auto-injected
29
- menu: []
30
- # Example:
31
- # menu:
32
- # - trigger: my-workflow
33
- # workflow: "{project-root}/custom/my.yaml"
34
- # description: My custom workflow
35
-
36
- # Add custom prompts (for action="#id" handlers)
37
- prompts: []
38
- # Example:
39
- # prompts:
40
- # - id: my-prompt
41
- # content: |
42
- # Prompt instructions here
@@ -1,42 +0,0 @@
1
- # Agent Customization
2
- # Customize any section below - all are optional
3
- # After editing: npx bmad-method build <agent-name>
4
-
5
- # Override agent name
6
- agent:
7
- metadata:
8
- name: ""
9
-
10
- # Replace entire persona (not merged)
11
- persona:
12
- role: ""
13
- identity: ""
14
- communication_style: ""
15
- principles: []
16
-
17
- # Add custom critical actions (appended after standard config loading)
18
- critical_actions: []
19
-
20
- # Add persistent memories for the agent
21
- memories: []
22
- # Example:
23
- # memories:
24
- # - "User prefers detailed technical explanations"
25
- # - "Current project uses React and TypeScript"
26
-
27
- # Add custom menu items (appended to base menu)
28
- # Don't include * prefix or help/exit - auto-injected
29
- menu: []
30
- # Example:
31
- # menu:
32
- # - trigger: my-workflow
33
- # workflow: "{project-root}/custom/my.yaml"
34
- # description: My custom workflow
35
-
36
- # Add custom prompts (for action="#id" handlers)
37
- prompts: []
38
- # Example:
39
- # prompts:
40
- # - id: my-prompt
41
- # content: |
42
- # Prompt instructions here
@@ -1,42 +0,0 @@
1
- # Agent Customization
2
- # Customize any section below - all are optional
3
- # After editing: npx bmad-method build <agent-name>
4
-
5
- # Override agent name
6
- agent:
7
- metadata:
8
- name: ""
9
-
10
- # Replace entire persona (not merged)
11
- persona:
12
- role: ""
13
- identity: ""
14
- communication_style: ""
15
- principles: []
16
-
17
- # Add custom critical actions (appended after standard config loading)
18
- critical_actions: []
19
-
20
- # Add persistent memories for the agent
21
- memories: []
22
- # Example:
23
- # memories:
24
- # - "User prefers detailed technical explanations"
25
- # - "Current project uses React and TypeScript"
26
-
27
- # Add custom menu items (appended to base menu)
28
- # Don't include * prefix or help/exit - auto-injected
29
- menu: []
30
- # Example:
31
- # menu:
32
- # - trigger: my-workflow
33
- # workflow: "{project-root}/custom/my.yaml"
34
- # description: My custom workflow
35
-
36
- # Add custom prompts (for action="#id" handlers)
37
- prompts: []
38
- # Example:
39
- # prompts:
40
- # - id: my-prompt
41
- # content: |
42
- # Prompt instructions here
@@ -1,42 +0,0 @@
1
- # Agent Customization
2
- # Customize any section below - all are optional
3
- # After editing: npx bmad-method build <agent-name>
4
-
5
- # Override agent name
6
- agent:
7
- metadata:
8
- name: ""
9
-
10
- # Replace entire persona (not merged)
11
- persona:
12
- role: ""
13
- identity: ""
14
- communication_style: ""
15
- principles: []
16
-
17
- # Add custom critical actions (appended after standard config loading)
18
- critical_actions: []
19
-
20
- # Add persistent memories for the agent
21
- memories: []
22
- # Example:
23
- # memories:
24
- # - "User prefers detailed technical explanations"
25
- # - "Current project uses React and TypeScript"
26
-
27
- # Add custom menu items (appended to base menu)
28
- # Don't include * prefix or help/exit - auto-injected
29
- menu: []
30
- # Example:
31
- # menu:
32
- # - trigger: my-workflow
33
- # workflow: "{project-root}/custom/my.yaml"
34
- # description: My custom workflow
35
-
36
- # Add custom prompts (for action="#id" handlers)
37
- prompts: []
38
- # Example:
39
- # prompts:
40
- # - id: my-prompt
41
- # content: |
42
- # Prompt instructions here
@@ -1,70 +0,0 @@
1
- ---
2
- name: 'bmad builder'
3
- description: 'BMad Builder'
4
- ---
5
-
6
- You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
7
-
8
- ```xml
9
- <agent id="bmad/bmb/agents/bmad-builder.md" name="BMad Builder" title="BMad Builder" icon="🧙">
10
- <activation critical="MANDATORY">
11
- <step n="1">Load persona from this current agent file (already in context)</step>
12
- <step n="2">🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT:
13
- - Load and read {project-root}/bmad/bmb/config.yaml NOW
14
- - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder}
15
- - VERIFY: If config not loaded, STOP and report error to user
16
- - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored</step>
17
- <step n="3">Remember: user's name is {user_name}</step>
18
-
19
- <step n="4">Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of
20
- ALL menu items from menu section</step>
21
- <step n="5">STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text</step>
22
- <step n="6">On user input: Number → execute menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user
23
- to clarify | No match → show "Not recognized"</step>
24
- <step n="7">When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item
25
- (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions</step>
26
-
27
- <menu-handlers>
28
- <handlers>
29
- <handler type="workflow">
30
- When menu item has: workflow="path/to/workflow.yaml"
31
- 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml
32
- 2. Read the complete file - this is the CORE OS for executing BMAD workflows
33
- 3. Pass the yaml path as 'workflow-config' parameter to those instructions
34
- 4. Execute workflow.xml instructions precisely following all steps
35
- 5. Save outputs after completing EACH workflow step (never batch multiple steps together)
36
- 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet
37
- </handler>
38
- </handlers>
39
- </menu-handlers>
40
-
41
- <rules>
42
- - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style
43
- - Stay in character until exit selected
44
- - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown
45
- - Number all lists, use letters for sub-options
46
- - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2
47
- - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}.
48
- </rules>
49
- </activation>
50
- <persona>
51
- <role>Master BMad Module Agent Team and Workflow Builder and Maintainer</role>
52
- <identity>Lives to serve the expansion of the BMad Method</identity>
53
- <communication_style>Talks like a pulp super hero</communication_style>
54
- <principles>Execute resources directly Load resources at runtime never pre-load Always present numbered lists for choices</principles>
55
- </persona>
56
- <menu>
57
- <item cmd="*help">Show numbered menu</item>
58
- <item cmd="*audit-workflow" workflow="{project-root}/bmad/bmb/workflows/audit-workflow/workflow.yaml">Audit existing workflows for BMAD Core compliance and best practices</item>
59
- <item cmd="*convert" workflow="{project-root}/bmad/bmb/workflows/convert-legacy/workflow.yaml">Convert v4 or any other style task agent or template to a workflow</item>
60
- <item cmd="*create-agent" workflow="{project-root}/bmad/bmb/workflows/create-agent/workflow.yaml">Create a new BMAD Core compliant agent</item>
61
- <item cmd="*create-module" workflow="{project-root}/bmad/bmb/workflows/create-module/workflow.yaml">Create a complete BMAD compatible module (custom agents and workflows)</item>
62
- <item cmd="*create-workflow" workflow="{project-root}/bmad/bmb/workflows/create-workflow/workflow.yaml">Create a new BMAD Core workflow with proper structure</item>
63
- <item cmd="*edit-agent" workflow="{project-root}/bmad/bmb/workflows/edit-agent/workflow.yaml">Edit existing agents while following best practices</item>
64
- <item cmd="*edit-module" workflow="{project-root}/bmad/bmb/workflows/edit-module/workflow.yaml">Edit existing modules (structure, agents, workflows, documentation)</item>
65
- <item cmd="*edit-workflow" workflow="{project-root}/bmad/bmb/workflows/edit-workflow/workflow.yaml">Edit existing workflows while following best practices</item>
66
- <item cmd="*redoc" workflow="{project-root}/bmad/bmb/workflows/redoc/workflow.yaml">Create or update module documentation</item>
67
- <item cmd="*exit">Exit with confirmation</item>
68
- </menu>
69
- </agent>
70
- ```
@@ -1,23 +0,0 @@
1
- # Audit Workflow Configuration
2
- name: "audit-workflow"
3
- description: "Comprehensive workflow quality audit - validates structure, config standards, variable usage, bloat detection, and web_bundle completeness. Performs deep analysis of workflow.yaml, instructions.md, template.md, and web_bundle configuration against BMAD v6 standards."
4
- author: "BMad"
5
-
6
- # Critical variables from config
7
- config_source: "{project-root}/bmad/bmb/config.yaml"
8
- output_folder: "{config_source}:output_folder"
9
- user_name: "{config_source}:user_name"
10
- communication_language: "{config_source}:communication_language"
11
- date: system-generated
12
-
13
- # Module path and component files
14
- installed_path: "{project-root}/bmad/bmb/workflows/audit-workflow"
15
- template: "{installed_path}/template.md"
16
- instructions: "{installed_path}/instructions.md"
17
- validation: "{installed_path}/checklist.md"
18
-
19
- # Output configuration
20
- default_output_file: "{output_folder}/audit-report-{{workflow_name}}-{{date}}.md"
21
-
22
- standalone: true
23
- # Web bundle configuration
@@ -1,42 +0,0 @@
1
- # Build Module Workflow Configuration
2
- name: create-module
3
- description: "Interactive workflow to build complete BMAD modules with agents, workflows, tasks, and installation infrastructure"
4
- author: "BMad"
5
-
6
- # Critical variables load from config_source
7
- config_source: "{project-root}/bmad/bmb/config.yaml"
8
- custom_module_location: "{config_source}:custom_module_location"
9
- communication_language: "{config_source}:communication_language"
10
- user_name: "{config_source}:user_name"
11
-
12
- # Reference guides for module building
13
- module_structure_guide: "{installed_path}/module-structure.md"
14
- installer_templates: "{installed_path}/installer-templates/"
15
-
16
- # Use existing build workflows
17
- agent_builder: "{project-root}/bmad/bmb/workflows/create-agent/workflow.yaml"
18
- workflow_builder: "{project-root}/bmad/bmb/workflows/create-workflow/workflow.yaml"
19
- brainstorming_workflow: "{project-root}/bmad/core/workflows/brainstorming/workflow.yaml"
20
- brainstorming_context: "{installed_path}/brainstorm-context.md"
21
-
22
- # Optional docs that help understand module patterns
23
- recommended_inputs:
24
- - module_brief: "{output_folder}/module-brief-*.md"
25
- - brainstorming_results: "{output_folder}/brainstorming-*.md"
26
- - bmm_module: "{project-root}/bmad/bmm/"
27
- - cis_module: "{project-root}/bmad/cis/"
28
- - existing_agents: "{project-root}/bmad/*/agents/"
29
- - existing_workflows: "{project-root}/bmad/*/workflows/"
30
-
31
- # Module path and component files
32
- installed_path: "{project-root}/bmad/bmb/workflows/create-module"
33
- template: false # This is an interactive scaffolding workflow
34
- instructions: "{installed_path}/instructions.md"
35
- validation: "{installed_path}/checklist.md"
36
-
37
- # Output configuration - creates entire module structure
38
- # Save to custom_module_location/{{module_code}}
39
- installer_output_folder: "{custom_module_location}/{{module_code}}"
40
-
41
- standalone: true
42
- # Web bundle configuration