@zeyue0329/xiaoma-cli 1.0.7 → 1.0.9

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 (310) hide show
  1. package/CHANGELOG.md +686 -0
  2. package/LICENSE +6 -1
  3. package/README.md +173 -460
  4. package/common/tasks/create-doc.md +3 -1
  5. package/common/tasks/execute-checklist.md +2 -7
  6. package/common/utils/bmad-doc-template.md +7 -5
  7. package/common/utils/workflow-management.md +2 -0
  8. package/dist/agents/analyst.txt +1143 -1118
  9. package/dist/agents/architect.txt +1555 -1531
  10. package/dist/agents/dev.txt +170 -22
  11. package/dist/agents/pm.txt +1103 -1106
  12. package/dist/agents/po.txt +329 -334
  13. package/dist/agents/qa.txt +1773 -154
  14. package/dist/agents/sm.txt +101 -102
  15. package/dist/agents/ux-expert.txt +93 -91
  16. package/dist/agents/xiaoma-master.txt +745 -673
  17. package/dist/agents/xiaoma-orchestrator.txt +107 -77
  18. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +2386 -0
  19. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +1627 -0
  20. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +822 -0
  21. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +11008 -0
  22. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +4031 -0
  23. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +3717 -0
  24. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.txt +456 -0
  25. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.txt +982 -0
  26. package/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +15450 -0
  27. package/dist/expansion-packs/bmad-creative-writing/agents/beta-reader.txt +921 -0
  28. package/dist/expansion-packs/bmad-creative-writing/agents/book-critic.txt +81 -0
  29. package/dist/expansion-packs/bmad-creative-writing/agents/character-psychologist.txt +886 -0
  30. package/dist/expansion-packs/bmad-creative-writing/agents/cover-designer.txt +85 -0
  31. package/dist/expansion-packs/bmad-creative-writing/agents/dialog-specialist.txt +903 -0
  32. package/dist/expansion-packs/bmad-creative-writing/agents/editor.txt +837 -0
  33. package/dist/expansion-packs/bmad-creative-writing/agents/genre-specialist.txt +989 -0
  34. package/dist/expansion-packs/bmad-creative-writing/agents/narrative-designer.txt +888 -0
  35. package/dist/expansion-packs/bmad-creative-writing/agents/plot-architect.txt +1173 -0
  36. package/dist/expansion-packs/bmad-creative-writing/agents/world-builder.txt +914 -0
  37. package/dist/expansion-packs/bmad-creative-writing/teams/agent-team.txt +6511 -0
  38. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +2087 -0
  39. package/dist/teams/team-all.txt +5710 -3857
  40. package/dist/teams/team-fullstack.txt +3242 -3157
  41. package/dist/teams/team-ide-minimal.txt +2330 -534
  42. package/dist/teams/team-no-ui.txt +2935 -2857
  43. package/docs/GUIDING-PRINCIPLES.md +91 -0
  44. package/docs/core-architecture.md +219 -0
  45. package/docs/enhanced-ide-development-workflow.md +248 -0
  46. package/docs/expansion-packs.md +200 -0
  47. package/docs/how-to-contribute-with-pull-requests.md +158 -0
  48. package/docs/user-guide.md +530 -0
  49. package/docs/versioning-and-releases.md +155 -0
  50. package/docs/versions.md +48 -0
  51. package/docs/working-in-the-brownfield.md +597 -0
  52. package/expansion-packs/bmad-2d-phaser-game-dev/agent-teams/phaser-2d-nodejs-game-team.yaml +14 -0
  53. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.md +73 -0
  54. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +80 -0
  55. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +66 -0
  56. package/expansion-packs/bmad-2d-phaser-game-dev/checklists/game-design-checklist.md +203 -0
  57. package/expansion-packs/bmad-2d-phaser-game-dev/checklists/game-story-dod-checklist.md +162 -0
  58. package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +9 -0
  59. package/expansion-packs/bmad-2d-phaser-game-dev/data/bmad-kb.md +252 -0
  60. package/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +649 -0
  61. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/advanced-elicitation.md +112 -0
  62. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/create-game-story.md +218 -0
  63. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/game-design-brainstorming.md +292 -0
  64. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +614 -0
  65. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +357 -0
  66. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +344 -0
  67. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +254 -0
  68. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +485 -0
  69. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-dev-greenfield.yaml +184 -0
  70. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-prototype.yaml +176 -0
  71. package/expansion-packs/bmad-2d-unity-game-dev/agent-teams/unity-2d-game-team.yaml +15 -0
  72. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.md +82 -0
  73. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.md +79 -0
  74. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.md +80 -0
  75. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.md +67 -0
  76. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-architect-checklist.md +393 -0
  77. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-change-checklist.md +205 -0
  78. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-design-checklist.md +203 -0
  79. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-story-dod-checklist.md +126 -0
  80. package/expansion-packs/bmad-2d-unity-game-dev/config.yaml +7 -0
  81. package/expansion-packs/bmad-2d-unity-game-dev/data/bmad-kb.md +771 -0
  82. package/expansion-packs/bmad-2d-unity-game-dev/data/development-guidelines.md +588 -0
  83. package/expansion-packs/bmad-2d-unity-game-dev/tasks/advanced-elicitation.md +112 -0
  84. package/expansion-packs/bmad-2d-unity-game-dev/tasks/correct-course-game.md +143 -0
  85. package/expansion-packs/bmad-2d-unity-game-dev/tasks/create-game-story.md +186 -0
  86. package/expansion-packs/bmad-2d-unity-game-dev/tasks/game-design-brainstorming.md +292 -0
  87. package/expansion-packs/bmad-2d-unity-game-dev/tasks/validate-game-story.md +202 -0
  88. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-architecture-tmpl.yaml +1031 -0
  89. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-brief-tmpl.yaml +357 -0
  90. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-design-doc-tmpl.yaml +706 -0
  91. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml +257 -0
  92. package/expansion-packs/bmad-2d-unity-game-dev/templates/level-design-doc-tmpl.yaml +485 -0
  93. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-dev-greenfield.yaml +184 -0
  94. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-prototype.yaml +176 -0
  95. package/expansion-packs/bmad-creative-writing/README.md +146 -0
  96. package/expansion-packs/bmad-creative-writing/agent-teams/agent-team.yaml +20 -0
  97. package/expansion-packs/bmad-creative-writing/agents/beta-reader.md +94 -0
  98. package/expansion-packs/bmad-creative-writing/agents/book-critic.md +40 -0
  99. package/expansion-packs/bmad-creative-writing/agents/character-psychologist.md +93 -0
  100. package/expansion-packs/bmad-creative-writing/agents/cover-designer.md +46 -0
  101. package/expansion-packs/bmad-creative-writing/agents/dialog-specialist.md +92 -0
  102. package/expansion-packs/bmad-creative-writing/agents/editor.md +93 -0
  103. package/expansion-packs/bmad-creative-writing/agents/genre-specialist.md +95 -0
  104. package/expansion-packs/bmad-creative-writing/agents/narrative-designer.md +93 -0
  105. package/expansion-packs/bmad-creative-writing/agents/plot-architect.md +95 -0
  106. package/expansion-packs/bmad-creative-writing/agents/world-builder.md +94 -0
  107. package/expansion-packs/bmad-creative-writing/checklists/beta-feedback-closure-checklist.md +23 -0
  108. package/expansion-packs/bmad-creative-writing/checklists/character-consistency-checklist.md +23 -0
  109. package/expansion-packs/bmad-creative-writing/checklists/comedic-timing-checklist.md +23 -0
  110. package/expansion-packs/bmad-creative-writing/checklists/cyberpunk-aesthetic-checklist.md +23 -0
  111. package/expansion-packs/bmad-creative-writing/checklists/ebook-formatting-checklist.md +21 -0
  112. package/expansion-packs/bmad-creative-writing/checklists/epic-poetry-meter-checklist.md +23 -0
  113. package/expansion-packs/bmad-creative-writing/checklists/fantasy-magic-system-checklist.md +23 -0
  114. package/expansion-packs/bmad-creative-writing/checklists/foreshadowing-payoff-checklist.md +22 -0
  115. package/expansion-packs/bmad-creative-writing/checklists/genre-tropes-checklist.md +22 -0
  116. package/expansion-packs/bmad-creative-writing/checklists/historical-accuracy-checklist.md +23 -0
  117. package/expansion-packs/bmad-creative-writing/checklists/horror-suspense-checklist.md +23 -0
  118. package/expansion-packs/bmad-creative-writing/checklists/kdp-cover-ready-checklist.md +25 -0
  119. package/expansion-packs/bmad-creative-writing/checklists/line-edit-quality-checklist.md +23 -0
  120. package/expansion-packs/bmad-creative-writing/checklists/marketing-copy-checklist.md +23 -0
  121. package/expansion-packs/bmad-creative-writing/checklists/mystery-clue-trail-checklist.md +23 -0
  122. package/expansion-packs/bmad-creative-writing/checklists/orbital-mechanics-checklist.md +23 -0
  123. package/expansion-packs/bmad-creative-writing/checklists/plot-structure-checklist.md +59 -0
  124. package/expansion-packs/bmad-creative-writing/checklists/publication-readiness-checklist.md +23 -0
  125. package/expansion-packs/bmad-creative-writing/checklists/romance-emotional-beats-checklist.md +23 -0
  126. package/expansion-packs/bmad-creative-writing/checklists/scene-quality-checklist.md +23 -0
  127. package/expansion-packs/bmad-creative-writing/checklists/scifi-technology-plausibility-checklist.md +22 -0
  128. package/expansion-packs/bmad-creative-writing/checklists/sensitivity-representation-checklist.md +23 -0
  129. package/expansion-packs/bmad-creative-writing/checklists/steampunk-gadget-checklist.md +23 -0
  130. package/expansion-packs/bmad-creative-writing/checklists/thriller-pacing-stakes-checklist.md +23 -0
  131. package/expansion-packs/bmad-creative-writing/checklists/timeline-continuity-checklist.md +23 -0
  132. package/expansion-packs/bmad-creative-writing/checklists/world-building-continuity-checklist.md +23 -0
  133. package/expansion-packs/bmad-creative-writing/checklists/ya-appropriateness-checklist.md +23 -0
  134. package/expansion-packs/bmad-creative-writing/config.yaml +12 -0
  135. package/expansion-packs/bmad-creative-writing/data/bmad-kb.md +209 -0
  136. package/expansion-packs/bmad-creative-writing/data/story-structures.md +67 -0
  137. package/expansion-packs/bmad-creative-writing/docs/brief.md +212 -0
  138. package/expansion-packs/bmad-creative-writing/tasks/advanced-elicitation.md +119 -0
  139. package/expansion-packs/bmad-creative-writing/tasks/analyze-reader-feedback.md +23 -0
  140. package/expansion-packs/bmad-creative-writing/tasks/analyze-story-structure.md +67 -0
  141. package/expansion-packs/bmad-creative-writing/tasks/assemble-kdp-package.md +29 -0
  142. package/expansion-packs/bmad-creative-writing/tasks/brainstorm-premise.md +23 -0
  143. package/expansion-packs/bmad-creative-writing/tasks/build-world.md +24 -0
  144. package/expansion-packs/bmad-creative-writing/tasks/character-depth-pass.md +22 -0
  145. package/expansion-packs/bmad-creative-writing/tasks/create-doc.md +103 -0
  146. package/expansion-packs/bmad-creative-writing/tasks/create-draft-section.md +26 -0
  147. package/expansion-packs/bmad-creative-writing/tasks/critical-review.md +26 -0
  148. package/expansion-packs/bmad-creative-writing/tasks/develop-character.md +24 -0
  149. package/expansion-packs/bmad-creative-writing/tasks/execute-checklist.md +88 -0
  150. package/expansion-packs/bmad-creative-writing/tasks/expand-premise.md +23 -0
  151. package/expansion-packs/bmad-creative-writing/tasks/expand-synopsis.md +23 -0
  152. package/expansion-packs/bmad-creative-writing/tasks/final-polish.md +23 -0
  153. package/expansion-packs/bmad-creative-writing/tasks/generate-cover-brief.md +25 -0
  154. package/expansion-packs/bmad-creative-writing/tasks/generate-cover-prompts.md +26 -0
  155. package/expansion-packs/bmad-creative-writing/tasks/generate-scene-list.md +23 -0
  156. package/expansion-packs/bmad-creative-writing/tasks/incorporate-feedback.md +25 -0
  157. package/expansion-packs/bmad-creative-writing/tasks/outline-scenes.md +23 -0
  158. package/expansion-packs/bmad-creative-writing/tasks/provide-feedback.md +24 -0
  159. package/expansion-packs/bmad-creative-writing/tasks/publish-chapter.md +23 -0
  160. package/expansion-packs/bmad-creative-writing/tasks/quick-feedback.md +22 -0
  161. package/expansion-packs/bmad-creative-writing/tasks/select-next-arc.md +23 -0
  162. package/expansion-packs/bmad-creative-writing/tasks/workshop-dialog.md +64 -0
  163. package/expansion-packs/bmad-creative-writing/templates/beta-feedback-form.yaml +97 -0
  164. package/expansion-packs/bmad-creative-writing/templates/chapter-draft-tmpl.yaml +82 -0
  165. package/expansion-packs/bmad-creative-writing/templates/character-profile-tmpl.yaml +92 -0
  166. package/expansion-packs/bmad-creative-writing/templates/cover-design-brief-tmpl.yaml +98 -0
  167. package/expansion-packs/bmad-creative-writing/templates/premise-brief-tmpl.yaml +78 -0
  168. package/expansion-packs/bmad-creative-writing/templates/scene-list-tmpl.yaml +55 -0
  169. package/expansion-packs/bmad-creative-writing/templates/story-outline-tmpl.yaml +96 -0
  170. package/expansion-packs/bmad-creative-writing/templates/world-guide-tmpl.yaml +89 -0
  171. package/expansion-packs/bmad-creative-writing/workflows/book-cover-design-workflow.md +218 -0
  172. package/expansion-packs/bmad-creative-writing/workflows/novel-greenfield-workflow.yaml +56 -0
  173. package/expansion-packs/bmad-creative-writing/workflows/novel-serial-workflow.yaml +50 -0
  174. package/expansion-packs/bmad-creative-writing/workflows/novel-snowflake-workflow.yaml +69 -0
  175. package/expansion-packs/bmad-creative-writing/workflows/novel-writing.yaml +91 -0
  176. package/expansion-packs/bmad-creative-writing/workflows/screenplay-development.yaml +85 -0
  177. package/expansion-packs/bmad-creative-writing/workflows/series-planning.yaml +78 -0
  178. package/expansion-packs/bmad-creative-writing/workflows/short-story-creation.yaml +64 -0
  179. package/expansion-packs/bmad-infrastructure-devops/README.md +147 -0
  180. package/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.md +73 -0
  181. package/expansion-packs/bmad-infrastructure-devops/checklists/infrastructure-checklist.md +486 -0
  182. package/expansion-packs/bmad-infrastructure-devops/config.yaml +10 -0
  183. package/expansion-packs/bmad-infrastructure-devops/data/bmad-kb.md +307 -0
  184. package/expansion-packs/bmad-infrastructure-devops/tasks/review-infrastructure.md +161 -0
  185. package/expansion-packs/bmad-infrastructure-devops/tasks/validate-infrastructure.md +155 -0
  186. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +425 -0
  187. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +630 -0
  188. package/implement-fork-friendly-ci.sh +229 -0
  189. package/package.json +75 -45
  190. package/prettier.config.mjs +32 -0
  191. package/test.md +1 -0
  192. package/tools/builders/web-builder.js +128 -129
  193. package/tools/bump-all-versions.js +42 -33
  194. package/tools/bump-expansion-version.js +23 -16
  195. package/tools/cli.js +15 -15
  196. package/tools/flattener/aggregate.js +76 -0
  197. package/tools/flattener/binary.js +80 -0
  198. package/tools/flattener/discovery.js +71 -0
  199. package/tools/flattener/files.js +35 -0
  200. package/tools/flattener/ignoreRules.js +176 -0
  201. package/tools/flattener/main.js +458 -460
  202. package/tools/flattener/projectRoot.js +206 -0
  203. package/tools/flattener/prompts.js +44 -0
  204. package/tools/flattener/stats.helpers.js +395 -0
  205. package/tools/flattener/stats.js +80 -0
  206. package/tools/flattener/test-matrix.js +413 -0
  207. package/tools/flattener/xml.js +88 -0
  208. package/tools/installer/README.md +1 -1
  209. package/tools/installer/bin/xiaoma.js +380 -87
  210. package/tools/installer/config/ide-agent-config.yaml +3 -3
  211. package/tools/installer/config/install.config.yaml +73 -22
  212. package/tools/installer/lib/config-loader.js +48 -44
  213. package/tools/installer/lib/file-manager.js +91 -113
  214. package/tools/installer/lib/ide-base-setup.js +57 -56
  215. package/tools/installer/lib/ide-setup.js +816 -407
  216. package/tools/installer/lib/installer.js +915 -687
  217. package/tools/installer/lib/memory-profiler.js +54 -53
  218. package/tools/installer/lib/module-manager.js +19 -15
  219. package/tools/installer/lib/resource-locator.js +26 -28
  220. package/tools/installer/package-lock.json +67 -56
  221. package/tools/installer/package.json +24 -23
  222. package/tools/lib/dependency-resolver.js +30 -34
  223. package/tools/lib/yaml-utils.js +7 -7
  224. package/tools/md-assets/web-agent-startup-instructions.md +1 -1
  225. package/tools/preview-release-notes.js +66 -0
  226. package/tools/setup-hooks.sh +37 -0
  227. package/tools/shared/bannerArt.js +105 -0
  228. package/tools/sync-installer-version.js +7 -9
  229. package/tools/sync-version.sh +23 -0
  230. package/tools/update-expansion-version.js +14 -15
  231. package/tools/upgraders/v3-to-v4-upgrader.js +208 -299
  232. package/tools/version-bump.js +41 -26
  233. package/tools/xiaoma-npx-wrapper.js +11 -11
  234. package/tools/yaml-format.js +56 -43
  235. package/xiaoma-core/agent-teams/team-all.yaml +2 -1
  236. package/xiaoma-core/agent-teams/team-fullstack.yaml +1 -0
  237. package/xiaoma-core/agent-teams/team-ide-minimal.yaml +1 -0
  238. package/xiaoma-core/agent-teams/team-no-ui.yaml +1 -0
  239. package/xiaoma-core/agents/analyst.md +20 -17
  240. package/xiaoma-core/agents/architect.md +15 -14
  241. package/xiaoma-core/agents/dev.md +23 -18
  242. package/xiaoma-core/agents/pm.md +18 -15
  243. package/xiaoma-core/agents/po.md +13 -10
  244. package/xiaoma-core/agents/qa.md +46 -24
  245. package/xiaoma-core/agents/sm.md +11 -8
  246. package/xiaoma-core/agents/ux-expert.md +10 -7
  247. package/xiaoma-core/agents/xiaoma-master.md +24 -22
  248. package/xiaoma-core/agents/xiaoma-orchestrator.md +30 -33
  249. package/xiaoma-core/checklists/architect-checklist.md +2 -5
  250. package/xiaoma-core/checklists/change-checklist.md +4 -2
  251. package/xiaoma-core/checklists/pm-checklist.md +2 -5
  252. package/xiaoma-core/checklists/po-master-checklist.md +2 -9
  253. package/xiaoma-core/checklists/story-dod-checklist.md +2 -7
  254. package/xiaoma-core/checklists/story-draft-checklist.md +2 -3
  255. package/xiaoma-core/core-config.yaml +4 -1
  256. package/xiaoma-core/data/{xiaoma-kb.md → bmad-kb.md} +43 -37
  257. package/xiaoma-core/data/brainstorming-techniques.md +2 -0
  258. package/xiaoma-core/data/elicitation-methods.md +22 -0
  259. package/xiaoma-core/data/technical-preferences.md +2 -0
  260. package/xiaoma-core/data/test-levels-framework.md +148 -0
  261. package/xiaoma-core/data/test-priorities-matrix.md +174 -0
  262. package/xiaoma-core/tasks/advanced-elicitation.md +2 -0
  263. package/xiaoma-core/tasks/apply-qa-fixes.md +150 -0
  264. package/xiaoma-core/tasks/brownfield-create-epic.md +2 -0
  265. package/xiaoma-core/tasks/brownfield-create-story.md +2 -0
  266. package/xiaoma-core/tasks/correct-course.md +2 -0
  267. package/xiaoma-core/tasks/create-brownfield-story.md +14 -4
  268. package/xiaoma-core/tasks/create-deep-research-prompt.md +2 -11
  269. package/xiaoma-core/tasks/create-next-story.md +3 -1
  270. package/xiaoma-core/tasks/document-project.md +17 -13
  271. package/xiaoma-core/tasks/facilitate-brainstorming-session.md +5 -3
  272. package/xiaoma-core/tasks/generate-ai-frontend-prompt.md +2 -0
  273. package/xiaoma-core/tasks/index-docs.md +2 -6
  274. package/xiaoma-core/tasks/kb-mode-interaction.md +17 -15
  275. package/xiaoma-core/tasks/nfr-assess.md +345 -0
  276. package/xiaoma-core/tasks/qa-gate.md +163 -0
  277. package/xiaoma-core/tasks/review-story.md +245 -74
  278. package/xiaoma-core/tasks/risk-profile.md +355 -0
  279. package/xiaoma-core/tasks/shard-doc.md +2 -2
  280. package/xiaoma-core/tasks/test-design.md +176 -0
  281. package/xiaoma-core/tasks/trace-requirements.md +266 -0
  282. package/xiaoma-core/tasks/validate-next-story.md +2 -0
  283. package/xiaoma-core/templates/architecture-tmpl.yaml +50 -49
  284. package/xiaoma-core/templates/brainstorming-output-tmpl.yaml +5 -5
  285. package/xiaoma-core/templates/brownfield-architecture-tmpl.yaml +32 -31
  286. package/xiaoma-core/templates/brownfield-prd-tmpl.yaml +14 -13
  287. package/xiaoma-core/templates/competitor-analysis-tmpl.yaml +20 -6
  288. package/xiaoma-core/templates/front-end-architecture-tmpl.yaml +22 -9
  289. package/xiaoma-core/templates/front-end-spec-tmpl.yaml +25 -24
  290. package/xiaoma-core/templates/fullstack-architecture-tmpl.yaml +123 -104
  291. package/xiaoma-core/templates/market-research-tmpl.yaml +3 -2
  292. package/xiaoma-core/templates/prd-tmpl.yaml +10 -9
  293. package/xiaoma-core/templates/project-brief-tmpl.yaml +5 -4
  294. package/xiaoma-core/templates/qa-gate-tmpl.yaml +103 -0
  295. package/xiaoma-core/templates/story-tmpl.yaml +13 -12
  296. package/xiaoma-core/workflows/brownfield-fullstack.yaml +13 -12
  297. package/xiaoma-core/workflows/brownfield-service.yaml +5 -4
  298. package/xiaoma-core/workflows/brownfield-ui.yaml +5 -4
  299. package/xiaoma-core/workflows/greenfield-fullstack.yaml +7 -6
  300. package/xiaoma-core/workflows/greenfield-service.yaml +5 -4
  301. package/xiaoma-core/workflows/greenfield-ui.yaml +6 -5
  302. package/.releaserc.json +0 -18
  303. package/.vscode/settings.json +0 -44
  304. package/docs/quick-start.md +0 -179
  305. package/tools/bmad-npx-wrapper.js +0 -39
  306. package/tools/semantic-release-sync-installer.js +0 -30
  307. package/xiaoma-core/bmad-core/user-guide.md +0 -0
  308. package/xiaoma-core/enhanced-ide-development-workflow.md +0 -43
  309. package/xiaoma-core/user-guide.md +0 -251
  310. package/xiaoma-core/working-in-the-brownfield.md +0 -364
@@ -1,12 +1,12 @@
1
1
  {
2
- "name": "@zeyue0329/xiaoma-cli-installer",
3
- "version": "1.0.5",
2
+ "name": "bmad-method",
3
+ "version": "4.42.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
- "name": "@zeyue0329/xiaoma-cli-installer",
9
- "version": "1.0.5",
8
+ "name": "bmad-method",
9
+ "version": "4.42.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "chalk": "^4.1.2",
@@ -14,16 +14,43 @@
14
14
  "fs-extra": "^11.3.0",
15
15
  "inquirer": "^8.2.6",
16
16
  "js-yaml": "^4.1.0",
17
- "ora": "^5.4.1"
17
+ "ora": "^5.4.1",
18
+ "semver": "^7.6.3"
18
19
  },
19
20
  "bin": {
20
- "xiaoma-cli-installer": "bin/xiaoma.js",
21
- "xiaoma-installer": "bin/xiaoma.js"
21
+ "bmad": "bin/bmad.js",
22
+ "bmad-method": "bin/bmad.js"
22
23
  },
23
24
  "engines": {
24
25
  "node": ">=20.0.0"
25
26
  }
26
27
  },
28
+ "node_modules/@inquirer/external-editor": {
29
+ "version": "1.0.0",
30
+ "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.0.tgz",
31
+ "integrity": "sha512-5v3YXc5ZMfL6OJqXPrX9csb4l7NlQA2doO1yynUjpUChT9hg4JcuBVP0RbsEJ/3SL/sxWEyFjT2W69ZhtoBWqg==",
32
+ "license": "MIT",
33
+ "dependencies": {
34
+ "chardet": "^2.1.0",
35
+ "iconv-lite": "^0.6.3"
36
+ },
37
+ "engines": {
38
+ "node": ">=18"
39
+ },
40
+ "peerDependencies": {
41
+ "@types/node": ">=18"
42
+ }
43
+ },
44
+ "node_modules/@types/node": {
45
+ "version": "24.2.1",
46
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz",
47
+ "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==",
48
+ "license": "MIT",
49
+ "peer": true,
50
+ "dependencies": {
51
+ "undici-types": "~7.10.0"
52
+ }
53
+ },
27
54
  "node_modules/ansi-escapes": {
28
55
  "version": "4.3.2",
29
56
  "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
@@ -141,9 +168,9 @@
141
168
  }
142
169
  },
143
170
  "node_modules/chardet": {
144
- "version": "0.7.0",
145
- "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
146
- "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
171
+ "version": "2.1.0",
172
+ "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz",
173
+ "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==",
147
174
  "license": "MIT"
148
175
  },
149
176
  "node_modules/cli-cursor": {
@@ -242,20 +269,6 @@
242
269
  "node": ">=0.8.0"
243
270
  }
244
271
  },
245
- "node_modules/external-editor": {
246
- "version": "3.1.0",
247
- "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
248
- "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
249
- "license": "MIT",
250
- "dependencies": {
251
- "chardet": "^0.7.0",
252
- "iconv-lite": "^0.4.24",
253
- "tmp": "^0.0.33"
254
- },
255
- "engines": {
256
- "node": ">=4"
257
- }
258
- },
259
272
  "node_modules/figures": {
260
273
  "version": "3.2.0",
261
274
  "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
@@ -272,9 +285,9 @@
272
285
  }
273
286
  },
274
287
  "node_modules/fs-extra": {
275
- "version": "11.3.1",
276
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.1.tgz",
277
- "integrity": "sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g==",
288
+ "version": "11.3.0",
289
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz",
290
+ "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==",
278
291
  "license": "MIT",
279
292
  "dependencies": {
280
293
  "graceful-fs": "^4.2.0",
@@ -301,12 +314,12 @@
301
314
  }
302
315
  },
303
316
  "node_modules/iconv-lite": {
304
- "version": "0.4.24",
305
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
306
- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
317
+ "version": "0.6.3",
318
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
319
+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
307
320
  "license": "MIT",
308
321
  "dependencies": {
309
- "safer-buffer": ">= 2.1.2 < 3"
322
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
310
323
  },
311
324
  "engines": {
312
325
  "node": ">=0.10.0"
@@ -339,16 +352,16 @@
339
352
  "license": "ISC"
340
353
  },
341
354
  "node_modules/inquirer": {
342
- "version": "8.2.6",
343
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz",
344
- "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==",
355
+ "version": "8.2.7",
356
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.7.tgz",
357
+ "integrity": "sha512-UjOaSel/iddGZJ5xP/Eixh6dY1XghiBw4XK13rCCIJcJfyhhoul/7KhLLUGtebEj6GDYM6Vnx/mVsjx2L/mFIA==",
345
358
  "license": "MIT",
346
359
  "dependencies": {
360
+ "@inquirer/external-editor": "^1.0.0",
347
361
  "ansi-escapes": "^4.2.1",
348
362
  "chalk": "^4.1.1",
349
363
  "cli-cursor": "^3.1.0",
350
364
  "cli-width": "^3.0.0",
351
- "external-editor": "^3.0.3",
352
365
  "figures": "^3.0.0",
353
366
  "lodash": "^4.17.21",
354
367
  "mute-stream": "0.0.8",
@@ -493,15 +506,6 @@
493
506
  "url": "https://github.com/sponsors/sindresorhus"
494
507
  }
495
508
  },
496
- "node_modules/os-tmpdir": {
497
- "version": "1.0.2",
498
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
499
- "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==",
500
- "license": "MIT",
501
- "engines": {
502
- "node": ">=0.10.0"
503
- }
504
- },
505
509
  "node_modules/readable-stream": {
506
510
  "version": "3.6.2",
507
511
  "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
@@ -573,6 +577,18 @@
573
577
  "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
574
578
  "license": "MIT"
575
579
  },
580
+ "node_modules/semver": {
581
+ "version": "7.7.2",
582
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
583
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
584
+ "license": "ISC",
585
+ "bin": {
586
+ "semver": "bin/semver.js"
587
+ },
588
+ "engines": {
589
+ "node": ">=10"
590
+ }
591
+ },
576
592
  "node_modules/signal-exit": {
577
593
  "version": "3.0.7",
578
594
  "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
@@ -632,18 +648,6 @@
632
648
  "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
633
649
  "license": "MIT"
634
650
  },
635
- "node_modules/tmp": {
636
- "version": "0.0.33",
637
- "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
638
- "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
639
- "license": "MIT",
640
- "dependencies": {
641
- "os-tmpdir": "~1.0.2"
642
- },
643
- "engines": {
644
- "node": ">=0.6.0"
645
- }
646
- },
647
651
  "node_modules/tslib": {
648
652
  "version": "2.8.1",
649
653
  "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
@@ -662,6 +666,13 @@
662
666
  "url": "https://github.com/sponsors/sindresorhus"
663
667
  }
664
668
  },
669
+ "node_modules/undici-types": {
670
+ "version": "7.10.0",
671
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz",
672
+ "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
673
+ "license": "MIT",
674
+ "peer": true
675
+ },
665
676
  "node_modules/universalify": {
666
677
  "version": "2.0.1",
667
678
  "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
@@ -1,17 +1,9 @@
1
1
  {
2
- "name": "@zeyue0329/xiaoma-cli-installer",
3
- "version": "1.0.7",
4
- "description": "XiaoMa Cli installer - AI-powered Agile development framework",
5
- "main": "lib/installer.js",
6
- "bin": {
7
- "xiaoma-installer": "./bin/xiaoma.js",
8
- "xiaoma-cli-installer": "./bin/xiaoma.js"
9
- },
10
- "scripts": {
11
- "test": "echo \"Error: no test specified\" && exit 1"
12
- },
2
+ "name": "bmad-method",
3
+ "version": "4.42.1",
4
+ "description": "BMad Method installer - AI-powered Agile development framework",
13
5
  "keywords": [
14
- "xiaoma",
6
+ "bmad",
15
7
  "agile",
16
8
  "ai",
17
9
  "development",
@@ -19,25 +11,34 @@
19
11
  "installer",
20
12
  "agents"
21
13
  ],
22
- "author": "XiaoMa Team",
14
+ "homepage": "https://github.com/bmad-team/bmad-method#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/bmad-team/bmad-method/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/bmad-team/bmad-method.git"
21
+ },
23
22
  "license": "MIT",
23
+ "author": "BMad Team",
24
+ "main": "lib/installer.js",
25
+ "bin": {
26
+ "bmad": "./bin/bmad.js",
27
+ "bmad-method": "./bin/bmad.js"
28
+ },
29
+ "scripts": {
30
+ "test": "echo \"Error: no test specified\" && exit 1"
31
+ },
24
32
  "dependencies": {
25
33
  "chalk": "^4.1.2",
26
34
  "commander": "^14.0.0",
27
35
  "fs-extra": "^11.3.0",
28
36
  "inquirer": "^8.2.6",
29
37
  "js-yaml": "^4.1.0",
30
- "ora": "^5.4.1"
38
+ "ora": "^5.4.1",
39
+ "semver": "^7.6.3"
31
40
  },
32
41
  "engines": {
33
42
  "node": ">=20.0.0"
34
- },
35
- "repository": {
36
- "type": "git",
37
- "url": "https://github.com/zqyl-xiaoma/xiaoma-cli.git"
38
- },
39
- "bugs": {
40
- "url": "https://github.com/zqyl-xiaoma/xiaoma-cli/issues"
41
- },
42
- "homepage": "https://github.com/zqyl-xiaoma/xiaoma-cli#readme"
43
+ }
43
44
  }
@@ -1,5 +1,5 @@
1
- const fs = require('fs').promises;
2
- const path = require('path');
1
+ const fs = require('node:fs').promises;
2
+ const path = require('node:path');
3
3
  const yaml = require('js-yaml');
4
4
  const { extractYamlFromAgent } = require('./yaml-utils');
5
5
 
@@ -14,23 +14,23 @@ class DependencyResolver {
14
14
  async resolveAgentDependencies(agentId) {
15
15
  const agentPath = path.join(this.xiaomaCore, 'agents', `${agentId}.md`);
16
16
  const agentContent = await fs.readFile(agentPath, 'utf8');
17
-
17
+
18
18
  // Extract YAML from markdown content with command cleaning
19
19
  const yamlContent = extractYamlFromAgent(agentContent, true);
20
20
  if (!yamlContent) {
21
21
  throw new Error(`No YAML configuration found in agent ${agentId}`);
22
22
  }
23
-
23
+
24
24
  const agentConfig = yaml.load(yamlContent);
25
-
25
+
26
26
  const dependencies = {
27
27
  agent: {
28
28
  id: agentId,
29
29
  path: agentPath,
30
30
  content: agentContent,
31
- config: agentConfig
31
+ config: agentConfig,
32
32
  },
33
- resources: []
33
+ resources: [],
34
34
  };
35
35
 
36
36
  // Personas are now embedded in agent configs, no need to resolve separately
@@ -52,49 +52,49 @@ class DependencyResolver {
52
52
  const teamPath = path.join(this.xiaomaCore, 'agent-teams', `${teamId}.yaml`);
53
53
  const teamContent = await fs.readFile(teamPath, 'utf8');
54
54
  const teamConfig = yaml.load(teamContent);
55
-
55
+
56
56
  const dependencies = {
57
57
  team: {
58
58
  id: teamId,
59
59
  path: teamPath,
60
60
  content: teamContent,
61
- config: teamConfig
61
+ config: teamConfig,
62
62
  },
63
63
  agents: [],
64
- resources: new Map() // Use Map to deduplicate resources
64
+ resources: new Map(), // Use Map to deduplicate resources
65
65
  };
66
66
 
67
67
  // Always add xiaoma-orchestrator agent first if it's a team
68
- const xiaomaAgent = await this.resolveAgentDependencies('xiaoma-orchestrator');
69
- dependencies.agents.push(xiaomaAgent.agent);
70
- xiaomaAgent.resources.forEach(res => {
68
+ const bmadAgent = await this.resolveAgentDependencies('xiaoma-orchestrator');
69
+ dependencies.agents.push(bmadAgent.agent);
70
+ for (const res of bmadAgent.resources) {
71
71
  dependencies.resources.set(res.path, res);
72
- });
72
+ }
73
73
 
74
74
  // Resolve all agents in the team
75
75
  let agentsToResolve = teamConfig.agents || [];
76
-
76
+
77
77
  // Handle wildcard "*" - include all agents except xiaoma-master
78
78
  if (agentsToResolve.includes('*')) {
79
79
  const allAgents = await this.listAgents();
80
80
  // Remove wildcard and add all agents except those already in the list and xiaoma-master
81
- agentsToResolve = agentsToResolve.filter(a => a !== '*');
81
+ agentsToResolve = agentsToResolve.filter((a) => a !== '*');
82
82
  for (const agent of allAgents) {
83
83
  if (!agentsToResolve.includes(agent) && agent !== 'xiaoma-master') {
84
84
  agentsToResolve.push(agent);
85
85
  }
86
86
  }
87
87
  }
88
-
88
+
89
89
  for (const agentId of agentsToResolve) {
90
90
  if (agentId === 'xiaoma-orchestrator' || agentId === 'xiaoma-master') continue; // Already added or excluded
91
91
  const agentDeps = await this.resolveAgentDependencies(agentId);
92
92
  dependencies.agents.push(agentDeps.agent);
93
-
93
+
94
94
  // Add resources with deduplication
95
- agentDeps.resources.forEach(res => {
95
+ for (const res of agentDeps.resources) {
96
96
  dependencies.resources.set(res.path, res);
97
- });
97
+ }
98
98
  }
99
99
 
100
100
  // Resolve workflows
@@ -104,7 +104,7 @@ class DependencyResolver {
104
104
  }
105
105
 
106
106
  // Convert Map back to array
107
- dependencies.resources = Array.from(dependencies.resources.values());
107
+ dependencies.resources = [...dependencies.resources.values()];
108
108
 
109
109
  return dependencies;
110
110
  }
@@ -119,16 +119,16 @@ class DependencyResolver {
119
119
  let content = null;
120
120
  let filePath = null;
121
121
 
122
- // First try bmad-core
122
+ // First try xiaoma-core
123
123
  try {
124
124
  filePath = path.join(this.xiaomaCore, type, id);
125
125
  content = await fs.readFile(filePath, 'utf8');
126
- } catch (e) {
127
- // If not found in bmad-core, try common folder
126
+ } catch {
127
+ // If not found in xiaoma-core, try common folder
128
128
  try {
129
129
  filePath = path.join(this.common, type, id);
130
130
  content = await fs.readFile(filePath, 'utf8');
131
- } catch (e2) {
131
+ } catch {
132
132
  // File not found in either location
133
133
  }
134
134
  }
@@ -142,7 +142,7 @@ class DependencyResolver {
142
142
  type,
143
143
  id,
144
144
  path: filePath,
145
- content
145
+ content,
146
146
  };
147
147
 
148
148
  this.cache.set(cacheKey, resource);
@@ -156,10 +156,8 @@ class DependencyResolver {
156
156
  async listAgents() {
157
157
  try {
158
158
  const files = await fs.readdir(path.join(this.xiaomaCore, 'agents'));
159
- return files
160
- .filter(f => f.endsWith('.md'))
161
- .map(f => f.replace('.md', ''));
162
- } catch (error) {
159
+ return files.filter((f) => f.endsWith('.md')).map((f) => f.replace('.md', ''));
160
+ } catch {
163
161
  return [];
164
162
  }
165
163
  }
@@ -167,10 +165,8 @@ class DependencyResolver {
167
165
  async listTeams() {
168
166
  try {
169
167
  const files = await fs.readdir(path.join(this.xiaomaCore, 'agent-teams'));
170
- return files
171
- .filter(f => f.endsWith('.yaml'))
172
- .map(f => f.replace('.yaml', ''));
173
- } catch (error) {
168
+ return files.filter((f) => f.endsWith('.yaml')).map((f) => f.replace('.yaml', ''));
169
+ } catch {
174
170
  return [];
175
171
  }
176
172
  }
@@ -10,20 +10,20 @@
10
10
  */
11
11
  function extractYamlFromAgent(agentContent, cleanCommands = false) {
12
12
  // Remove carriage returns and match YAML block
13
- const yamlMatch = agentContent.replace(/\r/g, "").match(/```ya?ml\n([\s\S]*?)\n```/);
13
+ const yamlMatch = agentContent.replaceAll('\r', '').match(/```ya?ml\n([\s\S]*?)\n```/);
14
14
  if (!yamlMatch) return null;
15
-
15
+
16
16
  let yamlContent = yamlMatch[1].trim();
17
-
17
+
18
18
  // Clean up command descriptions if requested
19
19
  // Converts "- command - description" to just "- command"
20
20
  if (cleanCommands) {
21
- yamlContent = yamlContent.replace(/^(\s*-)(\s*"[^"]+")(\s*-\s*.*)$/gm, '$1$2');
21
+ yamlContent = yamlContent.replaceAll(/^(\s*-)(\s*"[^"]+")(\s*-\s*.*)$/gm, '$1$2');
22
22
  }
23
-
23
+
24
24
  return yamlContent;
25
25
  }
26
26
 
27
27
  module.exports = {
28
- extractYamlFromAgent
29
- };
28
+ extractYamlFromAgent,
29
+ };
@@ -1,6 +1,6 @@
1
1
  # Web Agent Bundle Instructions
2
2
 
3
- You are now operating as a specialized AI agent from the XiaoMa-Method framework. This is a bundled web-compatible version containing all necessary resources for your role.
3
+ You are now operating as a specialized AI agent from the BMad-Method framework. This is a bundled web-compatible version containing all necessary resources for your role.
4
4
 
5
5
  ## Important Instructions
6
6
 
@@ -0,0 +1,66 @@
1
+ const { execSync } = require('node:child_process');
2
+ const fs = require('node:fs');
3
+
4
+ // Get the latest stable tag (exclude beta tags)
5
+ const allTags = execSync('git tag -l | sort -V', { encoding: 'utf8' }).split('\n').filter(Boolean);
6
+ const stableTags = allTags.filter((tag) => !tag.includes('beta'));
7
+ const latestTag = stableTags.at(-1) || 'v5.0.0';
8
+
9
+ // Get commits since last tag
10
+ const commits = execSync(`git log ${latestTag}..HEAD --pretty=format:"- %s" --reverse`, {
11
+ encoding: 'utf8',
12
+ })
13
+ .split('\n')
14
+ .filter(Boolean);
15
+
16
+ // Categorize commits
17
+ const features = commits.filter((commit) => /^- (feat|Feature)/.test(commit));
18
+ const fixes = commits.filter((commit) => /^- (fix|Fix)/.test(commit));
19
+ const chores = commits.filter((commit) => /^- (chore|Chore)/.test(commit));
20
+ const others = commits.filter(
21
+ (commit) => !/^- (feat|Feature|fix|Fix|chore|Chore|release:|Release:)/.test(commit),
22
+ );
23
+
24
+ // Get next version (you can modify this logic)
25
+ const currentVersion = require('../package.json').version;
26
+ const versionParts = currentVersion.split('.').map(Number);
27
+ const nextVersion = `${versionParts[0]}.${versionParts[1] + 1}.0`; // Default to minor bump
28
+
29
+ console.log(`## šŸš€ What's New in v${nextVersion}\n`);
30
+
31
+ if (features.length > 0) {
32
+ console.log('### ✨ New Features');
33
+ for (const feature of features) console.log(feature);
34
+ console.log('');
35
+ }
36
+
37
+ if (fixes.length > 0) {
38
+ console.log('### šŸ› Bug Fixes');
39
+ for (const fix of fixes) console.log(fix);
40
+ console.log('');
41
+ }
42
+
43
+ if (others.length > 0) {
44
+ console.log('### šŸ“¦ Other Changes');
45
+ for (const other of others) console.log(other);
46
+ console.log('');
47
+ }
48
+
49
+ if (chores.length > 0) {
50
+ console.log('### šŸ”§ Maintenance');
51
+ for (const chore of chores) console.log(chore);
52
+ console.log('');
53
+ }
54
+
55
+ console.log('\n## šŸ“¦ Installation\n');
56
+ console.log('```bash');
57
+ console.log('npx bmad-method install');
58
+ console.log('```');
59
+
60
+ console.log(
61
+ `\n**Full Changelog**: https://github.com/bmadcode/BMAD-METHOD/compare/${latestTag}...v${nextVersion}`,
62
+ );
63
+
64
+ console.log(`\n---\nšŸ“Š **Summary**: ${commits.length} commits since ${latestTag}`);
65
+ console.log(`šŸ·ļø **Previous tag**: ${latestTag}`);
66
+ console.log(`šŸš€ **Next version**: v${nextVersion} (estimated)`);
@@ -0,0 +1,37 @@
1
+ #!/bin/bash
2
+
3
+ # Setup script for git hooks
4
+ echo "Setting up git hooks..."
5
+
6
+ # Install husky
7
+ npm install --save-dev husky
8
+
9
+ # Initialize husky
10
+ npx husky init
11
+
12
+ # Create pre-commit hook
13
+ cat > .husky/pre-commit << 'EOF'
14
+ #!/usr/bin/env sh
15
+ . "$(dirname -- "$0")/_/husky.sh"
16
+
17
+ # Run validation checks before commit
18
+ echo "Running pre-commit checks..."
19
+
20
+ npm run validate
21
+ npm run format:check
22
+ npm run lint
23
+
24
+ if [ $? -ne 0 ]; then
25
+ echo "āŒ Pre-commit checks failed. Please fix the issues before committing."
26
+ echo " Run 'npm run format' to fix formatting issues"
27
+ echo " Run 'npm run lint:fix' to fix some lint issues"
28
+ exit 1
29
+ fi
30
+
31
+ echo "āœ… Pre-commit checks passed!"
32
+ EOF
33
+
34
+ chmod +x .husky/pre-commit
35
+
36
+ echo "āœ… Git hooks setup complete!"
37
+ echo "Now commits will be validated before they're created."