bmad-plus 0.12.2 → 0.14.0

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 (127) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +96 -461
  3. package/package.json +12 -5
  4. package/readme-international/README.de.md +42 -9
  5. package/readme-international/README.es.md +43 -10
  6. package/readme-international/README.fr.md +42 -9
  7. package/src/bmad-plus/agents/agent-orchestrator/SKILL.md +5 -3
  8. package/src/bmad-plus/module.yaml +270 -220
  9. package/src/bmad-plus/packs/pack-dev-studio/README.md +133 -141
  10. package/src/bmad-plus/packs/pack-dev-studio/SKILL.md +49 -0
  11. package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/analyst-agent.md +35 -60
  12. package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/document-project.md +59 -59
  13. package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/domain-research.md +55 -93
  14. package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/market-research.md +58 -93
  15. package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/prfaq.md +55 -132
  16. package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/product-brief.md +63 -78
  17. package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/tech-writer-agent.md +54 -69
  18. package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/technical-research.md +54 -93
  19. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/architect-agent.md +32 -60
  20. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/create-architecture.md +67 -71
  21. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/create-epics-stories.md +61 -90
  22. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/generate-project-context.md +56 -78
  23. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/implementation-readiness.md +55 -88
  24. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-01-init.md +20 -153
  25. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-01b-continue.md +20 -173
  26. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-02-context.md +14 -220
  27. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-03-starter.md +20 -329
  28. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-04-decisions.md +15 -314
  29. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-05-patterns.md +15 -355
  30. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-06-structure.md +15 -375
  31. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-07-validation.md +14 -357
  32. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-08-complete.md +13 -78
  33. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/checkpoint-preview.md +52 -65
  34. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-01-gather-context.md +14 -81
  35. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-02-review.md +14 -31
  36. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-03-triage.md +14 -45
  37. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-04-present.md +13 -128
  38. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review.md +61 -87
  39. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/correct-course.md +55 -298
  40. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/create-story.md +52 -426
  41. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-agent.md +48 -69
  42. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-story-checklist.md +22 -80
  43. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-story.md +60 -482
  44. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/investigate.md +50 -184
  45. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/qa-e2e-tests.md +57 -173
  46. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/quick-dev.md +56 -108
  47. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/retrospective.md +54 -1509
  48. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/sprint-planning.md +54 -296
  49. package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/sprint-status.md +41 -283
  50. package/src/bmad-plus/packs/pack-dev-studio/categories/planning/create-prd.md +58 -18
  51. package/src/bmad-plus/packs/pack-dev-studio/categories/planning/create-ux-design.md +103 -72
  52. package/src/bmad-plus/packs/pack-dev-studio/categories/planning/edit-prd.md +55 -27
  53. package/src/bmad-plus/packs/pack-dev-studio/categories/planning/pm-agent.md +34 -60
  54. package/src/bmad-plus/packs/pack-dev-studio/categories/planning/prd.md +46 -87
  55. package/src/bmad-plus/packs/pack-dev-studio/categories/planning/steps/step-01-init.md +10 -0
  56. package/src/bmad-plus/packs/pack-dev-studio/categories/planning/ux-designer-agent.md +30 -60
  57. package/src/bmad-plus/packs/pack-dev-studio/categories/planning/validate-prd.md +57 -27
  58. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/advanced-elicitation.md +47 -138
  59. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/adversarial-review.md +48 -34
  60. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/bmad-help.md +51 -68
  61. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/brainstorming.md +46 -3
  62. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/customize.md +68 -109
  63. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/distillator.md +53 -174
  64. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/edge-case-hunter.md +39 -53
  65. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/editorial-review-prose.md +45 -83
  66. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/editorial-review-structure.md +45 -176
  67. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/index-docs.md +45 -63
  68. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/party-mode.md +53 -124
  69. package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/shard-doc.md +44 -100
  70. package/src/bmad-plus/packs/pack-dev-studio/dev-studio-orchestrator.md +56 -116
  71. package/src/bmad-plus/packs/pack-dev-studio/shared/architecture-decision-template.md +49 -12
  72. package/src/bmad-plus/packs/pack-dev-studio/shared/bwml-spec.md +51 -328
  73. package/src/bmad-plus/packs/pack-dev-studio/shared/catalog.json +489 -0
  74. package/src/bmad-plus/packs/pack-dev-studio/shared/execution.md +69 -0
  75. package/src/bmad-plus/packs/pack-dev-studio/shared/module-help.csv +39 -32
  76. package/src/bmad-plus/packs/pack-dev-studio/upstream-sync.yaml +85 -14
  77. package/src/bmad-plus/packs/pack-memory/README.md +6 -0
  78. package/src/bmad-plus/packs/pack-memory/memory-orchestrator.md +12 -5
  79. package/src/bmad-plus/packs/pack-seo/SKILL.md +27 -1
  80. package/src/bmad-plus/packs/pack-seo/scripts/seo_apis.py +8 -8
  81. package/src/bmad-plus/packs/pack-seo/scripts/seo_fetch.py +1 -2
  82. package/src/bmad-plus/packs/pack-seo/scripts/seo_report.py +0 -1
  83. package/src/bmad-plus/packs/pack-seo/seo-chief.md +16 -1
  84. package/src/bmad-plus/packs/pack-seo/seo-judge.md +12 -0
  85. package/src/bmad-plus/packs/pack-seo/seo-scout.md +12 -0
  86. package/src/bmad-plus/skills/bmad-plus-autopilot/SKILL.md +4 -4
  87. package/src/bmad-plus/skills/bmad-plus-sync/SKILL.md +5 -3
  88. package/src/bmad-plus/skills/dev-studio/SKILL.md +19 -0
  89. package/tools/bmad-plus-npx.js +4 -2
  90. package/tools/build/adapters.config.js +60 -51
  91. package/tools/build/check-counts.js +52 -54
  92. package/tools/build/check-install-contract.js +450 -0
  93. package/tools/build/generate-adapters.js +252 -56
  94. package/tools/build/generate.js +364 -14
  95. package/tools/build/generated-adapters/.codex/AGENTS.md +20 -7
  96. package/tools/build/generated-adapters/.cursor/rules/bmad-plus.mdc +20 -7
  97. package/tools/build/generated-adapters/.opencode/AGENTS.md +20 -7
  98. package/tools/build/generated-adapters/AGENTS.md +20 -7
  99. package/tools/build/generated-adapters/CLAUDE.md +20 -7
  100. package/tools/build/generated-adapters/CONVENTIONS.md +20 -7
  101. package/tools/build/generated-adapters/GEMINI.md +20 -7
  102. package/tools/build/module.template.yaml +82 -0
  103. package/tools/build/pack-delivery.js +78 -0
  104. package/tools/cli/bmad-plus-cli.js +16 -1
  105. package/tools/cli/commands/doctor.js +49 -217
  106. package/tools/cli/commands/install.js +109 -164
  107. package/tools/cli/commands/studio.js +68 -0
  108. package/tools/cli/commands/uninstall.js +173 -65
  109. package/tools/cli/commands/update-check.js +31 -0
  110. package/tools/cli/commands/update-policy.js +39 -0
  111. package/tools/cli/commands/update.js +102 -113
  112. package/tools/cli/i18n.js +60 -0
  113. package/tools/cli/lib/ide-config.js +4 -261
  114. package/tools/cli/lib/install-manifest.js +17 -0
  115. package/tools/cli/lib/installation-health.js +360 -0
  116. package/tools/cli/lib/installed-adapters.js +89 -0
  117. package/tools/cli/lib/npm-runner.js +177 -0
  118. package/tools/cli/lib/pack-copy.js +62 -66
  119. package/tools/cli/lib/packs.js +546 -3
  120. package/tools/cli/lib/python-health.js +233 -0
  121. package/tools/cli/lib/python-provision.js +2 -2
  122. package/tools/cli/lib/studio.js +310 -0
  123. package/tools/cli/lib/update-check.js +153 -0
  124. package/tools/cli/lib/update-dispatch.js +182 -0
  125. package/tools/cli/lib/update-policy.js +90 -0
  126. package/tools/cli/lib/update-transaction.js +334 -0
  127. package/tools/release/publication-content.js +901 -0
@@ -1,84 +1,80 @@
1
1
  /**
2
- * BMAD+ Shared Pack-Copy Module
3
- * Extracted duplicate file-copy loops from install.js and update.js.
4
- *
2
+ * Shared deterministic pack enumeration and conservative installation copying.
5
3
  * Author: Laurent Rochetta
6
4
  */
7
-
8
5
  const path = require('node:path');
9
6
  const fs = require('node:fs');
10
- const fsExtra = require('fs-extra');
11
-
12
- /**
13
- * Copy files for a single pack definition into the target directories.
14
- *
15
- * @param {object} opts
16
- * @param {string} opts.bmadSrc - Path to src/bmad-plus/
17
- * @param {string} opts.targetAgentsDir - Destination for agents / skills
18
- * @param {string} opts.targetDataDir - Destination for data files
19
- * @param {string} opts.projectRoot - Project root (for external package resolution)
20
- * @param {object} opts.pack - Pack definition from PACKS
21
- * @returns {{ copiedAgents: number, copiedSkills: number, copiedFiles: number }}
22
- */
23
- function copyPackFiles({ bmadSrc, targetAgentsDir, targetDataDir, projectRoot, pack }) {
24
- let copiedAgents = 0;
25
- let copiedSkills = 0;
26
- let copiedFiles = 0;
7
+ const crypto = require('node:crypto');
8
+ const { safeTarget } = require('../../build/generate-adapters');
27
9
 
28
- if (!pack) return { copiedAgents, copiedSkills, copiedFiles };
10
+ const fileHash = content => crypto.createHash('sha256').update(content).digest('hex');
29
11
 
30
- // Copy agents
31
- for (const agent of (pack.agents || [])) {
32
- const src = path.join(bmadSrc, 'agents', agent);
33
- const dest = path.join(targetAgentsDir, agent);
34
- if (fs.existsSync(src)) {
35
- fsExtra.copySync(src, dest, { overwrite: true });
36
- copiedAgents++;
12
+ function listPackFiles({ bmadSrc, targetAgentsDir, targetDataDir, projectRoot, pack }) {
13
+ const result = { copiedAgents: 0, copiedSkills: 0, copiedFiles: 0, files: [] };
14
+ if (!pack) return result;
15
+ function walk(source, target) {
16
+ let stat;
17
+ try { stat = fs.lstatSync(source); } catch (error) {
18
+ if (error.code === 'ENOENT') return false;
19
+ throw error;
37
20
  }
21
+ if (stat.isSymbolicLink()) throw new Error('Pack source is a symbolic link: ' + source);
22
+ if (stat.isDirectory()) {
23
+ for (const name of fs.readdirSync(source).sort()) walk(path.join(source, name), path.join(target, name));
24
+ } else if (stat.isFile()) {
25
+ result.files.push({ source, target });
26
+ } else throw new Error('Pack source is not a regular file: ' + source);
27
+ return true;
38
28
  }
39
-
40
- // Copy skills
41
- for (const skill of (pack.skills || [])) {
42
- const src = path.join(bmadSrc, 'skills', skill);
43
- const dest = path.join(targetAgentsDir, skill);
44
- if (fs.existsSync(src)) {
45
- fsExtra.copySync(src, dest, { overwrite: true });
46
- copiedSkills++;
47
- }
29
+ for (const name of pack.agents || []) {
30
+ if (walk(path.join(bmadSrc, 'agents', name), path.join(targetAgentsDir, name))) result.copiedAgents++;
48
31
  }
49
-
50
- // Copy data files
51
- for (const dataFile of (pack.data || [])) {
52
- const src = path.join(bmadSrc, 'data', dataFile);
53
- const dest = path.join(targetDataDir, dataFile);
54
- if (fs.existsSync(src)) {
55
- fsExtra.copySync(src, dest, { overwrite: true });
56
- copiedFiles++;
57
- }
32
+ for (const name of pack.skills || []) {
33
+ if (walk(path.join(bmadSrc, 'skills', name), path.join(targetAgentsDir, name))) result.copiedSkills++;
58
34
  }
59
-
60
- // Copy external package (e.g. OSINT)
61
- if (pack.externalPackage) {
62
- const extSrc = path.join(projectRoot, pack.externalPackage, 'skills');
63
- if (fs.existsSync(extSrc)) {
64
- fsExtra.copySync(extSrc, targetAgentsDir, { overwrite: true });
65
- copiedSkills++;
66
- }
35
+ for (const name of pack.data || []) {
36
+ if (walk(path.join(bmadSrc, 'data', name), path.join(targetDataDir, name))) result.copiedFiles++;
37
+ }
38
+ if (pack.externalPackage && walk(path.join(projectRoot, pack.externalPackage, 'skills'), targetAgentsDir)) result.copiedSkills++;
39
+ if (pack.packDir && walk(path.join(bmadSrc, pack.packSrcDir || 'agents', pack.packDir), path.join(targetAgentsDir, pack.packDir))) {
40
+ result.copiedAgents++;
41
+ result.copiedFiles++;
67
42
  }
43
+ return result;
44
+ }
68
45
 
69
- // Copy pack directory (SEO, Backup, Animated, Shield, etc.)
70
- if (pack.packDir) {
71
- const srcParent = pack.packSrcDir || 'agents';
72
- const packSrc = path.join(bmadSrc, srcParent, pack.packDir);
73
- const packDest = path.join(targetAgentsDir, pack.packDir);
74
- if (fs.existsSync(packSrc)) {
75
- fsExtra.copySync(packSrc, packDest, { overwrite: true });
76
- copiedAgents++;
77
- copiedFiles++;
46
+ function copyManagedFile({ source, target, projectDir, inventory, previousInventory = {}, onConflict = () => {} }) {
47
+ const file = path.relative(projectDir, target).split(path.sep).join('/');
48
+ safeTarget(projectDir, file);
49
+ const sourceStat = fs.lstatSync(source);
50
+ if (!sourceStat.isFile() || sourceStat.isSymbolicLink()) throw new Error('Pack source is not a regular file: ' + source);
51
+ const content = fs.readFileSync(source);
52
+ const hash = fileHash(content);
53
+ if (fs.existsSync(target)) {
54
+ const existingHash = fileHash(fs.readFileSync(target));
55
+ if (existingHash === hash) {
56
+ if (inventory) inventory[file] = hash;
57
+ return false;
58
+ }
59
+ if (previousInventory[file] !== existingHash) {
60
+ if (inventory && previousInventory[file]) inventory[file] = previousInventory[file];
61
+ onConflict(file);
62
+ return false;
78
63
  }
79
64
  }
65
+ fs.mkdirSync(path.dirname(target), { recursive: true });
66
+ safeTarget(projectDir, file);
67
+ fs.writeFileSync(target, content, { mode: sourceStat.mode });
68
+ if (inventory) inventory[file] = hash;
69
+ return true;
70
+ }
80
71
 
81
- return { copiedAgents, copiedSkills, copiedFiles };
72
+ function copyPackFiles(options) {
73
+ const { files, ...counts } = listPackFiles(options);
74
+ const projectDir = options.projectDir || path.dirname(options.targetAgentsDir);
75
+ for (const { target } of files) safeTarget(projectDir, path.relative(projectDir, target).split(path.sep).join('/'));
76
+ for (const entry of files) copyManagedFile({ ...options, ...entry, projectDir });
77
+ return counts;
82
78
  }
83
79
 
84
- module.exports = { copyPackFiles };
80
+ module.exports = { copyPackFiles, listPackFiles, copyManagedFile, fileHash };