bmad-method 6.3.1-next.2 → 6.3.1-next.20

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 (155) hide show
  1. package/package.json +1 -2
  2. package/src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.md +51 -36
  3. package/src/bmm-skills/1-analysis/bmad-agent-analyst/customize.toml +90 -0
  4. package/src/bmm-skills/1-analysis/bmad-agent-tech-writer/SKILL.md +50 -33
  5. package/src/bmm-skills/1-analysis/bmad-agent-tech-writer/customize.toml +81 -0
  6. package/src/bmm-skills/1-analysis/bmad-document-project/SKILL.md +57 -1
  7. package/src/bmm-skills/1-analysis/bmad-document-project/customize.toml +41 -0
  8. package/src/bmm-skills/1-analysis/bmad-document-project/workflows/deep-dive-instructions.md +1 -0
  9. package/src/bmm-skills/1-analysis/bmad-document-project/workflows/full-scan-instructions.md +1 -0
  10. package/src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md +48 -9
  11. package/src/bmm-skills/1-analysis/bmad-prfaq/customize.toml +41 -0
  12. package/src/bmm-skills/1-analysis/bmad-prfaq/references/verdict.md +4 -0
  13. package/src/bmm-skills/1-analysis/bmad-product-brief/SKILL.md +44 -9
  14. package/src/bmm-skills/1-analysis/bmad-product-brief/customize.toml +47 -0
  15. package/src/bmm-skills/1-analysis/bmad-product-brief/prompts/contextual-discovery.md +8 -7
  16. package/src/bmm-skills/1-analysis/bmad-product-brief/prompts/draft-and-review.md +6 -5
  17. package/src/bmm-skills/1-analysis/bmad-product-brief/prompts/finalize.md +4 -1
  18. package/src/bmm-skills/1-analysis/bmad-product-brief/prompts/guided-elicitation.md +3 -2
  19. package/src/bmm-skills/1-analysis/research/bmad-domain-research/SKILL.md +91 -1
  20. package/src/bmm-skills/1-analysis/research/bmad-domain-research/customize.toml +41 -0
  21. package/src/bmm-skills/1-analysis/research/bmad-domain-research/domain-steps/step-06-research-synthesis.md +6 -0
  22. package/src/bmm-skills/1-analysis/research/bmad-market-research/SKILL.md +91 -1
  23. package/src/bmm-skills/1-analysis/research/bmad-market-research/customize.toml +41 -0
  24. package/src/bmm-skills/1-analysis/research/bmad-market-research/steps/step-06-research-completion.md +6 -0
  25. package/src/bmm-skills/1-analysis/research/bmad-technical-research/SKILL.md +91 -1
  26. package/src/bmm-skills/1-analysis/research/bmad-technical-research/customize.toml +41 -0
  27. package/src/bmm-skills/1-analysis/research/bmad-technical-research/technical-steps/step-06-research-synthesis.md +6 -0
  28. package/src/bmm-skills/2-plan-workflows/bmad-agent-pm/SKILL.md +50 -35
  29. package/src/bmm-skills/2-plan-workflows/bmad-agent-pm/customize.toml +85 -0
  30. package/src/bmm-skills/2-plan-workflows/bmad-agent-ux-designer/SKILL.md +50 -31
  31. package/src/bmm-skills/2-plan-workflows/bmad-agent-ux-designer/customize.toml +60 -0
  32. package/src/bmm-skills/2-plan-workflows/bmad-create-prd/SKILL.md +99 -1
  33. package/src/bmm-skills/2-plan-workflows/bmad-create-prd/customize.toml +41 -0
  34. package/src/bmm-skills/2-plan-workflows/bmad-create-prd/steps-c/step-08-scoping.md +70 -23
  35. package/src/bmm-skills/2-plan-workflows/bmad-create-prd/steps-c/step-11-polish.md +1 -1
  36. package/src/bmm-skills/2-plan-workflows/bmad-create-prd/steps-c/step-12-complete.md +6 -0
  37. package/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/SKILL.md +70 -1
  38. package/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/customize.toml +41 -0
  39. package/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/steps/step-14-complete.md +6 -0
  40. package/src/bmm-skills/2-plan-workflows/bmad-edit-prd/SKILL.md +97 -1
  41. package/src/bmm-skills/2-plan-workflows/bmad-edit-prd/customize.toml +42 -0
  42. package/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-04-complete.md +2 -0
  43. package/src/bmm-skills/2-plan-workflows/bmad-validate-prd/SKILL.md +99 -1
  44. package/src/bmm-skills/2-plan-workflows/bmad-validate-prd/customize.toml +42 -0
  45. package/src/bmm-skills/2-plan-workflows/bmad-validate-prd/steps-v/step-v-13-report-complete.md +1 -0
  46. package/src/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.md +50 -30
  47. package/src/bmm-skills/3-solutioning/bmad-agent-architect/customize.toml +65 -0
  48. package/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/SKILL.md +86 -1
  49. package/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/customize.toml +41 -0
  50. package/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-06-final-assessment.md +6 -0
  51. package/src/bmm-skills/3-solutioning/bmad-create-architecture/SKILL.md +69 -1
  52. package/src/bmm-skills/3-solutioning/bmad-create-architecture/customize.toml +41 -0
  53. package/src/bmm-skills/3-solutioning/bmad-create-architecture/steps/step-08-complete.md +6 -0
  54. package/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/SKILL.md +88 -1
  55. package/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/customize.toml +41 -0
  56. package/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/steps/step-04-final-validation.md +6 -0
  57. package/src/bmm-skills/3-solutioning/bmad-generate-project-context/SKILL.md +76 -1
  58. package/src/bmm-skills/3-solutioning/bmad-generate-project-context/customize.toml +41 -0
  59. package/src/bmm-skills/3-solutioning/bmad-generate-project-context/steps/step-03-complete.md +6 -0
  60. package/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md +48 -43
  61. package/src/bmm-skills/4-implementation/bmad-agent-dev/customize.toml +90 -0
  62. package/src/bmm-skills/4-implementation/bmad-correct-course/SKILL.md +296 -1
  63. package/src/bmm-skills/4-implementation/bmad-correct-course/customize.toml +41 -0
  64. package/src/bmm-skills/4-implementation/bmad-create-story/SKILL.md +412 -1
  65. package/src/bmm-skills/4-implementation/bmad-create-story/customize.toml +41 -0
  66. package/src/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests/SKILL.md +171 -1
  67. package/src/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests/customize.toml +41 -0
  68. package/src/bmm-skills/4-implementation/bmad-retrospective/SKILL.md +1507 -1
  69. package/src/bmm-skills/4-implementation/bmad-retrospective/customize.toml +41 -0
  70. package/src/bmm-skills/module.yaml +49 -0
  71. package/src/core-skills/bmad-advanced-elicitation/SKILL.md +7 -1
  72. package/src/core-skills/bmad-customize/SKILL.md +111 -0
  73. package/src/core-skills/bmad-customize/scripts/list_customizable_skills.py +231 -0
  74. package/src/core-skills/bmad-customize/scripts/tests/test_list_customizable_skills.py +249 -0
  75. package/src/core-skills/bmad-distillator/resources/distillate-format-reference.md +1 -1
  76. package/src/core-skills/bmad-party-mode/SKILL.md +13 -10
  77. package/src/core-skills/module-help.csv +1 -0
  78. package/src/core-skills/module.yaml +3 -0
  79. package/src/scripts/resolve_config.py +176 -0
  80. package/src/scripts/resolve_customization.py +230 -0
  81. package/tools/installer/cli-utils.js +0 -137
  82. package/tools/installer/commands/status.js +1 -1
  83. package/tools/installer/commands/uninstall.js +1 -1
  84. package/tools/installer/core/existing-install.js +1 -1
  85. package/tools/installer/core/install-paths.js +12 -6
  86. package/tools/installer/core/installer.js +88 -88
  87. package/tools/installer/core/manifest-generator.js +331 -189
  88. package/tools/installer/core/manifest.js +24 -642
  89. package/tools/installer/file-ops.js +1 -1
  90. package/tools/installer/fs-native.js +116 -0
  91. package/tools/installer/ide/_config-driven.js +1 -1
  92. package/tools/installer/ide/platform-codes.js +1 -1
  93. package/tools/installer/ide/shared/path-utils.js +0 -145
  94. package/tools/installer/ide/shared/skill-manifest.js +1 -1
  95. package/tools/installer/message-loader.js +1 -1
  96. package/tools/installer/modules/community-manager.js +11 -6
  97. package/tools/installer/modules/custom-module-manager.js +1 -28
  98. package/tools/installer/modules/external-manager.js +5 -44
  99. package/tools/installer/modules/official-modules.js +5 -53
  100. package/tools/installer/modules/plugin-resolver.js +1 -1
  101. package/tools/installer/modules/registry-client.js +133 -12
  102. package/tools/installer/modules/version-resolver.js +336 -0
  103. package/tools/installer/project-root.js +55 -1
  104. package/tools/installer/prompts.js +0 -106
  105. package/tools/installer/ui.js +50 -48
  106. package/tools/migrate-custom-module-paths.js +1 -1
  107. package/src/bmm-skills/1-analysis/bmad-agent-analyst/bmad-skill-manifest.yaml +0 -11
  108. package/src/bmm-skills/1-analysis/bmad-agent-tech-writer/bmad-skill-manifest.yaml +0 -11
  109. package/src/bmm-skills/1-analysis/bmad-document-project/workflow.md +0 -25
  110. package/src/bmm-skills/1-analysis/research/bmad-domain-research/workflow.md +0 -51
  111. package/src/bmm-skills/1-analysis/research/bmad-market-research/workflow.md +0 -51
  112. package/src/bmm-skills/1-analysis/research/bmad-technical-research/workflow.md +0 -52
  113. package/src/bmm-skills/2-plan-workflows/bmad-agent-pm/bmad-skill-manifest.yaml +0 -11
  114. package/src/bmm-skills/2-plan-workflows/bmad-agent-ux-designer/bmad-skill-manifest.yaml +0 -11
  115. package/src/bmm-skills/2-plan-workflows/bmad-create-prd/workflow.md +0 -61
  116. package/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/workflow.md +0 -35
  117. package/src/bmm-skills/2-plan-workflows/bmad-edit-prd/workflow.md +0 -62
  118. package/src/bmm-skills/2-plan-workflows/bmad-validate-prd/workflow.md +0 -61
  119. package/src/bmm-skills/3-solutioning/bmad-agent-architect/bmad-skill-manifest.yaml +0 -11
  120. package/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/workflow.md +0 -47
  121. package/src/bmm-skills/3-solutioning/bmad-create-architecture/workflow.md +0 -32
  122. package/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/workflow.md +0 -51
  123. package/src/bmm-skills/3-solutioning/bmad-generate-project-context/workflow.md +0 -39
  124. package/src/bmm-skills/4-implementation/bmad-agent-dev/bmad-skill-manifest.yaml +0 -11
  125. package/src/bmm-skills/4-implementation/bmad-correct-course/workflow.md +0 -267
  126. package/src/bmm-skills/4-implementation/bmad-create-story/workflow.md +0 -380
  127. package/src/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests/workflow.md +0 -136
  128. package/src/bmm-skills/4-implementation/bmad-retrospective/workflow.md +0 -1479
  129. package/tools/installer/ide/shared/agent-command-generator.js +0 -180
  130. package/tools/installer/ide/shared/bmad-artifacts.js +0 -208
  131. package/tools/installer/ide/shared/module-injections.js +0 -136
  132. package/tools/installer/ide/templates/agent-command-template.md +0 -14
  133. package/tools/installer/ide/templates/combined/antigravity.md +0 -8
  134. package/tools/installer/ide/templates/combined/default-agent.md +0 -15
  135. package/tools/installer/ide/templates/combined/default-task.md +0 -10
  136. package/tools/installer/ide/templates/combined/default-tool.md +0 -10
  137. package/tools/installer/ide/templates/combined/default-workflow.md +0 -6
  138. package/tools/installer/ide/templates/combined/gemini-agent.toml +0 -14
  139. package/tools/installer/ide/templates/combined/gemini-task.toml +0 -11
  140. package/tools/installer/ide/templates/combined/gemini-tool.toml +0 -11
  141. package/tools/installer/ide/templates/combined/gemini-workflow-yaml.toml +0 -16
  142. package/tools/installer/ide/templates/combined/gemini-workflow.toml +0 -14
  143. package/tools/installer/ide/templates/combined/kiro-agent.md +0 -16
  144. package/tools/installer/ide/templates/combined/kiro-task.md +0 -9
  145. package/tools/installer/ide/templates/combined/kiro-tool.md +0 -9
  146. package/tools/installer/ide/templates/combined/kiro-workflow.md +0 -7
  147. package/tools/installer/ide/templates/combined/opencode-agent.md +0 -15
  148. package/tools/installer/ide/templates/combined/opencode-task.md +0 -13
  149. package/tools/installer/ide/templates/combined/opencode-tool.md +0 -13
  150. package/tools/installer/ide/templates/combined/opencode-workflow-yaml.md +0 -16
  151. package/tools/installer/ide/templates/combined/opencode-workflow.md +0 -16
  152. package/tools/installer/ide/templates/combined/rovodev.md +0 -9
  153. package/tools/installer/ide/templates/combined/trae.md +0 -9
  154. package/tools/installer/ide/templates/combined/windsurf-workflow.md +0 -10
  155. package/tools/installer/ide/templates/split/.gitkeep +0 -0
@@ -1,5 +1,5 @@
1
1
  const path = require('node:path');
2
- const fs = require('fs-extra');
2
+ const fs = require('../fs-native');
3
3
  const { Manifest } = require('./manifest');
4
4
  const { OfficialModules } = require('../modules/official-modules');
5
5
  const { IdeManager } = require('../ide/manager');
@@ -11,6 +11,7 @@ const prompts = require('../prompts');
11
11
  const { BMAD_FOLDER_NAME } = require('../ide/shared/path-utils');
12
12
  const { InstallPaths } = require('./install-paths');
13
13
  const { ExternalModuleManager } = require('../modules/external-manager');
14
+ const { resolveModuleVersion } = require('../modules/version-resolver');
14
15
 
15
16
  const { ExistingInstall } = require('./existing-install');
16
17
 
@@ -24,44 +25,6 @@ class Installer {
24
25
  this.bmadFolderName = BMAD_FOLDER_NAME;
25
26
  }
26
27
 
27
- /**
28
- * Read the module version from .claude-plugin/marketplace.json
29
- * Walks up from sourcePath looking for .claude-plugin/marketplace.json
30
- * @param {string} sourcePath - Module source directory
31
- * @returns {string} Version string or empty string
32
- */
33
- async _getMarketplaceVersion(sourcePath) {
34
- let dir = sourcePath;
35
- for (let i = 0; i < 5; i++) {
36
- const marketplacePath = path.join(dir, '.claude-plugin', 'marketplace.json');
37
- if (await fs.pathExists(marketplacePath)) {
38
- try {
39
- const data = JSON.parse(await fs.readFile(marketplacePath, 'utf8'));
40
- return this._extractMarketplaceVersion(data);
41
- } catch {
42
- return '';
43
- }
44
- }
45
- const parent = path.dirname(dir);
46
- if (parent === dir) break;
47
- dir = parent;
48
- }
49
- return '';
50
- }
51
-
52
- /**
53
- * Extract the highest version from marketplace.json plugins array
54
- */
55
- _extractMarketplaceVersion(data) {
56
- const plugins = data?.plugins;
57
- if (!Array.isArray(plugins) || plugins.length === 0) return '';
58
- let best = '';
59
- for (const p of plugins) {
60
- if (p.version && (!best || p.version > best)) best = p.version;
61
- }
62
- return best;
63
- }
64
-
65
28
  /**
66
29
  * Main installation method
67
30
  * @param {Object} config - Installation configuration
@@ -244,6 +207,15 @@ class Installer {
244
207
 
245
208
  const installTasks = [];
246
209
 
210
+ installTasks.push({
211
+ title: 'Installing shared scripts',
212
+ task: async () => {
213
+ await this._installSharedScripts(paths);
214
+ addResult('Shared scripts', 'ok');
215
+ return 'Shared scripts installed';
216
+ },
217
+ });
218
+
247
219
  if (allModules.length > 0) {
248
220
  installTasks.push({
249
221
  title: isQuickUpdate ? `Updating ${allModules.length} module(s)` : `Installing ${allModules.length} module(s)`,
@@ -301,7 +273,8 @@ class Installer {
301
273
  addResult('Configurations', 'ok', 'generated');
302
274
 
303
275
  this.installedFiles.add(paths.manifestFile());
304
- this.installedFiles.add(paths.agentManifest());
276
+ this.installedFiles.add(paths.centralConfig());
277
+ this.installedFiles.add(paths.centralUserConfig());
305
278
 
306
279
  message('Generating manifests...');
307
280
  const manifestGen = new ManifestGenerator();
@@ -322,10 +295,11 @@ class Installer {
322
295
  await manifestGen.generateManifests(paths.bmadDir, allModulesForManifest, [...this.installedFiles], {
323
296
  ides: config.ides || [],
324
297
  preservedModules: modulesForCsvPreserve,
298
+ moduleConfigs,
325
299
  });
326
300
 
327
301
  message('Generating help catalog...');
328
- await this.mergeModuleHelpCatalogs(paths.bmadDir);
302
+ await this.mergeModuleHelpCatalogs(paths.bmadDir, manifestGen.agents);
329
303
  addResult('Help catalog', 'ok');
330
304
 
331
305
  return 'Configurations generated';
@@ -558,6 +532,44 @@ class Installer {
558
532
  return { tempBackupDir, tempModifiedBackupDir };
559
533
  }
560
534
 
535
+ /**
536
+ * Sync src/scripts/* → _bmad/scripts/ so shared Python scripts
537
+ * (e.g. resolve_customization.py) are available at install time.
538
+ * Wipes the destination first so files removed or renamed in source
539
+ * don't linger and get recorded as installed. Also seeds
540
+ * _bmad/custom/.gitignore on fresh installs so *.user.toml overrides
541
+ * stay out of version control.
542
+ */
543
+ async _installSharedScripts(paths) {
544
+ const srcScriptsDir = path.join(paths.srcDir, 'src', 'scripts');
545
+ if (!(await fs.pathExists(srcScriptsDir))) {
546
+ throw new Error(`Shared scripts source directory not found: ${srcScriptsDir}`);
547
+ }
548
+
549
+ await fs.remove(paths.scriptsDir);
550
+ await fs.ensureDir(paths.scriptsDir);
551
+ await fs.copy(srcScriptsDir, paths.scriptsDir, { overwrite: true });
552
+ await this._trackFilesRecursive(paths.scriptsDir);
553
+
554
+ const customGitignore = path.join(paths.customDir, '.gitignore');
555
+ if (!(await fs.pathExists(customGitignore))) {
556
+ await fs.writeFile(customGitignore, '*.user.toml\n', 'utf8');
557
+ this.installedFiles.add(customGitignore);
558
+ }
559
+ }
560
+
561
+ async _trackFilesRecursive(dir) {
562
+ const entries = await fs.readdir(dir, { withFileTypes: true });
563
+ for (const entry of entries) {
564
+ const full = path.join(dir, entry.name);
565
+ if (entry.isDirectory()) {
566
+ await this._trackFilesRecursive(full);
567
+ } else if (entry.isFile()) {
568
+ this.installedFiles.add(full);
569
+ }
570
+ }
571
+ }
572
+
561
573
  /**
562
574
  * Install official (non-custom) modules.
563
575
  * @param {Object} config - Installation configuration
@@ -592,15 +604,18 @@ class Installer {
592
604
  },
593
605
  );
594
606
 
595
- // Get display name from source module.yaml; version from resolution cache or marketplace.json
607
+ // Get display name from source module.yaml and resolve the freshest version metadata we can find locally.
596
608
  const sourcePath = await officialModules.findModuleSource(moduleName, { silent: true });
597
609
  const moduleInfo = sourcePath ? await officialModules.getModuleInfo(sourcePath, moduleName, '') : null;
598
610
  const displayName = moduleInfo?.name || moduleName;
599
611
 
600
- // Prefer version from resolution cache (accurate for custom/local modules),
601
- // fall back to marketplace.json walk-up for official modules
602
612
  const cachedResolution = CustomModuleManager._resolutionCache.get(moduleName);
603
- const version = cachedResolution?.version || (sourcePath ? await this._getMarketplaceVersion(sourcePath) : '');
613
+ const versionInfo = await resolveModuleVersion(moduleName, {
614
+ moduleSourcePath: sourcePath,
615
+ fallbackVersion: cachedResolution?.version,
616
+ marketplacePluginNames: cachedResolution?.pluginName ? [cachedResolution.pluginName] : [],
617
+ });
618
+ const version = versionInfo.version || '';
604
619
  addResult(displayName, 'ok', '', { moduleCode: moduleName, newVersion: version });
605
620
  }
606
621
  }
@@ -671,8 +686,11 @@ class Installer {
671
686
  const customFiles = [];
672
687
  const modifiedFiles = [];
673
688
 
674
- // Memory is always in _bmad/_memory
675
- const bmadMemoryPath = '_memory';
689
+ // Memory subtrees (v6.1: _bmad/_memory, current: _bmad/memory) hold
690
+ // per-user runtime data generated by agents with sidecars. These files
691
+ // aren't installer-managed and must never be reported as "custom" or
692
+ // "modified" — they're user state, not user overrides.
693
+ const bmadMemoryPaths = ['_memory', 'memory'];
676
694
 
677
695
  // Check if the manifest has hashes - if not, we can't detect modifications
678
696
  let manifestHasHashes = false;
@@ -738,7 +756,7 @@ class Installer {
738
756
  continue;
739
757
  }
740
758
 
741
- if (relativePath.startsWith(bmadMemoryPath + '/') && path.dirname(relativePath).includes('-sidecar')) {
759
+ if (bmadMemoryPaths.some((mp) => relativePath === mp || relativePath.startsWith(mp + '/'))) {
742
760
  continue;
743
761
  }
744
762
 
@@ -789,9 +807,8 @@ class Installer {
789
807
 
790
808
  // Get all installed module directories
791
809
  const entries = await fs.readdir(bmadDir, { withFileTypes: true });
792
- const installedModules = entries
793
- .filter((entry) => entry.isDirectory() && entry.name !== '_config' && entry.name !== 'docs')
794
- .map((entry) => entry.name);
810
+ const nonModuleDirs = new Set(['_config', '_memory', 'memory', 'docs', 'scripts', 'custom']);
811
+ const installedModules = entries.filter((entry) => entry.isDirectory() && !nonModuleDirs.has(entry.name)).map((entry) => entry.name);
795
812
 
796
813
  // Generate config.yaml for each installed module
797
814
  for (const moduleName of installedModules) {
@@ -873,53 +890,36 @@ class Installer {
873
890
  }
874
891
 
875
892
  /**
876
- * Merge all module-help.csv files into a single bmad-help.csv
877
- * Scans all installed modules for module-help.csv and merges them
878
- * Enriches agent info from agent-manifest.csv
879
- * Output is written to _bmad/_config/bmad-help.csv
893
+ * Merge all module-help.csv files into a single bmad-help.csv.
894
+ * Scans all installed modules for module-help.csv and merges them.
895
+ * Enriches agent info from the in-memory agent list produced by ManifestGenerator.
896
+ * Output is written to _bmad/_config/bmad-help.csv.
880
897
  * @param {string} bmadDir - BMAD installation directory
898
+ * @param {Array<Object>} agentEntries - Agents collected from module.yaml (code, name, title, icon, module, ...)
881
899
  */
882
- async mergeModuleHelpCatalogs(bmadDir) {
900
+ async mergeModuleHelpCatalogs(bmadDir, agentEntries = []) {
883
901
  const allRows = [];
884
902
  const headerRow =
885
903
  'module,phase,name,code,sequence,workflow-file,command,required,agent-name,agent-command,agent-display-name,agent-title,options,description,output-location,outputs';
886
904
 
887
- // Load agent manifest for agent info lookup
888
- const agentManifestPath = path.join(bmadDir, '_config', 'agent-manifest.csv');
889
- const agentInfo = new Map(); // agent-name -> {command, displayName, title+icon}
890
-
891
- if (await fs.pathExists(agentManifestPath)) {
892
- const manifestContent = await fs.readFile(agentManifestPath, 'utf8');
893
- const lines = manifestContent.split('\n').filter((line) => line.trim());
894
-
895
- for (const line of lines) {
896
- if (line.startsWith('name,')) continue; // Skip header
897
-
898
- const cols = line.split(',');
899
- if (cols.length >= 4) {
900
- const agentName = cols[0].replaceAll('"', '').trim();
901
- const displayName = cols[1].replaceAll('"', '').trim();
902
- const title = cols[2].replaceAll('"', '').trim();
903
- const icon = cols[3].replaceAll('"', '').trim();
904
- const module = cols[10] ? cols[10].replaceAll('"', '').trim() : '';
905
-
906
- // Build agent command: bmad:module:agent:name
907
- const agentCommand = module ? `bmad:${module}:agent:${agentName}` : `bmad:agent:${agentName}`;
908
-
909
- agentInfo.set(agentName, {
910
- command: agentCommand,
911
- displayName: displayName || agentName,
912
- title: icon && title ? `${icon} ${title}` : title || agentName,
913
- });
914
- }
915
- }
905
+ // Build agent lookup from the in-memory list (agent code → command + display fields).
906
+ const agentInfo = new Map();
907
+ for (const agent of agentEntries) {
908
+ if (!agent || !agent.code) continue;
909
+ const agentCommand = agent.module ? `bmad:${agent.module}:agent:${agent.code}` : `bmad:agent:${agent.code}`;
910
+ const displayName = agent.name || agent.code;
911
+ const titleCombined = agent.icon && agent.title ? `${agent.icon} ${agent.title}` : agent.title || agent.code;
912
+ agentInfo.set(agent.code, {
913
+ command: agentCommand,
914
+ displayName,
915
+ title: titleCombined,
916
+ });
916
917
  }
917
918
 
918
919
  // Get all installed module directories
919
920
  const entries = await fs.readdir(bmadDir, { withFileTypes: true });
920
- const installedModules = entries
921
- .filter((entry) => entry.isDirectory() && entry.name !== '_config' && entry.name !== 'docs' && entry.name !== '_memory')
922
- .map((entry) => entry.name);
921
+ const nonModuleDirs = new Set(['_config', '_memory', 'memory', 'docs', 'scripts', 'custom']);
922
+ const installedModules = entries.filter((entry) => entry.isDirectory() && !nonModuleDirs.has(entry.name)).map((entry) => entry.name);
923
923
 
924
924
  // Add core module to scan (it's installed at root level as _config, but we check src/core-skills)
925
925
  const coreModulePath = getSourcePath('core-skills');