bmad-method 6.12.4 → 7.0.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 (389) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +107 -54
  3. package/agents.json +640 -0
  4. package/bin/bmad-method.js +4 -0
  5. package/messages.yaml +260 -0
  6. package/modules.yaml +56 -0
  7. package/package.json +32 -110
  8. package/src/agent-picks.js +77 -0
  9. package/src/agents.js +141 -0
  10. package/src/bmad-scripts.js +167 -0
  11. package/src/cli.js +266 -0
  12. package/src/commands/agent-choice.js +67 -0
  13. package/src/commands/apply.js +38 -0
  14. package/src/commands/deps.js +25 -0
  15. package/src/commands/ending.js +54 -0
  16. package/src/commands/existing-install.js +50 -0
  17. package/src/commands/install-plan.js +130 -0
  18. package/src/commands/install-steps.js +66 -0
  19. package/src/commands/install.js +86 -0
  20. package/src/commands/status.js +39 -0
  21. package/src/commands/update.js +106 -0
  22. package/src/installed.js +48 -0
  23. package/src/messages.js +84 -0
  24. package/src/modules.js +221 -0
  25. package/src/preflight.js +124 -0
  26. package/src/project-lock.js +68 -0
  27. package/src/prompts.js +626 -0
  28. package/src/report.js +199 -0
  29. package/src/run.js +124 -0
  30. package/src/self-update.js +88 -0
  31. package/src/skills-cli.js +133 -0
  32. package/src/version.js +11 -0
  33. package/.claude-plugin/marketplace.json +0 -53
  34. package/AGENTS.md +0 -24
  35. package/CLAUDE.md +0 -1
  36. package/README_CN.md +0 -98
  37. package/README_KR.md +0 -90
  38. package/README_VN.md +0 -99
  39. package/bmad-modules.yaml +0 -140
  40. package/body.md +0 -17
  41. package/greptile.json +0 -52
  42. package/pr2.md +0 -11
  43. package/removals.txt +0 -87
  44. package/src/bmm-skills/agents/bmad-agent-analyst/SKILL.md +0 -76
  45. package/src/bmm-skills/agents/bmad-agent-analyst/customize.toml +0 -103
  46. package/src/bmm-skills/agents/bmad-agent-architect/SKILL.md +0 -76
  47. package/src/bmm-skills/agents/bmad-agent-architect/customize.toml +0 -63
  48. package/src/bmm-skills/agents/bmad-agent-dev/SKILL.md +0 -76
  49. package/src/bmm-skills/agents/bmad-agent-dev/customize.toml +0 -81
  50. package/src/bmm-skills/agents/bmad-agent-pm/SKILL.md +0 -76
  51. package/src/bmm-skills/agents/bmad-agent-pm/customize.toml +0 -73
  52. package/src/bmm-skills/agents/bmad-agent-ux-designer/SKILL.md +0 -76
  53. package/src/bmm-skills/agents/bmad-agent-ux-designer/customize.toml +0 -58
  54. package/src/bmm-skills/module-help.csv +0 -19
  55. package/src/bmm-skills/module.yaml +0 -85
  56. package/src/bmm-skills/plan/bmad-architecture/SKILL.md +0 -85
  57. package/src/bmm-skills/plan/bmad-architecture/assets/spine-template.md +0 -79
  58. package/src/bmm-skills/plan/bmad-architecture/customize.toml +0 -101
  59. package/src/bmm-skills/plan/bmad-architecture/references/headless.md +0 -26
  60. package/src/bmm-skills/plan/bmad-architecture/references/reviewer-gate.md +0 -13
  61. package/src/bmm-skills/plan/bmad-architecture/scripts/lint_spine.py +0 -261
  62. package/src/bmm-skills/plan/bmad-architecture/scripts/tests/test_lint_spine.py +0 -270
  63. package/src/bmm-skills/plan/bmad-create-epics-and-stories/SKILL.md +0 -93
  64. package/src/bmm-skills/plan/bmad-create-epics-and-stories/customize.toml +0 -39
  65. package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-01-validate-prerequisites.md +0 -263
  66. package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-02-design-epics.md +0 -242
  67. package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-03-create-stories.md +0 -255
  68. package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-04-final-validation.md +0 -141
  69. package/src/bmm-skills/plan/bmad-create-epics-and-stories/templates/epics-template.md +0 -62
  70. package/src/bmm-skills/plan/bmad-generate-project-context/SKILL.md +0 -12
  71. package/src/bmm-skills/plan/bmad-prd/SKILL.md +0 -94
  72. package/src/bmm-skills/plan/bmad-prd/assets/headless-schemas.md +0 -76
  73. package/src/bmm-skills/plan/bmad-prd/assets/prd-template.md +0 -165
  74. package/src/bmm-skills/plan/bmad-prd/assets/prd-validation-checklist.md +0 -135
  75. package/src/bmm-skills/plan/bmad-prd/assets/validation-report-template.html +0 -325
  76. package/src/bmm-skills/plan/bmad-prd/customize.toml +0 -148
  77. package/src/bmm-skills/plan/bmad-prd/references/headless.md +0 -39
  78. package/src/bmm-skills/plan/bmad-prd/references/validate.md +0 -97
  79. package/src/bmm-skills/plan/bmad-prfaq/SKILL.md +0 -135
  80. package/src/bmm-skills/plan/bmad-prfaq/agents/artifact-analyzer.md +0 -60
  81. package/src/bmm-skills/plan/bmad-prfaq/agents/web-researcher.md +0 -49
  82. package/src/bmm-skills/plan/bmad-prfaq/assets/prfaq-template.md +0 -62
  83. package/src/bmm-skills/plan/bmad-prfaq/bmad-manifest.json +0 -16
  84. package/src/bmm-skills/plan/bmad-prfaq/customize.toml +0 -39
  85. package/src/bmm-skills/plan/bmad-prfaq/references/customer-faq.md +0 -55
  86. package/src/bmm-skills/plan/bmad-prfaq/references/internal-faq.md +0 -51
  87. package/src/bmm-skills/plan/bmad-prfaq/references/press-release.md +0 -60
  88. package/src/bmm-skills/plan/bmad-prfaq/references/verdict.md +0 -83
  89. package/src/bmm-skills/plan/bmad-product-brief/SKILL.md +0 -91
  90. package/src/bmm-skills/plan/bmad-product-brief/assets/brief-template.md +0 -41
  91. package/src/bmm-skills/plan/bmad-product-brief/customize.toml +0 -100
  92. package/src/bmm-skills/plan/bmad-project-context/SKILL.md +0 -121
  93. package/src/bmm-skills/plan/bmad-project-context/customize.toml +0 -24
  94. package/src/bmm-skills/plan/bmad-project-context/references/best-practices.md +0 -84
  95. package/src/bmm-skills/plan/bmad-project-context/references/template.md +0 -55
  96. package/src/bmm-skills/plan/bmad-spec/SKILL.md +0 -160
  97. package/src/bmm-skills/plan/bmad-spec/assets/headless-schemas.md +0 -33
  98. package/src/bmm-skills/plan/bmad-spec/assets/spec-template.md +0 -49
  99. package/src/bmm-skills/plan/bmad-spec/assets/stories-schema.md +0 -44
  100. package/src/bmm-skills/plan/bmad-spec/customize.toml +0 -52
  101. package/src/bmm-skills/plan/bmad-sprint-planning/SKILL.md +0 -62
  102. package/src/bmm-skills/plan/bmad-sprint-planning/customize.toml +0 -39
  103. package/src/bmm-skills/plan/bmad-sprint-planning/references/fix-sprint-status.md +0 -30
  104. package/src/bmm-skills/plan/bmad-sprint-planning/references/generate-tracking.md +0 -25
  105. package/src/bmm-skills/plan/bmad-sprint-planning/references/readiness-gate.md +0 -20
  106. package/src/bmm-skills/plan/bmad-sprint-planning/references/status-view.md +0 -14
  107. package/src/bmm-skills/plan/bmad-sprint-planning/references/validate.md +0 -10
  108. package/src/bmm-skills/plan/bmad-sprint-planning/scripts/__pycache__/sprint_plan.cpython-311.pyc +0 -0
  109. package/src/bmm-skills/plan/bmad-sprint-planning/scripts/sprint_plan.py +0 -701
  110. package/src/bmm-skills/plan/bmad-sprint-planning/scripts/tests/__pycache__/test_sprint_plan.cpython-311-pytest-9.1.1.pyc +0 -0
  111. package/src/bmm-skills/plan/bmad-sprint-planning/scripts/tests/test_sprint_plan.py +0 -524
  112. package/src/bmm-skills/plan/bmad-sprint-planning/sprint-status-template.yaml +0 -71
  113. package/src/bmm-skills/plan/bmad-ux/SKILL.md +0 -90
  114. package/src/bmm-skills/plan/bmad-ux/assets/color-themes.md +0 -9
  115. package/src/bmm-skills/plan/bmad-ux/assets/design-directions.md +0 -9
  116. package/src/bmm-skills/plan/bmad-ux/assets/design-example-editorial.md +0 -158
  117. package/src/bmm-skills/plan/bmad-ux/assets/design-example-mobile.md +0 -93
  118. package/src/bmm-skills/plan/bmad-ux/assets/design-example-shadcn.md +0 -109
  119. package/src/bmm-skills/plan/bmad-ux/assets/excalidraw-wireframe.md +0 -19
  120. package/src/bmm-skills/plan/bmad-ux/assets/experience-example-mobile.md +0 -112
  121. package/src/bmm-skills/plan/bmad-ux/assets/experience-example-shadcn.md +0 -133
  122. package/src/bmm-skills/plan/bmad-ux/assets/headless-schemas.md +0 -84
  123. package/src/bmm-skills/plan/bmad-ux/assets/key-screens.md +0 -29
  124. package/src/bmm-skills/plan/bmad-ux/assets/validation-report-template.html +0 -319
  125. package/src/bmm-skills/plan/bmad-ux/customize.toml +0 -100
  126. package/src/bmm-skills/plan/bmad-ux/references/creative-tools.md +0 -19
  127. package/src/bmm-skills/plan/bmad-ux/references/design-md-spec.md +0 -50
  128. package/src/bmm-skills/plan/bmad-ux/references/headless.md +0 -37
  129. package/src/bmm-skills/plan/bmad-ux/references/validate.md +0 -115
  130. package/src/bmm-skills/ship/bmad-build/SKILL.md +0 -13
  131. package/src/bmm-skills/ship/bmad-build/compile-epic-context.md +0 -62
  132. package/src/bmm-skills/ship/bmad-build/customize.toml +0 -152
  133. package/src/bmm-skills/ship/bmad-build/references/claims-check.md +0 -14
  134. package/src/bmm-skills/ship/bmad-build/references/deletion-check.md +0 -14
  135. package/src/bmm-skills/ship/bmad-build/review-prompts/edge-case-hunter.md +0 -112
  136. package/src/bmm-skills/ship/bmad-build/review-prompts/verification-gap.md +0 -113
  137. package/src/bmm-skills/ship/bmad-build/spec-template.md +0 -111
  138. package/src/bmm-skills/ship/bmad-build/step-01-clarify-and-route.md +0 -100
  139. package/src/bmm-skills/ship/bmad-build/step-02-plan.md +0 -62
  140. package/src/bmm-skills/ship/bmad-build/step-03-implement.md +0 -51
  141. package/src/bmm-skills/ship/bmad-build/step-04-review.md +0 -85
  142. package/src/bmm-skills/ship/bmad-build/step-05-present.md +0 -43
  143. package/src/bmm-skills/ship/bmad-build/step-oneshot.md +0 -107
  144. package/src/bmm-skills/ship/bmad-build/sync-sprint-status.md +0 -5
  145. package/src/bmm-skills/ship/bmad-build/workflow.md +0 -84
  146. package/src/bmm-skills/ship/bmad-build-auto/SKILL.md +0 -13
  147. package/src/bmm-skills/ship/bmad-build-auto/compile-epic-context.md +0 -62
  148. package/src/bmm-skills/ship/bmad-build-auto/customize.toml +0 -119
  149. package/src/bmm-skills/ship/bmad-build-auto/references/claims-check.md +0 -14
  150. package/src/bmm-skills/ship/bmad-build-auto/references/deletion-check.md +0 -14
  151. package/src/bmm-skills/ship/bmad-build-auto/review-prompts/edge-case-hunter.md +0 -112
  152. package/src/bmm-skills/ship/bmad-build-auto/review-prompts/verification-gap.md +0 -113
  153. package/src/bmm-skills/ship/bmad-build-auto/spec-template.md +0 -96
  154. package/src/bmm-skills/ship/bmad-build-auto/step-01-clarify-and-route.md +0 -84
  155. package/src/bmm-skills/ship/bmad-build-auto/step-02-plan.md +0 -27
  156. package/src/bmm-skills/ship/bmad-build-auto/step-03-implement.md +0 -48
  157. package/src/bmm-skills/ship/bmad-build-auto/step-04-review.md +0 -116
  158. package/src/bmm-skills/ship/bmad-build-auto/workflow.md +0 -104
  159. package/src/bmm-skills/ship/bmad-code-review/SKILL.md +0 -90
  160. package/src/bmm-skills/ship/bmad-code-review/customize.toml +0 -110
  161. package/src/bmm-skills/ship/bmad-code-review/references/claims-check.md +0 -14
  162. package/src/bmm-skills/ship/bmad-code-review/references/deletion-check.md +0 -14
  163. package/src/bmm-skills/ship/bmad-code-review/review-prompts/edge-case-hunter.md +0 -112
  164. package/src/bmm-skills/ship/bmad-code-review/review-prompts/verification-gap.md +0 -113
  165. package/src/bmm-skills/ship/bmad-code-review/steps/step-01-gather-context.md +0 -94
  166. package/src/bmm-skills/ship/bmad-code-review/steps/step-02-review.md +0 -32
  167. package/src/bmm-skills/ship/bmad-code-review/steps/step-03-triage.md +0 -54
  168. package/src/bmm-skills/ship/bmad-code-review/steps/step-04-present.md +0 -134
  169. package/src/bmm-skills/ship/bmad-correct-course/SKILL.md +0 -308
  170. package/src/bmm-skills/ship/bmad-correct-course/checklist.md +0 -288
  171. package/src/bmm-skills/ship/bmad-correct-course/customize.toml +0 -39
  172. package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/SKILL.md +0 -176
  173. package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/checklist.md +0 -33
  174. package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/customize.toml +0 -39
  175. package/src/bmm-skills/ship/bmad-retrospective/SKILL.md +0 -94
  176. package/src/bmm-skills/ship/bmad-retrospective/customize.toml +0 -39
  177. package/src/bmm-skills/ship/bmad-retrospective/references/acceptance-verdict.md +0 -55
  178. package/src/bmm-skills/ship/bmad-retrospective/references/aggregate-views.md +0 -17
  179. package/src/bmm-skills/ship/bmad-retrospective/references/evidence-gathering.md +0 -30
  180. package/src/bmm-skills/ship/bmad-retrospective/references/retro-document.md +0 -84
  181. package/src/bmm-skills/ship/bmad-retrospective/references/team-discussion.md +0 -22
  182. package/src/bmm-skills/ship/bmad-retrospective/scripts/__pycache__/sprint_status.cpython-311.pyc +0 -0
  183. package/src/bmm-skills/ship/bmad-retrospective/scripts/git_evidence.py +0 -308
  184. package/src/bmm-skills/ship/bmad-retrospective/scripts/sprint_status.py +0 -750
  185. package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_git_evidence.cpython-311-pytest-9.1.1.pyc +0 -0
  186. package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_sprint_status.cpython-311-pytest-9.1.1.pyc +0 -0
  187. package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/fixtures/sprint-status-template.yaml +0 -71
  188. package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/test_git_evidence.py +0 -750
  189. package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/test_sprint_status.py +0 -1579
  190. package/src/bmm-skills/ship/bmad-walkthrough/SKILL.md +0 -68
  191. package/src/bmm-skills/ship/bmad-walkthrough/customize.toml +0 -39
  192. package/src/bmm-skills/ship/bmad-walkthrough/generate-trail.md +0 -38
  193. package/src/bmm-skills/ship/bmad-walkthrough/step-01-orientation.md +0 -105
  194. package/src/bmm-skills/ship/bmad-walkthrough/step-02-walkthrough.md +0 -89
  195. package/src/bmm-skills/ship/bmad-walkthrough/step-03-detail-pass.md +0 -106
  196. package/src/bmm-skills/ship/bmad-walkthrough/step-04-testing.md +0 -74
  197. package/src/bmm-skills/ship/bmad-walkthrough/step-05-wrapup.md +0 -30
  198. package/src/bmm-skills/v6-shims/README.md +0 -29
  199. package/src/bmm-skills/v6-shims/bmad-checkpoint-preview/SKILL.md +0 -21
  200. package/src/bmm-skills/v6-shims/bmad-create-architecture/SKILL.md +0 -32
  201. package/src/bmm-skills/v6-shims/bmad-create-architecture/customize.toml +0 -39
  202. package/src/bmm-skills/v6-shims/bmad-create-prd/SKILL.md +0 -32
  203. package/src/bmm-skills/v6-shims/bmad-create-prd/customize.toml +0 -39
  204. package/src/bmm-skills/v6-shims/bmad-create-story/SKILL.md +0 -436
  205. package/src/bmm-skills/v6-shims/bmad-create-story/checklist.md +0 -357
  206. package/src/bmm-skills/v6-shims/bmad-create-story/customize.toml +0 -39
  207. package/src/bmm-skills/v6-shims/bmad-create-story/discover-inputs.md +0 -88
  208. package/src/bmm-skills/v6-shims/bmad-create-story/template.md +0 -49
  209. package/src/bmm-skills/v6-shims/bmad-dev-auto/SKILL.md +0 -21
  210. package/src/bmm-skills/v6-shims/bmad-dev-story/SKILL.md +0 -504
  211. package/src/bmm-skills/v6-shims/bmad-dev-story/checklist.md +0 -80
  212. package/src/bmm-skills/v6-shims/bmad-dev-story/customize.toml +0 -39
  213. package/src/bmm-skills/v6-shims/bmad-document-project/SKILL.md +0 -16
  214. package/src/bmm-skills/v6-shims/bmad-domain-research/SKILL.md +0 -16
  215. package/src/bmm-skills/v6-shims/bmad-edit-prd/SKILL.md +0 -32
  216. package/src/bmm-skills/v6-shims/bmad-edit-prd/customize.toml +0 -40
  217. package/src/bmm-skills/v6-shims/bmad-market-research/SKILL.md +0 -16
  218. package/src/bmm-skills/v6-shims/bmad-quick-dev/SKILL.md +0 -21
  219. package/src/bmm-skills/v6-shims/bmad-sprint-status/SKILL.md +0 -28
  220. package/src/bmm-skills/v6-shims/bmad-sprint-status/customize.toml +0 -39
  221. package/src/bmm-skills/v6-shims/bmad-technical-research/SKILL.md +0 -16
  222. package/src/bmm-skills/v6-shims/bmad-validate-prd/SKILL.md +0 -32
  223. package/src/bmm-skills/v6-shims/bmad-validate-prd/customize.toml +0 -40
  224. package/src/core-skills/bmad-advanced-elicitation/SKILL.md +0 -64
  225. package/src/core-skills/bmad-advanced-elicitation/assets/methods.csv +0 -72
  226. package/src/core-skills/bmad-advanced-elicitation/customize.toml +0 -54
  227. package/src/core-skills/bmad-advanced-elicitation/scripts/pick_methods.py +0 -233
  228. package/src/core-skills/bmad-advanced-elicitation/scripts/tests/test_pick_methods.py +0 -228
  229. package/src/core-skills/bmad-brainstorming/SKILL.md +0 -80
  230. package/src/core-skills/bmad-brainstorming/assets/brain-icons.json +0 -166
  231. package/src/core-skills/bmad-brainstorming/assets/brain-methods.csv +0 -109
  232. package/src/core-skills/bmad-brainstorming/assets/brain-selector.html +0 -328
  233. package/src/core-skills/bmad-brainstorming/customize.toml +0 -83
  234. package/src/core-skills/bmad-brainstorming/references/converge.md +0 -24
  235. package/src/core-skills/bmad-brainstorming/references/finalize.md +0 -26
  236. package/src/core-skills/bmad-brainstorming/references/headless.md +0 -54
  237. package/src/core-skills/bmad-brainstorming/references/in-chat-techniques.md +0 -18
  238. package/src/core-skills/bmad-brainstorming/references/mode-autonomous.md +0 -10
  239. package/src/core-skills/bmad-brainstorming/references/mode-facilitator.md +0 -11
  240. package/src/core-skills/bmad-brainstorming/references/mode-partner.md +0 -16
  241. package/src/core-skills/bmad-brainstorming/references/resume.md +0 -5
  242. package/src/core-skills/bmad-brainstorming/scripts/brain.py +0 -789
  243. package/src/core-skills/bmad-brainstorming/scripts/tests/test_brain.py +0 -289
  244. package/src/core-skills/bmad-customize/SKILL.md +0 -111
  245. package/src/core-skills/bmad-customize/scripts/list_customizable_skills.py +0 -235
  246. package/src/core-skills/bmad-customize/scripts/tests/test_list_customizable_skills.py +0 -249
  247. package/src/core-skills/bmad-deep-recon/SKILL.md +0 -82
  248. package/src/core-skills/bmad-deep-recon/assets/research.template.md +0 -18
  249. package/src/core-skills/bmad-deep-recon/customize.toml +0 -212
  250. package/src/core-skills/bmad-deep-recon/references/draft.md +0 -8
  251. package/src/core-skills/bmad-deep-recon/references/finalize.md +0 -11
  252. package/src/core-skills/bmad-deep-recon/references/html-briefing.md +0 -16
  253. package/src/core-skills/bmad-deep-recon/references/lifecycle.md +0 -11
  254. package/src/core-skills/bmad-deep-recon/references/process.md +0 -10
  255. package/src/core-skills/bmad-deep-recon/references/run.md +0 -73
  256. package/src/core-skills/bmad-deep-recon/references/selection.md +0 -13
  257. package/src/core-skills/bmad-deep-recon/references/synthesis.md +0 -16
  258. package/src/core-skills/bmad-deep-recon/references/verification.md +0 -29
  259. package/src/core-skills/bmad-deep-recon/scripts/recon_kit.py +0 -326
  260. package/src/core-skills/bmad-deep-recon/scripts/tests/test_recon_kit.py +0 -144
  261. package/src/core-skills/bmad-deep-recon/types/academic-lit.md +0 -19
  262. package/src/core-skills/bmad-deep-recon/types/competitive.md +0 -19
  263. package/src/core-skills/bmad-deep-recon/types/domain.md +0 -19
  264. package/src/core-skills/bmad-deep-recon/types/market.md +0 -19
  265. package/src/core-skills/bmad-deep-recon/types/technical.md +0 -19
  266. package/src/core-skills/bmad-deep-recon/types/user-voice.md +0 -19
  267. package/src/core-skills/bmad-forge-idea/SKILL.md +0 -107
  268. package/src/core-skills/bmad-forge-idea/customize.toml +0 -41
  269. package/src/core-skills/bmad-forge-idea/scripts/resolve_personas.py +0 -277
  270. package/src/core-skills/bmad-forge-idea/scripts/tests/test_resolve_personas.py +0 -160
  271. package/src/core-skills/bmad-help/SKILL.md +0 -77
  272. package/src/core-skills/bmad-party-mode/SKILL.md +0 -60
  273. package/src/core-skills/bmad-party-mode/customize.toml +0 -211
  274. package/src/core-skills/bmad-party-mode/references/create-party.md +0 -70
  275. package/src/core-skills/bmad-party-mode/references/mode-agent-team.md +0 -13
  276. package/src/core-skills/bmad-party-mode/references/mode-auto.md +0 -13
  277. package/src/core-skills/bmad-party-mode/references/mode-subagent.md +0 -31
  278. package/src/core-skills/bmad-party-mode/references/party-memory.md +0 -51
  279. package/src/core-skills/bmad-party-mode/scripts/resolve_party.py +0 -300
  280. package/src/core-skills/bmad-party-mode/scripts/tests/test_resolve_party.py +0 -183
  281. package/src/core-skills/bmad-review/SKILL.md +0 -50
  282. package/src/core-skills/bmad-review/customize.toml +0 -141
  283. package/src/core-skills/bmad-review/references/editorial-common.md +0 -56
  284. package/src/core-skills/bmad-review/references/lens-adversarial.md +0 -19
  285. package/src/core-skills/bmad-review/references/lens-edge-case-hunter.md +0 -72
  286. package/src/core-skills/bmad-review/references/lens-prose.md +0 -7
  287. package/src/core-skills/bmad-review/references/lens-structure.md +0 -9
  288. package/src/core-skills/bmad-review/references/lens-verification-gap.md +0 -92
  289. package/src/core-skills/bmad-review/references/structure-models.md +0 -44
  290. package/src/core-skills/bmad-review/scripts/tests/test_word_metrics.py +0 -62
  291. package/src/core-skills/bmad-review/scripts/word_metrics.py +0 -102
  292. package/src/core-skills/module-help.csv +0 -10
  293. package/src/core-skills/module.yaml +0 -38
  294. package/src/core-skills/v6-shims/README.md +0 -25
  295. package/src/core-skills/v6-shims/bmad-editorial-review/SKILL.md +0 -8
  296. package/src/core-skills/v6-shims/bmad-editorial-review/customize.toml +0 -31
  297. package/src/core-skills/v6-shims/bmad-editorial-review-prose/SKILL.md +0 -8
  298. package/src/core-skills/v6-shims/bmad-editorial-review-structure/SKILL.md +0 -8
  299. package/src/core-skills/v6-shims/bmad-review-adversarial-general/SKILL.md +0 -8
  300. package/src/core-skills/v6-shims/bmad-review-edge-case-hunter/SKILL.md +0 -8
  301. package/src/core-skills/v6-shims/bmad-review-verification-gap/SKILL.md +0 -8
  302. package/src/scripts/__pycache__/config_utils.cpython-311.pyc +0 -0
  303. package/src/scripts/config_utils.py +0 -119
  304. package/src/scripts/memlog.py +0 -228
  305. package/src/scripts/render_skill.py +0 -401
  306. package/src/scripts/resolve_config.py +0 -82
  307. package/src/scripts/resolve_customization.py +0 -164
  308. package/src/scripts/tests/__pycache__/test_config_utils.cpython-311.pyc +0 -0
  309. package/src/scripts/tests/__pycache__/test_resolve_config.cpython-311.pyc +0 -0
  310. package/src/scripts/tests/__pycache__/test_resolve_customization.cpython-311.pyc +0 -0
  311. package/src/scripts/tests/test_config_utils.py +0 -85
  312. package/src/scripts/tests/test_memlog.py +0 -306
  313. package/src/scripts/tests/test_resolve_config.py +0 -117
  314. package/src/scripts/tests/test_resolve_customization.py +0 -179
  315. package/tools/bundle-web-bundles.js +0 -117
  316. package/tools/format-workflow-md.js +0 -263
  317. package/tools/installer/README.md +0 -60
  318. package/tools/installer/bmad-cli.js +0 -105
  319. package/tools/installer/cli-utils.js +0 -57
  320. package/tools/installer/commands/install.js +0 -151
  321. package/tools/installer/commands/status.js +0 -65
  322. package/tools/installer/commands/uninstall.js +0 -167
  323. package/tools/installer/core/config.js +0 -76
  324. package/tools/installer/core/existing-install.js +0 -121
  325. package/tools/installer/core/install-paths.js +0 -132
  326. package/tools/installer/core/installer.js +0 -1826
  327. package/tools/installer/core/legacy-warnings.js +0 -151
  328. package/tools/installer/core/manifest-generator.js +0 -883
  329. package/tools/installer/core/manifest.js +0 -439
  330. package/tools/installer/core/shim-policy.js +0 -159
  331. package/tools/installer/core/uv-check.js +0 -195
  332. package/tools/installer/core/wsl-node-check.js +0 -109
  333. package/tools/installer/file-ops.js +0 -204
  334. package/tools/installer/fs-native.js +0 -116
  335. package/tools/installer/ide/_config-driven.js +0 -972
  336. package/tools/installer/ide/manager.js +0 -324
  337. package/tools/installer/ide/platform-codes.js +0 -80
  338. package/tools/installer/ide/platform-codes.yaml +0 -363
  339. package/tools/installer/ide/shared/installed-skills.js +0 -50
  340. package/tools/installer/ide/shared/path-utils.js +0 -219
  341. package/tools/installer/ide/shared/skill-manifest.js +0 -57
  342. package/tools/installer/install-messages.yaml +0 -44
  343. package/tools/installer/list-options.js +0 -210
  344. package/tools/installer/message-loader.js +0 -83
  345. package/tools/installer/modules/channel-plan.js +0 -216
  346. package/tools/installer/modules/channel-resolver.js +0 -241
  347. package/tools/installer/modules/custom-module-manager.js +0 -924
  348. package/tools/installer/modules/external-manager.js +0 -673
  349. package/tools/installer/modules/git-env.js +0 -47
  350. package/tools/installer/modules/module-help-schema.js +0 -13
  351. package/tools/installer/modules/official-modules.js +0 -2289
  352. package/tools/installer/modules/plugin-resolver.js +0 -398
  353. package/tools/installer/modules/version-resolver.js +0 -336
  354. package/tools/installer/project-root.js +0 -224
  355. package/tools/installer/prompts.js +0 -804
  356. package/tools/installer/set-overrides.js +0 -330
  357. package/tools/installer/ui.js +0 -2262
  358. package/tools/installer/yaml-format.js +0 -245
  359. package/tools/javascript-conventions.md +0 -5
  360. package/tools/migrate-custom-module-paths.js +0 -124
  361. package/tools/skill-validator.md +0 -312
  362. package/tools/tests/__pycache__/test_validate_skills.cpython-311.pyc +0 -0
  363. package/tools/tests/fixtures/validate-skills/bmad/SKILL.md +0 -8
  364. package/tools/tests/fixtures/validate-skills/deprecated-shim/SKILL.md +0 -9
  365. package/tools/tests/fixtures/validate-skills/missing-trigger/SKILL.md +0 -9
  366. package/tools/tests/fixtures/validate-skills/with-trigger/SKILL.md +0 -8
  367. package/tools/tests/test_validate_skills.py +0 -476
  368. package/tools/validate-published-implementation-model.mjs +0 -59
  369. package/tools/validate-sidebar-order.js +0 -388
  370. package/tools/validate-svg-changes.sh +0 -356
  371. package/tools/validate_skills.py +0 -698
  372. package/web-bundles/README.md +0 -46
  373. package/web-bundles/brainstorming-coach/INSTRUCTIONS.md +0 -86
  374. package/web-bundles/brainstorming-coach/SKILL.md +0 -83
  375. package/web-bundles/brainstorming-coach/brain-methods.csv +0 -62
  376. package/web-bundles/bundles.json +0 -139
  377. package/web-bundles/market-and-industry-research/INSTRUCTIONS.md +0 -88
  378. package/web-bundles/market-and-industry-research/SKILL.md +0 -59
  379. package/web-bundles/prd-coach/INSTRUCTIONS.md +0 -86
  380. package/web-bundles/prd-coach/SKILL.md +0 -101
  381. package/web-bundles/prd-coach/prd-template.md +0 -165
  382. package/web-bundles/prd-coach/prd-validation-checklist.md +0 -135
  383. package/web-bundles/prfaq-coach/INSTRUCTIONS.md +0 -86
  384. package/web-bundles/prfaq-coach/SKILL.md +0 -139
  385. package/web-bundles/product-brief-coach/INSTRUCTIONS.md +0 -86
  386. package/web-bundles/product-brief-coach/SKILL.md +0 -113
  387. package/web-bundles/ux-coach/INSTRUCTIONS.md +0 -92
  388. package/web-bundles/ux-coach/SKILL.md +0 -187
  389. package/web-bundles/ux-coach/ux-validation.md +0 -100
@@ -1,195 +0,0 @@
1
- const { spawnSync } = require('node:child_process');
2
- const prompts = require('../prompts');
3
-
4
- // `uv` (https://docs.astral.sh/uv/) is how BMAD runs the Python scripts its
5
- // skills shell out to: `uv run <script>` resolves the interpreter and any
6
- // dependencies on demand from the script's own `requires-python` metadata, so
7
- // skills don't have to assume a particular `python3` is on PATH.
8
- //
9
- // As of v6.11.0 this is a requirement, not a preference: the rendered skills
10
- // (`bmad-build`, `bmad-build-auto`) render through `render_skill.py` and HALT
11
- // on activation if `uv` is unavailable — there is no interpreter fallback.
12
- //
13
- // The check still never blocks the install. Core-only, docs-only, and CI
14
- // installs are legitimate and never touch a rendered skill, so a missing `uv`
15
- // must not fail the run. What it does is tell the truth about what will and
16
- // will not work afterwards, here and again in the post-install summary.
17
- const RUNTIME_COMMAND = 'uv';
18
-
19
- // Probed only when `uv` is absent. Some skills still invoke the interpreter
20
- // directly (`python3 .../resolve_customization.py`), and those scripts declare
21
- // `requires-python = ">=3.11"` — `resolve_config.py` hard-exits below it
22
- // because `tomllib` is a 3.11 stdlib addition. When `uv` is present it
23
- // provisions its own interpreter and whatever `python3` resolves to on PATH is
24
- // irrelevant, so probing it then would report a problem that doesn't exist.
25
- const PYTHON_COMMAND = 'python3';
26
- const MIN_PYTHON = { major: 3, minor: 11 };
27
-
28
- /**
29
- * Parse `uv --version` output into version parts.
30
- * Example outputs: "uv 0.5.31", "uv 0.5.31 (Homebrew 2025-02-12)".
31
- * @param {string} output - stdout/stderr from `uv --version`
32
- * @returns {{major: number, minor: number, patch: number, raw: string}|null}
33
- */
34
- function parseUvVersion(output) {
35
- if (!output) return null;
36
- const match = output.match(/uv\s+(\d+)\.(\d+)(?:\.(\d+))?/i);
37
- if (!match) return null;
38
- return {
39
- major: Number(match[1]),
40
- minor: Number(match[2]),
41
- patch: Number(match[3] || 0),
42
- raw: `${match[1]}.${match[2]}.${match[3] || 0}`,
43
- };
44
- }
45
-
46
- /**
47
- * Parse `python3 --version` output into version parts.
48
- * Example outputs: "Python 3.11.7", "Python 3.13.0rc1".
49
- * @param {string} output - stdout/stderr from `python3 --version`
50
- * @returns {{major: number, minor: number, patch: number, raw: string}|null}
51
- */
52
- function parsePythonVersion(output) {
53
- if (!output) return null;
54
- const match = output.match(/Python\s+(\d+)\.(\d+)(?:\.(\d+))?/i);
55
- if (!match) return null;
56
- return {
57
- major: Number(match[1]),
58
- minor: Number(match[2]),
59
- patch: Number(match[3] || 0),
60
- raw: `${match[1]}.${match[2]}.${match[3] || 0}`,
61
- };
62
- }
63
-
64
- /**
65
- * Whether a parsed Python version satisfies the 3.11+ floor the scripts declare.
66
- * @param {{major: number, minor: number}|null} version
67
- * @returns {boolean}
68
- */
69
- function pythonMeetsMinimum(version) {
70
- if (!version) return false;
71
- if (version.major !== MIN_PYTHON.major) return version.major > MIN_PYTHON.major;
72
- return version.minor >= MIN_PYTHON.minor;
73
- }
74
-
75
- /**
76
- * Run `<command> --version` and hand the combined output to a parser.
77
- * @param {string} command
78
- * @param {(output: string) => Object|null} parse
79
- * @returns {{version: Object}|null}
80
- */
81
- function probeVersion(command, parse) {
82
- let result;
83
- try {
84
- result = spawnSync(command, ['--version'], {
85
- encoding: 'utf8',
86
- timeout: 5000,
87
- windowsHide: true,
88
- });
89
- } catch {
90
- return null;
91
- }
92
- if (!result || result.error) return null;
93
- const version = parse(`${result.stdout || ''}\n${result.stderr || ''}`);
94
- return version ? { version } : null;
95
- }
96
-
97
- /**
98
- * Probe the local environment for `uv`.
99
- * @returns {{version: {major: number, minor: number, patch: number, raw: string}}|null}
100
- */
101
- function detectUv() {
102
- return probeVersion(RUNTIME_COMMAND, parseUvVersion);
103
- }
104
-
105
- /**
106
- * Probe the local environment for `python3`.
107
- * @returns {{version: {major: number, minor: number, patch: number, raw: string}}|null}
108
- */
109
- function detectPython3() {
110
- return probeVersion(PYTHON_COMMAND, parsePythonVersion);
111
- }
112
-
113
- function setupHints() {
114
- return [
115
- '`uv run` provisions the interpreter and dependencies for you — no manual',
116
- 'venv or pip, and no need for a particular python3 on PATH.',
117
- '',
118
- 'Easiest path: ask your AI agent to "install and set up uv for me".',
119
- '',
120
- 'Or install it yourself:',
121
- ' macOS/Linux: curl -LsSf https://astral.sh/uv/install.sh | sh',
122
- ' Windows: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"',
123
- ' Homebrew: brew install uv',
124
- ' Docs: https://docs.astral.sh/uv/getting-started/installation/',
125
- ].join('\n');
126
- }
127
-
128
- /**
129
- * Describe what a missing `uv` leaves working, based on the `python3` fallback.
130
- *
131
- * With `uv` gone the rendered skills are lost either way; the only question is
132
- * whether the skills that invoke the interpreter directly still run, and that
133
- * turns on `python3` being 3.11+.
134
- *
135
- * @param {{version: Object}|null} python - result of detectPython3()
136
- * @returns {string}
137
- */
138
- function pythonFallbackNote(python) {
139
- if (!python) {
140
- return 'No python3 on PATH either, so no Python-backed skill will run.';
141
- }
142
- if (pythonMeetsMinimum(python.version)) {
143
- return (
144
- `python3 ${python.version.raw} is present, so skills that call the interpreter ` +
145
- 'directly still work — but the rendered skills above stay unavailable.'
146
- );
147
- }
148
- return (
149
- `python3 ${python.version.raw} is present but below the required ` +
150
- `${MIN_PYTHON.major}.${MIN_PYTHON.minor}, so no Python-backed skill will run.`
151
- );
152
- }
153
-
154
- /**
155
- * Check whether `uv` is available and inform the user.
156
- *
157
- * Warn-don't-block: a missing `uv` never stops or fails the install, because
158
- * core-only and CI installs are legitimate and never render a skill. But the
159
- * warning names the concrete consequence — `bmad-build` and `bmad-build-auto`
160
- * halt — rather than describing `uv` as a nice-to-have, and `installer.js`
161
- * repeats it in the post-install summary so it isn't lost in the scrollback.
162
- *
163
- * @returns {Promise<{status: 'found'|'missing', detected: Object|null, python: Object|null}>}
164
- */
165
- async function checkUvEnvironment() {
166
- // Called via module.exports so tests can stub detection.
167
- const detected = module.exports.detectUv();
168
-
169
- if (detected) {
170
- await prompts.log.success(`✅ Python UV check pass (uv ${detected.version.raw} detected).`);
171
- return { status: 'found', detected, python: null };
172
- }
173
-
174
- const python = module.exports.detectPython3();
175
-
176
- await prompts.log.warn(
177
- 'uv not found on PATH. BMAD requires it to run the Python scripts its skills\n' +
178
- 'shell out to: bmad-build and bmad-build-auto render through `uv run` and will\n' +
179
- 'HALT on activation without it — there is no interpreter fallback.\n' +
180
- `${pythonFallbackNote(python)}\n` +
181
- 'The install itself completes either way.',
182
- );
183
- await prompts.note(setupHints(), 'uv required');
184
- return { status: 'missing', detected: null, python };
185
- }
186
-
187
- module.exports = {
188
- checkUvEnvironment,
189
- detectUv,
190
- detectPython3,
191
- parseUvVersion,
192
- parsePythonVersion,
193
- pythonMeetsMinimum,
194
- MIN_PYTHON,
195
- };
@@ -1,109 +0,0 @@
1
- const prompts = require('../prompts');
2
-
3
- const WSL_UNC_PATTERN = /^\\\\wsl(?:\.localhost|\$)?\\/i;
4
-
5
- function normalizePath(value) {
6
- return typeof value === 'string' ? value.replaceAll('/', '\\').toLowerCase() : '';
7
- }
8
-
9
- function isLinuxStylePath(value) {
10
- return (
11
- typeof value === 'string' &&
12
- value.startsWith('/') &&
13
- !value.startsWith('//') &&
14
- !/^\/[a-z](?:\/|$)/i.test(value) &&
15
- !/^\/cygdrive\/[a-z](?:\/|$)/i.test(value)
16
- );
17
- }
18
-
19
- function isWslUncPath(value) {
20
- return WSL_UNC_PATTERN.test(value || '');
21
- }
22
-
23
- /**
24
- * Detect the broken interop case where WSL resolved node/npx to Windows.
25
- * @param {Object} [runtime]
26
- * @param {string} [runtime.platform]
27
- * @param {Object} [runtime.env]
28
- * @param {string} [runtime.cwd]
29
- * @param {string} [runtime.execPath]
30
- * @returns {{isMismatch: boolean, reason: string|null, execPath: string}}
31
- */
32
- function detectWindowsNodeFromWsl(runtime = {}) {
33
- const platform = runtime.platform || process.platform;
34
- const env = runtime.env || process.env;
35
- const cwd = runtime.cwd || safeCwd();
36
- const execPath = runtime.execPath || process.execPath || '';
37
-
38
- if (platform !== 'win32') {
39
- return { isMismatch: false, reason: null, execPath };
40
- }
41
-
42
- if (env.WSL_DISTRO_NAME) {
43
- return { isMismatch: true, reason: 'WSL_DISTRO_NAME is set', execPath };
44
- }
45
-
46
- if (env.WSL_INTEROP) {
47
- return { isMismatch: true, reason: 'WSL_INTEROP is set', execPath };
48
- }
49
-
50
- if (isLinuxStylePath(env.PWD)) {
51
- return { isMismatch: true, reason: 'PWD is a Linux path', execPath };
52
- }
53
-
54
- if (isWslUncPath(cwd)) {
55
- return { isMismatch: true, reason: 'current directory is a WSL UNC path', execPath };
56
- }
57
-
58
- const normalizedExecPath = normalizePath(execPath);
59
- if (normalizedExecPath.includes('\\wsl$\\') || normalizedExecPath.includes('\\wsl.localhost\\')) {
60
- return { isMismatch: true, reason: 'Node executable path is under a WSL UNC path', execPath };
61
- }
62
-
63
- return { isMismatch: false, reason: null, execPath };
64
- }
65
-
66
- function safeCwd() {
67
- try {
68
- return process.cwd();
69
- } catch {
70
- return '';
71
- }
72
- }
73
-
74
- function formatWindowsNodeFromWslMessage(detection) {
75
- const lines = [
76
- 'Windows Node.js was launched from a WSL shell.',
77
- '',
78
- 'This usually means Node.js is not installed inside the WSL distro, so WSL resolved `node`/`npx` to Windows.',
79
- 'The installer cannot safely continue because Linux paths may be interpreted as Windows paths.',
80
- '',
81
- 'Install Node.js inside WSL, then rerun the same command from the WSL terminal.',
82
- ];
83
-
84
- if (detection.execPath) {
85
- lines.push('', `Detected Node executable: ${detection.execPath}`);
86
- }
87
-
88
- if (detection.reason) {
89
- lines.push(`Detection signal: ${detection.reason}`);
90
- }
91
-
92
- return lines.join('\n');
93
- }
94
-
95
- async function checkWindowsNodeFromWsl() {
96
- const detection = module.exports.detectWindowsNodeFromWsl();
97
- if (!detection.isMismatch) {
98
- return detection;
99
- }
100
-
101
- await prompts.log.error(formatWindowsNodeFromWslMessage(detection));
102
- process.exit(1);
103
- }
104
-
105
- module.exports = {
106
- checkWindowsNodeFromWsl,
107
- detectWindowsNodeFromWsl,
108
- formatWindowsNodeFromWslMessage,
109
- };
@@ -1,204 +0,0 @@
1
- const fs = require('./fs-native');
2
- const path = require('node:path');
3
- const crypto = require('node:crypto');
4
-
5
- /**
6
- * File operations utility class
7
- */
8
- class FileOps {
9
- /**
10
- * Copy a directory recursively
11
- * @param {string} source - Source directory
12
- * @param {string} dest - Destination directory
13
- * @param {Object} options - Copy options
14
- */
15
- async copyDirectory(source, dest, options = {}) {
16
- const defaultOptions = {
17
- overwrite: true,
18
- errorOnExist: false,
19
- filter: (src) => !this.shouldIgnore(src),
20
- };
21
-
22
- const copyOptions = { ...defaultOptions, ...options };
23
- await fs.copy(source, dest, copyOptions);
24
- }
25
-
26
- /**
27
- * Sync directory (selective copy preserving modifications)
28
- * @param {string} source - Source directory
29
- * @param {string} dest - Destination directory
30
- */
31
- async syncDirectory(source, dest) {
32
- const sourceFiles = await this.getFileList(source);
33
-
34
- for (const file of sourceFiles) {
35
- const sourceFile = path.join(source, file);
36
- const destFile = path.join(dest, file);
37
-
38
- // Check if destination file exists
39
- if (await fs.pathExists(destFile)) {
40
- // Compare checksums to see if file has been modified
41
- const sourceHash = await this.getFileHash(sourceFile);
42
- const destHash = await this.getFileHash(destFile);
43
-
44
- if (sourceHash === destHash) {
45
- // Files are identical, safe to update
46
- await fs.copy(sourceFile, destFile, { overwrite: true });
47
- } else {
48
- // File has been modified, check timestamps
49
- const sourceStats = await fs.stat(sourceFile);
50
- const destStats = await fs.stat(destFile);
51
-
52
- if (sourceStats.mtime > destStats.mtime) {
53
- // Source is newer, update
54
- await fs.copy(sourceFile, destFile, { overwrite: true });
55
- }
56
- // Otherwise, preserve user modifications
57
- }
58
- } else {
59
- // New file, copy it
60
- await fs.ensureDir(path.dirname(destFile));
61
- await fs.copy(sourceFile, destFile);
62
- }
63
- }
64
-
65
- // Remove files that no longer exist in source
66
- const destFiles = await this.getFileList(dest);
67
- for (const file of destFiles) {
68
- const sourceFile = path.join(source, file);
69
- const destFile = path.join(dest, file);
70
-
71
- if (!(await fs.pathExists(sourceFile))) {
72
- await fs.remove(destFile);
73
- }
74
- }
75
- }
76
-
77
- /**
78
- * Get list of all files in a directory
79
- * @param {string} dir - Directory path
80
- * @returns {Array} List of relative file paths
81
- */
82
- async getFileList(dir) {
83
- const files = [];
84
-
85
- if (!(await fs.pathExists(dir))) {
86
- return files;
87
- }
88
-
89
- const walk = async (currentDir, baseDir) => {
90
- const entries = await fs.readdir(currentDir, { withFileTypes: true });
91
-
92
- for (const entry of entries) {
93
- const fullPath = path.join(currentDir, entry.name);
94
-
95
- if (entry.isDirectory() && !this.shouldIgnore(fullPath)) {
96
- await walk(fullPath, baseDir);
97
- } else if (entry.isFile() && !this.shouldIgnore(fullPath)) {
98
- files.push(path.relative(baseDir, fullPath));
99
- }
100
- }
101
- };
102
-
103
- await walk(dir, dir);
104
- return files;
105
- }
106
-
107
- /**
108
- * Get file hash for comparison
109
- * @param {string} filePath - File path
110
- * @returns {string} File hash
111
- */
112
- async getFileHash(filePath) {
113
- const hash = crypto.createHash('sha256');
114
- const stream = fs.createReadStream(filePath);
115
-
116
- return new Promise((resolve, reject) => {
117
- stream.on('data', (data) => hash.update(data));
118
- stream.on('end', () => resolve(hash.digest('hex')));
119
- stream.on('error', reject);
120
- });
121
- }
122
-
123
- /**
124
- * Check if a path should be ignored
125
- * @param {string} filePath - Path to check
126
- * @returns {boolean} True if should be ignored
127
- */
128
- shouldIgnore(filePath) {
129
- const ignoredPatterns = ['.git', '.DS_Store', 'node_modules', '*.swp', '*.tmp', '.idea', '.vscode', '__pycache__', '*.pyc'];
130
-
131
- const basename = path.basename(filePath);
132
-
133
- for (const pattern of ignoredPatterns) {
134
- if (pattern.includes('*')) {
135
- // Simple glob pattern matching
136
- const regex = new RegExp(pattern.replace('*', '.*'));
137
- if (regex.test(basename)) {
138
- return true;
139
- }
140
- } else if (basename === pattern) {
141
- return true;
142
- }
143
- }
144
-
145
- return false;
146
- }
147
-
148
- /**
149
- * Ensure directory exists
150
- * @param {string} dir - Directory path
151
- */
152
- async ensureDir(dir) {
153
- await fs.ensureDir(dir);
154
- }
155
-
156
- /**
157
- * Remove directory or file
158
- * @param {string} targetPath - Path to remove
159
- */
160
- async remove(targetPath) {
161
- if (await fs.pathExists(targetPath)) {
162
- await fs.remove(targetPath);
163
- }
164
- }
165
-
166
- /**
167
- * Read file content
168
- * @param {string} filePath - File path
169
- * @returns {string} File content
170
- */
171
- async readFile(filePath) {
172
- return await fs.readFile(filePath, 'utf8');
173
- }
174
-
175
- /**
176
- * Write file content
177
- * @param {string} filePath - File path
178
- * @param {string} content - File content
179
- */
180
- async writeFile(filePath, content) {
181
- await fs.ensureDir(path.dirname(filePath));
182
- await fs.writeFile(filePath, content, 'utf8');
183
- }
184
-
185
- /**
186
- * Check if path exists
187
- * @param {string} targetPath - Path to check
188
- * @returns {boolean} True if exists
189
- */
190
- async exists(targetPath) {
191
- return await fs.pathExists(targetPath);
192
- }
193
-
194
- /**
195
- * Get file or directory stats
196
- * @param {string} targetPath - Path to check
197
- * @returns {Object} File stats
198
- */
199
- async stat(targetPath) {
200
- return await fs.stat(targetPath);
201
- }
202
- }
203
-
204
- module.exports = { FileOps };
@@ -1,116 +0,0 @@
1
- // Drop-in replacement for fs-extra using native node:fs APIs.
2
- // Eliminates graceful-fs monkey-patching that causes non-deterministic
3
- // file loss during multi-module installs on macOS (issue #1779).
4
- const fsp = require('node:fs/promises');
5
- const fs = require('node:fs');
6
- const path = require('node:path');
7
-
8
- async function pathExists(p) {
9
- try {
10
- await fsp.access(p);
11
- return true;
12
- } catch {
13
- return false;
14
- }
15
- }
16
-
17
- async function ensureDir(dir) {
18
- await fsp.mkdir(dir, { recursive: true });
19
- }
20
-
21
- async function remove(p) {
22
- await fsp.rm(p, { recursive: true, force: true });
23
- }
24
-
25
- async function copy(src, dest, options = {}) {
26
- const filterFn = options.filter;
27
- const overwrite = options.overwrite !== false;
28
- const srcStat = await fsp.stat(src);
29
-
30
- if (srcStat.isFile()) {
31
- if (filterFn && !(await filterFn(src, dest))) return;
32
- await fsp.mkdir(path.dirname(dest), { recursive: true });
33
- if (!overwrite) {
34
- try {
35
- await fsp.access(dest);
36
- if (options.errorOnExist) throw new Error(`${dest} already exists`);
37
- return;
38
- } catch (error) {
39
- if (error.message.includes('already exists')) throw error;
40
- }
41
- }
42
- await fsp.copyFile(src, dest);
43
- return;
44
- }
45
-
46
- if (srcStat.isDirectory()) {
47
- if (filterFn && !(await filterFn(src, dest))) return;
48
- await fsp.mkdir(dest, { recursive: true });
49
- const entries = await fsp.readdir(src, { withFileTypes: true });
50
- for (const entry of entries) {
51
- await copy(path.join(src, entry.name), path.join(dest, entry.name), options);
52
- }
53
- }
54
- }
55
-
56
- async function move(src, dest) {
57
- try {
58
- await fsp.rename(src, dest);
59
- } catch (error) {
60
- if (error.code === 'EXDEV') {
61
- await copy(src, dest);
62
- await fsp.rm(src, { recursive: true, force: true });
63
- } else {
64
- throw error;
65
- }
66
- }
67
- }
68
-
69
- function readJsonSync(p) {
70
- return JSON.parse(fs.readFileSync(p, 'utf8'));
71
- }
72
-
73
- async function writeJson(p, data, options = {}) {
74
- const spaces = options.spaces ?? 2;
75
- await fsp.writeFile(p, JSON.stringify(data, null, spaces) + '\n', 'utf8');
76
- }
77
-
78
- module.exports = {
79
- // Native async (node:fs/promises)
80
- readFile: fsp.readFile,
81
- writeFile: fsp.writeFile,
82
- stat: fsp.stat,
83
- readdir: fsp.readdir,
84
- access: fsp.access,
85
- realpath: fsp.realpath,
86
- rename: fsp.rename,
87
- rmdir: fsp.rmdir,
88
- unlink: fsp.unlink,
89
- chmod: fsp.chmod,
90
- mkdir: fsp.mkdir,
91
- mkdtemp: fsp.mkdtemp,
92
- copyFile: fsp.copyFile,
93
- rm: fsp.rm,
94
-
95
- // fs-extra compatible helpers (native implementations)
96
- pathExists,
97
- ensureDir,
98
- remove,
99
- copy,
100
- move,
101
- readJsonSync,
102
- writeJson,
103
-
104
- // Sync methods from core node:fs
105
- existsSync: fs.existsSync.bind(fs),
106
- readFileSync: fs.readFileSync.bind(fs),
107
- writeFileSync: fs.writeFileSync.bind(fs),
108
- statSync: fs.statSync.bind(fs),
109
- accessSync: fs.accessSync.bind(fs),
110
- readdirSync: fs.readdirSync.bind(fs),
111
- createReadStream: fs.createReadStream.bind(fs),
112
- pathExistsSync: fs.existsSync.bind(fs),
113
-
114
- // Constants
115
- constants: fs.constants,
116
- };