bmad-method 6.0.5-next.9 → 6.1.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 (261) hide show
  1. package/package.json +1 -1
  2. package/src/bmm/agents/analyst.agent.yaml +1 -1
  3. package/src/bmm/module-help.csv +1 -1
  4. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +1 -1
  5. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +1 -1
  6. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +1 -1
  7. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +1 -1
  8. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02-discovery.md +1 -1
  9. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02b-vision.md +1 -1
  10. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02c-executive-summary.md +1 -1
  11. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-03-success.md +1 -1
  12. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-04-journeys.md +1 -1
  13. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-05-domain.md +1 -1
  14. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-06-innovation.md +1 -1
  15. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-07-project-type.md +1 -1
  16. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-08-scoping.md +1 -1
  17. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-09-functional.md +1 -1
  18. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-10-nonfunctional.md +1 -1
  19. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-11-polish.md +1 -1
  20. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01-discovery.md +1 -1
  21. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +1 -1
  22. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +1 -1
  23. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +2 -2
  24. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +2 -2
  25. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +2 -2
  26. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +2 -2
  27. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +2 -2
  28. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +2 -2
  29. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +2 -2
  30. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +2 -2
  31. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +2 -2
  32. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +2 -2
  33. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +2 -2
  34. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +2 -2
  35. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +2 -2
  36. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +2 -2
  37. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +2 -2
  38. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +2 -2
  39. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +2 -2
  40. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +31 -13
  41. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +1 -1
  42. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +6 -2
  43. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +1 -1
  44. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/templates/epics-template.md +4 -0
  45. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md +0 -4
  46. package/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +1 -1
  47. package/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +1 -1
  48. package/src/bmm/workflows/generate-project-context/steps/step-02-generate.md +1 -1
  49. package/src/core/module-help.csv +2 -2
  50. package/src/core/workflows/bmad-brainstorming/SKILL.md +6 -0
  51. package/src/core/workflows/bmad-brainstorming/bmad-skill-manifest.yaml +1 -0
  52. package/src/core/workflows/{brainstorming → bmad-brainstorming}/workflow.md +2 -5
  53. package/src/core/workflows/bmad-party-mode/SKILL.md +6 -0
  54. package/src/core/workflows/bmad-party-mode/bmad-skill-manifest.yaml +1 -0
  55. package/src/core/workflows/{party-mode → bmad-party-mode}/steps/step-03-graceful-exit.md +0 -1
  56. package/src/core/workflows/{party-mode → bmad-party-mode}/workflow.md +0 -4
  57. package/tools/cli/external-official-modules.yaml +18 -18
  58. package/tools/cli/installers/lib/core/installer.js +25 -8
  59. package/tools/cli/installers/lib/ide/_base-ide.js +0 -1
  60. package/tools/cli/installers/lib/ide/_config-driven.js +9 -4
  61. package/tools/cli/installers/lib/ide/manager.js +3 -3
  62. package/tools/cli/lib/agent/compiler.js +1 -1
  63. package/.augment/code_review_guidelines.yaml +0 -231
  64. package/.coderabbit.yaml +0 -85
  65. package/.github/CODE_OF_CONDUCT.md +0 -128
  66. package/.github/FUNDING.yaml +0 -15
  67. package/.github/ISSUE_TEMPLATE/bug-report.yaml +0 -124
  68. package/.github/ISSUE_TEMPLATE/config.yaml +0 -8
  69. package/.github/ISSUE_TEMPLATE/documentation.yaml +0 -55
  70. package/.github/ISSUE_TEMPLATE/feature-request.md +0 -22
  71. package/.github/ISSUE_TEMPLATE/issue.md +0 -32
  72. package/.github/PULL_REQUEST_TEMPLATE.md +0 -13
  73. package/.github/scripts/discord-helpers.sh +0 -34
  74. package/.github/workflows/coderabbit-review.yaml +0 -22
  75. package/.github/workflows/discord.yaml +0 -90
  76. package/.github/workflows/docs.yaml +0 -64
  77. package/.github/workflows/publish.yaml +0 -133
  78. package/.github/workflows/quality.yaml +0 -116
  79. package/.husky/pre-commit +0 -20
  80. package/.markdownlint-cli2.yaml +0 -41
  81. package/.nvmrc +0 -1
  82. package/.prettierignore +0 -12
  83. package/.vscode/settings.json +0 -96
  84. package/CHANGELOG.md +0 -1785
  85. package/CNAME +0 -1
  86. package/CONTRIBUTING.md +0 -176
  87. package/CONTRIBUTORS.md +0 -32
  88. package/SECURITY.md +0 -85
  89. package/TRADEMARK.md +0 -55
  90. package/Wordmark.png +0 -0
  91. package/banner-bmad-method.png +0 -0
  92. package/docs/404.md +0 -9
  93. package/docs/_STYLE_GUIDE.md +0 -370
  94. package/docs/explanation/advanced-elicitation.md +0 -49
  95. package/docs/explanation/adversarial-review.md +0 -59
  96. package/docs/explanation/brainstorming.md +0 -33
  97. package/docs/explanation/established-projects-faq.md +0 -50
  98. package/docs/explanation/party-mode.md +0 -59
  99. package/docs/explanation/preventing-agent-conflicts.md +0 -112
  100. package/docs/explanation/project-context.md +0 -157
  101. package/docs/explanation/quick-dev-new-preview.md +0 -73
  102. package/docs/explanation/quick-flow.md +0 -77
  103. package/docs/explanation/why-solutioning-matters.md +0 -77
  104. package/docs/how-to/customize-bmad.md +0 -172
  105. package/docs/how-to/established-projects.md +0 -117
  106. package/docs/how-to/get-answers-about-bmad.md +0 -138
  107. package/docs/how-to/install-bmad.md +0 -116
  108. package/docs/how-to/non-interactive-installation.md +0 -171
  109. package/docs/how-to/project-context.md +0 -136
  110. package/docs/how-to/quick-fixes.md +0 -123
  111. package/docs/how-to/shard-large-documents.md +0 -78
  112. package/docs/how-to/upgrade-to-v6.md +0 -100
  113. package/docs/index.md +0 -60
  114. package/docs/reference/agents.md +0 -28
  115. package/docs/reference/commands.md +0 -145
  116. package/docs/reference/modules.md +0 -76
  117. package/docs/reference/testing.md +0 -106
  118. package/docs/reference/workflow-map.md +0 -89
  119. package/docs/roadmap.mdx +0 -136
  120. package/docs/tutorials/getting-started.md +0 -275
  121. package/docs/zh-cn/404.md +0 -9
  122. package/docs/zh-cn/_STYLE_GUIDE.md +0 -370
  123. package/docs/zh-cn/explanation/advanced-elicitation.md +0 -62
  124. package/docs/zh-cn/explanation/adversarial-review.md +0 -71
  125. package/docs/zh-cn/explanation/brainstorming.md +0 -43
  126. package/docs/zh-cn/explanation/established-projects-faq.md +0 -60
  127. package/docs/zh-cn/explanation/party-mode.md +0 -79
  128. package/docs/zh-cn/explanation/preventing-agent-conflicts.md +0 -137
  129. package/docs/zh-cn/explanation/project-context.md +0 -176
  130. package/docs/zh-cn/explanation/quick-flow.md +0 -93
  131. package/docs/zh-cn/explanation/why-solutioning-matters.md +0 -90
  132. package/docs/zh-cn/how-to/customize-bmad.md +0 -182
  133. package/docs/zh-cn/how-to/established-projects.md +0 -134
  134. package/docs/zh-cn/how-to/get-answers-about-bmad.md +0 -144
  135. package/docs/zh-cn/how-to/install-bmad.md +0 -105
  136. package/docs/zh-cn/how-to/non-interactive-installation.md +0 -181
  137. package/docs/zh-cn/how-to/project-context.md +0 -152
  138. package/docs/zh-cn/how-to/quick-fixes.md +0 -140
  139. package/docs/zh-cn/how-to/shard-large-documents.md +0 -86
  140. package/docs/zh-cn/how-to/upgrade-to-v6.md +0 -120
  141. package/docs/zh-cn/index.md +0 -69
  142. package/docs/zh-cn/reference/agents.md +0 -41
  143. package/docs/zh-cn/reference/commands.md +0 -166
  144. package/docs/zh-cn/reference/modules.md +0 -94
  145. package/docs/zh-cn/reference/testing.md +0 -122
  146. package/docs/zh-cn/reference/workflow-map.md +0 -104
  147. package/docs/zh-cn/roadmap.mdx +0 -152
  148. package/docs/zh-cn/tutorials/getting-started.md +0 -300
  149. package/eslint.config.mjs +0 -141
  150. package/prettier.config.mjs +0 -32
  151. package/src/core/workflows/brainstorming/bmad-skill-manifest.yaml +0 -3
  152. package/src/core/workflows/party-mode/bmad-skill-manifest.yaml +0 -3
  153. package/test/README.md +0 -295
  154. package/test/adversarial-review-tests/README.md +0 -56
  155. package/test/adversarial-review-tests/sample-content.md +0 -46
  156. package/test/adversarial-review-tests/test-cases.yaml +0 -103
  157. package/test/fixtures/agent-schema/invalid/critical-actions/actions-as-string.agent.yaml +0 -27
  158. package/test/fixtures/agent-schema/invalid/critical-actions/empty-string-in-actions.agent.yaml +0 -30
  159. package/test/fixtures/agent-schema/invalid/menu/empty-menu.agent.yaml +0 -22
  160. package/test/fixtures/agent-schema/invalid/menu/missing-menu.agent.yaml +0 -20
  161. package/test/fixtures/agent-schema/invalid/menu-commands/empty-command-target.agent.yaml +0 -25
  162. package/test/fixtures/agent-schema/invalid/menu-commands/no-command-target.agent.yaml +0 -24
  163. package/test/fixtures/agent-schema/invalid/menu-triggers/camel-case.agent.yaml +0 -25
  164. package/test/fixtures/agent-schema/invalid/menu-triggers/compound-invalid-format.agent.yaml +0 -25
  165. package/test/fixtures/agent-schema/invalid/menu-triggers/compound-mismatched-kebab.agent.yaml +0 -25
  166. package/test/fixtures/agent-schema/invalid/menu-triggers/duplicate-triggers.agent.yaml +0 -31
  167. package/test/fixtures/agent-schema/invalid/menu-triggers/empty-trigger.agent.yaml +0 -25
  168. package/test/fixtures/agent-schema/invalid/menu-triggers/leading-asterisk.agent.yaml +0 -25
  169. package/test/fixtures/agent-schema/invalid/menu-triggers/snake-case.agent.yaml +0 -25
  170. package/test/fixtures/agent-schema/invalid/menu-triggers/trigger-with-spaces.agent.yaml +0 -25
  171. package/test/fixtures/agent-schema/invalid/metadata/empty-module-string.agent.yaml +0 -26
  172. package/test/fixtures/agent-schema/invalid/metadata/empty-name.agent.yaml +0 -24
  173. package/test/fixtures/agent-schema/invalid/metadata/extra-metadata-fields.agent.yaml +0 -27
  174. package/test/fixtures/agent-schema/invalid/metadata/missing-id.agent.yaml +0 -23
  175. package/test/fixtures/agent-schema/invalid/persona/empty-principles-array.agent.yaml +0 -24
  176. package/test/fixtures/agent-schema/invalid/persona/empty-string-in-principles.agent.yaml +0 -27
  177. package/test/fixtures/agent-schema/invalid/persona/extra-persona-fields.agent.yaml +0 -27
  178. package/test/fixtures/agent-schema/invalid/persona/missing-role.agent.yaml +0 -24
  179. package/test/fixtures/agent-schema/invalid/prompts/empty-content.agent.yaml +0 -29
  180. package/test/fixtures/agent-schema/invalid/prompts/extra-prompt-fields.agent.yaml +0 -31
  181. package/test/fixtures/agent-schema/invalid/prompts/missing-content.agent.yaml +0 -28
  182. package/test/fixtures/agent-schema/invalid/prompts/missing-id.agent.yaml +0 -28
  183. package/test/fixtures/agent-schema/invalid/top-level/empty-file.agent.yaml +0 -5
  184. package/test/fixtures/agent-schema/invalid/top-level/extra-top-level-keys.agent.yaml +0 -28
  185. package/test/fixtures/agent-schema/invalid/top-level/missing-agent-key.agent.yaml +0 -11
  186. package/test/fixtures/agent-schema/invalid/yaml-errors/invalid-indentation.agent.yaml +0 -19
  187. package/test/fixtures/agent-schema/invalid/yaml-errors/malformed-yaml.agent.yaml +0 -18
  188. package/test/fixtures/agent-schema/valid/critical-actions/empty-critical-actions.agent.yaml +0 -24
  189. package/test/fixtures/agent-schema/valid/critical-actions/no-critical-actions.agent.yaml +0 -22
  190. package/test/fixtures/agent-schema/valid/critical-actions/valid-critical-actions.agent.yaml +0 -27
  191. package/test/fixtures/agent-schema/valid/menu/multiple-menu-items.agent.yaml +0 -31
  192. package/test/fixtures/agent-schema/valid/menu/single-menu-item.agent.yaml +0 -22
  193. package/test/fixtures/agent-schema/valid/menu-commands/all-command-types.agent.yaml +0 -38
  194. package/test/fixtures/agent-schema/valid/menu-commands/multiple-commands.agent.yaml +0 -23
  195. package/test/fixtures/agent-schema/valid/menu-triggers/compound-triggers.agent.yaml +0 -31
  196. package/test/fixtures/agent-schema/valid/menu-triggers/kebab-case-triggers.agent.yaml +0 -34
  197. package/test/fixtures/agent-schema/valid/metadata/core-agent-with-module.agent.yaml +0 -24
  198. package/test/fixtures/agent-schema/valid/metadata/empty-module-name-in-path.agent.yaml +0 -24
  199. package/test/fixtures/agent-schema/valid/metadata/malformed-path-treated-as-core.agent.yaml +0 -24
  200. package/test/fixtures/agent-schema/valid/metadata/module-agent-correct.agent.yaml +0 -24
  201. package/test/fixtures/agent-schema/valid/metadata/module-agent-missing-module.agent.yaml +0 -23
  202. package/test/fixtures/agent-schema/valid/metadata/wrong-module-value.agent.yaml +0 -24
  203. package/test/fixtures/agent-schema/valid/persona/complete-persona.agent.yaml +0 -24
  204. package/test/fixtures/agent-schema/valid/prompts/empty-prompts.agent.yaml +0 -24
  205. package/test/fixtures/agent-schema/valid/prompts/no-prompts.agent.yaml +0 -22
  206. package/test/fixtures/agent-schema/valid/prompts/valid-prompts-minimal.agent.yaml +0 -28
  207. package/test/fixtures/agent-schema/valid/prompts/valid-prompts-with-description.agent.yaml +0 -30
  208. package/test/fixtures/agent-schema/valid/top-level/minimal-core-agent.agent.yaml +0 -24
  209. package/test/fixtures/file-refs-csv/invalid/all-empty-workflow.csv +0 -3
  210. package/test/fixtures/file-refs-csv/invalid/empty-data.csv +0 -1
  211. package/test/fixtures/file-refs-csv/invalid/no-workflow-column.csv +0 -3
  212. package/test/fixtures/file-refs-csv/invalid/unresolvable-vars.csv +0 -3
  213. package/test/fixtures/file-refs-csv/valid/bmm-style.csv +0 -3
  214. package/test/fixtures/file-refs-csv/valid/core-style.csv +0 -3
  215. package/test/fixtures/file-refs-csv/valid/minimal.csv +0 -2
  216. package/test/test-agent-schema.js +0 -387
  217. package/test/test-cli-integration.sh +0 -159
  218. package/test/test-file-refs-csv.js +0 -133
  219. package/test/test-install-to-bmad.js +0 -154
  220. package/test/test-installation-components.js +0 -1796
  221. package/test/test-rehype-plugins.mjs +0 -1050
  222. package/test/test-workflow-path-regex.js +0 -88
  223. package/test/unit-test-schema.js +0 -133
  224. package/tools/build-docs.mjs +0 -464
  225. package/tools/docs/_prompt-external-modules-page.md +0 -59
  226. package/tools/docs/fix-refs.md +0 -91
  227. package/tools/docs/native-skills-migration-checklist.md +0 -281
  228. package/tools/fix-doc-links.js +0 -285
  229. package/tools/validate-agent-schema.js +0 -110
  230. package/tools/validate-doc-links.js +0 -407
  231. package/tools/validate-file-refs.js +0 -556
  232. package/website/README.md +0 -75
  233. package/website/astro.config.mjs +0 -157
  234. package/website/public/diagrams/quick-dev-diagram.png +0 -0
  235. package/website/public/favicon.ico +0 -0
  236. package/website/public/img/bmad-dark.png +0 -0
  237. package/website/public/img/bmad-light.png +0 -0
  238. package/website/public/workflow-map-diagram.html +0 -361
  239. package/website/src/components/Banner.astro +0 -62
  240. package/website/src/components/Header.astro +0 -96
  241. package/website/src/components/MobileMenuFooter.astro +0 -33
  242. package/website/src/content/config.ts +0 -7
  243. package/website/src/content/i18n/zh-CN.json +0 -28
  244. package/website/src/lib/site-url.mjs +0 -25
  245. package/website/src/pages/404.astro +0 -11
  246. package/website/src/pages/robots.txt.ts +0 -48
  247. package/website/src/rehype-base-paths.js +0 -112
  248. package/website/src/rehype-markdown-links.js +0 -119
  249. package/website/src/styles/custom.css +0 -805
  250. /package/src/core/workflows/{brainstorming → bmad-brainstorming}/brain-methods.csv +0 -0
  251. /package/src/core/workflows/{brainstorming → bmad-brainstorming}/steps/step-01-session-setup.md +0 -0
  252. /package/src/core/workflows/{brainstorming → bmad-brainstorming}/steps/step-01b-continue.md +0 -0
  253. /package/src/core/workflows/{brainstorming → bmad-brainstorming}/steps/step-02a-user-selected.md +0 -0
  254. /package/src/core/workflows/{brainstorming → bmad-brainstorming}/steps/step-02b-ai-recommended.md +0 -0
  255. /package/src/core/workflows/{brainstorming → bmad-brainstorming}/steps/step-02c-random-selection.md +0 -0
  256. /package/src/core/workflows/{brainstorming → bmad-brainstorming}/steps/step-02d-progressive-flow.md +0 -0
  257. /package/src/core/workflows/{brainstorming → bmad-brainstorming}/steps/step-03-technique-execution.md +0 -0
  258. /package/src/core/workflows/{brainstorming → bmad-brainstorming}/steps/step-04-idea-organization.md +0 -0
  259. /package/src/core/workflows/{brainstorming → bmad-brainstorming}/template.md +0 -0
  260. /package/src/core/workflows/{party-mode → bmad-party-mode}/steps/step-01-agent-loading.md +0 -0
  261. /package/src/core/workflows/{party-mode → bmad-party-mode}/steps/step-02-discussion-orchestration.md +0 -0
@@ -1,154 +0,0 @@
1
- /**
2
- * install_to_bmad Flag — Design Contract Tests
3
- *
4
- * Unit tests against the functions that implement the install_to_bmad flag.
5
- * These nail down the 4 core design decisions:
6
- *
7
- * 1. true/omitted → skill stays in _bmad/ (default behavior)
8
- * 2. false → skill removed from _bmad/ after IDE install
9
- * 3. No platform → no cleanup runs (cleanup lives in installVerbatimSkills)
10
- * 4. Mixed flags → each skill evaluated independently
11
- *
12
- * Usage: node test/test-install-to-bmad.js
13
- */
14
-
15
- const path = require('node:path');
16
- const os = require('node:os');
17
- const fs = require('fs-extra');
18
- const { loadSkillManifest, getInstallToBmad } = require('../tools/cli/installers/lib/ide/shared/skill-manifest');
19
-
20
- // ANSI colors
21
- const colors = {
22
- reset: '\u001B[0m',
23
- green: '\u001B[32m',
24
- red: '\u001B[31m',
25
- yellow: '\u001B[33m',
26
- cyan: '\u001B[36m',
27
- dim: '\u001B[2m',
28
- };
29
-
30
- let passed = 0;
31
- let failed = 0;
32
-
33
- function assert(condition, testName, errorMessage = '') {
34
- if (condition) {
35
- console.log(`${colors.green}✓${colors.reset} ${testName}`);
36
- passed++;
37
- } else {
38
- console.log(`${colors.red}✗${colors.reset} ${testName}`);
39
- if (errorMessage) {
40
- console.log(` ${colors.dim}${errorMessage}${colors.reset}`);
41
- }
42
- failed++;
43
- }
44
- }
45
-
46
- async function runTests() {
47
- console.log(`${colors.cyan}========================================`);
48
- console.log('install_to_bmad — Design Contract Tests');
49
- console.log(`========================================${colors.reset}\n`);
50
-
51
- // ============================================================
52
- // 1. true/omitted → getInstallToBmad returns true (keep in _bmad/)
53
- // ============================================================
54
- console.log(`${colors.yellow}Design decision 1: true or omitted → skill stays in _bmad/${colors.reset}\n`);
55
-
56
- // Null manifest (no bmad-skill-manifest.yaml) → true
57
- assert(getInstallToBmad(null, 'workflow.md') === true, 'null manifest defaults to true');
58
-
59
- // Single-entry, flag omitted → true
60
- assert(
61
- getInstallToBmad({ __single: { type: 'skill' } }, 'workflow.md') === true,
62
- 'single-entry manifest with flag omitted defaults to true',
63
- );
64
-
65
- // Single-entry, explicit true → true
66
- assert(
67
- getInstallToBmad({ __single: { type: 'skill', install_to_bmad: true } }, 'workflow.md') === true,
68
- 'single-entry manifest with explicit true returns true',
69
- );
70
-
71
- console.log('');
72
-
73
- // ============================================================
74
- // 2. false → getInstallToBmad returns false (remove from _bmad/)
75
- // ============================================================
76
- console.log(`${colors.yellow}Design decision 2: false → skill removed from _bmad/${colors.reset}\n`);
77
-
78
- // Single-entry, explicit false → false
79
- assert(
80
- getInstallToBmad({ __single: { type: 'skill', install_to_bmad: false } }, 'workflow.md') === false,
81
- 'single-entry manifest with explicit false returns false',
82
- );
83
-
84
- // loadSkillManifest round-trip: YAML with false is preserved through load
85
- {
86
- const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-itb-'));
87
- await fs.writeFile(path.join(tmpDir, 'bmad-skill-manifest.yaml'), 'type: skill\ninstall_to_bmad: false\n');
88
- const loaded = await loadSkillManifest(tmpDir);
89
- assert(getInstallToBmad(loaded, 'workflow.md') === false, 'loadSkillManifest preserves install_to_bmad: false through round-trip');
90
- await fs.remove(tmpDir);
91
- }
92
-
93
- console.log('');
94
-
95
- // ============================================================
96
- // 3. No platform → cleanup only runs inside installVerbatimSkills
97
- // (This is a design invariant: getInstallToBmad is only consulted
98
- // during IDE install. Without a platform, the flag has no effect.)
99
- // ============================================================
100
- console.log(`${colors.yellow}Design decision 3: flag is a per-skill property, not a pipeline gate${colors.reset}\n`);
101
-
102
- // The flag value is stored but doesn't trigger any side effects by itself.
103
- // Cleanup is driven by reading the CSV column inside installVerbatimSkills.
104
- // We verify the flag is just data — getInstallToBmad doesn't touch the filesystem.
105
- {
106
- const manifest = { __single: { type: 'skill', install_to_bmad: false } };
107
- const result = getInstallToBmad(manifest, 'workflow.md');
108
- assert(typeof result === 'boolean', 'getInstallToBmad returns a boolean (pure data, no side effects)');
109
- assert(result === false, 'false value is faithfully returned for consumer to act on');
110
- }
111
-
112
- console.log('');
113
-
114
- // ============================================================
115
- // 4. Mixed flags → each skill evaluated independently
116
- // ============================================================
117
- console.log(`${colors.yellow}Design decision 4: mixed flags — each skill independent${colors.reset}\n`);
118
-
119
- // Multi-entry manifest: different files can have different flags
120
- {
121
- const manifest = {
122
- 'workflow.md': { type: 'skill', install_to_bmad: false },
123
- 'other.md': { type: 'skill', install_to_bmad: true },
124
- };
125
- assert(getInstallToBmad(manifest, 'workflow.md') === false, 'multi-entry: workflow.md with false returns false');
126
- assert(getInstallToBmad(manifest, 'other.md') === true, 'multi-entry: other.md with true returns true');
127
- assert(getInstallToBmad(manifest, 'unknown.md') === true, 'multi-entry: unknown file defaults to true');
128
- }
129
-
130
- console.log('');
131
-
132
- // ============================================================
133
- // Summary
134
- // ============================================================
135
- console.log(`${colors.cyan}========================================`);
136
- console.log('Results:');
137
- console.log(` Passed: ${colors.green}${passed}${colors.reset}`);
138
- console.log(` Failed: ${colors.red}${failed}${colors.reset}`);
139
- console.log(`========================================${colors.reset}\n`);
140
-
141
- if (failed === 0) {
142
- console.log(`${colors.green}All install_to_bmad contract tests passed!${colors.reset}\n`);
143
- process.exit(0);
144
- } else {
145
- console.log(`${colors.red}Some install_to_bmad contract tests failed${colors.reset}\n`);
146
- process.exit(1);
147
- }
148
- }
149
-
150
- runTests().catch((error) => {
151
- console.error(`${colors.red}Test runner failed:${colors.reset}`, error.message);
152
- console.error(error.stack);
153
- process.exit(1);
154
- });