@zeyue0329/xiaoma-cli 1.0.8 → 1.0.10

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 (326) hide show
  1. package/.github/FORK_GUIDE.md +106 -0
  2. package/.github/FUNDING.yaml +15 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  5. package/.github/workflows/discord.yaml +26 -0
  6. package/.github/workflows/format-check.yaml +44 -0
  7. package/.github/workflows/manual-release.yaml +174 -0
  8. package/.github/workflows/pr-validation.yaml +55 -0
  9. package/.husky/pre-commit +3 -0
  10. package/.vscode/settings.json +26 -1
  11. package/CHANGELOG.md +686 -0
  12. package/CONTRIBUTING.md +250 -0
  13. package/LICENSE +6 -1
  14. package/common/tasks/create-doc.md +2 -0
  15. package/common/tasks/execute-checklist.md +2 -7
  16. package/common/utils/bmad-doc-template.md +7 -5
  17. package/common/utils/workflow-management.md +2 -0
  18. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +2103 -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 +8486 -0
  22. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +3210 -0
  23. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +3244 -0
  24. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.txt +317 -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 +12854 -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 +6071 -0
  38. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +2079 -0
  39. package/docs/GUIDING-PRINCIPLES.md +91 -0
  40. package/docs/core-architecture.md +219 -0
  41. package/docs/enhanced-ide-development-workflow.md +248 -0
  42. package/docs/expansion-packs.md +200 -0
  43. package/docs/how-to-contribute-with-pull-requests.md +158 -0
  44. package/docs/user-guide.md +530 -0
  45. package/docs/versioning-and-releases.md +155 -0
  46. package/docs/versions.md +48 -0
  47. package/docs/working-in-the-brownfield.md +597 -0
  48. package/eslint.config.mjs +119 -0
  49. package/expansion-packs/bmad-2d-phaser-game-dev/agent-teams/phaser-2d-nodejs-game-team.yaml +14 -0
  50. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.md +73 -0
  51. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +80 -0
  52. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +66 -0
  53. package/expansion-packs/bmad-2d-phaser-game-dev/checklists/game-design-checklist.md +203 -0
  54. package/expansion-packs/bmad-2d-phaser-game-dev/checklists/game-story-dod-checklist.md +162 -0
  55. package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +9 -0
  56. package/expansion-packs/bmad-2d-phaser-game-dev/data/bmad-kb.md +252 -0
  57. package/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +649 -0
  58. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/advanced-elicitation.md +112 -0
  59. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/create-game-story.md +218 -0
  60. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/game-design-brainstorming.md +292 -0
  61. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +614 -0
  62. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +357 -0
  63. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +344 -0
  64. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +254 -0
  65. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +485 -0
  66. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-dev-greenfield.yaml +184 -0
  67. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-prototype.yaml +176 -0
  68. package/expansion-packs/bmad-2d-unity-game-dev/agent-teams/unity-2d-game-team.yaml +15 -0
  69. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.md +82 -0
  70. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.md +79 -0
  71. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.md +80 -0
  72. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.md +67 -0
  73. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-architect-checklist.md +393 -0
  74. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-change-checklist.md +205 -0
  75. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-design-checklist.md +203 -0
  76. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-story-dod-checklist.md +126 -0
  77. package/expansion-packs/bmad-2d-unity-game-dev/config.yaml +7 -0
  78. package/expansion-packs/bmad-2d-unity-game-dev/data/bmad-kb.md +771 -0
  79. package/expansion-packs/bmad-2d-unity-game-dev/data/development-guidelines.md +588 -0
  80. package/expansion-packs/bmad-2d-unity-game-dev/tasks/advanced-elicitation.md +112 -0
  81. package/expansion-packs/bmad-2d-unity-game-dev/tasks/correct-course-game.md +143 -0
  82. package/expansion-packs/bmad-2d-unity-game-dev/tasks/create-game-story.md +186 -0
  83. package/expansion-packs/bmad-2d-unity-game-dev/tasks/game-design-brainstorming.md +292 -0
  84. package/expansion-packs/bmad-2d-unity-game-dev/tasks/validate-game-story.md +202 -0
  85. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-architecture-tmpl.yaml +1031 -0
  86. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-brief-tmpl.yaml +357 -0
  87. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-design-doc-tmpl.yaml +706 -0
  88. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml +257 -0
  89. package/expansion-packs/bmad-2d-unity-game-dev/templates/level-design-doc-tmpl.yaml +485 -0
  90. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-dev-greenfield.yaml +184 -0
  91. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-prototype.yaml +176 -0
  92. package/expansion-packs/bmad-creative-writing/README.md +146 -0
  93. package/expansion-packs/bmad-creative-writing/agent-teams/agent-team.yaml +20 -0
  94. package/expansion-packs/bmad-creative-writing/agents/beta-reader.md +94 -0
  95. package/expansion-packs/bmad-creative-writing/agents/book-critic.md +40 -0
  96. package/expansion-packs/bmad-creative-writing/agents/character-psychologist.md +93 -0
  97. package/expansion-packs/bmad-creative-writing/agents/cover-designer.md +46 -0
  98. package/expansion-packs/bmad-creative-writing/agents/dialog-specialist.md +92 -0
  99. package/expansion-packs/bmad-creative-writing/agents/editor.md +93 -0
  100. package/expansion-packs/bmad-creative-writing/agents/genre-specialist.md +95 -0
  101. package/expansion-packs/bmad-creative-writing/agents/narrative-designer.md +93 -0
  102. package/expansion-packs/bmad-creative-writing/agents/plot-architect.md +95 -0
  103. package/expansion-packs/bmad-creative-writing/agents/world-builder.md +94 -0
  104. package/expansion-packs/bmad-creative-writing/checklists/beta-feedback-closure-checklist.md +23 -0
  105. package/expansion-packs/bmad-creative-writing/checklists/character-consistency-checklist.md +23 -0
  106. package/expansion-packs/bmad-creative-writing/checklists/comedic-timing-checklist.md +23 -0
  107. package/expansion-packs/bmad-creative-writing/checklists/cyberpunk-aesthetic-checklist.md +23 -0
  108. package/expansion-packs/bmad-creative-writing/checklists/ebook-formatting-checklist.md +21 -0
  109. package/expansion-packs/bmad-creative-writing/checklists/epic-poetry-meter-checklist.md +23 -0
  110. package/expansion-packs/bmad-creative-writing/checklists/fantasy-magic-system-checklist.md +23 -0
  111. package/expansion-packs/bmad-creative-writing/checklists/foreshadowing-payoff-checklist.md +22 -0
  112. package/expansion-packs/bmad-creative-writing/checklists/genre-tropes-checklist.md +22 -0
  113. package/expansion-packs/bmad-creative-writing/checklists/historical-accuracy-checklist.md +23 -0
  114. package/expansion-packs/bmad-creative-writing/checklists/horror-suspense-checklist.md +23 -0
  115. package/expansion-packs/bmad-creative-writing/checklists/kdp-cover-ready-checklist.md +25 -0
  116. package/expansion-packs/bmad-creative-writing/checklists/line-edit-quality-checklist.md +23 -0
  117. package/expansion-packs/bmad-creative-writing/checklists/marketing-copy-checklist.md +23 -0
  118. package/expansion-packs/bmad-creative-writing/checklists/mystery-clue-trail-checklist.md +23 -0
  119. package/expansion-packs/bmad-creative-writing/checklists/orbital-mechanics-checklist.md +23 -0
  120. package/expansion-packs/bmad-creative-writing/checklists/plot-structure-checklist.md +59 -0
  121. package/expansion-packs/bmad-creative-writing/checklists/publication-readiness-checklist.md +23 -0
  122. package/expansion-packs/bmad-creative-writing/checklists/romance-emotional-beats-checklist.md +23 -0
  123. package/expansion-packs/bmad-creative-writing/checklists/scene-quality-checklist.md +23 -0
  124. package/expansion-packs/bmad-creative-writing/checklists/scifi-technology-plausibility-checklist.md +22 -0
  125. package/expansion-packs/bmad-creative-writing/checklists/sensitivity-representation-checklist.md +23 -0
  126. package/expansion-packs/bmad-creative-writing/checklists/steampunk-gadget-checklist.md +23 -0
  127. package/expansion-packs/bmad-creative-writing/checklists/thriller-pacing-stakes-checklist.md +23 -0
  128. package/expansion-packs/bmad-creative-writing/checklists/timeline-continuity-checklist.md +23 -0
  129. package/expansion-packs/bmad-creative-writing/checklists/world-building-continuity-checklist.md +23 -0
  130. package/expansion-packs/bmad-creative-writing/checklists/ya-appropriateness-checklist.md +23 -0
  131. package/expansion-packs/bmad-creative-writing/config.yaml +12 -0
  132. package/expansion-packs/bmad-creative-writing/data/bmad-kb.md +209 -0
  133. package/expansion-packs/bmad-creative-writing/data/story-structures.md +67 -0
  134. package/expansion-packs/bmad-creative-writing/docs/brief.md +212 -0
  135. package/expansion-packs/bmad-creative-writing/tasks/advanced-elicitation.md +119 -0
  136. package/expansion-packs/bmad-creative-writing/tasks/analyze-reader-feedback.md +23 -0
  137. package/expansion-packs/bmad-creative-writing/tasks/analyze-story-structure.md +67 -0
  138. package/expansion-packs/bmad-creative-writing/tasks/assemble-kdp-package.md +29 -0
  139. package/expansion-packs/bmad-creative-writing/tasks/brainstorm-premise.md +23 -0
  140. package/expansion-packs/bmad-creative-writing/tasks/build-world.md +24 -0
  141. package/expansion-packs/bmad-creative-writing/tasks/character-depth-pass.md +22 -0
  142. package/expansion-packs/bmad-creative-writing/tasks/create-doc.md +103 -0
  143. package/expansion-packs/bmad-creative-writing/tasks/create-draft-section.md +26 -0
  144. package/expansion-packs/bmad-creative-writing/tasks/critical-review.md +26 -0
  145. package/expansion-packs/bmad-creative-writing/tasks/develop-character.md +24 -0
  146. package/expansion-packs/bmad-creative-writing/tasks/execute-checklist.md +88 -0
  147. package/expansion-packs/bmad-creative-writing/tasks/expand-premise.md +23 -0
  148. package/expansion-packs/bmad-creative-writing/tasks/expand-synopsis.md +23 -0
  149. package/expansion-packs/bmad-creative-writing/tasks/final-polish.md +23 -0
  150. package/expansion-packs/bmad-creative-writing/tasks/generate-cover-brief.md +25 -0
  151. package/expansion-packs/bmad-creative-writing/tasks/generate-cover-prompts.md +26 -0
  152. package/expansion-packs/bmad-creative-writing/tasks/generate-scene-list.md +23 -0
  153. package/expansion-packs/bmad-creative-writing/tasks/incorporate-feedback.md +25 -0
  154. package/expansion-packs/bmad-creative-writing/tasks/outline-scenes.md +23 -0
  155. package/expansion-packs/bmad-creative-writing/tasks/provide-feedback.md +24 -0
  156. package/expansion-packs/bmad-creative-writing/tasks/publish-chapter.md +23 -0
  157. package/expansion-packs/bmad-creative-writing/tasks/quick-feedback.md +22 -0
  158. package/expansion-packs/bmad-creative-writing/tasks/select-next-arc.md +23 -0
  159. package/expansion-packs/bmad-creative-writing/tasks/workshop-dialog.md +64 -0
  160. package/expansion-packs/bmad-creative-writing/templates/beta-feedback-form.yaml +97 -0
  161. package/expansion-packs/bmad-creative-writing/templates/chapter-draft-tmpl.yaml +82 -0
  162. package/expansion-packs/bmad-creative-writing/templates/character-profile-tmpl.yaml +92 -0
  163. package/expansion-packs/bmad-creative-writing/templates/cover-design-brief-tmpl.yaml +98 -0
  164. package/expansion-packs/bmad-creative-writing/templates/premise-brief-tmpl.yaml +78 -0
  165. package/expansion-packs/bmad-creative-writing/templates/scene-list-tmpl.yaml +55 -0
  166. package/expansion-packs/bmad-creative-writing/templates/story-outline-tmpl.yaml +96 -0
  167. package/expansion-packs/bmad-creative-writing/templates/world-guide-tmpl.yaml +89 -0
  168. package/expansion-packs/bmad-creative-writing/workflows/book-cover-design-workflow.md +218 -0
  169. package/expansion-packs/bmad-creative-writing/workflows/novel-greenfield-workflow.yaml +56 -0
  170. package/expansion-packs/bmad-creative-writing/workflows/novel-serial-workflow.yaml +50 -0
  171. package/expansion-packs/bmad-creative-writing/workflows/novel-snowflake-workflow.yaml +69 -0
  172. package/expansion-packs/bmad-creative-writing/workflows/novel-writing.yaml +91 -0
  173. package/expansion-packs/bmad-creative-writing/workflows/screenplay-development.yaml +85 -0
  174. package/expansion-packs/bmad-creative-writing/workflows/series-planning.yaml +78 -0
  175. package/expansion-packs/bmad-creative-writing/workflows/short-story-creation.yaml +64 -0
  176. package/expansion-packs/bmad-infrastructure-devops/README.md +147 -0
  177. package/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.md +73 -0
  178. package/expansion-packs/bmad-infrastructure-devops/checklists/infrastructure-checklist.md +486 -0
  179. package/expansion-packs/bmad-infrastructure-devops/config.yaml +10 -0
  180. package/expansion-packs/bmad-infrastructure-devops/data/bmad-kb.md +307 -0
  181. package/expansion-packs/bmad-infrastructure-devops/tasks/review-infrastructure.md +161 -0
  182. package/expansion-packs/bmad-infrastructure-devops/tasks/validate-infrastructure.md +155 -0
  183. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +425 -0
  184. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +630 -0
  185. package/implement-fork-friendly-ci.sh +229 -0
  186. package/package.json +75 -45
  187. package/prettier.config.mjs +32 -0
  188. package/test.md +1 -0
  189. package/tools/builders/web-builder.js +143 -149
  190. package/tools/bump-all-versions.js +42 -33
  191. package/tools/bump-expansion-version.js +23 -16
  192. package/tools/cli.js +15 -15
  193. package/tools/flattener/aggregate.js +76 -0
  194. package/tools/flattener/binary.js +80 -0
  195. package/tools/flattener/discovery.js +71 -0
  196. package/tools/flattener/files.js +35 -0
  197. package/tools/flattener/ignoreRules.js +176 -0
  198. package/tools/flattener/main.js +458 -460
  199. package/tools/flattener/projectRoot.js +206 -0
  200. package/tools/flattener/prompts.js +44 -0
  201. package/tools/flattener/stats.helpers.js +395 -0
  202. package/tools/flattener/stats.js +80 -0
  203. package/tools/flattener/test-matrix.js +413 -0
  204. package/tools/flattener/xml.js +88 -0
  205. package/tools/installer/README.md +1 -1
  206. package/tools/installer/bin/xiaoma.js +390 -150
  207. package/tools/installer/config/ide-agent-config.yaml +1 -1
  208. package/tools/installer/config/install.config.yaml +60 -9
  209. package/tools/installer/lib/config-loader.js +55 -51
  210. package/tools/installer/lib/file-manager.js +92 -117
  211. package/tools/installer/lib/ide-base-setup.js +57 -56
  212. package/tools/installer/lib/ide-setup.js +821 -414
  213. package/tools/installer/lib/installer.js +924 -699
  214. package/tools/installer/lib/memory-profiler.js +54 -53
  215. package/tools/installer/lib/module-manager.js +19 -15
  216. package/tools/installer/lib/resource-locator.js +31 -33
  217. package/tools/installer/package.json +24 -23
  218. package/tools/lib/dependency-resolver.js +39 -43
  219. package/tools/lib/yaml-utils.js +7 -7
  220. package/tools/md-assets/web-agent-startup-instructions.md +6 -6
  221. package/tools/preview-release-notes.js +66 -0
  222. package/tools/setup-hooks.sh +37 -0
  223. package/tools/shared/bannerArt.js +105 -0
  224. package/tools/sync-installer-version.js +7 -9
  225. package/tools/sync-version.sh +23 -0
  226. package/tools/update-expansion-version.js +14 -15
  227. package/tools/upgraders/v3-to-v4-upgrader.js +203 -294
  228. package/tools/version-bump.js +41 -26
  229. package/tools/xiaoma-npx-wrapper.js +14 -14
  230. package/tools/yaml-format.js +56 -43
  231. package/xiaoma-core/agent-teams/team-all.yaml +3 -2
  232. package/xiaoma-core/agent-teams/team-fullstack.yaml +2 -1
  233. package/xiaoma-core/agent-teams/team-ide-minimal.yaml +1 -0
  234. package/xiaoma-core/agent-teams/team-no-ui.yaml +2 -1
  235. package/xiaoma-core/agents/analyst.md +20 -17
  236. package/xiaoma-core/agents/architect.md +15 -14
  237. package/xiaoma-core/agents/{xiaoma-master.md → bmad-master.md} +29 -27
  238. package/xiaoma-core/agents/{xiaoma-orchestrator.md → bmad-orchestrator.md} +36 -39
  239. package/xiaoma-core/agents/dev.md +23 -18
  240. package/xiaoma-core/agents/pm.md +18 -15
  241. package/xiaoma-core/agents/po.md +13 -10
  242. package/xiaoma-core/agents/qa.md +46 -24
  243. package/xiaoma-core/agents/sm.md +11 -8
  244. package/xiaoma-core/agents/ux-expert.md +10 -7
  245. package/xiaoma-core/checklists/architect-checklist.md +2 -5
  246. package/xiaoma-core/checklists/change-checklist.md +4 -2
  247. package/xiaoma-core/checklists/pm-checklist.md +2 -5
  248. package/xiaoma-core/checklists/po-master-checklist.md +2 -9
  249. package/xiaoma-core/checklists/story-dod-checklist.md +2 -7
  250. package/xiaoma-core/checklists/story-draft-checklist.md +2 -3
  251. package/xiaoma-core/core-config.yaml +4 -1
  252. package/xiaoma-core/data/{xiaoma-kb.md → bmad-kb.md} +48 -42
  253. package/xiaoma-core/data/brainstorming-techniques.md +2 -0
  254. package/xiaoma-core/data/elicitation-methods.md +22 -0
  255. package/xiaoma-core/data/technical-preferences.md +2 -0
  256. package/xiaoma-core/data/test-levels-framework.md +148 -0
  257. package/xiaoma-core/data/test-priorities-matrix.md +174 -0
  258. package/xiaoma-core/tasks/advanced-elicitation.md +2 -0
  259. package/xiaoma-core/tasks/apply-qa-fixes.md +150 -0
  260. package/xiaoma-core/tasks/brownfield-create-epic.md +2 -0
  261. package/xiaoma-core/tasks/brownfield-create-story.md +2 -0
  262. package/xiaoma-core/tasks/correct-course.md +2 -0
  263. package/xiaoma-core/tasks/create-brownfield-story.md +14 -4
  264. package/xiaoma-core/tasks/create-deep-research-prompt.md +2 -11
  265. package/xiaoma-core/tasks/create-next-story.md +3 -1
  266. package/xiaoma-core/tasks/document-project.md +17 -13
  267. package/xiaoma-core/tasks/facilitate-brainstorming-session.md +5 -3
  268. package/xiaoma-core/tasks/generate-ai-frontend-prompt.md +2 -0
  269. package/xiaoma-core/tasks/index-docs.md +2 -6
  270. package/xiaoma-core/tasks/kb-mode-interaction.md +17 -15
  271. package/xiaoma-core/tasks/nfr-assess.md +345 -0
  272. package/xiaoma-core/tasks/qa-gate.md +163 -0
  273. package/xiaoma-core/tasks/review-story.md +245 -74
  274. package/xiaoma-core/tasks/risk-profile.md +355 -0
  275. package/xiaoma-core/tasks/shard-doc.md +2 -2
  276. package/xiaoma-core/tasks/test-design.md +176 -0
  277. package/xiaoma-core/tasks/trace-requirements.md +266 -0
  278. package/xiaoma-core/tasks/validate-next-story.md +5 -3
  279. package/xiaoma-core/templates/architecture-tmpl.yaml +50 -49
  280. package/xiaoma-core/templates/brainstorming-output-tmpl.yaml +5 -5
  281. package/xiaoma-core/templates/brownfield-architecture-tmpl.yaml +32 -31
  282. package/xiaoma-core/templates/brownfield-prd-tmpl.yaml +14 -13
  283. package/xiaoma-core/templates/competitor-analysis-tmpl.yaml +20 -6
  284. package/xiaoma-core/templates/front-end-architecture-tmpl.yaml +22 -9
  285. package/xiaoma-core/templates/front-end-spec-tmpl.yaml +25 -24
  286. package/xiaoma-core/templates/fullstack-architecture-tmpl.yaml +123 -104
  287. package/xiaoma-core/templates/market-research-tmpl.yaml +3 -2
  288. package/xiaoma-core/templates/prd-tmpl.yaml +10 -9
  289. package/xiaoma-core/templates/project-brief-tmpl.yaml +5 -4
  290. package/xiaoma-core/templates/qa-gate-tmpl.yaml +103 -0
  291. package/xiaoma-core/templates/story-tmpl.yaml +13 -12
  292. package/xiaoma-core/workflows/brownfield-fullstack.yaml +13 -12
  293. package/xiaoma-core/workflows/brownfield-service.yaml +5 -4
  294. package/xiaoma-core/workflows/brownfield-ui.yaml +5 -4
  295. package/xiaoma-core/workflows/greenfield-fullstack.yaml +7 -6
  296. package/xiaoma-core/workflows/greenfield-service.yaml +5 -4
  297. package/xiaoma-core/workflows/greenfield-ui.yaml +6 -5
  298. package/.releaserc.json +0 -18
  299. package/README.md +0 -532
  300. package/XiaoMa-Web/345/244/232/346/231/272/350/203/275/344/275/2230-1/351/241/271/347/233/256/345/274/200/345/217/221/345/256/214/346/225/264/346/214/207/345/215/227.md +0 -977
  301. package/XiaoMa-Web/347/216/260/346/234/211/351/241/271/347/233/256/351/234/200/346/261/202/345/274/200/345/217/221/345/256/214/346/225/264/346/214/207/345/215/227.md +0 -873
  302. package/XiaoMa-Web/347/272/257/345/211/215/347/253/257/351/241/271/347/233/256Claude-Code/345/274/200/345/217/221/345/256/214/346/225/264/346/214/207/345/215/227.md +0 -372
  303. package/XiaoMa-Web/351/241/271/347/233/256/346/200/273/347/273/223/346/212/245/345/221/212.md +0 -310
  304. package/dist/agents/analyst.txt +0 -2882
  305. package/dist/agents/architect.txt +0 -3543
  306. package/dist/agents/dev-cn.txt +0 -428
  307. package/dist/agents/dev.txt +0 -428
  308. package/dist/agents/pm.txt +0 -2229
  309. package/dist/agents/po.txt +0 -1364
  310. package/dist/agents/qa.txt +0 -386
  311. package/dist/agents/sm.txt +0 -668
  312. package/dist/agents/ux-expert.txt +0 -701
  313. package/dist/agents/xiaoma-master.txt +0 -8756
  314. package/dist/agents/xiaoma-orchestrator.txt +0 -1490
  315. package/dist/teams/team-all.txt +0 -11062
  316. package/dist/teams/team-fullstack.txt +0 -10392
  317. package/dist/teams/team-ide-minimal.txt +0 -3507
  318. package/dist/teams/team-no-ui.txt +0 -8951
  319. package/docs/quick-start.md +0 -179
  320. package/tools/bmad-npx-wrapper.js +0 -39
  321. package/tools/installer/package-lock.json +0 -704
  322. package/tools/semantic-release-sync-installer.js +0 -30
  323. package/xiaoma-core/bmad-core/user-guide.md +0 -0
  324. package/xiaoma-core/enhanced-ide-development-workflow.md +0 -43
  325. package/xiaoma-core/user-guide.md +0 -251
  326. package/xiaoma-core/working-in-the-brownfield.md +0 -364
@@ -0,0 +1,771 @@
1
+ <!-- Powered by BMAD™ Core -->
2
+
3
+ # BMad Knowledge Base - 2D Unity Game Development
4
+
5
+ ## Overview
6
+
7
+ This is the game development expansion of BMad-Method (Breakthrough Method of Agile AI-driven Development), specializing in creating 2D games using Unity and C#. The v4 system introduces a modular architecture with improved dependency management, bundle optimization, and support for both web and IDE environments, specifically optimized for game development workflows.
8
+
9
+ ### Key Features for Game Development
10
+
11
+ - **Game-Specialized Agent System**: AI agents for each game development role (Designer, Developer, Scrum Master)
12
+ - **Unity-Optimized Build System**: Automated dependency resolution for game assets and scripts
13
+ - **Dual Environment Support**: Optimized for both web UIs and game development IDEs
14
+ - **Game Development Resources**: Specialized templates, tasks, and checklists for 2D Unity games
15
+ - **Performance-First Approach**: Built-in optimization patterns for cross-platform game deployment
16
+
17
+ ### Game Development Focus
18
+
19
+ - **Target Engine**: Unity 2022 LTS or newer with C# 10+
20
+ - **Platform Strategy**: Cross-platform (PC, Console, Mobile) with a focus on 2D
21
+ - **Development Approach**: Agile story-driven development with game-specific workflows
22
+ - **Performance Target**: Stable frame rate on target devices
23
+ - **Architecture**: Component-based architecture using Unity's best practices
24
+
25
+ ### When to Use BMad for Game Development
26
+
27
+ - **New Game Projects (Greenfield)**: Complete end-to-end game development from concept to deployment
28
+ - **Existing Game Projects (Brownfield)**: Feature additions, level expansions, and gameplay enhancements
29
+ - **Game Team Collaboration**: Multiple specialized roles working together on game features
30
+ - **Game Quality Assurance**: Structured testing, performance validation, and gameplay balance
31
+ - **Game Documentation**: Professional Game Design Documents, technical architecture, user stories
32
+
33
+ ## How BMad Works for Game Development
34
+
35
+ ### The Core Method
36
+
37
+ BMad transforms you into a "Player Experience CEO" - directing a team of specialized game development AI agents through structured workflows. Here's how:
38
+
39
+ 1. **You Direct, AI Executes**: You provide game vision and creative decisions; agents handle implementation details
40
+ 2. **Specialized Game Agents**: Each agent masters one game development role (Designer, Developer, Scrum Master)
41
+ 3. **Game-Focused Workflows**: Proven patterns guide you from game concept to deployed 2D Unity game
42
+ 4. **Clean Handoffs**: Fresh context windows ensure agents stay focused and effective for game development
43
+
44
+ ### The Two-Phase Game Development Approach
45
+
46
+ #### Phase 1: Game Design & Planning (Web UI - Cost Effective)
47
+
48
+ - Use large context windows for comprehensive game design
49
+ - Generate complete Game Design Documents and technical architecture
50
+ - Leverage multiple agents for creative brainstorming and mechanics refinement
51
+ - Create once, use throughout game development
52
+
53
+ #### Phase 2: Game Development (IDE - Implementation)
54
+
55
+ - Shard game design documents into manageable pieces
56
+ - Execute focused SM → Dev cycles for game features
57
+ - One game story at a time, sequential progress
58
+ - Real-time Unity operations, C# coding, and game testing
59
+
60
+ ### The Game Development Loop
61
+
62
+ ```text
63
+ 1. Game SM Agent (New Chat) → Creates next game story from sharded docs
64
+ 2. You → Review and approve game story
65
+ 3. Game Dev Agent (New Chat) → Implements approved game feature in Unity
66
+ 4. QA Agent (New Chat) → Reviews code and tests gameplay
67
+ 5. You → Verify game feature completion
68
+ 6. Repeat until game epic complete
69
+ ```
70
+
71
+ ### Why This Works for Games
72
+
73
+ - **Context Optimization**: Clean chats = better AI performance for complex game logic
74
+ - **Role Clarity**: Agents don't context-switch = higher quality game features
75
+ - **Incremental Progress**: Small game stories = manageable complexity
76
+ - **Player-Focused Oversight**: You validate each game feature = quality control
77
+ - **Design-Driven**: Game specs guide everything = consistent player experience
78
+
79
+ ### Core Game Development Philosophy
80
+
81
+ #### Player-First Development
82
+
83
+ You are developing games as a "Player Experience CEO" - thinking like a game director with unlimited creative resources and a singular vision for player enjoyment.
84
+
85
+ #### Game Development Principles
86
+
87
+ 1. **MAXIMIZE_PLAYER_ENGAGEMENT**: Push the AI to create compelling gameplay. Challenge mechanics and iterate.
88
+ 2. **GAMEPLAY_QUALITY_CONTROL**: You are the ultimate arbiter of fun. Review all game features.
89
+ 3. **CREATIVE_OVERSIGHT**: Maintain the high-level game vision and ensure design alignment.
90
+ 4. **ITERATIVE_REFINEMENT**: Expect to revisit game mechanics. Game development is not linear.
91
+ 5. **CLEAR_GAME_INSTRUCTIONS**: Precise game requirements lead to better implementations.
92
+ 6. **DOCUMENTATION_IS_KEY**: Good game design docs lead to good game features.
93
+ 7. **START_SMALL_SCALE_FAST**: Test core mechanics, then expand and polish.
94
+ 8. **EMBRACE_CREATIVE_CHAOS**: Adapt and overcome game development challenges.
95
+
96
+ ## Getting Started with Game Development
97
+
98
+ ### Quick Start Options for Game Development
99
+
100
+ #### Option 1: Web UI for Game Design
101
+
102
+ **Best for**: Game designers who want to start with comprehensive planning
103
+
104
+ 1. Navigate to `dist/teams/` (after building)
105
+ 2. Copy `unity-2d-game-team.txt` content
106
+ 3. Create new Gemini Gem or CustomGPT
107
+ 4. Upload file with instructions: "Your critical operating instructions are attached, do not break character as directed"
108
+ 5. Type `/help` to see available game development commands
109
+
110
+ #### Option 2: IDE Integration for Game Development
111
+
112
+ **Best for**: Unity developers using Cursor, Claude Code, Windsurf, Trae, Cline, Roo Code, Github Copilot
113
+
114
+ ```bash
115
+ # Interactive installation (recommended)
116
+ npx bmad-method install
117
+ # Select the bmad-2d-unity-game-dev expansion pack when prompted
118
+ ```
119
+
120
+ **Installation Steps for Game Development**:
121
+
122
+ - Choose "Install expansion pack" when prompted
123
+ - Select "bmad-2d-unity-game-dev" from the list
124
+ - Select your IDE from supported options:
125
+ - **Cursor**: Native AI integration with Unity support
126
+ - **Claude Code**: Anthropic's official IDE
127
+ - **Windsurf**: Built-in AI capabilities
128
+ - **Trae**: Built-in AI capabilities
129
+ - **Cline**: VS Code extension with AI features
130
+ - **Roo Code**: Web-based IDE with agent support
131
+ - **GitHub Copilot**: VS Code extension with AI peer programming assistant
132
+
133
+ **Verify Game Development Installation**:
134
+
135
+ - `.bmad-core/` folder created with all core agents
136
+ - `.bmad-2d-unity-game-dev/` folder with game development agents
137
+ - IDE-specific integration files created
138
+ - Game development agents available with `/bmad2du` prefix (per config.yaml)
139
+
140
+ ### Environment Selection Guide for Game Development
141
+
142
+ **Use Web UI for**:
143
+
144
+ - Game design document creation and brainstorming
145
+ - Cost-effective comprehensive game planning (especially with Gemini)
146
+ - Multi-agent game design consultation
147
+ - Creative ideation and mechanics refinement
148
+
149
+ **Use IDE for**:
150
+
151
+ - Unity project development and C# coding
152
+ - Game asset operations and project integration
153
+ - Game story management and implementation workflow
154
+ - Unity testing, profiling, and debugging
155
+
156
+ **Cost-Saving Tip for Game Development**: Create large game design documents in web UI, then copy to `docs/game-design-doc.md` and `docs/game-architecture.md` in your Unity project before switching to IDE for development.
157
+
158
+ ### IDE-Only Game Development Workflow Considerations
159
+
160
+ **Can you do everything in IDE?** Yes, but understand the game development tradeoffs:
161
+
162
+ **Pros of IDE-Only Game Development**:
163
+
164
+ - Single environment workflow from design to Unity deployment
165
+ - Direct Unity project operations from start
166
+ - No copy/paste between environments
167
+ - Immediate Unity project integration
168
+
169
+ **Cons of IDE-Only Game Development**:
170
+
171
+ - Higher token costs for large game design document creation
172
+ - Smaller context windows for comprehensive game planning
173
+ - May hit limits during creative brainstorming phases
174
+ - Less cost-effective for extensive game design iteration
175
+
176
+ **CRITICAL RULE for Game Development**:
177
+
178
+ - **ALWAYS use Game SM agent for story creation** - Never use bmad-master or bmad-orchestrator
179
+ - **ALWAYS use Game Dev agent for Unity implementation** - Never use bmad-master or bmad-orchestrator
180
+ - **Why this matters**: Game SM and Game Dev agents are specifically optimized for Unity workflows
181
+ - **No exceptions**: Even if using bmad-master for design, switch to Game SM → Game Dev for implementation
182
+
183
+ ## Core Configuration for Game Development (core-config.yaml)
184
+
185
+ **New in V4**: The `expansion-packs/bmad-2d-unity-game-dev/core-config.yaml` file enables BMad to work seamlessly with any Unity project structure, providing maximum flexibility for game development.
186
+
187
+ ### Game Development Configuration
188
+
189
+ The expansion pack follows the standard BMad configuration patterns. Copy your core-config.yaml file to expansion-packs/bmad-2d-unity-game-dev/ and add Game-specific configurations to your project's `core-config.yaml`:
190
+
191
+ ```yaml
192
+ markdownExploder: true
193
+ prd:
194
+ prdFile: docs/prd.md
195
+ prdVersion: v4
196
+ prdSharded: true
197
+ prdShardedLocation: docs/prd
198
+ epicFilePattern: epic-{n}*.md
199
+ architecture:
200
+ architectureFile: docs/architecture.md
201
+ architectureVersion: v4
202
+ architectureSharded: true
203
+ architectureShardedLocation: docs/architecture
204
+ gdd:
205
+ gddVersion: v4
206
+ gddSharded: true
207
+ gddLocation: docs/game-design-doc.md
208
+ gddShardedLocation: docs/gdd
209
+ epicFilePattern: epic-{n}*.md
210
+ gamearchitecture:
211
+ gamearchitectureFile: docs/architecture.md
212
+ gamearchitectureVersion: v3
213
+ gamearchitectureLocation: docs/game-architecture.md
214
+ gamearchitectureSharded: true
215
+ gamearchitectureShardedLocation: docs/game-architecture
216
+ gamebriefdocLocation: docs/game-brief.md
217
+ levelDesignLocation: docs/level-design.md
218
+ #Specify the location for your unity editor
219
+ unityEditorLocation: /home/USER/Unity/Hub/Editor/VERSION/Editor/Unity
220
+ customTechnicalDocuments: null
221
+ devDebugLog: .ai/debug-log.md
222
+ devStoryLocation: docs/stories
223
+ slashPrefix: bmad2du
224
+ #replace old devLoadAlwaysFiles with this once you have sharded your gamearchitecture document
225
+ devLoadAlwaysFiles:
226
+ - docs/game-architecture/9-coding-standards.md
227
+ - docs/game-architecture/3-tech-stack.md
228
+ - docs/game-architecture/8-unity-project-structure.md
229
+ ```
230
+
231
+ ## Complete Game Development Workflow
232
+
233
+ ### Planning Phase (Web UI Recommended - Especially Gemini for Game Design!)
234
+
235
+ **Ideal for cost efficiency with Gemini's massive context for game brainstorming:**
236
+
237
+ **For All Game Projects**:
238
+
239
+ 1. **Game Concept Brainstorming**: `/bmad2du/game-designer` - Use `*game-design-brainstorming` task
240
+ 2. **Game Brief**: Create foundation game document using `game-brief-tmpl`
241
+ 3. **Game Design Document Creation**: `/bmad2du/game-designer` - Use `game-design-doc-tmpl` for comprehensive game requirements
242
+ 4. **Game Architecture Design**: `/bmad2du/game-architect` - Use `game-architecture-tmpl` for Unity technical foundation
243
+ 5. **Level Design Framework**: `/bmad2du/game-designer` - Use `level-design-doc-tmpl` for level structure planning
244
+ 6. **Document Preparation**: Copy final documents to Unity project as `docs/game-design-doc.md`, `docs/game-brief.md`, `docs/level-design.md` and `docs/game-architecture.md`
245
+
246
+ #### Example Game Planning Prompts
247
+
248
+ **For Game Design Document Creation**:
249
+
250
+ ```text
251
+ "I want to build a [genre] 2D game that [core gameplay].
252
+ Help me brainstorm mechanics and create a comprehensive Game Design Document."
253
+ ```
254
+
255
+ **For Game Architecture Design**:
256
+
257
+ ```text
258
+ "Based on this Game Design Document, design a scalable Unity architecture
259
+ that can handle [specific game requirements] with stable performance."
260
+ ```
261
+
262
+ ### Critical Transition: Web UI to Unity IDE
263
+
264
+ **Once game planning is complete, you MUST switch to IDE for Unity development:**
265
+
266
+ - **Why**: Unity development workflow requires C# operations, asset management, and real-time Unity testing
267
+ - **Cost Benefit**: Web UI is more cost-effective for large game design creation; IDE is optimized for Unity development
268
+ - **Required Files**: Ensure `docs/game-design-doc.md` and `docs/game-architecture.md` exist in your Unity project
269
+
270
+ ### Unity IDE Development Workflow
271
+
272
+ **Prerequisites**: Game planning documents must exist in `docs/` folder of Unity project
273
+
274
+ 1. **Document Sharding** (CRITICAL STEP for Game Development):
275
+ - Documents created by Game Designer/Architect (in Web or IDE) MUST be sharded for development
276
+ - Use core BMad agents or tools to shard:
277
+ a) **Manual**: Use core BMad `shard-doc` task if available
278
+ b) **Agent**: Ask core `@xiaoma-master` agent to shard documents
279
+ - Shards `docs/game-design-doc.md` → `docs/game-design/` folder
280
+ - Shards `docs/game-architecture.md` → `docs/game-architecture/` folder
281
+ - **WARNING**: Do NOT shard in Web UI - copying many small files to Unity is painful!
282
+
283
+ 2. **Verify Sharded Game Content**:
284
+ - At least one `feature-n.md` file in `docs/game-design/` with game stories in development order
285
+ - Unity system documents and coding standards for game dev agent reference
286
+ - Sharded docs for Game SM agent story creation
287
+
288
+ Resulting Unity Project Folder Structure:
289
+
290
+ - `docs/game-design/` - Broken down game design sections
291
+ - `docs/game-architecture/` - Broken down Unity architecture sections
292
+ - `docs/game-stories/` - Generated game development stories
293
+
294
+ 3. **Game Development Cycle** (Sequential, one game story at a time):
295
+
296
+ **CRITICAL CONTEXT MANAGEMENT for Unity Development**:
297
+ - **Context windows matter!** Always use fresh, clean context windows
298
+ - **Model selection matters!** Use most powerful thinking model for Game SM story creation
299
+ - **ALWAYS start new chat between Game SM, Game Dev, and QA work**
300
+
301
+ **Step 1 - Game Story Creation**:
302
+ - **NEW CLEAN CHAT** → Select powerful model → `/bmad2du/game-sm` → `*draft`
303
+ - Game SM executes create-game-story task using `game-story-tmpl`
304
+ - Review generated story in `docs/game-stories/`
305
+ - Update status from "Draft" to "Approved"
306
+
307
+ **Step 2 - Unity Game Story Implementation**:
308
+ - **NEW CLEAN CHAT** → `/bmad2du/game-developer`
309
+ - Agent asks which game story to implement
310
+ - Include story file content to save game dev agent lookup time
311
+ - Game Dev follows tasks/subtasks, marking completion
312
+ - Game Dev maintains File List of all Unity/C# changes
313
+ - Game Dev marks story as "Review" when complete with all Unity tests passing
314
+
315
+ **Step 3 - Game QA Review**:
316
+ - **NEW CLEAN CHAT** → Use core `@qa` agent → execute review-story task
317
+ - QA performs senior Unity developer code review
318
+ - QA can refactor and improve Unity code directly
319
+ - QA appends results to story's QA Results section
320
+ - If approved: Status → "Done"
321
+ - If changes needed: Status stays "Review" with unchecked items for game dev
322
+
323
+ **Step 4 - Repeat**: Continue Game SM → Game Dev → QA cycle until all game feature stories complete
324
+
325
+ **Important**: Only 1 game story in progress at a time, worked sequentially until all game feature stories complete.
326
+
327
+ ### Game Story Status Tracking Workflow
328
+
329
+ Game stories progress through defined statuses:
330
+
331
+ - **Draft** → **Approved** → **InProgress** → **Done**
332
+
333
+ Each status change requires user verification and approval before proceeding.
334
+
335
+ ### Game Development Workflow Types
336
+
337
+ #### Greenfield Game Development
338
+
339
+ - Game concept brainstorming and mechanics design
340
+ - Game design requirements and feature definition
341
+ - Unity system architecture and technical design
342
+ - Game development execution
343
+ - Game testing, performance optimization, and deployment
344
+
345
+ #### Brownfield Game Enhancement (Existing Unity Projects)
346
+
347
+ **Key Concept**: Brownfield game development requires comprehensive documentation of your existing Unity project for AI agents to understand game mechanics, Unity patterns, and technical constraints.
348
+
349
+ **Brownfield Game Enhancement Workflow**:
350
+
351
+ Since this expansion pack doesn't include specific brownfield templates, you'll adapt the existing templates:
352
+
353
+ 1. **Upload Unity project to Web UI** (GitHub URL, files, or zip)
354
+ 2. **Create adapted Game Design Document**: `/bmad2du/game-designer` - Modify `game-design-doc-tmpl` to include:
355
+ - Analysis of existing game systems
356
+ - Integration points for new features
357
+ - Compatibility requirements
358
+ - Risk assessment for changes
359
+
360
+ 3. **Game Architecture Planning**:
361
+ - Use `/bmad2du/game-architect` with `game-architecture-tmpl`
362
+ - Focus on how new features integrate with existing Unity systems
363
+ - Plan for gradual rollout and testing
364
+
365
+ 4. **Story Creation for Enhancements**:
366
+ - Use `/bmad2du/game-sm` with `*create-game-story`
367
+ - Stories should explicitly reference existing code to modify
368
+ - Include integration testing requirements
369
+
370
+ **When to Use Each Game Development Approach**:
371
+
372
+ **Full Game Enhancement Workflow** (Recommended for):
373
+
374
+ - Major game feature additions
375
+ - Game system modernization
376
+ - Complex Unity integrations
377
+ - Multiple related gameplay changes
378
+
379
+ **Quick Story Creation** (Use when):
380
+
381
+ - Single, focused game enhancement
382
+ - Isolated gameplay fixes
383
+ - Small feature additions
384
+ - Well-documented existing Unity game
385
+
386
+ **Critical Success Factors for Game Development**:
387
+
388
+ 1. **Game Documentation First**: Always document existing code thoroughly before making changes
389
+ 2. **Unity Context Matters**: Provide agents access to relevant Unity scripts and game systems
390
+ 3. **Gameplay Integration Focus**: Emphasize compatibility and non-breaking changes to game mechanics
391
+ 4. **Incremental Approach**: Plan for gradual rollout and extensive game testing
392
+
393
+ ## Document Creation Best Practices for Game Development
394
+
395
+ ### Required File Naming for Game Framework Integration
396
+
397
+ - `docs/game-design-doc.md` - Game Design Document
398
+ - `docs/game-architecture.md` - Unity System Architecture Document
399
+
400
+ **Why These Names Matter for Game Development**:
401
+
402
+ - Game agents automatically reference these files during Unity development
403
+ - Game sharding tasks expect these specific filenames
404
+ - Game workflow automation depends on standard naming
405
+
406
+ ### Cost-Effective Game Document Creation Workflow
407
+
408
+ **Recommended for Large Game Documents (Game Design Document, Game Architecture):**
409
+
410
+ 1. **Use Web UI**: Create game documents in web interface for cost efficiency
411
+ 2. **Copy Final Output**: Save complete markdown to your Unity project
412
+ 3. **Standard Names**: Save as `docs/game-design-doc.md` and `docs/game-architecture.md`
413
+ 4. **Switch to Unity IDE**: Use IDE agents for Unity development and smaller game documents
414
+
415
+ ### Game Document Sharding
416
+
417
+ Game templates with Level 2 headings (`##`) can be automatically sharded:
418
+
419
+ **Original Game Design Document**:
420
+
421
+ ```markdown
422
+ ## Core Gameplay Mechanics
423
+
424
+ ## Player Progression System
425
+
426
+ ## Level Design Framework
427
+
428
+ ## Technical Requirements
429
+ ```
430
+
431
+ **After Sharding**:
432
+
433
+ - `docs/game-design/core-gameplay-mechanics.md`
434
+ - `docs/game-design/player-progression-system.md`
435
+ - `docs/game-design/level-design-framework.md`
436
+ - `docs/game-design/technical-requirements.md`
437
+
438
+ Use the `shard-doc` task or `@kayvan/markdown-tree-parser` tool for automatic game document sharding.
439
+
440
+ ## Game Agent System
441
+
442
+ ### Core Game Development Team
443
+
444
+ | Agent | Role | Primary Functions | When to Use |
445
+ | ---------------- | ----------------- | ------------------------------------------- | ------------------------------------------- |
446
+ | `game-designer` | Game Designer | Game mechanics, creative design, GDD | Game concept, mechanics, creative direction |
447
+ | `game-developer` | Unity Developer | C# implementation, Unity optimization | All Unity development tasks |
448
+ | `game-sm` | Game Scrum Master | Game story creation, sprint planning | Game project management, workflow |
449
+ | `game-architect` | Game Architect | Unity system design, technical architecture | Complex Unity systems, performance planning |
450
+
451
+ **Note**: For QA and other roles, use the core BMad agents (e.g., `@qa` from bmad-core).
452
+
453
+ ### Game Agent Interaction Commands
454
+
455
+ #### IDE-Specific Syntax for Game Development
456
+
457
+ **Game Agent Loading by IDE**:
458
+
459
+ - **Claude Code**: `/bmad2du/game-designer`, `/bmad2du/game-developer`, `/bmad2du/game-sm`, `/bmad2du/game-architect`
460
+ - **Cursor**: `@bmad2du/game-designer`, `@bmad2du/game-developer`, `@bmad2du/game-sm`, `@bmad2du/game-architect`
461
+ - **Windsurf**: `/bmad2du/game-designer`, `/bmad2du/game-developer`, `/bmad2du/game-sm`, `/bmad2du/game-architect`
462
+ - **Trae**: `@bmad2du/game-designer`, `@bmad2du/game-developer`, `@bmad2du/game-sm`, `@bmad2du/game-architect`
463
+ - **Roo Code**: Select mode from mode selector with bmad2du prefix
464
+ - **GitHub Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select the appropriate game agent.
465
+
466
+ **Common Game Development Task Commands**:
467
+
468
+ - `*help` - Show available game development commands
469
+ - `*status` - Show current game development context/progress
470
+ - `*exit` - Exit the game agent mode
471
+ - `*game-design-brainstorming` - Brainstorm game concepts and mechanics (Game Designer)
472
+ - `*draft` - Create next game development story (Game SM agent)
473
+ - `*validate-game-story` - Validate a game story implementation (with core QA agent)
474
+ - `*correct-course-game` - Course correction for game development issues
475
+ - `*advanced-elicitation` - Deep dive into game requirements
476
+
477
+ **In Web UI (after building with unity-2d-game-team)**:
478
+
479
+ ```text
480
+ /bmad2du/game-designer - Access game designer agent
481
+ /bmad2du/game-architect - Access game architect agent
482
+ /bmad2du/game-developer - Access game developer agent
483
+ /bmad2du/game-sm - Access game scrum master agent
484
+ /help - Show available game development commands
485
+ /switch agent-name - Change active agent (if orchestrator available)
486
+ ```
487
+
488
+ ## Game-Specific Development Guidelines
489
+
490
+ ### Unity + C# Standards
491
+
492
+ **Project Structure:**
493
+
494
+ ```text
495
+ UnityProject/
496
+ ├── Assets/
497
+ │ └── _Project
498
+ │ ├── Scenes/ # Game scenes (Boot, Menu, Game, etc.)
499
+ │ ├── Scripts/ # C# scripts
500
+ │ │ ├── Editor/ # Editor-specific scripts
501
+ │ │ └── Runtime/ # Runtime scripts
502
+ │ ├── Prefabs/ # Reusable game objects
503
+ │ ├── Art/ # Art assets (sprites, models, etc.)
504
+ │ ├── Audio/ # Audio assets
505
+ │ ├── Data/ # ScriptableObjects and other data
506
+ │ └── Tests/ # Unity Test Framework tests
507
+ │ ├── EditMode/
508
+ │ └── PlayMode/
509
+ ├── Packages/ # Package Manager manifest
510
+ └── ProjectSettings/ # Unity project settings
511
+ ```
512
+
513
+ **Performance Requirements:**
514
+
515
+ - Maintain stable frame rate on target devices
516
+ - Memory usage under specified limits per level
517
+ - Loading times under 3 seconds for levels
518
+ - Smooth animation and responsive controls
519
+
520
+ **Code Quality:**
521
+
522
+ - C# best practices compliance
523
+ - Component-based architecture (SOLID principles)
524
+ - Efficient use of the MonoBehaviour lifecycle
525
+ - Error handling and graceful degradation
526
+
527
+ ### Game Development Story Structure
528
+
529
+ **Story Requirements:**
530
+
531
+ - Clear reference to Game Design Document section
532
+ - Specific acceptance criteria for game functionality
533
+ - Technical implementation details for Unity and C#
534
+ - Performance requirements and optimization considerations
535
+ - Testing requirements including gameplay validation
536
+
537
+ **Story Categories:**
538
+
539
+ - **Core Mechanics**: Fundamental gameplay systems
540
+ - **Level Content**: Individual levels and content implementation
541
+ - **UI/UX**: User interface and player experience features
542
+ - **Performance**: Optimization and technical improvements
543
+ - **Polish**: Visual effects, audio, and game feel enhancements
544
+
545
+ ### Quality Assurance for Games
546
+
547
+ **Testing Approach:**
548
+
549
+ - Unit tests for C# logic (EditMode tests)
550
+ - Integration tests for game systems (PlayMode tests)
551
+ - Performance benchmarking and profiling with Unity Profiler
552
+ - Gameplay testing and balance validation
553
+ - Cross-platform compatibility testing
554
+
555
+ **Performance Monitoring:**
556
+
557
+ - Frame rate consistency tracking
558
+ - Memory usage monitoring
559
+ - Asset loading performance
560
+ - Input responsiveness validation
561
+ - Battery usage optimization (mobile)
562
+
563
+ ## Usage Patterns and Best Practices for Game Development
564
+
565
+ ### Environment-Specific Usage for Games
566
+
567
+ **Web UI Best For Game Development**:
568
+
569
+ - Initial game design and creative brainstorming phases
570
+ - Cost-effective large game document creation
571
+ - Game agent consultation and mechanics refinement
572
+ - Multi-agent game workflows with orchestrator
573
+
574
+ **Unity IDE Best For Game Development**:
575
+
576
+ - Active Unity development and C# implementation
577
+ - Unity asset operations and project integration
578
+ - Game story management and development cycles
579
+ - Unity testing, profiling, and debugging
580
+
581
+ ### Quality Assurance for Game Development
582
+
583
+ - Use appropriate game agents for specialized tasks
584
+ - Follow Agile ceremonies and game review processes
585
+ - Use game-specific checklists:
586
+ - `game-architect-checklist` for architecture reviews
587
+ - `game-change-checklist` for change validation
588
+ - `game-design-checklist` for design reviews
589
+ - `game-story-dod-checklist` for story quality
590
+ - Regular validation with game templates
591
+
592
+ ### Performance Optimization for Game Development
593
+
594
+ - Use specific game agents vs. `bmad-master` for focused Unity tasks
595
+ - Choose appropriate game team size for project needs
596
+ - Leverage game-specific technical preferences for consistency
597
+ - Regular context management and cache clearing for Unity workflows
598
+
599
+ ## Game Development Team Roles
600
+
601
+ ### Game Designer
602
+
603
+ - **Primary Focus**: Game mechanics, player experience, design documentation
604
+ - **Key Outputs**: Game Brief, Game Design Document, Level Design Framework
605
+ - **Specialties**: Brainstorming, game balance, player psychology, creative direction
606
+
607
+ ### Game Developer
608
+
609
+ - **Primary Focus**: Unity implementation, C# excellence, performance optimization
610
+ - **Key Outputs**: Working game features, optimized Unity code, technical architecture
611
+ - **Specialties**: C#/Unity, performance optimization, cross-platform development
612
+
613
+ ### Game Scrum Master
614
+
615
+ - **Primary Focus**: Game story creation, development planning, agile process
616
+ - **Key Outputs**: Detailed implementation stories, sprint planning, quality assurance
617
+ - **Specialties**: Story breakdown, developer handoffs, process optimization
618
+
619
+ ## Platform-Specific Considerations
620
+
621
+ ### Cross-Platform Development
622
+
623
+ - Abstract input using the new Input System
624
+ - Use platform-dependent compilation for specific logic
625
+ - Test on all target platforms regularly
626
+ - Optimize for different screen resolutions and aspect ratios
627
+
628
+ ### Mobile Optimization
629
+
630
+ - Touch gesture support and responsive controls
631
+ - Battery usage optimization
632
+ - Performance scaling for different device capabilities
633
+ - App store compliance and packaging
634
+
635
+ ### Performance Targets
636
+
637
+ - **PC/Console**: 60+ FPS at target resolution
638
+ - **Mobile**: 60 FPS on mid-range devices, 30 FPS minimum on low-end
639
+ - **Loading**: Initial load under 5 seconds, scene transitions under 2 seconds
640
+ - **Memory**: Within platform-specific memory budgets
641
+
642
+ ## Success Metrics for Game Development
643
+
644
+ ### Technical Metrics
645
+
646
+ - Frame rate consistency (>90% of time at target FPS)
647
+ - Memory usage within budgets
648
+ - Loading time targets met
649
+ - Zero critical bugs in core gameplay systems
650
+
651
+ ### Player Experience Metrics
652
+
653
+ - Tutorial completion rate >80%
654
+ - Level completion rates appropriate for difficulty curve
655
+ - Average session length meets design targets
656
+ - Player retention and engagement metrics
657
+
658
+ ### Development Process Metrics
659
+
660
+ - Story completion within estimated timeframes
661
+ - Code quality metrics (test coverage, code analysis)
662
+ - Documentation completeness and accuracy
663
+ - Team velocity and delivery consistency
664
+
665
+ ## Common Unity Development Patterns
666
+
667
+ ### Scene Management
668
+
669
+ - Use a loading scene for asynchronous loading of game scenes
670
+ - Use additive scene loading for large levels or streaming
671
+ - Manage scenes with a dedicated SceneManager class
672
+
673
+ ### Game State Management
674
+
675
+ - Use ScriptableObjects to store shared game state
676
+ - Implement a finite state machine (FSM) for complex behaviors
677
+ - Use a GameManager singleton for global state management
678
+
679
+ ### Input Handling
680
+
681
+ - Use the new Input System for robust, cross-platform input
682
+ - Create Action Maps for different input contexts (e.g., menu, gameplay)
683
+ - Use PlayerInput component for easy player input handling
684
+
685
+ ### Performance Optimization
686
+
687
+ - Object pooling for frequently instantiated objects (e.g., bullets, enemies)
688
+ - Use the Unity Profiler to identify performance bottlenecks
689
+ - Optimize physics settings and collision detection
690
+ - Use LOD (Level of Detail) for complex models
691
+
692
+ ## Success Tips for Game Development
693
+
694
+ - **Use Gemini for game design planning** - The team-game-dev bundle provides collaborative game expertise
695
+ - **Use bmad-master for game document organization** - Sharding creates manageable game feature chunks
696
+ - **Follow the Game SM → Game Dev cycle religiously** - This ensures systematic game progress
697
+ - **Keep conversations focused** - One game agent, one Unity task per conversation
698
+ - **Review everything** - Always review and approve before marking game features complete
699
+
700
+ ## Contributing to BMad-Method Game Development
701
+
702
+ ### Game Development Contribution Guidelines
703
+
704
+ For full details, see `CONTRIBUTING.md`. Key points for game development:
705
+
706
+ **Fork Workflow for Game Development**:
707
+
708
+ 1. Fork the repository
709
+ 2. Create game development feature branches
710
+ 3. Submit PRs to `next` branch (default) or `main` for critical game development fixes only
711
+ 4. Keep PRs small: 200-400 lines ideal, 800 lines maximum
712
+ 5. One game feature/fix per PR
713
+
714
+ **Game Development PR Requirements**:
715
+
716
+ - Clear descriptions (max 200 words) with What/Why/How/Testing for game features
717
+ - Use conventional commits (feat:, fix:, docs:) with game context
718
+ - Atomic commits - one logical game change per commit
719
+ - Must align with game development guiding principles
720
+
721
+ **Game Development Core Principles**:
722
+
723
+ - **Game Dev Agents Must Be Lean**: Minimize dependencies, save context for Unity code
724
+ - **Natural Language First**: Everything in markdown, no code in game development core
725
+ - **Core vs Game Expansion Packs**: Core for universal needs, game packs for Unity specialization
726
+ - **Game Design Philosophy**: "Game dev agents code Unity, game planning agents plan gameplay"
727
+
728
+ ## Game Development Expansion Pack System
729
+
730
+ ### This Game Development Expansion Pack
731
+
732
+ This 2D Unity Game Development expansion pack extends BMad-Method beyond traditional software development into professional game development. It provides specialized game agent teams, Unity templates, and game workflows while keeping the core framework lean and focused on general development.
733
+
734
+ ### Why Use This Game Development Expansion Pack?
735
+
736
+ 1. **Keep Core Lean**: Game dev agents maintain maximum context for Unity coding
737
+ 2. **Game Domain Expertise**: Deep, specialized Unity and game development knowledge
738
+ 3. **Community Game Innovation**: Game developers can contribute and share Unity patterns
739
+ 4. **Modular Game Design**: Install only game development capabilities you need
740
+
741
+ ### Using This Game Development Expansion Pack
742
+
743
+ 1. **Install via CLI**:
744
+
745
+ ```bash
746
+ npx bmad-method install
747
+ # Select "Install game development expansion pack" option
748
+ ```
749
+
750
+ 2. **Use in Your Game Workflow**: Installed game agents integrate seamlessly with existing BMad agents
751
+
752
+ ### Creating Custom Game Development Extensions
753
+
754
+ Use the **expansion-creator** pack to build your own game development extensions:
755
+
756
+ 1. **Define Game Domain**: What game development expertise are you capturing?
757
+ 2. **Design Game Agents**: Create specialized game roles with clear Unity boundaries
758
+ 3. **Build Game Resources**: Tasks, templates, checklists for your game domain
759
+ 4. **Test & Share**: Validate with real Unity use cases, share with game development community
760
+
761
+ **Key Principle**: Game development expansion packs democratize game development expertise by making specialized Unity and game design knowledge accessible through AI agents.
762
+
763
+ ## Getting Help with Game Development
764
+
765
+ - **Commands**: Use `*/*help` in any environment to see available game development commands
766
+ - **Game Agent Switching**: Use `*/*switch game-agent-name` with orchestrator for role changes
767
+ - **Game Documentation**: Check `docs/` folder for Unity project-specific context
768
+ - **Game Community**: Discord and GitHub resources available for game development support
769
+ - **Game Contributing**: See `CONTRIBUTING.md` for full game development guidelines
770
+
771
+ This knowledge base provides the foundation for effective game development using the BMad-Method framework with specialized focus on 2D game creation using Unity and C#.