@zeyue0329/xiaoma-cli 1.0.48 → 6.0.0-alpha.13

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 (914) hide show
  1. package/README.md +0 -2
  2. package/custom/src/agents/commit-poet/commit-poet.agent.yaml +129 -0
  3. package/custom/src/agents/commit-poet/installation-guide.md +36 -0
  4. package/custom/src/agents/toolsmith/installation-guide.md +36 -0
  5. package/custom/src/agents/toolsmith/toolsmith-sidecar/instructions.md +70 -0
  6. package/custom/src/agents/toolsmith/toolsmith-sidecar/knowledge/bundlers.md +111 -0
  7. package/custom/src/agents/toolsmith/toolsmith-sidecar/knowledge/deploy.md +70 -0
  8. package/custom/src/agents/toolsmith/toolsmith-sidecar/knowledge/docs.md +114 -0
  9. package/custom/src/agents/toolsmith/toolsmith-sidecar/knowledge/installers.md +134 -0
  10. package/custom/src/agents/toolsmith/toolsmith-sidecar/knowledge/modules.md +160 -0
  11. package/custom/src/agents/toolsmith/toolsmith-sidecar/knowledge/tests.md +103 -0
  12. package/custom/src/agents/toolsmith/toolsmith-sidecar/memories.md +17 -0
  13. package/custom/src/agents/toolsmith/toolsmith.agent.yaml +108 -0
  14. package/docs/BUNDLE_DISTRIBUTION_SETUP.md +95 -0
  15. package/docs/agent-customization-guide.md +208 -0
  16. package/docs/custom-agent-installation.md +183 -0
  17. package/docs/document-sharding-guide.md +449 -0
  18. package/docs/ide-info/auggie.md +31 -0
  19. package/docs/ide-info/claude-code.md +25 -0
  20. package/docs/ide-info/cline.md +31 -0
  21. package/docs/ide-info/codex.md +21 -0
  22. package/docs/ide-info/crush.md +30 -0
  23. package/docs/ide-info/cursor.md +25 -0
  24. package/docs/ide-info/gemini.md +25 -0
  25. package/docs/ide-info/github-copilot.md +26 -0
  26. package/docs/ide-info/iflow.md +33 -0
  27. package/docs/ide-info/kilo.md +24 -0
  28. package/docs/ide-info/opencode.md +24 -0
  29. package/docs/ide-info/qwen.md +25 -0
  30. package/docs/ide-info/roo.md +27 -0
  31. package/docs/ide-info/rovo-dev.md +388 -0
  32. package/docs/ide-info/trae.md +25 -0
  33. package/docs/ide-info/windsurf.md +22 -0
  34. package/docs/index.md +144 -0
  35. package/docs/installers-bundlers/ide-injections.md +186 -0
  36. package/docs/installers-bundlers/installers-modules-platforms-reference.md +379 -0
  37. package/docs/rag/rag.md +812 -0
  38. package/docs/v4-to-v6-upgrade.md +220 -0
  39. package/docs/v6-open-items.md +17 -0
  40. package/docs/web-bundles-gemini-gpt-guide.md +468 -0
  41. package/eslint.config.mjs +133 -0
  42. package/package.json +41 -51
  43. package/prettier.config.mjs +32 -0
  44. package/src/core/_module-installer/install-config.yaml +29 -0
  45. package/src/core/_module-installer/installer.js +60 -0
  46. package/src/core/agents/xiaoma-master.agent.yaml +39 -0
  47. package/src/core/agents/xiaoma-web-orchestrator.agent.xml +113 -0
  48. package/src/core/resources/excalidraw/README.md +160 -0
  49. package/src/core/resources/excalidraw/excalidraw-helpers.md +127 -0
  50. package/src/core/resources/excalidraw/library-loader.md +50 -0
  51. package/src/core/resources/excalidraw/validate-json-instructions.md +79 -0
  52. package/src/core/tasks/advanced-elicitation-methods.csv +51 -0
  53. package/src/core/tasks/advanced-elicitation.xml +116 -0
  54. package/src/core/tasks/index-docs.xml +65 -0
  55. package/src/core/tasks/validate-workflow.xml +89 -0
  56. package/src/core/tasks/workflow.xml +235 -0
  57. package/src/core/tools/shard-doc.xml +109 -0
  58. package/src/core/workflows/brainstorming/brain-methods.csv +62 -0
  59. package/src/core/workflows/brainstorming/steps/step-01-session-setup.md +196 -0
  60. package/src/core/workflows/brainstorming/steps/step-01b-continue.md +121 -0
  61. package/src/core/workflows/brainstorming/steps/step-02a-user-selected.md +224 -0
  62. package/src/core/workflows/brainstorming/steps/step-02b-ai-recommended.md +236 -0
  63. package/src/core/workflows/brainstorming/steps/step-02c-random-selection.md +208 -0
  64. package/src/core/workflows/brainstorming/steps/step-02d-progressive-flow.md +263 -0
  65. package/src/core/workflows/brainstorming/steps/step-03-technique-execution.md +339 -0
  66. package/src/core/workflows/brainstorming/steps/step-04-idea-organization.md +302 -0
  67. package/src/core/workflows/brainstorming/template.md +15 -0
  68. package/src/core/workflows/brainstorming/workflow.md +51 -0
  69. package/src/core/workflows/party-mode/steps/step-01-agent-loading.md +138 -0
  70. package/src/core/workflows/party-mode/steps/step-02-discussion-orchestration.md +203 -0
  71. package/src/core/workflows/party-mode/steps/step-03-graceful-exit.md +159 -0
  72. package/src/core/workflows/party-mode/workflow.md +207 -0
  73. package/src/modules/cis/_module-installer/install-config.yaml +16 -0
  74. package/src/modules/cis/_module-installer/installer.js +92 -0
  75. package/src/modules/cis/agents/README.md +104 -0
  76. package/src/modules/cis/agents/brainstorming-coach.agent.yaml +29 -0
  77. package/src/modules/cis/agents/creative-problem-solver.agent.yaml +29 -0
  78. package/src/modules/cis/agents/design-thinking-coach.agent.yaml +29 -0
  79. package/src/modules/cis/agents/innovation-strategist.agent.yaml +29 -0
  80. package/src/modules/cis/agents/presentation-master.agent.yaml +61 -0
  81. package/src/modules/cis/agents/storyteller.agent.yaml +29 -0
  82. package/src/modules/cis/readme.md +153 -0
  83. package/src/modules/cis/teams/creative-squad.yaml +7 -0
  84. package/src/modules/cis/teams/default-party.csv +12 -0
  85. package/src/modules/cis/workflows/README.md +139 -0
  86. package/src/modules/cis/workflows/design-thinking/README.md +56 -0
  87. package/src/modules/cis/workflows/design-thinking/design-methods.csv +31 -0
  88. package/src/modules/cis/workflows/design-thinking/instructions.md +202 -0
  89. package/src/modules/cis/workflows/design-thinking/template.md +111 -0
  90. package/src/modules/cis/workflows/design-thinking/workflow.yaml +38 -0
  91. package/src/modules/cis/workflows/innovation-strategy/README.md +56 -0
  92. package/src/modules/cis/workflows/innovation-strategy/innovation-frameworks.csv +31 -0
  93. package/src/modules/cis/workflows/innovation-strategy/instructions.md +276 -0
  94. package/src/modules/cis/workflows/innovation-strategy/template.md +189 -0
  95. package/src/modules/cis/workflows/innovation-strategy/workflow.yaml +38 -0
  96. package/src/modules/cis/workflows/problem-solving/README.md +56 -0
  97. package/src/modules/cis/workflows/problem-solving/instructions.md +252 -0
  98. package/src/modules/cis/workflows/problem-solving/solving-methods.csv +31 -0
  99. package/src/modules/cis/workflows/problem-solving/template.md +165 -0
  100. package/src/modules/cis/workflows/problem-solving/workflow.yaml +38 -0
  101. package/src/modules/cis/workflows/storytelling/README.md +58 -0
  102. package/src/modules/cis/workflows/storytelling/instructions.md +293 -0
  103. package/src/modules/cis/workflows/storytelling/story-types.csv +26 -0
  104. package/src/modules/cis/workflows/storytelling/template.md +113 -0
  105. package/src/modules/cis/workflows/storytelling/workflow.yaml +38 -0
  106. package/src/modules/xmb/README.md +261 -0
  107. package/src/modules/xmb/_module-installer/install-config.yaml +28 -0
  108. package/src/modules/xmb/agents/xiaoma-builder.agent.yaml +71 -0
  109. package/src/modules/xmb/docs/agents/agent-compilation.md +340 -0
  110. package/src/modules/xmb/docs/agents/agent-menu-patterns.md +524 -0
  111. package/src/modules/xmb/docs/agents/expert-agent-architecture.md +364 -0
  112. package/src/modules/xmb/docs/agents/index.md +55 -0
  113. package/src/modules/xmb/docs/agents/kb.csv +0 -0
  114. package/src/modules/xmb/docs/agents/module-agent-architecture.md +367 -0
  115. package/src/modules/xmb/docs/agents/simple-agent-architecture.md +288 -0
  116. package/src/modules/xmb/docs/agents/understanding-agent-types.md +184 -0
  117. package/src/modules/xmb/docs/workflows/architecture.md +220 -0
  118. package/src/modules/xmb/docs/workflows/common-workflow-tools.csv +19 -0
  119. package/src/modules/xmb/docs/workflows/csv-data-file-standards.md +206 -0
  120. package/src/modules/xmb/docs/workflows/index.md +45 -0
  121. package/src/modules/xmb/docs/workflows/intent-vs-prescriptive-spectrum.md +220 -0
  122. package/src/modules/xmb/docs/workflows/kb.csv +0 -0
  123. package/src/modules/xmb/docs/workflows/step-template.md +283 -0
  124. package/src/modules/xmb/docs/workflows/terms.md +97 -0
  125. package/src/modules/xmb/docs/workflows/workflow-template.md +152 -0
  126. package/src/modules/xmb/reference/agents/expert-examples/journal-keeper/README.md +242 -0
  127. package/src/modules/xmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/breakthroughs.md +24 -0
  128. package/src/modules/xmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/instructions.md +108 -0
  129. package/src/modules/xmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/memories.md +46 -0
  130. package/src/modules/xmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/mood-patterns.md +39 -0
  131. package/src/modules/xmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +152 -0
  132. package/src/modules/xmb/reference/agents/module-examples/README.md +50 -0
  133. package/src/modules/xmb/reference/agents/module-examples/security-engineer.agent.yaml +53 -0
  134. package/src/modules/xmb/reference/agents/module-examples/trend-analyst.agent.yaml +57 -0
  135. package/src/modules/xmb/reference/agents/simple-examples/README.md +223 -0
  136. package/src/modules/xmb/reference/agents/simple-examples/commit-poet.agent.yaml +126 -0
  137. package/src/modules/xmb/reference/readme.md +3 -0
  138. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/data/dietary-restrictions.csv +18 -0
  139. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/data/macro-calculator.csv +16 -0
  140. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/data/recipe-database.csv +28 -0
  141. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/steps/step-01-init.md +177 -0
  142. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/steps/step-01b-continue.md +150 -0
  143. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/steps/step-02-profile.md +164 -0
  144. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/steps/step-03-assessment.md +152 -0
  145. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/steps/step-04-strategy.md +182 -0
  146. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +167 -0
  147. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/steps/step-06-prep-schedule.md +194 -0
  148. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/templates/assessment-section.md +25 -0
  149. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/templates/nutrition-plan.md +68 -0
  150. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/templates/prep-schedule-section.md +29 -0
  151. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/templates/profile-section.md +47 -0
  152. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/templates/shopping-section.md +37 -0
  153. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/templates/strategy-section.md +18 -0
  154. package/src/modules/xmb/reference/workflows/meal-prep-nutrition/workflow.md +58 -0
  155. package/src/modules/xmb/workflows/create-agent/data/agent-validation-checklist.md +174 -0
  156. package/src/modules/xmb/workflows/create-agent/data/brainstorm-context.md +153 -0
  157. package/src/modules/xmb/workflows/create-agent/data/communication-presets.csv +61 -0
  158. package/src/modules/xmb/workflows/create-agent/data/info-and-installation-guide.md +17 -0
  159. package/src/modules/xmb/workflows/create-agent/data/reference/README.md +3 -0
  160. package/src/modules/xmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/README.md +242 -0
  161. package/src/modules/xmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/breakthroughs.md +24 -0
  162. package/src/modules/xmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/instructions.md +108 -0
  163. package/src/modules/xmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/memories.md +46 -0
  164. package/src/modules/xmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/mood-patterns.md +39 -0
  165. package/src/modules/xmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +152 -0
  166. package/src/modules/xmb/workflows/create-agent/data/reference/agents/module-examples/README.md +50 -0
  167. package/src/modules/xmb/workflows/create-agent/data/reference/agents/module-examples/security-engineer.agent.yaml +53 -0
  168. package/src/modules/xmb/workflows/create-agent/data/reference/agents/module-examples/trend-analyst.agent.yaml +57 -0
  169. package/src/modules/xmb/workflows/create-agent/data/reference/agents/simple-examples/README.md +223 -0
  170. package/src/modules/xmb/workflows/create-agent/data/reference/agents/simple-examples/commit-poet.agent.yaml +126 -0
  171. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/data/dietary-restrictions.csv +18 -0
  172. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/data/macro-calculator.csv +16 -0
  173. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/data/recipe-database.csv +28 -0
  174. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-01-init.md +177 -0
  175. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-01b-continue.md +150 -0
  176. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-02-profile.md +164 -0
  177. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-03-assessment.md +152 -0
  178. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-04-strategy.md +182 -0
  179. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +167 -0
  180. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-06-prep-schedule.md +194 -0
  181. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/templates/assessment-section.md +25 -0
  182. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/templates/nutrition-plan.md +68 -0
  183. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/templates/prep-schedule-section.md +29 -0
  184. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/templates/profile-section.md +47 -0
  185. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/templates/shopping-section.md +37 -0
  186. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/templates/strategy-section.md +18 -0
  187. package/src/modules/xmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/workflow.md +58 -0
  188. package/src/modules/xmb/workflows/create-agent/data/validation-complete.md +305 -0
  189. package/src/modules/xmb/workflows/create-agent/steps/step-01-brainstorm.md +145 -0
  190. package/src/modules/xmb/workflows/create-agent/steps/step-02-discover.md +210 -0
  191. package/src/modules/xmb/workflows/create-agent/steps/step-03-persona.md +260 -0
  192. package/src/modules/xmb/workflows/create-agent/steps/step-04-commands.md +237 -0
  193. package/src/modules/xmb/workflows/create-agent/steps/step-05-name.md +231 -0
  194. package/src/modules/xmb/workflows/create-agent/steps/step-06-build.md +224 -0
  195. package/src/modules/xmb/workflows/create-agent/steps/step-07-validate.md +234 -0
  196. package/src/modules/xmb/workflows/create-agent/steps/step-08-setup.md +179 -0
  197. package/src/modules/xmb/workflows/create-agent/steps/step-09-customize.md +197 -0
  198. package/src/modules/xmb/workflows/create-agent/steps/step-10-build-tools.md +180 -0
  199. package/src/modules/xmb/workflows/create-agent/steps/step-11-celebrate.md +222 -0
  200. package/src/modules/xmb/workflows/create-agent/templates/agent_commands.md +21 -0
  201. package/src/modules/xmb/workflows/create-agent/templates/agent_persona.md +25 -0
  202. package/src/modules/xmb/workflows/create-agent/templates/agent_purpose_and_type.md +23 -0
  203. package/src/modules/xmb/workflows/create-agent/workflow.md +91 -0
  204. package/src/modules/xmb/workflows/create-workflow/steps/step-01-init.md +168 -0
  205. package/src/modules/xmb/workflows/create-workflow/steps/step-02-gather.md +233 -0
  206. package/src/modules/xmb/workflows/create-workflow/steps/step-03-tools-overview.md +127 -0
  207. package/src/modules/xmb/workflows/create-workflow/steps/step-04-core-tools.md +145 -0
  208. package/src/modules/xmb/workflows/create-workflow/steps/step-05-memory-requirements.md +136 -0
  209. package/src/modules/xmb/workflows/create-workflow/steps/step-06-external-tools.md +154 -0
  210. package/src/modules/xmb/workflows/create-workflow/steps/step-07-installation-guidance.md +159 -0
  211. package/src/modules/xmb/workflows/create-workflow/steps/step-08-tools-summary.md +167 -0
  212. package/src/modules/xmb/workflows/create-workflow/steps/step-09-design.md +239 -0
  213. package/src/modules/xmb/workflows/create-workflow/steps/step-10-plan-review.md +215 -0
  214. package/src/modules/xmb/workflows/create-workflow/steps/step-11-build.md +262 -0
  215. package/src/modules/xmb/workflows/create-workflow/steps/step-12-review.md +270 -0
  216. package/src/modules/xmb/workflows/create-workflow/templates/build-summary.md +36 -0
  217. package/src/modules/xmb/workflows/create-workflow/templates/completion-section.md +39 -0
  218. package/src/modules/xmb/workflows/create-workflow/templates/content-template.md +21 -0
  219. package/src/modules/xmb/workflows/create-workflow/templates/design-section.md +53 -0
  220. package/src/modules/xmb/workflows/create-workflow/templates/project-info.md +18 -0
  221. package/src/modules/xmb/workflows/create-workflow/templates/requirements-section.md +47 -0
  222. package/src/modules/xmb/workflows/create-workflow/templates/review-section.md +56 -0
  223. package/src/modules/xmb/workflows/create-workflow/templates/step-file.md +139 -0
  224. package/src/modules/xmb/workflows/create-workflow/templates/workflow-plan.md +54 -0
  225. package/src/modules/xmb/workflows/create-workflow/templates/workflow.md +58 -0
  226. package/src/modules/xmb/workflows/create-workflow/workflow.md +58 -0
  227. package/src/modules/xmb/workflows/edit-agent/steps/step-01-discover-intent.md +134 -0
  228. package/src/modules/xmb/workflows/edit-agent/steps/step-02-analyze-agent.md +202 -0
  229. package/src/modules/xmb/workflows/edit-agent/steps/step-03-propose-changes.md +157 -0
  230. package/src/modules/xmb/workflows/edit-agent/steps/step-04-apply-changes.md +150 -0
  231. package/src/modules/xmb/workflows/edit-agent/steps/step-05-validate.md +150 -0
  232. package/src/modules/xmb/workflows/edit-agent/workflow.md +58 -0
  233. package/src/modules/xmb/workflows/edit-workflow/steps/step-01-analyze.md +221 -0
  234. package/src/modules/xmb/workflows/edit-workflow/steps/step-02-discover.md +253 -0
  235. package/src/modules/xmb/workflows/edit-workflow/steps/step-03-improve.md +217 -0
  236. package/src/modules/xmb/workflows/edit-workflow/steps/step-04-validate.md +193 -0
  237. package/src/modules/xmb/workflows/edit-workflow/steps/step-05-compliance-check.md +245 -0
  238. package/src/modules/xmb/workflows/edit-workflow/templates/completion-summary.md +75 -0
  239. package/src/modules/xmb/workflows/edit-workflow/templates/improvement-goals.md +68 -0
  240. package/src/modules/xmb/workflows/edit-workflow/templates/improvement-log.md +40 -0
  241. package/src/modules/xmb/workflows/edit-workflow/templates/validation-results.md +51 -0
  242. package/src/modules/xmb/workflows/edit-workflow/templates/workflow-analysis.md +56 -0
  243. package/src/modules/xmb/workflows/edit-workflow/workflow.md +58 -0
  244. package/src/modules/xmb/workflows/workflow-compliance-check/steps/step-01-validate-goal.md +152 -0
  245. package/src/modules/xmb/workflows/workflow-compliance-check/steps/step-02-workflow-validation.md +243 -0
  246. package/src/modules/xmb/workflows/workflow-compliance-check/steps/step-03-step-validation.md +274 -0
  247. package/src/modules/xmb/workflows/workflow-compliance-check/steps/step-04-file-validation.md +295 -0
  248. package/src/modules/xmb/workflows/workflow-compliance-check/steps/step-05-intent-spectrum-validation.md +264 -0
  249. package/src/modules/xmb/workflows/workflow-compliance-check/steps/step-06-web-subprocess-validation.md +360 -0
  250. package/src/modules/xmb/workflows/workflow-compliance-check/steps/step-07-holistic-analysis.md +258 -0
  251. package/src/modules/xmb/workflows/workflow-compliance-check/steps/step-08-generate-report.md +301 -0
  252. package/src/modules/xmb/workflows/workflow-compliance-check/templates/compliance-report.md +140 -0
  253. package/src/modules/xmb/workflows/workflow-compliance-check/workflow.md +58 -0
  254. package/src/modules/xmb/workflows-legacy/create-module/README.md +229 -0
  255. package/src/modules/xmb/workflows-legacy/create-module/brainstorm-context.md +137 -0
  256. package/src/modules/xmb/workflows-legacy/create-module/checklist.md +235 -0
  257. package/src/modules/xmb/workflows-legacy/create-module/installer-templates/install-config.yaml +92 -0
  258. package/src/modules/xmb/workflows-legacy/create-module/installer-templates/installer.js +231 -0
  259. package/src/modules/xmb/workflows-legacy/create-module/instructions.md +577 -0
  260. package/src/modules/xmb/workflows-legacy/create-module/module-structure.md +400 -0
  261. package/src/modules/xmb/workflows-legacy/create-module/workflow.yaml +52 -0
  262. package/src/modules/xmb/workflows-legacy/edit-module/README.md +187 -0
  263. package/src/modules/xmb/workflows-legacy/edit-module/checklist.md +165 -0
  264. package/src/modules/xmb/workflows-legacy/edit-module/instructions.md +341 -0
  265. package/src/modules/xmb/workflows-legacy/edit-module/workflow.yaml +34 -0
  266. package/src/modules/xmb/workflows-legacy/module-brief/README.md +264 -0
  267. package/src/modules/xmb/workflows-legacy/module-brief/checklist.md +116 -0
  268. package/src/modules/xmb/workflows-legacy/module-brief/instructions.md +268 -0
  269. package/src/modules/xmb/workflows-legacy/module-brief/template.md +275 -0
  270. package/src/modules/xmb/workflows-legacy/module-brief/workflow.yaml +36 -0
  271. package/src/modules/xmc/README.md +128 -0
  272. package/src/modules/xmc/_module-installer/install-config.yaml +53 -0
  273. package/src/modules/xmc/_module-installer/installer.js +131 -0
  274. package/src/modules/xmc/_module-installer/platform-specifics/claude-code.js +35 -0
  275. package/src/modules/xmc/_module-installer/platform-specifics/windsurf.js +32 -0
  276. package/src/modules/xmc/agents/analyst.agent.yaml +49 -0
  277. package/src/modules/xmc/agents/architect.agent.yaml +52 -0
  278. package/src/modules/xmc/agents/auto-iteration-orchestrator.agent.yaml +115 -0
  279. package/src/modules/xmc/agents/dev.agent.yaml +44 -0
  280. package/src/modules/xmc/agents/pm.agent.yaml +50 -0
  281. package/src/modules/xmc/agents/quick-flow-solo-dev.agent.yaml +36 -0
  282. package/src/modules/xmc/agents/sm.agent.yaml +55 -0
  283. package/src/modules/xmc/agents/tea.agent.yaml +70 -0
  284. package/src/modules/xmc/agents/tech-writer.agent.yaml +67 -0
  285. package/src/modules/xmc/agents/ux-designer.agent.yaml +45 -0
  286. package/src/modules/xmc/data/README.md +29 -0
  287. package/src/modules/xmc/data/documentation-standards.md +262 -0
  288. package/src/modules/xmc/data/project-context-template.md +40 -0
  289. package/src/modules/xmc/docs/README.md +252 -0
  290. package/src/modules/xmc/docs/agents-guide.md +952 -0
  291. package/src/modules/xmc/docs/brownfield-guide.md +750 -0
  292. package/src/modules/xmc/docs/enterprise-agentic-development.md +686 -0
  293. package/src/modules/xmc/docs/faq.md +561 -0
  294. package/src/modules/xmc/docs/glossary.md +303 -0
  295. package/src/modules/xmc/docs/images/workflow-method-greenfield.excalidraw +5174 -0
  296. package/src/modules/xmc/docs/images/workflow-method-greenfield.svg +2 -0
  297. package/src/modules/xmc/docs/iteration-development-guide.md +752 -0
  298. package/src/modules/xmc/docs/party-mode.md +224 -0
  299. package/src/modules/xmc/docs/quick-flow-solo-dev.md +337 -0
  300. package/src/modules/xmc/docs/quick-start.md +367 -0
  301. package/src/modules/xmc/docs/scale-adaptive-system.md +618 -0
  302. package/src/modules/xmc/docs/test-architecture.md +462 -0
  303. package/src/modules/xmc/docs/workflow-architecture-reference.md +366 -0
  304. package/src/modules/xmc/docs/workflow-document-project-reference.md +489 -0
  305. package/src/modules/xmc/docs/workflows-analysis.md +266 -0
  306. package/src/modules/xmc/docs/workflows-implementation.md +171 -0
  307. package/src/modules/xmc/docs/workflows-planning.md +451 -0
  308. package/src/modules/xmc/docs/workflows-solutioning.md +509 -0
  309. package/src/modules/xmc/docs/xiaoma-quick-flow.md +528 -0
  310. package/src/modules/xmc/sub-modules/claude-code/config.yaml +5 -0
  311. package/src/modules/xmc/sub-modules/claude-code/injections.yaml +242 -0
  312. package/src/modules/xmc/sub-modules/claude-code/readme.md +87 -0
  313. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-analysis/api-documenter.md +102 -0
  314. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-analysis/codebase-analyzer.md +82 -0
  315. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-analysis/data-analyst.md +101 -0
  316. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-analysis/pattern-detector.md +84 -0
  317. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-planning/dependency-mapper.md +83 -0
  318. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-planning/epic-optimizer.md +81 -0
  319. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-planning/requirements-analyst.md +61 -0
  320. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-planning/technical-decisions-curator.md +168 -0
  321. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-planning/trend-spotter.md +115 -0
  322. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-planning/user-journey-mapper.md +123 -0
  323. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-planning/user-researcher.md +72 -0
  324. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-research/market-researcher.md +51 -0
  325. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-research/tech-debt-auditor.md +106 -0
  326. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-review/document-reviewer.md +102 -0
  327. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-review/technical-evaluator.md +68 -0
  328. package/src/modules/xmc/sub-modules/claude-code/sub-agents/bmad-review/test-coverage-analyzer.md +108 -0
  329. package/src/modules/xmc/teams/default-party.csv +21 -0
  330. package/src/modules/xmc/teams/team-fullstack.yaml +12 -0
  331. package/src/modules/xmc/testarch/knowledge/api-request.md +303 -0
  332. package/src/modules/xmc/testarch/knowledge/auth-session.md +356 -0
  333. package/src/modules/xmc/testarch/knowledge/burn-in.md +273 -0
  334. package/src/modules/xmc/testarch/knowledge/ci-burn-in.md +675 -0
  335. package/src/modules/xmc/testarch/knowledge/component-tdd.md +486 -0
  336. package/src/modules/xmc/testarch/knowledge/contract-testing.md +957 -0
  337. package/src/modules/xmc/testarch/knowledge/data-factories.md +500 -0
  338. package/src/modules/xmc/testarch/knowledge/email-auth.md +721 -0
  339. package/src/modules/xmc/testarch/knowledge/error-handling.md +725 -0
  340. package/src/modules/xmc/testarch/knowledge/feature-flags.md +750 -0
  341. package/src/modules/xmc/testarch/knowledge/file-utils.md +260 -0
  342. package/src/modules/xmc/testarch/knowledge/fixture-architecture.md +401 -0
  343. package/src/modules/xmc/testarch/knowledge/fixtures-composition.md +382 -0
  344. package/src/modules/xmc/testarch/knowledge/intercept-network-call.md +280 -0
  345. package/src/modules/xmc/testarch/knowledge/log.md +294 -0
  346. package/src/modules/xmc/testarch/knowledge/network-error-monitor.md +272 -0
  347. package/src/modules/xmc/testarch/knowledge/network-first.md +486 -0
  348. package/src/modules/xmc/testarch/knowledge/network-recorder.md +265 -0
  349. package/src/modules/xmc/testarch/knowledge/nfr-criteria.md +670 -0
  350. package/src/modules/xmc/testarch/knowledge/overview.md +284 -0
  351. package/src/modules/xmc/testarch/knowledge/playwright-config.md +730 -0
  352. package/src/modules/xmc/testarch/knowledge/probability-impact.md +601 -0
  353. package/src/modules/xmc/testarch/knowledge/recurse.md +296 -0
  354. package/src/modules/xmc/testarch/knowledge/risk-governance.md +615 -0
  355. package/src/modules/xmc/testarch/knowledge/selective-testing.md +732 -0
  356. package/src/modules/xmc/testarch/knowledge/selector-resilience.md +527 -0
  357. package/src/modules/xmc/testarch/knowledge/test-healing-patterns.md +644 -0
  358. package/src/modules/xmc/testarch/knowledge/test-levels-framework.md +473 -0
  359. package/src/modules/xmc/testarch/knowledge/test-priorities-matrix.md +373 -0
  360. package/src/modules/xmc/testarch/knowledge/test-quality.md +664 -0
  361. package/src/modules/xmc/testarch/knowledge/timing-debugging.md +372 -0
  362. package/src/modules/xmc/testarch/knowledge/visual-debugging.md +524 -0
  363. package/src/modules/xmc/testarch/tea-index.csv +33 -0
  364. package/src/modules/xmc/workflows/1-analysis/product-brief/product-brief.template.md +8 -0
  365. package/src/modules/xmc/workflows/1-analysis/product-brief/steps/step-01-init.md +192 -0
  366. package/src/modules/xmc/workflows/1-analysis/product-brief/steps/step-01b-continue.md +167 -0
  367. package/src/modules/xmc/workflows/1-analysis/product-brief/steps/step-02-vision.md +203 -0
  368. package/src/modules/xmc/workflows/1-analysis/product-brief/steps/step-03-users.md +206 -0
  369. package/src/modules/xmc/workflows/1-analysis/product-brief/steps/step-04-metrics.md +209 -0
  370. package/src/modules/xmc/workflows/1-analysis/product-brief/steps/step-05-scope.md +223 -0
  371. package/src/modules/xmc/workflows/1-analysis/product-brief/steps/step-06-complete.md +199 -0
  372. package/src/modules/xmc/workflows/1-analysis/product-brief/workflow.md +58 -0
  373. package/src/modules/xmc/workflows/1-analysis/research/domain-steps/step-01-init.md +136 -0
  374. package/src/modules/xmc/workflows/1-analysis/research/domain-steps/step-02-domain-analysis.md +228 -0
  375. package/src/modules/xmc/workflows/1-analysis/research/domain-steps/step-03-competitive-landscape.md +237 -0
  376. package/src/modules/xmc/workflows/1-analysis/research/domain-steps/step-04-regulatory-focus.md +205 -0
  377. package/src/modules/xmc/workflows/1-analysis/research/domain-steps/step-05-technical-trends.md +233 -0
  378. package/src/modules/xmc/workflows/1-analysis/research/domain-steps/step-06-research-synthesis.md +443 -0
  379. package/src/modules/xmc/workflows/1-analysis/research/market-steps/step-01-init.md +182 -0
  380. package/src/modules/xmc/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +235 -0
  381. package/src/modules/xmc/workflows/1-analysis/research/market-steps/step-02-customer-insights.md +198 -0
  382. package/src/modules/xmc/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +247 -0
  383. package/src/modules/xmc/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +257 -0
  384. package/src/modules/xmc/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +175 -0
  385. package/src/modules/xmc/workflows/1-analysis/research/market-steps/step-06-research-completion.md +475 -0
  386. package/src/modules/xmc/workflows/1-analysis/research/research.template.md +16 -0
  387. package/src/modules/xmc/workflows/1-analysis/research/technical-steps/step-01-init.md +136 -0
  388. package/src/modules/xmc/workflows/1-analysis/research/technical-steps/step-02-technical-overview.md +237 -0
  389. package/src/modules/xmc/workflows/1-analysis/research/technical-steps/step-03-integration-patterns.md +246 -0
  390. package/src/modules/xmc/workflows/1-analysis/research/technical-steps/step-04-architectural-patterns.md +200 -0
  391. package/src/modules/xmc/workflows/1-analysis/research/technical-steps/step-05-implementation-research.md +237 -0
  392. package/src/modules/xmc/workflows/1-analysis/research/technical-steps/step-06-research-synthesis.md +486 -0
  393. package/src/modules/xmc/workflows/1-analysis/research/workflow.md +198 -0
  394. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-01-init.md +159 -0
  395. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-01b-continue.md +126 -0
  396. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +209 -0
  397. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +215 -0
  398. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +218 -0
  399. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +233 -0
  400. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +251 -0
  401. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +253 -0
  402. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +223 -0
  403. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +223 -0
  404. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +240 -0
  405. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +247 -0
  406. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +236 -0
  407. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +263 -0
  408. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +226 -0
  409. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/ux-design-template.md +13 -0
  410. package/src/modules/xmc/workflows/2-plan-workflows/create-ux-design/workflow.md +53 -0
  411. package/src/modules/xmc/workflows/2-plan-workflows/prd/domain-complexity.csv +13 -0
  412. package/src/modules/xmc/workflows/2-plan-workflows/prd/prd-template.md +9 -0
  413. package/src/modules/xmc/workflows/2-plan-workflows/prd/project-types.csv +11 -0
  414. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-01-init.md +161 -0
  415. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-01b-continue.md +123 -0
  416. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-02-discovery.md +275 -0
  417. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-03-success.md +271 -0
  418. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-04-journeys.md +272 -0
  419. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-05-domain.md +249 -0
  420. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-06-innovation.md +240 -0
  421. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-07-project-type.md +236 -0
  422. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-08-scoping.md +280 -0
  423. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-09-functional.md +251 -0
  424. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-10-nonfunctional.md +275 -0
  425. package/src/modules/xmc/workflows/2-plan-workflows/prd/steps/step-11-complete.md +210 -0
  426. package/src/modules/xmc/workflows/2-plan-workflows/prd/workflow.md +61 -0
  427. package/src/modules/xmc/workflows/3-solutioning/architecture/architecture-decision-template.md +13 -0
  428. package/src/modules/xmc/workflows/3-solutioning/architecture/data/domain-complexity.csv +11 -0
  429. package/src/modules/xmc/workflows/3-solutioning/architecture/data/project-types.csv +7 -0
  430. package/src/modules/xmc/workflows/3-solutioning/architecture/steps/step-01-init.md +194 -0
  431. package/src/modules/xmc/workflows/3-solutioning/architecture/steps/step-01b-continue.md +163 -0
  432. package/src/modules/xmc/workflows/3-solutioning/architecture/steps/step-02-context.md +223 -0
  433. package/src/modules/xmc/workflows/3-solutioning/architecture/steps/step-03-starter.md +330 -0
  434. package/src/modules/xmc/workflows/3-solutioning/architecture/steps/step-04-decisions.md +317 -0
  435. package/src/modules/xmc/workflows/3-solutioning/architecture/steps/step-05-patterns.md +358 -0
  436. package/src/modules/xmc/workflows/3-solutioning/architecture/steps/step-06-structure.md +378 -0
  437. package/src/modules/xmc/workflows/3-solutioning/architecture/steps/step-07-validation.md +358 -0
  438. package/src/modules/xmc/workflows/3-solutioning/architecture/steps/step-08-complete.md +351 -0
  439. package/src/modules/xmc/workflows/3-solutioning/architecture/workflow.md +48 -0
  440. package/src/modules/xmc/workflows/3-solutioning/create-epics-and-stories/epics-template.md +80 -0
  441. package/src/modules/xmc/workflows/3-solutioning/create-epics-and-stories/instructions.md +387 -0
  442. package/src/modules/xmc/workflows/3-solutioning/create-epics-and-stories/workflow.yaml +53 -0
  443. package/src/modules/xmc/workflows/3-solutioning/implementation-readiness/checklist.md +169 -0
  444. package/src/modules/xmc/workflows/3-solutioning/implementation-readiness/instructions.md +332 -0
  445. package/src/modules/xmc/workflows/3-solutioning/implementation-readiness/template.md +146 -0
  446. package/src/modules/xmc/workflows/3-solutioning/implementation-readiness/workflow.yaml +64 -0
  447. package/src/modules/xmc/workflows/4-implementation/code-review/instructions.xml +176 -0
  448. package/src/modules/xmc/workflows/4-implementation/code-review/workflow.yaml +54 -0
  449. package/src/modules/xmc/workflows/4-implementation/correct-course/checklist.md +279 -0
  450. package/src/modules/xmc/workflows/4-implementation/correct-course/instructions.md +206 -0
  451. package/src/modules/xmc/workflows/4-implementation/correct-course/workflow.yaml +58 -0
  452. package/src/modules/xmc/workflows/4-implementation/create-story/checklist.md +358 -0
  453. package/src/modules/xmc/workflows/4-implementation/create-story/instructions.xml +354 -0
  454. package/src/modules/xmc/workflows/4-implementation/create-story/template.md +51 -0
  455. package/src/modules/xmc/workflows/4-implementation/create-story/workflow.yaml +60 -0
  456. package/src/modules/xmc/workflows/4-implementation/dev-story/checklist.md +80 -0
  457. package/src/modules/xmc/workflows/4-implementation/dev-story/instructions.xml +406 -0
  458. package/src/modules/xmc/workflows/4-implementation/dev-story/workflow.yaml +27 -0
  459. package/src/modules/xmc/workflows/4-implementation/retrospective/instructions.md +1443 -0
  460. package/src/modules/xmc/workflows/4-implementation/retrospective/workflow.yaml +57 -0
  461. package/src/modules/xmc/workflows/4-implementation/sprint-planning/checklist.md +33 -0
  462. package/src/modules/xmc/workflows/4-implementation/sprint-planning/instructions.md +232 -0
  463. package/src/modules/xmc/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +56 -0
  464. package/src/modules/xmc/workflows/4-implementation/sprint-planning/workflow.yaml +53 -0
  465. package/src/modules/xmc/workflows/auto-iteration/full-auto-workflow.md +692 -0
  466. package/src/modules/xmc/workflows/auto-iteration/knowledge-base/kb-call-points.md +595 -0
  467. package/src/modules/xmc/workflows/auto-iteration/knowledge-base/kb-interface.md +347 -0
  468. package/src/modules/xmc/workflows/auto-iteration/knowledge-base/kb-query.md +368 -0
  469. package/src/modules/xmc/workflows/auto-iteration/knowledge-base/kb-setup.md +343 -0
  470. package/src/modules/xmc/workflows/auto-iteration/phases/phase-1-analyze.md +406 -0
  471. package/src/modules/xmc/workflows/auto-iteration/phases/phase-2-plan.md +574 -0
  472. package/src/modules/xmc/workflows/auto-iteration/phases/phase-3-design.md +628 -0
  473. package/src/modules/xmc/workflows/auto-iteration/phases/phase-4-develop.md +622 -0
  474. package/src/modules/xmc/workflows/auto-iteration/phases/phase-5-test.md +538 -0
  475. package/src/modules/xmc/workflows/auto-iteration/resume.md +254 -0
  476. package/src/modules/xmc/workflows/auto-iteration/status.md +194 -0
  477. package/src/modules/xmc/workflows/auto-iteration/templates/auto-iteration-status.template.yaml +142 -0
  478. package/src/modules/xmc/workflows/bmad-quick-flow/create-tech-spec/instructions.md +115 -0
  479. package/src/modules/xmc/workflows/bmad-quick-flow/create-tech-spec/workflow.yaml +26 -0
  480. package/src/modules/xmc/workflows/bmad-quick-flow/quick-dev/checklist.md +25 -0
  481. package/src/modules/xmc/workflows/bmad-quick-flow/quick-dev/instructions.md +105 -0
  482. package/src/modules/xmc/workflows/bmad-quick-flow/quick-dev/workflow.yaml +29 -0
  483. package/src/modules/xmc/workflows/diagrams/_shared/excalidraw-library.json +90 -0
  484. package/src/modules/xmc/workflows/diagrams/_shared/excalidraw-templates.yaml +127 -0
  485. package/src/modules/xmc/workflows/diagrams/create-dataflow/checklist.md +39 -0
  486. package/src/modules/xmc/workflows/diagrams/create-dataflow/instructions.md +130 -0
  487. package/src/modules/xmc/workflows/diagrams/create-dataflow/workflow.yaml +27 -0
  488. package/src/modules/xmc/workflows/diagrams/create-diagram/checklist.md +43 -0
  489. package/src/modules/xmc/workflows/diagrams/create-diagram/instructions.md +141 -0
  490. package/src/modules/xmc/workflows/diagrams/create-diagram/workflow.yaml +27 -0
  491. package/src/modules/xmc/workflows/diagrams/create-flowchart/checklist.md +49 -0
  492. package/src/modules/xmc/workflows/diagrams/create-flowchart/instructions.md +241 -0
  493. package/src/modules/xmc/workflows/diagrams/create-flowchart/workflow.yaml +27 -0
  494. package/src/modules/xmc/workflows/diagrams/create-wireframe/checklist.md +38 -0
  495. package/src/modules/xmc/workflows/diagrams/create-wireframe/instructions.md +133 -0
  496. package/src/modules/xmc/workflows/diagrams/create-wireframe/workflow.yaml +27 -0
  497. package/src/modules/xmc/workflows/document-project/checklist.md +245 -0
  498. package/src/modules/xmc/workflows/document-project/documentation-requirements.csv +12 -0
  499. package/src/modules/xmc/workflows/document-project/instructions.md +222 -0
  500. package/src/modules/xmc/workflows/document-project/templates/deep-dive-template.md +345 -0
  501. package/src/modules/xmc/workflows/document-project/templates/index-template.md +169 -0
  502. package/src/modules/xmc/workflows/document-project/templates/project-overview-template.md +103 -0
  503. package/src/modules/xmc/workflows/document-project/templates/project-scan-report-schema.json +160 -0
  504. package/src/modules/xmc/workflows/document-project/templates/source-tree-template.md +135 -0
  505. package/src/modules/xmc/workflows/document-project/workflow.yaml +31 -0
  506. package/src/modules/xmc/workflows/document-project/workflows/deep-dive-instructions.md +298 -0
  507. package/src/modules/xmc/workflows/document-project/workflows/deep-dive.yaml +31 -0
  508. package/src/modules/xmc/workflows/document-project/workflows/full-scan-instructions.md +1106 -0
  509. package/src/modules/xmc/workflows/document-project/workflows/full-scan.yaml +31 -0
  510. package/src/modules/xmc/workflows/generate-project-context/project-context-template.md +20 -0
  511. package/src/modules/xmc/workflows/generate-project-context/steps/step-01-discover.md +193 -0
  512. package/src/modules/xmc/workflows/generate-project-context/steps/step-02-generate.md +317 -0
  513. package/src/modules/xmc/workflows/generate-project-context/steps/step-03-complete.md +277 -0
  514. package/src/modules/xmc/workflows/generate-project-context/workflow.md +48 -0
  515. package/src/modules/xmc/workflows/testarch/atdd/atdd-checklist-template.md +363 -0
  516. package/src/modules/xmc/workflows/testarch/atdd/checklist.md +373 -0
  517. package/src/modules/xmc/workflows/testarch/atdd/instructions.md +805 -0
  518. package/src/modules/xmc/workflows/testarch/atdd/workflow.yaml +47 -0
  519. package/src/modules/xmc/workflows/testarch/automate/checklist.md +580 -0
  520. package/src/modules/xmc/workflows/testarch/automate/instructions.md +1324 -0
  521. package/src/modules/xmc/workflows/testarch/automate/workflow.yaml +54 -0
  522. package/src/modules/xmc/workflows/testarch/ci/checklist.md +246 -0
  523. package/src/modules/xmc/workflows/testarch/ci/github-actions-template.yaml +165 -0
  524. package/src/modules/xmc/workflows/testarch/ci/gitlab-ci-template.yaml +128 -0
  525. package/src/modules/xmc/workflows/testarch/ci/instructions.md +534 -0
  526. package/src/modules/xmc/workflows/testarch/ci/workflow.yaml +47 -0
  527. package/src/modules/xmc/workflows/testarch/framework/checklist.md +321 -0
  528. package/src/modules/xmc/workflows/testarch/framework/instructions.md +481 -0
  529. package/src/modules/xmc/workflows/testarch/framework/workflow.yaml +49 -0
  530. package/src/modules/xmc/workflows/testarch/nfr-assess/checklist.md +405 -0
  531. package/src/modules/xmc/workflows/testarch/nfr-assess/instructions.md +722 -0
  532. package/src/modules/xmc/workflows/testarch/nfr-assess/nfr-report-template.md +443 -0
  533. package/src/modules/xmc/workflows/testarch/nfr-assess/workflow.yaml +49 -0
  534. package/src/modules/xmc/workflows/testarch/test-design/checklist.md +234 -0
  535. package/src/modules/xmc/workflows/testarch/test-design/instructions.md +788 -0
  536. package/src/modules/xmc/workflows/testarch/test-design/test-design-template.md +285 -0
  537. package/src/modules/xmc/workflows/testarch/test-design/workflow.yaml +50 -0
  538. package/src/modules/xmc/workflows/testarch/test-review/checklist.md +470 -0
  539. package/src/modules/xmc/workflows/testarch/test-review/instructions.md +628 -0
  540. package/src/modules/xmc/workflows/testarch/test-review/test-review-template.md +388 -0
  541. package/src/modules/xmc/workflows/testarch/test-review/workflow.yaml +48 -0
  542. package/src/modules/xmc/workflows/testarch/trace/checklist.md +654 -0
  543. package/src/modules/xmc/workflows/testarch/trace/instructions.md +1045 -0
  544. package/src/modules/xmc/workflows/testarch/trace/trace-template.md +673 -0
  545. package/src/modules/xmc/workflows/testarch/trace/workflow.yaml +57 -0
  546. package/src/modules/xmc/workflows/workflow-status/init/instructions.md +331 -0
  547. package/src/modules/xmc/workflows/workflow-status/init/workflow.yaml +29 -0
  548. package/src/modules/xmc/workflows/workflow-status/instructions.md +395 -0
  549. package/src/modules/xmc/workflows/workflow-status/paths/enterprise-brownfield.yaml +127 -0
  550. package/src/modules/xmc/workflows/workflow-status/paths/enterprise-greenfield.yaml +115 -0
  551. package/src/modules/xmc/workflows/workflow-status/paths/method-brownfield.yaml +111 -0
  552. package/src/modules/xmc/workflows/workflow-status/paths/method-greenfield.yaml +102 -0
  553. package/src/modules/xmc/workflows/workflow-status/project-levels.yaml +59 -0
  554. package/src/modules/xmc/workflows/workflow-status/workflow-status-template.yaml +24 -0
  555. package/src/modules/xmc/workflows/workflow-status/workflow.yaml +30 -0
  556. package/src/utility/models/action-command-header.md +0 -0
  557. package/src/utility/models/agent-activation-ide.xml +51 -0
  558. package/src/utility/models/agent-activation-web.xml +50 -0
  559. package/src/utility/models/agent-command-header.md +1 -0
  560. package/src/utility/models/agent-config-template.md +23 -0
  561. package/src/utility/models/agent-in-team-activation.xml +3 -0
  562. package/src/utility/models/fragments/activation-rules.xml +7 -0
  563. package/src/utility/models/fragments/activation-steps.xml +16 -0
  564. package/src/utility/models/fragments/handler-action.xml +4 -0
  565. package/src/utility/models/fragments/handler-data.xml +5 -0
  566. package/src/utility/models/fragments/handler-exec.xml +6 -0
  567. package/src/utility/models/fragments/handler-multi.xml +14 -0
  568. package/src/utility/models/fragments/handler-tmpl.xml +5 -0
  569. package/src/utility/models/fragments/handler-validate-workflow.xml +7 -0
  570. package/src/utility/models/fragments/handler-workflow.xml +9 -0
  571. package/src/utility/models/fragments/menu-handlers.xml +6 -0
  572. package/src/utility/models/fragments/web-bundle-activation-steps.xml +32 -0
  573. package/src/utility/templates/agent.customize.template.yaml +42 -0
  574. package/test/README.md +295 -0
  575. package/test/fixtures/agent-schema/invalid/critical-actions/actions-as-string.agent.yaml +26 -0
  576. package/test/fixtures/agent-schema/invalid/critical-actions/empty-string-in-actions.agent.yaml +29 -0
  577. package/test/fixtures/agent-schema/invalid/menu/empty-menu.agent.yaml +21 -0
  578. package/test/fixtures/agent-schema/invalid/menu/missing-menu.agent.yaml +19 -0
  579. package/test/fixtures/agent-schema/invalid/menu-commands/empty-command-target.agent.yaml +24 -0
  580. package/test/fixtures/agent-schema/invalid/menu-commands/no-command-target.agent.yaml +23 -0
  581. package/test/fixtures/agent-schema/invalid/menu-triggers/camel-case.agent.yaml +24 -0
  582. package/test/fixtures/agent-schema/invalid/menu-triggers/duplicate-triggers.agent.yaml +30 -0
  583. package/test/fixtures/agent-schema/invalid/menu-triggers/empty-trigger.agent.yaml +24 -0
  584. package/test/fixtures/agent-schema/invalid/menu-triggers/leading-asterisk.agent.yaml +24 -0
  585. package/test/fixtures/agent-schema/invalid/menu-triggers/snake-case.agent.yaml +24 -0
  586. package/test/fixtures/agent-schema/invalid/menu-triggers/trigger-with-spaces.agent.yaml +24 -0
  587. package/test/fixtures/agent-schema/invalid/metadata/core-agent-with-module.agent.yaml +26 -0
  588. package/test/fixtures/agent-schema/invalid/metadata/empty-module-string.agent.yaml +26 -0
  589. package/test/fixtures/agent-schema/invalid/metadata/empty-name.agent.yaml +24 -0
  590. package/test/fixtures/agent-schema/invalid/metadata/extra-metadata-fields.agent.yaml +26 -0
  591. package/test/fixtures/agent-schema/invalid/metadata/missing-id.agent.yaml +23 -0
  592. package/test/fixtures/agent-schema/invalid/metadata/module-agent-missing-module.agent.yaml +25 -0
  593. package/test/fixtures/agent-schema/invalid/metadata/wrong-module-value.agent.yaml +26 -0
  594. package/test/fixtures/agent-schema/invalid/persona/empty-principles-array.agent.yaml +23 -0
  595. package/test/fixtures/agent-schema/invalid/persona/empty-string-in-principles.agent.yaml +26 -0
  596. package/test/fixtures/agent-schema/invalid/persona/extra-persona-fields.agent.yaml +26 -0
  597. package/test/fixtures/agent-schema/invalid/persona/missing-role.agent.yaml +23 -0
  598. package/test/fixtures/agent-schema/invalid/prompts/empty-content.agent.yaml +28 -0
  599. package/test/fixtures/agent-schema/invalid/prompts/extra-prompt-fields.agent.yaml +30 -0
  600. package/test/fixtures/agent-schema/invalid/prompts/missing-content.agent.yaml +27 -0
  601. package/test/fixtures/agent-schema/invalid/prompts/missing-id.agent.yaml +27 -0
  602. package/test/fixtures/agent-schema/invalid/top-level/empty-file.agent.yaml +5 -0
  603. package/test/fixtures/agent-schema/invalid/top-level/extra-top-level-keys.agent.yaml +27 -0
  604. package/test/fixtures/agent-schema/invalid/top-level/missing-agent-key.agent.yaml +11 -0
  605. package/test/fixtures/agent-schema/invalid/yaml-errors/invalid-indentation.agent.yaml +19 -0
  606. package/test/fixtures/agent-schema/invalid/yaml-errors/malformed-yaml.agent.yaml +18 -0
  607. package/test/fixtures/agent-schema/valid/critical-actions/empty-critical-actions.agent.yaml +23 -0
  608. package/test/fixtures/agent-schema/valid/critical-actions/no-critical-actions.agent.yaml +21 -0
  609. package/test/fixtures/agent-schema/valid/critical-actions/valid-critical-actions.agent.yaml +26 -0
  610. package/test/fixtures/agent-schema/valid/menu/multiple-menu-items.agent.yaml +30 -0
  611. package/test/fixtures/agent-schema/valid/menu/single-menu-item.agent.yaml +21 -0
  612. package/test/fixtures/agent-schema/valid/menu-commands/all-command-types.agent.yaml +37 -0
  613. package/test/fixtures/agent-schema/valid/menu-commands/multiple-commands.agent.yaml +23 -0
  614. package/test/fixtures/agent-schema/valid/menu-triggers/kebab-case-triggers.agent.yaml +33 -0
  615. package/test/fixtures/agent-schema/valid/metadata/empty-module-name-in-path.agent.yaml +23 -0
  616. package/test/fixtures/agent-schema/valid/metadata/malformed-path-treated-as-core.agent.yaml +23 -0
  617. package/test/fixtures/agent-schema/valid/metadata/module-agent-correct.agent.yaml +23 -0
  618. package/test/fixtures/agent-schema/valid/persona/complete-persona.agent.yaml +23 -0
  619. package/test/fixtures/agent-schema/valid/prompts/empty-prompts.agent.yaml +23 -0
  620. package/test/fixtures/agent-schema/valid/prompts/no-prompts.agent.yaml +21 -0
  621. package/test/fixtures/agent-schema/valid/prompts/valid-prompts-minimal.agent.yaml +27 -0
  622. package/test/fixtures/agent-schema/valid/prompts/valid-prompts-with-description.agent.yaml +29 -0
  623. package/test/fixtures/agent-schema/valid/top-level/minimal-core-agent.agent.yaml +23 -0
  624. package/test/test-agent-schema.js +387 -0
  625. package/test/test-cli-integration.sh +159 -0
  626. package/test/test-installation-components.js +214 -0
  627. package/test/unit-test-schema.js +133 -0
  628. package/tools/cli/README.md +609 -0
  629. package/tools/cli/bundlers/bundle-web.js +179 -0
  630. package/tools/cli/bundlers/test-analyst.js +28 -0
  631. package/tools/cli/bundlers/test-bundler.js +119 -0
  632. package/tools/cli/bundlers/web-bundler.js +1764 -0
  633. package/tools/cli/commands/agent-install.js +409 -0
  634. package/tools/cli/commands/build.js +458 -0
  635. package/tools/cli/commands/cleanup.js +141 -0
  636. package/tools/cli/commands/install.js +124 -0
  637. package/tools/cli/commands/list.js +28 -0
  638. package/tools/cli/commands/status.js +47 -0
  639. package/tools/cli/commands/uninstall.js +44 -0
  640. package/tools/cli/commands/update.js +28 -0
  641. package/tools/cli/installers/lib/core/config-collector.js +876 -0
  642. package/tools/cli/installers/lib/core/dependency-resolver.js +725 -0
  643. package/tools/cli/installers/lib/core/detector.js +329 -0
  644. package/tools/cli/installers/lib/core/ide-config-manager.js +154 -0
  645. package/tools/cli/installers/lib/core/installer.js +2956 -0
  646. package/tools/cli/installers/lib/core/manifest-generator.js +692 -0
  647. package/tools/cli/installers/lib/core/manifest.js +540 -0
  648. package/tools/cli/installers/lib/ide/_base-ide.js +651 -0
  649. package/tools/cli/installers/lib/ide/antigravity.js +510 -0
  650. package/tools/cli/installers/lib/ide/auggie.js +232 -0
  651. package/tools/cli/installers/lib/ide/claude-code.js +512 -0
  652. package/tools/cli/installers/lib/ide/cline.js +269 -0
  653. package/tools/cli/installers/lib/ide/codex.js +388 -0
  654. package/tools/cli/installers/lib/ide/crush.js +287 -0
  655. package/tools/cli/installers/lib/ide/cursor.js +400 -0
  656. package/tools/cli/installers/lib/ide/gemini.js +253 -0
  657. package/tools/cli/installers/lib/ide/github-copilot.js +387 -0
  658. package/tools/cli/installers/lib/ide/iflow.js +172 -0
  659. package/tools/cli/installers/lib/ide/kilo.js +249 -0
  660. package/tools/cli/installers/lib/ide/manager.js +245 -0
  661. package/tools/cli/installers/lib/ide/opencode.js +257 -0
  662. package/tools/cli/installers/lib/ide/qwen.js +372 -0
  663. package/tools/cli/installers/lib/ide/roo.js +324 -0
  664. package/tools/cli/installers/lib/ide/rovo-dev.js +290 -0
  665. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +90 -0
  666. package/tools/cli/installers/lib/ide/shared/module-injections.js +133 -0
  667. package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +119 -0
  668. package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +237 -0
  669. package/tools/cli/installers/lib/ide/shared/xiaoma-artifacts.js +143 -0
  670. package/tools/cli/installers/lib/ide/templates/agent-command-template.md +14 -0
  671. package/tools/cli/installers/lib/ide/templates/gemini-agent-command.toml +14 -0
  672. package/tools/cli/installers/lib/ide/templates/gemini-task-command.toml +12 -0
  673. package/tools/cli/installers/lib/ide/templates/workflow-command-template.md +13 -0
  674. package/tools/cli/installers/lib/ide/trae.js +313 -0
  675. package/tools/cli/installers/lib/ide/windsurf.js +258 -0
  676. package/tools/cli/installers/lib/modules/manager.js +751 -0
  677. package/tools/cli/lib/activation-builder.js +168 -0
  678. package/tools/cli/lib/agent/compiler.js +524 -0
  679. package/tools/cli/lib/agent/installer.js +735 -0
  680. package/tools/cli/lib/agent/template-engine.js +152 -0
  681. package/tools/cli/lib/agent-analyzer.js +109 -0
  682. package/tools/cli/lib/agent-party-generator.js +206 -0
  683. package/tools/cli/lib/cli-utils.js +210 -0
  684. package/tools/cli/lib/config.js +212 -0
  685. package/tools/cli/lib/file-ops.js +204 -0
  686. package/tools/cli/lib/platform-codes.js +116 -0
  687. package/tools/cli/lib/project-root.js +71 -0
  688. package/tools/cli/lib/replace-project-root.js +239 -0
  689. package/tools/cli/lib/ui.js +769 -0
  690. package/tools/cli/lib/xml-handler.js +229 -0
  691. package/tools/cli/lib/xml-to-markdown.js +82 -0
  692. package/tools/{yaml-format.js → cli/lib/yaml-format.js} +36 -66
  693. package/tools/cli/lib/yaml-xml-builder.js +606 -0
  694. package/tools/cli/regenerate-manifests.js +28 -0
  695. package/tools/cli/test-yaml-builder.js +43 -0
  696. package/tools/cli/xiaoma-cli.js +40 -0
  697. package/tools/flattener/aggregate.js +12 -30
  698. package/tools/flattener/binary.js +43 -46
  699. package/tools/flattener/discovery.js +15 -23
  700. package/tools/flattener/files.js +6 -6
  701. package/tools/flattener/ignoreRules.js +122 -127
  702. package/tools/flattener/main.js +140 -330
  703. package/tools/flattener/projectRoot.js +71 -81
  704. package/tools/flattener/prompts.js +10 -12
  705. package/tools/flattener/stats.helpers.js +63 -119
  706. package/tools/flattener/stats.js +2 -7
  707. package/tools/flattener/test-matrix.js +169 -228
  708. package/tools/flattener/xml.js +23 -31
  709. package/tools/format-workflow-md.js +263 -0
  710. package/tools/platform-codes.yaml +145 -0
  711. package/tools/schema/agent.js +389 -0
  712. package/tools/validate-agent-schema.js +110 -0
  713. package/tools/validate-bundles.js +87 -0
  714. package/tools/xiaoma-npx-wrapper.js +18 -24
  715. package/.claude/agents/tech-translator.md +0 -124
  716. package/.claude/settings.local.json +0 -37
  717. package/.idea/XiaoMa-Cli.iml +0 -9
  718. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  719. package/.idea/misc.xml +0 -6
  720. package/.idea/modules.xml +0 -8
  721. package/.idea/prettier.xml +0 -6
  722. package/.idea/vcs.xml +0 -7
  723. package/.idea/workspace.xml +0 -114
  724. package/.xiaoma-core/.coordinator-state.json +0 -19
  725. package/CLAUDE.md +0 -283
  726. package/JAVA-BACKEND-COMMANDS-REFERENCE.md +0 -300
  727. package/JAVA-BACKEND-ITERATION-GUIDE.md +0 -2116
  728. package/common/tasks/create-doc.md +0 -103
  729. package/common/tasks/execute-checklist.md +0 -88
  730. package/common/utils/bmad-doc-template.md +0 -327
  731. package/common/utils/workflow-management.md +0 -71
  732. package/dist/agents/analyst.txt +0 -6308
  733. package/dist/agents/architect.txt +0 -3911
  734. package/dist/agents/automation-orchestrator.txt +0 -396
  735. package/dist/agents/dev.txt +0 -576
  736. package/dist/agents/full-requirement-orchestrator.txt +0 -505
  737. package/dist/agents/pm.txt +0 -2224
  738. package/dist/agents/po.txt +0 -1358
  739. package/dist/agents/qa.txt +0 -2002
  740. package/dist/agents/sm.txt +0 -2061
  741. package/dist/agents/ux-expert.txt +0 -707
  742. package/dist/agents/workflow-executor.txt +0 -1029
  743. package/dist/agents/workflow-helper.txt +0 -93
  744. package/dist/agents/xiaoma-master.txt +0 -9008
  745. package/dist/agents/xiaoma-orchestrator.txt +0 -1523
  746. package/dist/teams/team-all.txt +0 -19525
  747. package/dist/teams/team-fullstack-with-database.txt +0 -21500
  748. package/dist/teams/team-fullstack.txt +0 -13831
  749. package/dist/teams/team-ide-minimal.txt +0 -6698
  750. package/dist/teams/team-no-ui.txt +0 -12379
  751. package/docs/GUIDING-PRINCIPLES.md +0 -91
  752. package/docs/architecture/workflow-coordinator-implementation.md +0 -1188
  753. package/docs/architecture-sharding-modification.md +0 -623
  754. package/docs/automated-requirements-analysis-outputs.md +0 -896
  755. package/docs/core-architecture.md +0 -219
  756. package/docs/enhanced-ide-development-workflow.md +0 -248
  757. package/docs/prd/workflow-coordinator-prd.md +0 -1214
  758. package/docs/user-guide.md +0 -530
  759. package/docs/versioning-and-releases.md +0 -155
  760. package/docs/versions.md +0 -48
  761. package/docs/working-in-the-brownfield.md +0 -597
  762. package/tools/api-server.js +0 -367
  763. package/tools/builders/web-builder.js +0 -830
  764. package/tools/bump-all-versions.js +0 -133
  765. package/tools/cli.js +0 -157
  766. package/tools/installer/README.md +0 -8
  767. package/tools/installer/bin/xiaoma.js +0 -477
  768. package/tools/installer/config/ide-agent-config.yaml +0 -58
  769. package/tools/installer/config/install.config.yaml +0 -164
  770. package/tools/installer/lib/config-loader.js +0 -286
  771. package/tools/installer/lib/file-manager.js +0 -446
  772. package/tools/installer/lib/ide-base-setup.js +0 -238
  773. package/tools/installer/lib/ide-setup.js +0 -2027
  774. package/tools/installer/lib/installer.js +0 -2333
  775. package/tools/installer/lib/memory-profiler.js +0 -235
  776. package/tools/installer/lib/module-manager.js +0 -116
  777. package/tools/installer/lib/resource-locator.js +0 -334
  778. package/tools/installer/package-lock.json +0 -715
  779. package/tools/installer/package.json +0 -44
  780. package/tools/lib/dependency-resolver.js +0 -186
  781. package/tools/lib/yaml-utils.js +0 -34
  782. package/tools/md-assets/web-agent-startup-instructions.md +0 -39
  783. package/tools/preview-release-notes.js +0 -74
  784. package/tools/setup-hooks.sh +0 -37
  785. package/tools/shared/bannerArt.js +0 -105
  786. package/tools/sync-installer-version.js +0 -41
  787. package/tools/sync-version.sh +0 -23
  788. package/tools/upgraders/v3-to-v4-upgrader.js +0 -753
  789. package/tools/version-bump.js +0 -100
  790. package/tools/workflow-coordinator/README.md +0 -38
  791. package/tools/workflow-coordinator/USAGE.md +0 -548
  792. package/tools/workflow-coordinator/package-lock.json +0 -4868
  793. package/tools/workflow-coordinator/package.json +0 -35
  794. package/tools/workflow-coordinator/src/api/server.js +0 -207
  795. package/tools/workflow-coordinator/src/controller/workflow-controller.js +0 -263
  796. package/tools/workflow-coordinator/src/index.js +0 -113
  797. package/tools/workflow-coordinator/src/parser/workflow-parser.js +0 -144
  798. package/tools/workflow-coordinator/src/utils/state-manager.js +0 -59
  799. package/tools/workflow-coordinator/src/utils/validator.js +0 -86
  800. package/tools/workflow-coordinator/test/integration-test.js +0 -266
  801. package/tools/workflow-coordinator/test/quick-test.js +0 -127
  802. package/xiaoma-core/agent-teams/team-all.yaml +0 -15
  803. package/xiaoma-core/agent-teams/team-fullstack-with-database.yaml +0 -27
  804. package/xiaoma-core/agent-teams/team-fullstack.yaml +0 -19
  805. package/xiaoma-core/agent-teams/team-ide-minimal.yaml +0 -11
  806. package/xiaoma-core/agent-teams/team-no-ui.yaml +0 -14
  807. package/xiaoma-core/agents/analyst.md +0 -91
  808. package/xiaoma-core/agents/architect.md +0 -85
  809. package/xiaoma-core/agents/automated-fix-validator.yaml +0 -579
  810. package/xiaoma-core/agents/automated-quality-validator.yaml +0 -549
  811. package/xiaoma-core/agents/automation-orchestrator.md +0 -353
  812. package/xiaoma-core/agents/dev.md +0 -79
  813. package/xiaoma-core/agents/enhanced-workflow-orchestrator.yaml +0 -304
  814. package/xiaoma-core/agents/full-requirement-orchestrator.md +0 -462
  815. package/xiaoma-core/agents/global-requirements-auditor.yaml +0 -520
  816. package/xiaoma-core/agents/intelligent-template-adapter.yaml +0 -389
  817. package/xiaoma-core/agents/issue-dispatcher.yaml +0 -627
  818. package/xiaoma-core/agents/master-execution-engine.yaml +0 -543
  819. package/xiaoma-core/agents/pm.md +0 -82
  820. package/xiaoma-core/agents/po.md +0 -77
  821. package/xiaoma-core/agents/qa.md +0 -88
  822. package/xiaoma-core/agents/requirements-coverage-auditor.yaml +0 -373
  823. package/xiaoma-core/agents/sm.md +0 -67
  824. package/xiaoma-core/agents/ux-expert.md +0 -67
  825. package/xiaoma-core/agents/workflow-executor.md +0 -1031
  826. package/xiaoma-core/agents/workflow-helper.md +0 -481
  827. package/xiaoma-core/agents/xiaoma-master.md +0 -108
  828. package/xiaoma-core/agents/xiaoma-orchestrator.md +0 -145
  829. package/xiaoma-core/checklists/architect-checklist.md +0 -440
  830. package/xiaoma-core/checklists/change-checklist.md +0 -184
  831. package/xiaoma-core/checklists/dev-completion-checklist.md +0 -324
  832. package/xiaoma-core/checklists/pm-checklist.md +0 -372
  833. package/xiaoma-core/checklists/po-master-checklist.md +0 -434
  834. package/xiaoma-core/checklists/po-story-validation-checklist.md +0 -219
  835. package/xiaoma-core/checklists/qa-approval-checklist.md +0 -393
  836. package/xiaoma-core/checklists/story-dod-checklist.md +0 -96
  837. package/xiaoma-core/checklists/story-draft-checklist.md +0 -155
  838. package/xiaoma-core/core-config.yaml +0 -23
  839. package/xiaoma-core/data/bmad-kb.md +0 -809
  840. package/xiaoma-core/data/brainstorming-techniques.md +0 -38
  841. package/xiaoma-core/data/elicitation-methods.md +0 -156
  842. package/xiaoma-core/data/technical-preferences.md +0 -5
  843. package/xiaoma-core/data/test-levels-framework.md +0 -148
  844. package/xiaoma-core/data/test-priorities-matrix.md +0 -174
  845. package/xiaoma-core/scripts/build-validation/pre-dev-validation.sh +0 -71
  846. package/xiaoma-core/scripts/build-validation/progressive-validation.sh +0 -88
  847. package/xiaoma-core/scripts/build-validation/quick-check.sh +0 -69
  848. package/xiaoma-core/tasks/advanced-elicitation.md +0 -119
  849. package/xiaoma-core/tasks/analyze-existing-database.md +0 -155
  850. package/xiaoma-core/tasks/apply-qa-fixes.md +0 -150
  851. package/xiaoma-core/tasks/automated-story-cycle.md +0 -370
  852. package/xiaoma-core/tasks/batch-story-generation.md +0 -354
  853. package/xiaoma-core/tasks/brownfield-create-epic.md +0 -162
  854. package/xiaoma-core/tasks/brownfield-create-story.md +0 -149
  855. package/xiaoma-core/tasks/correct-course.md +0 -72
  856. package/xiaoma-core/tasks/create-brownfield-story.md +0 -314
  857. package/xiaoma-core/tasks/create-database-design.md +0 -161
  858. package/xiaoma-core/tasks/create-deep-research-prompt.md +0 -280
  859. package/xiaoma-core/tasks/create-enhanced-story-with-database.md +0 -250
  860. package/xiaoma-core/tasks/create-next-story.md +0 -114
  861. package/xiaoma-core/tasks/document-project.md +0 -345
  862. package/xiaoma-core/tasks/facilitate-brainstorming-session.md +0 -138
  863. package/xiaoma-core/tasks/generate-ai-frontend-prompt.md +0 -53
  864. package/xiaoma-core/tasks/generate-database-ddl.md +0 -240
  865. package/xiaoma-core/tasks/generate-database-entities.md +0 -501
  866. package/xiaoma-core/tasks/generate-rag-questions.md +0 -312
  867. package/xiaoma-core/tasks/index-docs.md +0 -175
  868. package/xiaoma-core/tasks/kb-mode-interaction.md +0 -77
  869. package/xiaoma-core/tasks/nfr-assess.md +0 -345
  870. package/xiaoma-core/tasks/project-integration-testing.md +0 -477
  871. package/xiaoma-core/tasks/qa-gate.md +0 -163
  872. package/xiaoma-core/tasks/requirement-analysis-with-rag.md +0 -1318
  873. package/xiaoma-core/tasks/requirements-coverage-audit.md +0 -198
  874. package/xiaoma-core/tasks/review-story.md +0 -316
  875. package/xiaoma-core/tasks/risk-profile.md +0 -355
  876. package/xiaoma-core/tasks/serial-development-orchestration.md +0 -426
  877. package/xiaoma-core/tasks/shard-doc.md +0 -187
  878. package/xiaoma-core/tasks/test-design.md +0 -176
  879. package/xiaoma-core/tasks/trace-requirements.md +0 -266
  880. package/xiaoma-core/tasks/validate-next-story.md +0 -136
  881. package/xiaoma-core/templates/api-design-tmpl.yaml +0 -704
  882. package/xiaoma-core/templates/architecture-tmpl.yaml +0 -650
  883. package/xiaoma-core/templates/brainstorming-output-tmpl.yaml +0 -156
  884. package/xiaoma-core/templates/brownfield-architecture-tmpl.yaml +0 -476
  885. package/xiaoma-core/templates/brownfield-prd-tmpl.yaml +0 -280
  886. package/xiaoma-core/templates/competitor-analysis-tmpl.yaml +0 -336
  887. package/xiaoma-core/templates/database-design-tmpl.yaml +0 -266
  888. package/xiaoma-core/templates/enhanced-story-with-database-tmpl.yaml +0 -428
  889. package/xiaoma-core/templates/front-end-architecture-tmpl.yaml +0 -272
  890. package/xiaoma-core/templates/front-end-spec-tmpl.yaml +0 -354
  891. package/xiaoma-core/templates/fullstack-architecture-tmpl.yaml +0 -925
  892. package/xiaoma-core/templates/global-qa-monitoring-tmpl.yaml +0 -443
  893. package/xiaoma-core/templates/market-research-tmpl.yaml +0 -252
  894. package/xiaoma-core/templates/maven-lombok-template.xml +0 -111
  895. package/xiaoma-core/templates/prd-tmpl.yaml +0 -202
  896. package/xiaoma-core/templates/project-brief-tmpl.yaml +0 -221
  897. package/xiaoma-core/templates/qa-gate-tmpl.yaml +0 -102
  898. package/xiaoma-core/templates/rag-knowledge-tmpl.yaml +0 -569
  899. package/xiaoma-core/templates/rag-questions-tmpl.yaml +0 -949
  900. package/xiaoma-core/templates/requirements-coverage-audit.yaml +0 -330
  901. package/xiaoma-core/templates/start-enhanced-workflow.yaml +0 -347
  902. package/xiaoma-core/templates/story-tmpl.yaml +0 -137
  903. package/xiaoma-core/workflows/automated-requirements-analysis.yaml +0 -2149
  904. package/xiaoma-core/workflows/automated-requirements-development.yaml +0 -739
  905. package/xiaoma-core/workflows/automated-story-development.yaml +0 -1264
  906. package/xiaoma-core/workflows/brownfield-fullstack.yaml +0 -298
  907. package/xiaoma-core/workflows/brownfield-service.yaml +0 -188
  908. package/xiaoma-core/workflows/brownfield-ui.yaml +0 -198
  909. package/xiaoma-core/workflows/enhanced-fullstack-with-database.yaml +0 -427
  910. package/xiaoma-core/workflows/enhanced-fullstack-with-qa-loop.yaml +0 -766
  911. package/xiaoma-core/workflows/full-requirement-automation.yaml +0 -1305
  912. package/xiaoma-core/workflows/greenfield-fullstack.yaml +0 -241
  913. package/xiaoma-core/workflows/greenfield-service.yaml +0 -207
  914. package/xiaoma-core/workflows/greenfield-ui.yaml +0 -236
@@ -1,3911 +0,0 @@
1
- # Web Agent Bundle Instructions
2
-
3
- You are now operating as a specialized AI agent from the XiaoMa-Cli framework. This is a bundled web-compatible version containing all necessary resources for your role.
4
-
5
- ## Important Instructions
6
-
7
- 1. **Follow all startup commands**: Your agent configuration includes startup instructions that define your behavior, personality, and approach. These MUST be followed exactly.
8
-
9
- 2. **Resource Navigation**: This bundle contains all resources you need. Resources are marked with tags like:
10
-
11
- - `==================== START: .xiaoma-core/folder/filename.md ====================`
12
- - `==================== END: .xiaoma-core/folder/filename.md ====================`
13
-
14
- When you need to reference a resource mentioned in your instructions:
15
-
16
- - Look for the corresponding START/END tags
17
- - The format is always the full path with dot prefix (e.g., `.xiaoma-core/personas/analyst.md`, `.xiaoma-core/tasks/create-story.md`)
18
- - If a section is specified (e.g., `{root}/tasks/create-story.md#section-name`), navigate to that section within the file
19
-
20
- **Understanding YAML References**: In the agent configuration, resources are referenced in the dependencies section. For example:
21
-
22
- ```yaml
23
- dependencies:
24
- utils:
25
- - template-format
26
- tasks:
27
- - create-story
28
- ```
29
-
30
- These references map directly to bundle sections:
31
-
32
- - `utils: template-format` → Look for `==================== START: .xiaoma-core/utils/template-format.md ====================`
33
- - `tasks: create-story` → Look for `==================== START: .xiaoma-core/tasks/create-story.md ====================`
34
-
35
- 3. **Execution Context**: You are operating in a web environment. All your capabilities and knowledge are contained within this bundle. Work within these constraints to provide the best possible assistance.
36
-
37
- 4. **Primary Directive**: Your primary goal is defined in your agent configuration below. Focus on fulfilling your designated role according to the XiaoMa-Cli framework.
38
-
39
- ---
40
-
41
-
42
- ==================== START: .xiaoma-core/agents/architect.md ====================
43
- # architect
44
-
45
- CRITICAL: Read the full YAML, start activation to alter your state of being, follow startup section instructions, stay in this being until told to exit this mode:
46
-
47
- ```yaml
48
- activation-instructions:
49
- - 仅当用户通过命令或任务请求选择它们执行时才加载依赖文件
50
- - agent.customization 字段的优先级始终高于任何冲突的指令
51
- - 在列出任务/模板或在对话中呈现选项时,始终以编号选项列表的形式显示,允许用户输入数字进行选择或执行
52
- - 保持角色!
53
- agent:
54
- name: xiaojia
55
- id: architect
56
- title: 架构师
57
- icon: 🏗️
58
- whenToUse: 用于系统设计、架构文档、技术选型、API 设计和基础设施规划
59
- customization: null
60
- persona:
61
- role: 整体系统架构师与全栈技术领导者
62
- style: 全面、务实、以用户为中心、技术深入但易于理解
63
- identity: 精通整体应用设计的大师,连接前端、后端、基础设施及其中间的一切
64
- focus: 完整的系统架构、跨栈优化、务实的技术选型
65
- core_principles:
66
- - 整体系统思维 - 将每个组件都视为更大系统的一部分
67
- - 用户体验驱动架构 - 从用户旅程开始,然后反向构建
68
- - 务实的技术选型 - 在可能的情况下选择成熟的技术,在必要时选择新兴的技术
69
- - 渐进式复杂性 - 设计出启动简单但可扩展的系统
70
- - 跨栈性能焦点 - 在所有层面上进行整体优化
71
- - 开发者体验优先 - 提高开发者的生产力
72
- - 层层设防的安全 - 实现深度防御
73
- - 以数据为中心的设计 - 让数据需求驱动架构
74
- - 成本意识工程 - 平衡技术理想与财务现实
75
- - 演进式架构 - 为变更和适应而设计
76
- commands:
77
- - help: 显示以下命令的编号列表以供选择
78
- - create-backend-architecture: 使用 create-doc 和 architecture-tmpl.yaml
79
- - create-brownfield-architecture: 使用 create-doc 和 brownfield-architecture-tmpl.yaml
80
- - create-front-end-architecture: 使用 create-doc 和 front-end-architecture-tmpl.yaml
81
- - create-full-stack-architecture: 使用 create-doc 和 fullstack-architecture-tmpl.yaml
82
- - doc-out: 将完整文档输出到当前目标文件
83
- - document-project: 执行任务 document-project.md
84
- - execute-checklist {checklist}: 运行任务 execute-checklist (默认为->architect-checklist)
85
- - research {topic}: 执行任务 create-deep-research-prompt
86
- - shard-prd: 为提供的 architecture.md 运行任务 shard-doc.md (如果未找到则询问)
87
- - shard-doc: 执行任务 shard-doc.md 切分大型文档到多个小文档
88
- - yolo: 切换 Yolo 模式
89
- - exit: 作为架构师道别,然后放弃扮演此角色
90
- dependencies:
91
- checklists:
92
- - architect-checklist.md
93
- data:
94
- - technical-preferences.md
95
- tasks:
96
- - create-deep-research-prompt.md
97
- - create-doc.md
98
- - document-project.md
99
- - execute-checklist.md
100
- - shard-doc.md
101
- templates:
102
- - architecture-tmpl.yaml
103
- - brownfield-architecture-tmpl.yaml
104
- - front-end-architecture-tmpl.yaml
105
- - fullstack-architecture-tmpl.yaml
106
- ```
107
- ==================== END: .xiaoma-core/agents/architect.md ====================
108
-
109
- ==================== START: .xiaoma-core/tasks/create-deep-research-prompt.md ====================
110
- <!-- Powered by XiaoMa™ Core -->
111
-
112
- # Create Deep Research Prompt Task
113
-
114
- This task helps create comprehensive research prompts for various types of deep analysis. It can process inputs from brainstorming sessions, project briefs, market research, or specific research questions to generate targeted prompts for deeper investigation.
115
-
116
- ## Purpose
117
-
118
- Generate well-structured research prompts that:
119
-
120
- - Define clear research objectives and scope
121
- - Specify appropriate research methodologies
122
- - Outline expected deliverables and formats
123
- - Guide systematic investigation of complex topics
124
- - Ensure actionable insights are captured
125
-
126
- ## Research Type Selection
127
-
128
- CRITICAL: First, help the user select the most appropriate research focus based on their needs and any input documents they've provided.
129
-
130
- ### 1. Research Focus Options
131
-
132
- Present these numbered options to the user:
133
-
134
- 1. **Product Validation Research**
135
- - Validate product hypotheses and market fit
136
- - Test assumptions about user needs and solutions
137
- - Assess technical and business feasibility
138
- - Identify risks and mitigation strategies
139
-
140
- 2. **Market Opportunity Research**
141
- - Analyze market size and growth potential
142
- - Identify market segments and dynamics
143
- - Assess market entry strategies
144
- - Evaluate timing and market readiness
145
-
146
- 3. **User & Customer Research**
147
- - Deep dive into user personas and behaviors
148
- - Understand jobs-to-be-done and pain points
149
- - Map customer journeys and touchpoints
150
- - Analyze willingness to pay and value perception
151
-
152
- 4. **Competitive Intelligence Research**
153
- - Detailed competitor analysis and positioning
154
- - Feature and capability comparisons
155
- - Business model and strategy analysis
156
- - Identify competitive advantages and gaps
157
-
158
- 5. **Technology & Innovation Research**
159
- - Assess technology trends and possibilities
160
- - Evaluate technical approaches and architectures
161
- - Identify emerging technologies and disruptions
162
- - Analyze build vs. buy vs. partner options
163
-
164
- 6. **Industry & Ecosystem Research**
165
- - Map industry value chains and dynamics
166
- - Identify key players and relationships
167
- - Analyze regulatory and compliance factors
168
- - Understand partnership opportunities
169
-
170
- 7. **Strategic Options Research**
171
- - Evaluate different strategic directions
172
- - Assess business model alternatives
173
- - Analyze go-to-market strategies
174
- - Consider expansion and scaling paths
175
-
176
- 8. **Risk & Feasibility Research**
177
- - Identify and assess various risk factors
178
- - Evaluate implementation challenges
179
- - Analyze resource requirements
180
- - Consider regulatory and legal implications
181
-
182
- 9. **Custom Research Focus**
183
- - User-defined research objectives
184
- - Specialized domain investigation
185
- - Cross-functional research needs
186
-
187
- ### 2. Input Processing
188
-
189
- **If Project Brief provided:**
190
-
191
- - Extract key product concepts and goals
192
- - Identify target users and use cases
193
- - Note technical constraints and preferences
194
- - Highlight uncertainties and assumptions
195
-
196
- **If Brainstorming Results provided:**
197
-
198
- - Synthesize main ideas and themes
199
- - Identify areas needing validation
200
- - Extract hypotheses to test
201
- - Note creative directions to explore
202
-
203
- **If Market Research provided:**
204
-
205
- - Build on identified opportunities
206
- - Deepen specific market insights
207
- - Validate initial findings
208
- - Explore adjacent possibilities
209
-
210
- **If Starting Fresh:**
211
-
212
- - Gather essential context through questions
213
- - Define the problem space
214
- - Clarify research objectives
215
- - Establish success criteria
216
-
217
- ## Process
218
-
219
- ### 3. Research Prompt Structure
220
-
221
- CRITICAL: collaboratively develop a comprehensive research prompt with these components.
222
-
223
- #### A. Research Objectives
224
-
225
- CRITICAL: collaborate with the user to articulate clear, specific objectives for the research.
226
-
227
- - Primary research goal and purpose
228
- - Key decisions the research will inform
229
- - Success criteria for the research
230
- - Constraints and boundaries
231
-
232
- #### B. Research Questions
233
-
234
- CRITICAL: collaborate with the user to develop specific, actionable research questions organized by theme.
235
-
236
- **Core Questions:**
237
-
238
- - Central questions that must be answered
239
- - Priority ranking of questions
240
- - Dependencies between questions
241
-
242
- **Supporting Questions:**
243
-
244
- - Additional context-building questions
245
- - Nice-to-have insights
246
- - Future-looking considerations
247
-
248
- #### C. Research Methodology
249
-
250
- **Data Collection Methods:**
251
-
252
- - Secondary research sources
253
- - Primary research approaches (if applicable)
254
- - Data quality requirements
255
- - Source credibility criteria
256
-
257
- **Analysis Frameworks:**
258
-
259
- - Specific frameworks to apply
260
- - Comparison criteria
261
- - Evaluation methodologies
262
- - Synthesis approaches
263
-
264
- #### D. Output Requirements
265
-
266
- **Format Specifications:**
267
-
268
- - Executive summary requirements
269
- - Detailed findings structure
270
- - Visual/tabular presentations
271
- - Supporting documentation
272
-
273
- **Key Deliverables:**
274
-
275
- - Must-have sections and insights
276
- - Decision-support elements
277
- - Action-oriented recommendations
278
- - Risk and uncertainty documentation
279
-
280
- ### 4. Prompt Generation
281
-
282
- **Research Prompt Template:**
283
-
284
- ```markdown
285
- ## Research Objective
286
-
287
- [Clear statement of what this research aims to achieve]
288
-
289
- ## Background Context
290
-
291
- [Relevant information from project brief, brainstorming, or other inputs]
292
-
293
- ## Research Questions
294
-
295
- ### Primary Questions (Must Answer)
296
-
297
- 1. [Specific, actionable question]
298
- 2. [Specific, actionable question]
299
- ...
300
-
301
- ### Secondary Questions (Nice to Have)
302
-
303
- 1. [Supporting question]
304
- 2. [Supporting question]
305
- ...
306
-
307
- ## Research Methodology
308
-
309
- ### Information Sources
310
-
311
- - [Specific source types and priorities]
312
-
313
- ### Analysis Frameworks
314
-
315
- - [Specific frameworks to apply]
316
-
317
- ### Data Requirements
318
-
319
- - [Quality, recency, credibility needs]
320
-
321
- ## Expected Deliverables
322
-
323
- ### Executive Summary
324
-
325
- - Key findings and insights
326
- - Critical implications
327
- - Recommended actions
328
-
329
- ### Detailed Analysis
330
-
331
- [Specific sections needed based on research type]
332
-
333
- ### Supporting Materials
334
-
335
- - Data tables
336
- - Comparison matrices
337
- - Source documentation
338
-
339
- ## Success Criteria
340
-
341
- [How to evaluate if research achieved its objectives]
342
-
343
- ## Timeline and Priority
344
-
345
- [If applicable, any time constraints or phasing]
346
- ```
347
-
348
- ### 5. Review and Refinement
349
-
350
- 1. **Present Complete Prompt**
351
- - Show the full research prompt
352
- - Explain key elements and rationale
353
- - Highlight any assumptions made
354
-
355
- 2. **Gather Feedback**
356
- - Are the objectives clear and correct?
357
- - Do the questions address all concerns?
358
- - Is the scope appropriate?
359
- - Are output requirements sufficient?
360
-
361
- 3. **Refine as Needed**
362
- - Incorporate user feedback
363
- - Adjust scope or focus
364
- - Add missing elements
365
- - Clarify ambiguities
366
-
367
- ### 6. Next Steps Guidance
368
-
369
- **Execution Options:**
370
-
371
- 1. **Use with AI Research Assistant**: Provide this prompt to an AI model with research capabilities
372
- 2. **Guide Human Research**: Use as a framework for manual research efforts
373
- 3. **Hybrid Approach**: Combine AI and human research using this structure
374
-
375
- **Integration Points:**
376
-
377
- - How findings will feed into next phases
378
- - Which team members should review results
379
- - How to validate findings
380
- - When to revisit or expand research
381
-
382
- ## Important Notes
383
-
384
- - The quality of the research prompt directly impacts the quality of insights gathered
385
- - Be specific rather than general in research questions
386
- - Consider both current state and future implications
387
- - Balance comprehensiveness with focus
388
- - Document assumptions and limitations clearly
389
- - Plan for iterative refinement based on initial findings
390
- ==================== END: .xiaoma-core/tasks/create-deep-research-prompt.md ====================
391
-
392
- ==================== START: .xiaoma-core/tasks/create-doc.md ====================
393
- <!-- Powered by XIAOMA™ Core -->
394
-
395
- # Create Document from Template (YAML Driven)
396
-
397
- ## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
398
-
399
- **THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
400
-
401
- When this task is invoked:
402
-
403
- 1. **DISABLE ALL EFFICIENCY OPTIMIZATIONS** - This workflow requires full user interaction
404
- 2. **MANDATORY STEP-BY-STEP EXECUTION** - Each section must be processed sequentially with user feedback
405
- 3. **ELICITATION IS REQUIRED** - When `elicit: true`, you MUST use the 1-9 format and wait for user response
406
- 4. **NO SHORTCUTS ALLOWED** - Complete documents cannot be created without following this workflow
407
-
408
- **VIOLATION INDICATOR:** If you create a complete document without user interaction, you have violated this workflow.
409
-
410
- ## Critical: Template Discovery
411
-
412
- If a YAML Template has not been provided, list all templates from .xiaoma-core/templates or ask the user to provide another.
413
-
414
- ## CRITICAL: Mandatory Elicitation Format
415
-
416
- **When `elicit: true`, this is a HARD STOP requiring user interaction:**
417
-
418
- **YOU MUST:**
419
-
420
- 1. Present section content
421
- 2. Provide detailed rationale (explain trade-offs, assumptions, decisions made)
422
- 3. **STOP and present numbered options 1-9:**
423
- - **Option 1:** Always "Proceed to next section"
424
- - **Options 2-9:** Select 8 methods from data/elicitation-methods
425
- - End with: "Select 1-9 or just type your question/feedback:"
426
- 4. **WAIT FOR USER RESPONSE** - Do not proceed until user selects option or provides feedback
427
-
428
- **WORKFLOW VIOLATION:** Creating content for elicit=true sections without user interaction violates this task.
429
-
430
- **NEVER ask yes/no questions or use any other format.**
431
-
432
- ## Processing Flow
433
-
434
- 1. **Parse YAML template** - Load template metadata and sections
435
- 2. **Set preferences** - Show current mode (Interactive), confirm output file
436
- 3. **Process each section:**
437
- - Skip if condition unmet
438
- - Check agent permissions (owner/editors) - note if section is restricted to specific agents
439
- - Draft content using section instruction
440
- - Present content + detailed rationale
441
- - **IF elicit: true** → MANDATORY 1-9 options format
442
- - Save to file if possible
443
- 4. **Continue until complete**
444
-
445
- ## Detailed Rationale Requirements
446
-
447
- When presenting section content, ALWAYS include rationale that explains:
448
-
449
- - Trade-offs and choices made (what was chosen over alternatives and why)
450
- - Key assumptions made during drafting
451
- - Interesting or questionable decisions that need user attention
452
- - Areas that might need validation
453
-
454
- ## Elicitation Results Flow
455
-
456
- After user selects elicitation method (2-9):
457
-
458
- 1. Execute method from data/elicitation-methods
459
- 2. Present results with insights
460
- 3. Offer options:
461
- - **1. Apply changes and update section**
462
- - **2. Return to elicitation menu**
463
- - **3. Ask any questions or engage further with this elicitation**
464
-
465
- ## Agent Permissions
466
-
467
- When processing sections with agent permission fields:
468
-
469
- - **owner**: Note which agent role initially creates/populates the section
470
- - **editors**: List agent roles allowed to modify the section
471
- - **readonly**: Mark sections that cannot be modified after creation
472
-
473
- **For sections with restricted access:**
474
-
475
- - Include a note in the generated document indicating the responsible agent
476
- - Example: "_(This section is owned by dev-agent and can only be modified by dev-agent)_"
477
-
478
- ## YOLO Mode
479
-
480
- User can type `#yolo` to toggle to YOLO mode (process all sections at once).
481
-
482
- ## CRITICAL REMINDERS
483
-
484
- **❌ NEVER:**
485
-
486
- - Ask yes/no questions for elicitation
487
- - Use any format other than 1-9 numbered options
488
- - Create new elicitation methods
489
-
490
- **✅ ALWAYS:**
491
-
492
- - Use exact 1-9 format when elicit: true
493
- - Select options 2-9 from data/elicitation-methods only
494
- - Provide detailed rationale explaining decisions
495
- - End with "Select 1-9 or just type your question/feedback:"
496
- ==================== END: .xiaoma-core/tasks/create-doc.md ====================
497
-
498
- ==================== START: .xiaoma-core/tasks/document-project.md ====================
499
- <!-- Powered by XiaoMa™ Core -->
500
-
501
- # Document an Existing Project
502
-
503
- ## Purpose
504
-
505
- Generate comprehensive documentation for existing projects optimized for AI development agents. This task creates structured reference materials that enable AI agents to understand project context, conventions, and patterns for effective contribution to any codebase.
506
-
507
- ## Task Instructions
508
-
509
- ### 1. Initial Project Analysis
510
-
511
- **CRITICAL:** First, check if a PRD or requirements document exists in context. If yes, use it to focus your documentation efforts on relevant areas only.
512
-
513
- **IF PRD EXISTS**:
514
-
515
- - Review the PRD to understand what enhancement/feature is planned
516
- - Identify which modules, services, or areas will be affected
517
- - Focus documentation ONLY on these relevant areas
518
- - Skip unrelated parts of the codebase to keep docs lean
519
-
520
- **IF NO PRD EXISTS**:
521
- Ask the user:
522
-
523
- "I notice you haven't provided a PRD or requirements document. To create more focused and useful documentation, I recommend one of these options:
524
-
525
- 1. **Create a PRD first** - Would you like me to help create a brownfield PRD before documenting? This helps focus documentation on relevant areas.
526
-
527
- 2. **Provide existing requirements** - Do you have a requirements document, epic, or feature description you can share?
528
-
529
- 3. **Describe the focus** - Can you briefly describe what enhancement or feature you're planning? For example:
530
- - 'Adding payment processing to the user service'
531
- - 'Refactoring the authentication module'
532
- - 'Integrating with a new third-party API'
533
-
534
- 4. **Document everything** - Or should I proceed with comprehensive documentation of the entire codebase? (Note: This may create excessive documentation for large projects)
535
-
536
- Please let me know your preference, or I can proceed with full documentation if you prefer."
537
-
538
- Based on their response:
539
-
540
- - If they choose option 1-3: Use that context to focus documentation
541
- - If they choose option 4 or decline: Proceed with comprehensive analysis below
542
-
543
- Begin by conducting analysis of the existing project. Use available tools to:
544
-
545
- 1. **Project Structure Discovery**: Examine the root directory structure, identify main folders, and understand the overall organization
546
- 2. **Technology Stack Identification**: Look for package.json, requirements.txt, Cargo.toml, pom.xml, etc. to identify languages, frameworks, and dependencies
547
- 3. **Build System Analysis**: Find build scripts, CI/CD configurations, and development commands
548
- 4. **Existing Documentation Review**: Check for README files, docs folders, and any existing documentation
549
- 5. **Code Pattern Analysis**: Sample key files to understand coding patterns, naming conventions, and architectural approaches
550
-
551
- Ask the user these elicitation questions to better understand their needs:
552
-
553
- - What is the primary purpose of this project?
554
- - Are there any specific areas of the codebase that are particularly complex or important for agents to understand?
555
- - What types of tasks do you expect AI agents to perform on this project? (e.g., bug fixes, feature additions, refactoring, testing)
556
- - Are there any existing documentation standards or formats you prefer?
557
- - What level of technical detail should the documentation target? (junior developers, senior developers, mixed team)
558
- - Is there a specific feature or enhancement you're planning? (This helps focus documentation)
559
-
560
- ### 2. Deep Codebase Analysis
561
-
562
- CRITICAL: Before generating documentation, conduct extensive analysis of the existing codebase:
563
-
564
- 1. **Explore Key Areas**:
565
- - Entry points (main files, index files, app initializers)
566
- - Configuration files and environment setup
567
- - Package dependencies and versions
568
- - Build and deployment configurations
569
- - Test suites and coverage
570
-
571
- 2. **Ask Clarifying Questions**:
572
- - "I see you're using [technology X]. Are there any custom patterns or conventions I should document?"
573
- - "What are the most critical/complex parts of this system that developers struggle with?"
574
- - "Are there any undocumented 'tribal knowledge' areas I should capture?"
575
- - "What technical debt or known issues should I document?"
576
- - "Which parts of the codebase change most frequently?"
577
-
578
- 3. **Map the Reality**:
579
- - Identify ACTUAL patterns used (not theoretical best practices)
580
- - Find where key business logic lives
581
- - Locate integration points and external dependencies
582
- - Document workarounds and technical debt
583
- - Note areas that differ from standard patterns
584
-
585
- **IF PRD PROVIDED**: Also analyze what would need to change for the enhancement
586
-
587
- ### 3. Core Documentation Generation
588
-
589
- [[LLM: Generate a comprehensive BROWNFIELD architecture document that reflects the ACTUAL state of the codebase.
590
-
591
- **CRITICAL**: This is NOT an aspirational architecture document. Document what EXISTS, including:
592
-
593
- - Technical debt and workarounds
594
- - Inconsistent patterns between different parts
595
- - Legacy code that can't be changed
596
- - Integration constraints
597
- - Performance bottlenecks
598
-
599
- **Document Structure**:
600
-
601
- # [Project Name] Brownfield Architecture Document
602
-
603
- ## Introduction
604
-
605
- This document captures the CURRENT STATE of the [Project Name] codebase, including technical debt, workarounds, and real-world patterns. It serves as a reference for AI agents working on enhancements.
606
-
607
- ### Document Scope
608
-
609
- [If PRD provided: "Focused on areas relevant to: {enhancement description}"]
610
- [If no PRD: "Comprehensive documentation of entire system"]
611
-
612
- ### Change Log
613
-
614
- | Date | Version | Description | Author |
615
- | ------ | ------- | --------------------------- | --------- |
616
- | [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
617
-
618
- ## Quick Reference - Key Files and Entry Points
619
-
620
- ### Critical Files for Understanding the System
621
-
622
- - **Main Entry**: `src/index.js` (or actual entry point)
623
- - **Configuration**: `config/app.config.js`, `.env.example`
624
- - **Core Business Logic**: `src/services/`, `src/domain/`
625
- - **API Definitions**: `src/routes/` or link to OpenAPI spec
626
- - **Database Models**: `src/models/` or link to schema files
627
- - **Key Algorithms**: [List specific files with complex logic]
628
-
629
- ### If PRD Provided - Enhancement Impact Areas
630
-
631
- [Highlight which files/modules will be affected by the planned enhancement]
632
-
633
- ## High Level Architecture
634
-
635
- ### Technical Summary
636
-
637
- ### Actual Tech Stack (from package.json/requirements.txt)
638
-
639
- | Category | Technology | Version | Notes |
640
- | --------- | ---------- | ------- | -------------------------- |
641
- | Runtime | Node.js | 16.x | [Any constraints] |
642
- | Framework | Express | 4.18.2 | [Custom middleware?] |
643
- | Database | PostgreSQL | 13 | [Connection pooling setup] |
644
-
645
- etc...
646
-
647
- ### Repository Structure Reality Check
648
-
649
- - Type: [Monorepo/Polyrepo/Hybrid]
650
- - Package Manager: [npm/yarn/pnpm]
651
- - Notable: [Any unusual structure decisions]
652
-
653
- ## Source Tree and Module Organization
654
-
655
- ### Project Structure (Actual)
656
-
657
- ```text
658
- project-root/
659
- ├── src/
660
- │ ├── controllers/ # HTTP request handlers
661
- │ ├── services/ # Business logic (NOTE: inconsistent patterns between user and payment services)
662
- │ ├── models/ # Database models (Sequelize)
663
- │ ├── utils/ # Mixed bag - needs refactoring
664
- │ └── legacy/ # DO NOT MODIFY - old payment system still in use
665
- ├── tests/ # Jest tests (60% coverage)
666
- ├── scripts/ # Build and deployment scripts
667
- └── config/ # Environment configs
668
- ```
669
-
670
- ### Key Modules and Their Purpose
671
-
672
- - **User Management**: `src/services/userService.js` - Handles all user operations
673
- - **Authentication**: `src/middleware/auth.js` - JWT-based, custom implementation
674
- - **Payment Processing**: `src/legacy/payment.js` - CRITICAL: Do not refactor, tightly coupled
675
- - **[List other key modules with their actual files]**
676
-
677
- ## Data Models and APIs
678
-
679
- ### Data Models
680
-
681
- Instead of duplicating, reference actual model files:
682
-
683
- - **User Model**: See `src/models/User.js`
684
- - **Order Model**: See `src/models/Order.js`
685
- - **Related Types**: TypeScript definitions in `src/types/`
686
-
687
- ### API Specifications
688
-
689
- - **OpenAPI Spec**: `docs/api/openapi.yaml` (if exists)
690
- - **Postman Collection**: `docs/api/postman-collection.json`
691
- - **Manual Endpoints**: [List any undocumented endpoints discovered]
692
-
693
- ## Technical Debt and Known Issues
694
-
695
- ### Critical Technical Debt
696
-
697
- 1. **Payment Service**: Legacy code in `src/legacy/payment.js` - tightly coupled, no tests
698
- 2. **User Service**: Different pattern than other services, uses callbacks instead of promises
699
- 3. **Database Migrations**: Manually tracked, no proper migration tool
700
- 4. **[Other significant debt]**
701
-
702
- ### Workarounds and Gotchas
703
-
704
- - **Environment Variables**: Must set `NODE_ENV=production` even for staging (historical reason)
705
- - **Database Connections**: Connection pool hardcoded to 10, changing breaks payment service
706
- - **[Other workarounds developers need to know]**
707
-
708
- ## Integration Points and External Dependencies
709
-
710
- ### External Services
711
-
712
- | Service | Purpose | Integration Type | Key Files |
713
- | -------- | -------- | ---------------- | ------------------------------ |
714
- | Stripe | Payments | REST API | `src/integrations/stripe/` |
715
- | SendGrid | Emails | SDK | `src/services/emailService.js` |
716
-
717
- etc...
718
-
719
- ### Internal Integration Points
720
-
721
- - **Frontend Communication**: REST API on port 3000, expects specific headers
722
- - **Background Jobs**: Redis queue, see `src/workers/`
723
- - **[Other integrations]**
724
-
725
- ## Development and Deployment
726
-
727
- ### Local Development Setup
728
-
729
- 1. Actual steps that work (not ideal steps)
730
- 2. Known issues with setup
731
- 3. Required environment variables (see `.env.example`)
732
-
733
- ### Build and Deployment Process
734
-
735
- - **Build Command**: `npm run build` (webpack config in `webpack.config.js`)
736
- - **Deployment**: Manual deployment via `scripts/deploy.sh`
737
- - **Environments**: Dev, Staging, Prod (see `config/environments/`)
738
-
739
- ## Testing Reality
740
-
741
- ### Current Test Coverage
742
-
743
- - Unit Tests: 60% coverage (Jest)
744
- - Integration Tests: Minimal, in `tests/integration/`
745
- - E2E Tests: None
746
- - Manual Testing: Primary QA method
747
-
748
- ### Running Tests
749
-
750
- ```bash
751
- npm test # Runs unit tests
752
- npm run test:integration # Runs integration tests (requires local DB)
753
- ```
754
-
755
- ## If Enhancement PRD Provided - Impact Analysis
756
-
757
- ### Files That Will Need Modification
758
-
759
- Based on the enhancement requirements, these files will be affected:
760
-
761
- - `src/services/userService.js` - Add new user fields
762
- - `src/models/User.js` - Update schema
763
- - `src/routes/userRoutes.js` - New endpoints
764
- - [etc...]
765
-
766
- ### New Files/Modules Needed
767
-
768
- - `src/services/newFeatureService.js` - New business logic
769
- - `src/models/NewFeature.js` - New data model
770
- - [etc...]
771
-
772
- ### Integration Considerations
773
-
774
- - Will need to integrate with existing auth middleware
775
- - Must follow existing response format in `src/utils/responseFormatter.js`
776
- - [Other integration points]
777
-
778
- ## Appendix - Useful Commands and Scripts
779
-
780
- ### Frequently Used Commands
781
-
782
- ```bash
783
- npm run dev # Start development server
784
- npm run build # Production build
785
- npm run migrate # Run database migrations
786
- npm run seed # Seed test data
787
- ```
788
-
789
- ### Debugging and Troubleshooting
790
-
791
- - **Logs**: Check `logs/app.log` for application logs
792
- - **Debug Mode**: Set `DEBUG=app:*` for verbose logging
793
- - **Common Issues**: See `docs/troubleshooting.md`]]
794
-
795
- ### 4. Document Delivery
796
-
797
- 1. **In Web UI (Gemini, ChatGPT, Claude)**:
798
- - Present the entire document in one response (or multiple if too long)
799
- - Tell user to copy and save as `docs/brownfield-architecture.md` or `docs/project-architecture.md`
800
- - Mention it can be sharded later in IDE if needed
801
-
802
- 2. **In IDE Environment**:
803
- - Create the document as `docs/brownfield-architecture.md`
804
- - Inform user this single document contains all architectural information
805
- - Can be sharded later using PO agent if desired
806
-
807
- The document should be comprehensive enough that future agents can understand:
808
-
809
- - The actual state of the system (not idealized)
810
- - Where to find key files and logic
811
- - What technical debt exists
812
- - What constraints must be respected
813
- - If PRD provided: What needs to change for the enhancement]]
814
-
815
- ### 5. Quality Assurance
816
-
817
- CRITICAL: Before finalizing the document:
818
-
819
- 1. **Accuracy Check**: Verify all technical details match the actual codebase
820
- 2. **Completeness Review**: Ensure all major system components are documented
821
- 3. **Focus Validation**: If user provided scope, verify relevant areas are emphasized
822
- 4. **Clarity Assessment**: Check that explanations are clear for AI agents
823
- 5. **Navigation**: Ensure document has clear section structure for easy reference
824
-
825
- Apply the advanced elicitation task after major sections to refine based on user feedback.
826
-
827
- ## Success Criteria
828
-
829
- - Single comprehensive brownfield architecture document created
830
- - Document reflects REALITY including technical debt and workarounds
831
- - Key files and modules are referenced with actual paths
832
- - Models/APIs reference source files rather than duplicating content
833
- - If PRD provided: Clear impact analysis showing what needs to change
834
- - Document enables AI agents to navigate and understand the actual codebase
835
- - Technical constraints and "gotchas" are clearly documented
836
-
837
- ## Notes
838
-
839
- - This task creates ONE document that captures the TRUE state of the system
840
- - References actual files rather than duplicating content when possible
841
- - Documents technical debt, workarounds, and constraints honestly
842
- - For brownfield projects with PRD: Provides clear enhancement impact analysis
843
- - The goal is PRACTICAL documentation for AI agents doing real work
844
- ==================== END: .xiaoma-core/tasks/document-project.md ====================
845
-
846
- ==================== START: .xiaoma-core/tasks/execute-checklist.md ====================
847
- <!-- Powered by XIAOMA™ Core -->
848
-
849
- # Checklist Validation Task
850
-
851
- This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
852
-
853
- ## Available Checklists
854
-
855
- If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the .xiaoma-core/checklists folder to select the appropriate one to run.
856
-
857
- ## Instructions
858
-
859
- 1. **Initial Assessment**
860
- - If user or the task being run provides a checklist name:
861
- - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
862
- - If multiple matches found, ask user to clarify
863
- - Load the appropriate checklist from .xiaoma-core/checklists/
864
- - If no checklist specified:
865
- - Ask the user which checklist they want to use
866
- - Present the available options from the files in the checklists folder
867
- - Confirm if they want to work through the checklist:
868
- - Section by section (interactive mode - very time consuming)
869
- - All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
870
-
871
- 2. **Document and Artifact Gathering**
872
- - Each checklist will specify its required documents/artifacts at the beginning
873
- - Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
874
-
875
- 3. **Checklist Processing**
876
-
877
- If in interactive mode:
878
- - Work through each section of the checklist one at a time
879
- - For each section:
880
- - Review all items in the section following instructions for that section embedded in the checklist
881
- - Check each item against the relevant documentation or artifacts as appropriate
882
- - Present summary of findings for that section, highlighting warnings, errors and non applicable items (rationale for non-applicability).
883
- - Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
884
-
885
- If in YOLO mode:
886
- - Process all sections at once
887
- - Create a comprehensive report of all findings
888
- - Present the complete analysis to the user
889
-
890
- 4. **Validation Approach**
891
-
892
- For each checklist item:
893
- - Read and understand the requirement
894
- - Look for evidence in the documentation that satisfies the requirement
895
- - Consider both explicit mentions and implicit coverage
896
- - Aside from this, follow all checklist llm instructions
897
- - Mark items as:
898
- - ✅ PASS: Requirement clearly met
899
- - ❌ FAIL: Requirement not met or insufficient coverage
900
- - ⚠️ PARTIAL: Some aspects covered but needs improvement
901
- - N/A: Not applicable to this case
902
-
903
- 5. **Section Analysis**
904
-
905
- For each section:
906
- - think step by step to calculate pass rate
907
- - Identify common themes in failed items
908
- - Provide specific recommendations for improvement
909
- - In interactive mode, discuss findings with user
910
- - Document any user decisions or explanations
911
-
912
- 6. **Final Report**
913
-
914
- Prepare a summary that includes:
915
- - Overall checklist completion status
916
- - Pass rates by section
917
- - List of failed items with context
918
- - Specific recommendations for improvement
919
- - Any sections or items marked as N/A with justification
920
-
921
- ## Checklist Execution Methodology
922
-
923
- Each checklist now contains embedded LLM prompts and instructions that will:
924
-
925
- 1. **Guide thorough thinking** - Prompts ensure deep analysis of each section
926
- 2. **Request specific artifacts** - Clear instructions on what documents/access is needed
927
- 3. **Provide contextual guidance** - Section-specific prompts for better validation
928
- 4. **Generate comprehensive reports** - Final summary with detailed findings
929
-
930
- The LLM will:
931
-
932
- - Execute the complete checklist validation
933
- - Present a final report with pass/fail rates and key findings
934
- - Offer to provide detailed analysis of any section, especially those with warnings or failures
935
- ==================== END: .xiaoma-core/tasks/execute-checklist.md ====================
936
-
937
- ==================== START: .xiaoma-core/tasks/shard-doc.md ====================
938
- <!-- Powered by XiaoMa™ Core -->
939
-
940
- # Document Sharding Task
941
-
942
- ## Purpose
943
-
944
- - Split a large document into multiple smaller documents based on level 2 sections
945
- - Create a folder structure to organize the sharded documents
946
- - Maintain all content integrity including code blocks, diagrams, and markdown formatting
947
-
948
- ## Primary Method: Automatic with markdown-tree
949
-
950
- [[LLM: First, check if markdownExploder is set to true in .xiaoma-core/core-config.yaml. If it is, attempt to run the command: `md-tree explode {input file} {output path}`.
951
-
952
- If the command succeeds, inform the user that the document has been sharded successfully and STOP - do not proceed further.
953
-
954
- If the command fails (especially with an error indicating the command is not found or not available), inform the user: "The markdownExploder setting is enabled but the md-tree command is not available. Please either:
955
-
956
- 1. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
957
- 2. Or set markdownExploder to false in .xiaoma-core/core-config.yaml
958
-
959
- **IMPORTANT: STOP HERE - do not proceed with manual sharding until one of the above actions is taken.**"
960
-
961
- If markdownExploder is set to false, inform the user: "The markdownExploder setting is currently false. For better performance and reliability, you should:
962
-
963
- 1. Set markdownExploder to true in .xiaoma-core/core-config.yaml
964
- 2. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
965
-
966
- I will now proceed with the manual sharding process."
967
-
968
- Then proceed with the manual method below ONLY if markdownExploder is false.]]
969
-
970
- ### Installation and Usage
971
-
972
- 1. **Install globally**:
973
-
974
- ```bash
975
- npm install -g @kayvan/markdown-tree-parser
976
- ```
977
-
978
- 2. **Use the explode command**:
979
-
980
- ```bash
981
- # For PRD
982
- md-tree explode docs/prd.md docs/prd
983
-
984
- # For Architecture
985
- md-tree explode docs/architecture.md docs/architecture
986
-
987
- # For any document
988
- md-tree explode [source-document] [destination-folder]
989
- ```
990
-
991
- 3. **What it does**:
992
- - Automatically splits the document by level 2 sections
993
- - Creates properly named files
994
- - Adjusts heading levels appropriately
995
- - Handles all edge cases with code blocks and special markdown
996
-
997
- If the user has @kayvan/markdown-tree-parser installed, use it and skip the manual process below.
998
-
999
- ---
1000
-
1001
- ## Manual Method (if @kayvan/markdown-tree-parser is not available or user indicated manual method)
1002
-
1003
- ### Task Instructions
1004
-
1005
- 1. Identify Document and Target Location
1006
-
1007
- - Determine which document to shard (user-provided path)
1008
- - Create a new folder under `docs/` with the same name as the document (without extension)
1009
- - Example: `docs/prd.md` → create folder `docs/prd/`
1010
-
1011
- 2. Parse and Extract Sections
1012
-
1013
- CRITICAL AEGNT SHARDING RULES:
1014
-
1015
- 1. Read the entire document content
1016
- 2. Identify all level 2 sections (## headings)
1017
- 3. For each level 2 section:
1018
- - Extract the section heading and ALL content until the next level 2 section
1019
- - Include all subsections, code blocks, diagrams, lists, tables, etc.
1020
- - Be extremely careful with:
1021
- - Fenced code blocks (```) - ensure you capture the full block including closing backticks and account for potential misleading level 2's that are actually part of a fenced section example
1022
- - Mermaid diagrams - preserve the complete diagram syntax
1023
- - Nested markdown elements
1024
- - Multi-line content that might contain ## inside code blocks
1025
-
1026
- CRITICAL: Use proper parsing that understands markdown context. A ## inside a code block is NOT a section header.]]
1027
-
1028
- ### 3. Create Individual Files
1029
-
1030
- For each extracted section:
1031
-
1032
- 1. **Generate filename**: Convert the section heading to lowercase-dash-case
1033
- - Remove special characters
1034
- - Replace spaces with dashes
1035
- - Example: "## Tech Stack" → `tech-stack.md`
1036
-
1037
- 2. **Adjust heading levels**:
1038
- - The level 2 heading becomes level 1 (# instead of ##) in the sharded new document
1039
- - All subsection levels decrease by 1:
1040
-
1041
- ```txt
1042
- - ### → ##
1043
- - #### → ###
1044
- - ##### → ####
1045
- - etc.
1046
- ```
1047
-
1048
- 3. **Write content**: Save the adjusted content to the new file
1049
-
1050
- ### 4. Create Index File
1051
-
1052
- Create an `index.md` file in the sharded folder that:
1053
-
1054
- 1. Contains the original level 1 heading and any content before the first level 2 section
1055
- 2. Lists all the sharded files with links:
1056
-
1057
- ```markdown
1058
- # Original Document Title
1059
-
1060
- [Original introduction content if any]
1061
-
1062
- ## Sections
1063
-
1064
- - [Section Name 1](./section-name-1.md)
1065
- - [Section Name 2](./section-name-2.md)
1066
- - [Section Name 3](./section-name-3.md)
1067
- ...
1068
- ```
1069
-
1070
- ### 5. Preserve Special Content
1071
-
1072
- 1. **Code blocks**: Must capture complete blocks including:
1073
-
1074
- ```language
1075
- content
1076
- ```
1077
-
1078
- 2. **Mermaid diagrams**: Preserve complete syntax:
1079
-
1080
- ```mermaid
1081
- graph TD
1082
- ...
1083
- ```
1084
-
1085
- 3. **Tables**: Maintain proper markdown table formatting
1086
-
1087
- 4. **Lists**: Preserve indentation and nesting
1088
-
1089
- 5. **Inline code**: Preserve backticks
1090
-
1091
- 6. **Links and references**: Keep all markdown links intact
1092
-
1093
- 7. **Template markup**: If documents contain {{placeholders}} ,preserve exactly
1094
-
1095
- ### 6. Validation
1096
-
1097
- After sharding:
1098
-
1099
- 1. Verify all sections were extracted
1100
- 2. Check that no content was lost
1101
- 3. Ensure heading levels were properly adjusted
1102
- 4. Confirm all files were created successfully
1103
-
1104
- ### 7. Report Results
1105
-
1106
- Provide a summary:
1107
-
1108
- ```text
1109
- Document sharded successfully:
1110
- - Source: [original document path]
1111
- - Destination: docs/[folder-name]/
1112
- - Files created: [count]
1113
- - Sections:
1114
- - section-name-1.md: "Section Title 1"
1115
- - section-name-2.md: "Section Title 2"
1116
- ...
1117
- ```
1118
-
1119
- ## Important Notes
1120
-
1121
- - Never modify the actual content, only adjust heading levels
1122
- - Preserve ALL formatting, including whitespace where significant
1123
- - Handle edge cases like sections with code blocks containing ## symbols
1124
- - Ensure the sharding is reversible (could reconstruct the original from shards)
1125
- ==================== END: .xiaoma-core/tasks/shard-doc.md ====================
1126
-
1127
- ==================== START: .xiaoma-core/templates/architecture-tmpl.yaml ====================
1128
- template:
1129
- id: architecture-template-v2
1130
- name: 架构文档
1131
- version: 2.0
1132
- output:
1133
- format: markdown
1134
- filename: docs/architecture.md
1135
- title: "{{project_name}} Architecture Document"
1136
-
1137
- workflow:
1138
- mode: interactive
1139
- elicitation: advanced-elicitation
1140
-
1141
- sections:
1142
- - id: introduction
1143
- title: 引言
1144
- instruction: |
1145
- 如果可以,请在开始前审查所有提供的相关文档以收集全部背景信息。如果至少无法找到 docs/prd.md,请询问用户哪些文档将为架构设计提供基础。
1146
- sections:
1147
- - id: intro-content
1148
- content: |
1149
- 本文档概述了 {{project_name}} 的整体项目架构,包括后端系统、共享服务以及非 UI 特定的问题。其主要目标是作为 AI 驱动开发的指导性架构蓝图,确保遵循所选模式和技术的一致性。
1150
-
1151
- **与前端架构的关系:**
1152
- 如果项目包含重要的用户界面,将有一份独立的前端架构文档详细说明前端特定的设计,并且该文档必须与本文档结合使用。本文档中记录的核心技术栈选择(见“技术栈”)对整个项目(包括任何前端组件)具有决定性作用。
1153
- - id: starter-template
1154
- title: 启动模板或现有项目
1155
- instruction: |
1156
- 在进一步进行架构设计之前,请检查项目是否基于启动模板或现有代码库:
1157
-
1158
- 1. 审查 PRD 和头脑风暴简报中是否提及:
1159
- - 启动模板(例如,Create React App, Next.js, Vue CLI, Angular CLI 等)
1160
- - 作为基础的现有项目或代码库
1161
- - 脚手架项目或工具
1162
- - 需要克隆或改造的先前项目
1163
-
1164
- 2. 如果提及了启动模板或现有项目:
1165
- - 要求用户通过以下方式之一提供访问权限:
1166
- - 启动模板文档的链接
1167
- - 上传/附加项目文件(适用于小型项目)
1168
- - 分享项目仓库的链接(GitHub, GitLab 等)
1169
- - 分析启动模板/现有项目以了解:
1170
- - 预配置的技术栈和版本
1171
- - 项目结构和组织模式
1172
- - 内置脚本和工具
1173
- - 现有的架构模式和约定
1174
- - 启动模板带来的任何限制或约束
1175
- - 利用此分析来指导和调整您的架构决策
1176
-
1177
- 3. 如果没有提及启动模板但这是一个全新的项目:
1178
- - 根据技术栈偏好建议合适的启动模板
1179
- - 解释其好处(更快的设置、最佳实践、社区支持)
1180
- - 让用户决定是否使用
1181
-
1182
- 4. 如果用户确认不使用启动模板:
1183
- - 从头开始进行架构设计
1184
- - 注意所有工具和配置都需要手动设置
1185
-
1186
- 在继续进行架构设计之前,在此处记录决策。如果没有,则填写“不适用”。
1187
- elicit: true
1188
- - id: changelog
1189
- title: 变更日志
1190
- type: table
1191
- columns: [日期, 版本, 描述, 作者]
1192
- instruction: 跟踪文档版本和变更
1193
-
1194
- - id: high-level-architecture
1195
- title: 高层架构
1196
- instruction: |
1197
- 本节包含多个为架构奠定基础的子章节。请一次性呈现所有子章节。
1198
- elicit: true
1199
- sections:
1200
- - id: technical-summary
1201
- title: 技术摘要
1202
- instruction: |
1203
- 提供一段简短的概述(3-5句话),内容包括:
1204
- - 系统的整体架构风格
1205
- - 关键组件及其关系
1206
- - 主要的技术选择
1207
- - 使用的核心架构模式
1208
- - 回顾 PRD 目标以及此架构如何支持这些目标
1209
- - id: high-level-overview
1210
- title: 高层概览
1211
- instruction: |
1212
- 根据 PRD 的技术假设部分,描述:
1213
-
1214
- 1. 主要的架构风格(例如,单体、微服务、无服务器、事件驱动)
1215
- 2. PRD 中决定的仓库结构(Monorepo/Polyrepo)
1216
- 3. PRD 中决定的服务架构
1217
- 4. 概念层面上的主要用户交互流程或数据流
1218
- 5. 关键的架构决策及其理由
1219
- - id: project-diagram
1220
- title: 高层项目图
1221
- type: mermaid
1222
- mermaid_type: graph
1223
- instruction: |
1224
- 创建一个 Mermaid 图,以可视化高层架构。考虑:
1225
- - 系统边界
1226
- - 主要组件/服务
1227
- - 数据流方向
1228
- - 外部集成
1229
- - 用户入口点
1230
-
1231
- - id: architectural-patterns
1232
- title: 架构与设计模式
1233
- instruction: |
1234
- 列出将指导架构的关键高层模式。对于每个模式:
1235
-
1236
- 1. 如果存在多个选项,请提出 2-3 个可行的方案
1237
- 2. 提出您的建议并附上明确的理由
1238
- 3. 在最终确定前获得用户确认
1239
- 4. 这些模式应与 PRD 的技术假设和项目目标保持一致
1240
-
1241
- 需要考虑的常见模式:
1242
- - 架构风格模式(无服务器、事件驱动、微服务、CQRS、六边形架构)
1243
- - 代码组织模式(依赖注入、仓库、模块、工厂)
1244
- - 数据模式(事件溯源、Saga、每个服务一个数据库)
1245
- - 通信模式(REST, GraphQL, 消息队列, 发布/订阅)
1246
- template: "- **{{pattern_name}}:** {{pattern_description}} - _理由:_ {{rationale}}"
1247
- examples:
1248
- - "**无服务器架构:** 使用 AWS Lambda 进行计算 - _理由:_ 符合 PRD 中关于成本优化和自动扩展的要求"
1249
- - "**仓库模式:** 抽象数据访问逻辑 - _理由:_ 便于测试和未来的数据库迁移"
1250
- - "**事件驱动通信:** 使用 SNS/SQS 进行服务解耦 - _理由:_ 支持异步处理和系统弹性"
1251
-
1252
- - id: tech-stack
1253
- title: 技术栈
1254
- instruction: |
1255
- 这是决定性的技术选型部分。与用户合作做出具体选择:
1256
-
1257
- 1. 审查 PRD 技术假设以及来自 .xiaoma-core/data/technical-preferences.yaml 或附加的 technical-preferences 文件中的任何偏好
1258
- 2. 为每个类别提供 2-3 个带有优缺点的可行选项
1259
- 3. 根据项目需求提出明确的建议
1260
- 4. 为每个选型获得用户明确的批准
1261
- 5. 记录确切的版本(避免使用 "latest" - 请锁定具体版本)
1262
- 6. 此表格是唯一的信息源 - 所有其他文档必须引用这些选择
1263
-
1264
- 需要最终确定的关键决策 - 在显示表格之前,确保您了解或询问用户以下信息 - 如果用户不确定,告知他们您也可以提供带有理由的建议:
1265
-
1266
- - 启动模板(如果有)
1267
- - 语言和运行时的确切版本
1268
- - 框架、库和包
1269
- - 云服务提供商和关键服务选择
1270
- - 数据库和存储解决方案 - 如果不清楚,根据项目和云服务提供商建议 sql、nosql 或其他类型
1271
- - 开发工具
1272
-
1273
- 渲染表格时,确保用户意识到本节选择的重要性,并应检查是否存在差距或分歧,如果不清楚列表中某项的原因,请要求澄清,并立即征求反馈 - 该声明和选项应在允许用户输入之前全部渲染和提示。
1274
- elicit: true
1275
- sections:
1276
- - id: cloud-infrastructure
1277
- title: 云基础设施
1278
- template: |
1279
- - **提供商:** {{cloud_provider}}
1280
- - **关键服务:** {{core_services_list}}
1281
- - **部署区域:** {{regions}}
1282
- - id: technology-stack-table
1283
- title: 技术栈表
1284
- type: table
1285
- columns: [类别, 技术, 版本, 用途, 理由]
1286
- instruction: 使用所有相关技术填充技术栈表
1287
- examples:
1288
- - "| **语言** | TypeScript | 5.3.3 | 主要开发语言 | 强类型,优秀的工具链,团队专业知识 |"
1289
- - "| **运行时** | Node.js | 20.11.0 | JavaScript 运行时 | LTS 版本,性能稳定,生态系统广泛 |"
1290
- - "| **框架** | NestJS | 10.3.2 | 后端框架 | 企业级,良好的依赖注入,符合团队模式 |"
1291
-
1292
- - id: data-models
1293
- title: 数据模型
1294
- instruction: |
1295
- 定义核心数据模型/实体:
1296
-
1297
- 1. 审查 PRD 需求并识别关键业务实体
1298
- 2. 对每个模型,解释其用途和关系
1299
- 3. 包括关键属性和数据类型
1300
- 4. 显示模型之间的关系
1301
- 5. 与用户讨论设计决策
1302
-
1303
- 在转向数据库模式之前,创建一个清晰的概念模型。
1304
- elicit: true
1305
- repeatable: true
1306
- sections:
1307
- - id: model
1308
- title: "{{model_name}}"
1309
- template: |
1310
- **用途:** {{model_purpose}}
1311
-
1312
- **关键属性:**
1313
- - {{attribute_1}}: {{type_1}} - {{description_1}}
1314
- - {{attribute_2}}: {{type_2}} - {{description_2}}
1315
-
1316
- **关系:**
1317
- - {{relationship_1}}
1318
- - {{relationship_2}}
1319
-
1320
- - id: components
1321
- title: 组件
1322
- instruction: |
1323
- 基于上述的架构模式、技术栈和数据模型:
1324
-
1325
- 1. 识别主要的逻辑组件/服务及其职责
1326
- 2. 考虑 PRD 中定义的仓库结构 (monorepo/polyrepo)
1327
- 3. 定义组件之间清晰的边界和接口
1328
- 4. 对每个组件,明确:
1329
- - 主要职责
1330
- - 暴露的关键接口/API
1331
- - 对其他组件的依赖
1332
- - 基于技术栈选择的技术细节
1333
-
1334
- 5. 在需要时创建组件图
1335
- elicit: true
1336
- sections:
1337
- - id: component-list
1338
- repeatable: true
1339
- title: "{{component_name}}"
1340
- template: |
1341
- **职责:** {{component_description}}
1342
-
1343
- **关键接口:**
1344
- - {{interface_1}}
1345
- - {{interface_2}}
1346
-
1347
- **依赖:** {{dependencies}}
1348
-
1349
- **技术栈:** {{component_tech_details}}
1350
- - id: component-diagrams
1351
- title: 组件图
1352
- type: mermaid
1353
- instruction: |
1354
- 创建 Mermaid 图来可视化组件关系。选项:
1355
- - C4 容器图用于高层视图
1356
- - 组件图用于详细的内部结构
1357
- - 序列图用于复杂的交互
1358
- 选择最合适的图以保证清晰度
1359
-
1360
- - id: external-apis
1361
- title: 外部 API
1362
- condition: 项目需要外部 API 集成
1363
- instruction: |
1364
- 对于每个外部服务集成:
1365
-
1366
- 1. 根据 PRD 需求和组件设计识别所需的 API
1367
- 2. 如果文档 URL 未知,向用户询问具体信息
1368
- 3. 记录认证方法和安全考量
1369
- 4. 列出将要使用的具体端点
1370
- 5. 注意任何速率限制或使用约束
1371
-
1372
- 如果不需要外部 API,请明确说明并跳到下一节。
1373
- elicit: true
1374
- repeatable: true
1375
- sections:
1376
- - id: api
1377
- title: "{{api_name}} API"
1378
- template: |
1379
- - **用途:** {{api_purpose}}
1380
- - **文档:** {{api_docs_url}}
1381
- - **基础 URL:** {{api_base_url}}
1382
- - **认证:** {{auth_method}}
1383
- - **速率限制:** {{rate_limits}}
1384
-
1385
- **使用的关键端点:**
1386
- - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
1387
-
1388
- **集成说明:** {{integration_considerations}}
1389
-
1390
- - id: core-workflows
1391
- title: 核心工作流
1392
- type: mermaid
1393
- mermaid_type: sequence
1394
- instruction: |
1395
- 使用序列图说明关键系统工作流:
1396
-
1397
- 1. 从 PRD 中识别关键用户旅程
1398
- 2. 显示组件交互,包括外部 API
1399
- 3. 包括错误处理路径
1400
- 4. 记录异步操作
1401
- 5. 根据需要创建高层和详细的图表
1402
-
1403
- 重点关注那些能阐明架构决策或复杂交互的工作流。
1404
- elicit: true
1405
-
1406
- - id: rest-api-spec
1407
- title: REST API 规范
1408
- condition: 项目包含 REST API
1409
- type: code
1410
- language: yaml
1411
- instruction: |
1412
- 如果项目包含 REST API:
1413
-
1414
- 1. 创建一个 OpenAPI 3.0 规范
1415
- 2. 包括来自 epics/stories 的所有端点
1416
- 3. 基于数据模型定义请求/响应模式
1417
- 4. 记录认证要求
1418
- 5. 包括请求/响应示例
1419
-
1420
- 使用 YAML 格式以获得更好的可读性。如果没有 REST API,请跳过此节。
1421
- elicit: true
1422
- template: |
1423
- openapi: 3.0.0
1424
- info:
1425
- title: {{api_title}}
1426
- version: {{api_version}}
1427
- description: {{api_description}}
1428
- servers:
1429
- - url: {{server_url}}
1430
- description: {{server_description}}
1431
-
1432
- - id: database-schema
1433
- title: 数据库模式
1434
- instruction: |
1435
- 将概念数据模型转换为具体的数据库模式:
1436
-
1437
- 1. 使用在技术栈中选择的数据库类型
1438
- 2. 使用适当的表示法创建模式定义
1439
- 3. 包括索引、约束和关系
1440
- 4. 考虑性能和可伸缩性
1441
- 5. 对于 NoSQL,显示文档结构
1442
-
1443
- 以适合数据库类型的格式呈现模式(SQL DDL, JSON schema 等)。
1444
- elicit: true
1445
-
1446
- - id: source-tree
1447
- title: 源码树
1448
- type: code
1449
- language: plaintext
1450
- instruction: |
1451
- 创建一个能反映以下内容的项目文件夹结构:
1452
-
1453
- 1. 选择的仓库结构 (monorepo/polyrepo)
1454
- 2. 服务架构 (monolith/microservices/serverless)
1455
- 3. 选择的技术栈和语言
1456
- 4. 上述的组件组织方式
1457
- 5. 所选框架的最佳实践
1458
- 6. 清晰的关注点分离
1459
-
1460
- 根据项目需求调整结构。对于 monorepo,显示服务分离。对于 serverless,显示函数组织。包括特定于语言的约定。
1461
- elicit: true
1462
- examples:
1463
- - |
1464
- project-root/
1465
- ├── packages/
1466
- │ ├── api/ # 后端 API 服务
1467
- │ ├── web/ # 前端应用
1468
- │ ├── shared/ # 共享工具/类型
1469
- │ └── infrastructure/ # IaC 定义
1470
- ├── scripts/ # Monorepo 管理脚本
1471
- └── package.json # 带有 workspaces 的根 package.json
1472
-
1473
- - id: infrastructure-deployment
1474
- title: 基础设施与部署
1475
- instruction: |
1476
- 定义部署架构和实践:
1477
-
1478
- 1. 使用在技术栈中选择的 IaC 工具
1479
- 2. 选择适合架构的部署策略
1480
- 3. 定义环境和晋升流程
1481
- 4. 建立回滚程序
1482
- 5. 考虑安全性、监控和成本优化
1483
-
1484
- 获取用户关于部署偏好和 CI/CD 工具选择的输入。
1485
- elicit: true
1486
- sections:
1487
- - id: infrastructure-as-code
1488
- title: 基础设施即代码 (Infrastructure as Code)
1489
- template: |
1490
- - **工具:** {{iac_tool}} {{version}}
1491
- - **位置:** `{{iac_directory}}`
1492
- - **方法:** {{iac_approach}}
1493
- - id: deployment-strategy
1494
- title: 部署策略
1495
- template: |
1496
- - **策略:** {{deployment_strategy}}
1497
- - **CI/CD 平台:** {{cicd_platform}}
1498
- - **流水线配置:** `{{pipeline_config_location}}`
1499
- - id: environments
1500
- title: 环境
1501
- repeatable: true
1502
- template: "- **{{env_name}}:** {{env_purpose}} - {{env_details}}"
1503
- - id: promotion-flow
1504
- title: 环境晋升流程
1505
- type: code
1506
- language: text
1507
- template: "{{promotion_flow_diagram}}"
1508
- - id: rollback-strategy
1509
- title: 回滚策略
1510
- template: |
1511
- - **主要方法:** {{rollback_method}}
1512
- - **触发条件:** {{rollback_triggers}}
1513
- - **恢复时间目标 (RTO):** {{rto}}
1514
-
1515
- - id: error-handling-strategy
1516
- title: 错误处理策略
1517
- instruction: |
1518
- 定义全面的错误处理方法:
1519
-
1520
- 1. 为技术栈中的语言/框架选择合适的模式
1521
- 2. 定义日志记录标准和工具
1522
- 3. 建立错误类别和处理规则
1523
- 4. 考虑可观察性和调试需求
1524
- 5. 确保安全性(日志中不含敏感数据)
1525
-
1526
- 本节将指导 AI 和人类开发者实现一致的错误处理。
1527
- elicit: true
1528
- sections:
1529
- - id: general-approach
1530
- title: 通用方法
1531
- template: |
1532
- - **错误模型:** {{error_model}}
1533
- - **异常层次结构:** {{exception_structure}}
1534
- - **错误传播:** {{propagation_rules}}
1535
- - id: logging-standards
1536
- title: 日志记录标准
1537
- template: |
1538
- - **库:** {{logging_library}} {{version}}
1539
- - **格式:** {{log_format}}
1540
- - **级别:** {{log_levels_definition}}
1541
- - **必需的上下文:**
1542
- - 关联 ID: {{correlation_id_format}}
1543
- - 服务上下文: {{service_context}}
1544
- - 用户上下文: {{user_context_rules}}
1545
- - id: error-patterns
1546
- title: 错误处理模式
1547
- sections:
1548
- - id: external-api-errors
1549
- title: 外部 API 错误
1550
- template: |
1551
- - **重试策略:** {{retry_strategy}}
1552
- - **断路器:** {{circuit_breaker_config}}
1553
- - **超时配置:** {{timeout_settings}}
1554
- - **错误转换:** {{error_mapping_rules}}
1555
- - id: business-logic-errors
1556
- title: 业务逻辑错误
1557
- template: |
1558
- - **自定义异常:** {{business_exception_types}}
1559
- - **面向用户的错误:** {{user_error_format}}
1560
- - **错误码:** {{error_code_system}}
1561
- - id: data-consistency
1562
- title: 数据一致性
1563
- template: |
1564
- - **事务策略:** {{transaction_approach}}
1565
- - **补偿逻辑:** {{compensation_patterns}}
1566
- - **幂等性:** {{idempotency_approach}}
1567
-
1568
- - id: coding-standards
1569
- title: 编码标准
1570
- instruction: |
1571
- 这些标准对 AI 代理是强制性的。与用户合作,仅定义防止劣质代码所需的关键规则。解释说:
1572
-
1573
- 1. 本节直接控制 AI 开发者的行为
1574
- 2. 保持最简化 - 假设 AI 了解通用的最佳实践
1575
- 3. 专注于项目特定的约定和陷阱
1576
- 4. 过度详细的标准会膨胀上下文并减慢开发速度
1577
- 5. 标准将被提取到单独的文件中供开发代理使用
1578
-
1579
- 对于每个标准,都要获得用户明确确认其必要性。
1580
- elicit: true
1581
- sections:
1582
- - id: core-standards
1583
- title: 核心标准
1584
- template: |
1585
- - **语言与运行时:** {{languages_and_versions}}
1586
- - **风格与检查 (Linting):** {{linter_config}}
1587
- - **测试组织:** {{test_file_convention}}
1588
- - id: naming-conventions
1589
- title: 命名约定
1590
- type: table
1591
- columns: [元素, 约定, 示例]
1592
- instruction: 仅在偏离语言默认约定时包含此部分
1593
- - id: critical-rules
1594
- title: 关键规则
1595
- instruction: |
1596
- 仅列出 AI 可能违反的规则或项目特定的要求。例如:
1597
- - "切勿在生产代码中使用 console.log - 请使用 logger"
1598
- - "所有 API 响应必须使用 ApiResponse 包装类型"
1599
- - "数据库查询必须使用仓库模式,切勿直接使用 ORM"
1600
-
1601
- 避免使用显而易见的规则,如“使用 SOLID 原则”或“编写清晰的代码”。
1602
- repeatable: true
1603
- template: "- **{{rule_name}}:** {{rule_description}}"
1604
- - id: language-specifics
1605
- title: 特定语言指南
1606
- condition: 需要关键的特定语言规则
1607
- instruction: 仅在对于防止 AI 错误至关重要时添加。大多数团队不需要此部分。
1608
- sections:
1609
- - id: language-rules
1610
- title: "{{language_name}} 特定规则"
1611
- repeatable: true
1612
- template: "- **{{rule_topic}}:** {{rule_detail}}"
1613
-
1614
- - id: test-strategy
1615
- title: 测试策略与标准
1616
- instruction: |
1617
- 与用户合作定义全面的测试策略:
1618
-
1619
- 1. 使用技术栈中的测试框架
1620
- 2. 决定采用 TDD 还是后测试方法
1621
- 3. 定义测试的组织和命名
1622
- 4. 建立覆盖率目标
1623
- 5. 确定集成测试基础设施
1624
- 6. 规划测试数据和外部依赖
1625
-
1626
- 注意:基本信息会放在编码标准中供开发代理使用。这个详细的部分供 QA 代理和团队参考。
1627
- elicit: true
1628
- sections:
1629
- - id: testing-philosophy
1630
- title: 测试理念
1631
- template: |
1632
- - **方法:** {{test_approach}}
1633
- - **覆盖率目标:** {{coverage_targets}}
1634
- - **测试金字塔:** {{test_distribution}}
1635
- - id: test-types
1636
- title: 测试类型与组织
1637
- sections:
1638
- - id: unit-tests
1639
- title: 单元测试
1640
- template: |
1641
- - **框架:** {{unit_test_framework}} {{version}}
1642
- - **文件约定:** {{unit_test_naming}}
1643
- - **位置:** {{unit_test_location}}
1644
- - **模拟库 (Mocking Library):** {{mocking_library}}
1645
- - **覆盖率要求:** {{unit_coverage}}
1646
-
1647
- **AI 代理要求:**
1648
- - 为所有公共方法生成测试
1649
- - 覆盖边缘情况和错误条件
1650
- - 遵循 AAA 模式(Arrange, Act, Assert)
1651
- - 模拟所有外部依赖
1652
- - id: integration-tests
1653
- title: 集成测试
1654
- template: |
1655
- - **范围:** {{integration_scope}}
1656
- - **位置:** {{integration_test_location}}
1657
- - **测试基础设施:**
1658
- - **{{dependency_name}}:** {{test_approach}} ({{test_tool}})
1659
- examples:
1660
- - "**数据库:** 单元测试使用内存 H2,集成测试使用 Testcontainers PostgreSQL"
1661
- - "**消息队列:** 测试使用内嵌 Kafka"
1662
- - "**外部 API:** 使用 WireMock 进行打桩"
1663
- - id: e2e-tests
1664
- title: 端到端测试
1665
- template: |
1666
- - **框架:** {{e2e_framework}} {{version}}
1667
- - **范围:** {{e2e_scope}}
1668
- - **环境:** {{e2e_environment}}
1669
- - **测试数据:** {{e2e_data_strategy}}
1670
- - id: test-data-management
1671
- title: 测试数据管理
1672
- template: |
1673
- - **策略:** {{test_data_approach}}
1674
- - **固定数据 (Fixtures):** {{fixture_location}}
1675
- - **工厂 (Factories):** {{factory_pattern}}
1676
- - **清理:** {{cleanup_strategy}}
1677
- - id: continuous-testing
1678
- title: 持续测试
1679
- template: |
1680
- - **CI 集成:** {{ci_test_stages}}
1681
- - **性能测试:** {{perf_test_approach}}
1682
- - **安全测试:** {{security_test_approach}}
1683
-
1684
- - id: security
1685
- title: 安全
1686
- instruction: |
1687
- 为 AI 和人类开发者定义强制性的安全要求:
1688
-
1689
- 1. 专注于与实现相关的规则
1690
- 2. 引用技术栈中的安全工具
1691
- 3. 为常见场景定义清晰的模式
1692
- 4. 这些规则直接影响代码生成
1693
- 5. 与用户合作,确保完整性而不冗余
1694
- elicit: true
1695
- sections:
1696
- - id: input-validation
1697
- title: 输入验证
1698
- template: |
1699
- - **验证库:** {{validation_library}}
1700
- - **验证位置:** {{where_to_validate}}
1701
- - **必需规则:**
1702
- - 所有外部输入必须经过验证
1703
- - 在处理前于 API 边界进行验证
1704
- - 优先使用白名单方法而非黑名单
1705
- - id: auth-authorization
1706
- title: 认证与授权
1707
- template: |
1708
- - **认证方法:** {{auth_implementation}}
1709
- - **会话管理:** {{session_approach}}
1710
- - **必需模式:**
1711
- - {{auth_pattern_1}}
1712
- - {{auth_pattern_2}}
1713
- - id: secrets-management
1714
- title: 密钥管理
1715
- template: |
1716
- - **开发环境:** {{dev_secrets_approach}}
1717
- - **生产环境:** {{prod_secrets_service}}
1718
- - **代码要求:**
1719
- - 绝不硬编码密钥
1720
- - 仅通过配置服务访问
1721
- - 日志或错误消息中不包含密钥
1722
- - id: api-security
1723
- title: API 安全
1724
- template: |
1725
- - **速率限制:** {{rate_limit_implementation}}
1726
- - **CORS 策略:** {{cors_configuration}}
1727
- - **安全头 (Headers):** {{required_headers}}
1728
- - **HTTPS 强制:** {{https_approach}}
1729
- - id: data-protection
1730
- title: 数据保护
1731
- template: |
1732
- - **静态加密 (Encryption at Rest):** {{encryption_at_rest}}
1733
- - **传输中加密 (Encryption in Transit):** {{encryption_in_transit}}
1734
- - **个人身份信息 (PII) 处理:** {{pii_rules}}
1735
- - **日志记录限制:** {{what_not_to_log}}
1736
- - id: dependency-security
1737
- title: 依赖安全
1738
- template: |
1739
- - **扫描工具:** {{dependency_scanner}}
1740
- - **更新策略:** {{update_frequency}}
1741
- - **审批流程:** {{new_dep_process}}
1742
- - id: security-testing
1743
- title: 安全测试
1744
- template: |
1745
- - **SAST 工具:** {{static_analysis}}
1746
- - **DAST 工具:** {{dynamic_analysis}}
1747
- - **渗透测试:** {{pentest_schedule}}
1748
-
1749
- - id: checklist-results
1750
- title: 清单检查结果报告
1751
- instruction: 在运行清单检查前,主动提出输出完整的架构文档。一旦用户确认,执行 architect-checklist 并在此处填充结果。
1752
-
1753
- - id: next-steps
1754
- title: 后续步骤
1755
- instruction: |
1756
- 完成架构设计后:
1757
-
1758
- 1. 如果项目有 UI 组件:
1759
- - 使用“前端架构模式”
1760
- - 将此文档作为输入提供
1761
-
1762
- 2. 对于所有项目:
1763
- - 与产品负责人一起审查
1764
- - 使用开发代理开始用户故事的实现
1765
- - 使用 DevOps 代理设置基础设施
1766
-
1767
- 3. 如果需要,为下一个代理包含具体的提示
1768
- sections:
1769
- - id: architect-prompt
1770
- title: 架构师提示
1771
- condition: 项目有 UI 组件
1772
- instruction: |
1773
- 创建一个简短的提示,用于交接给架构师以创建前端架构。包括:
1774
- - 对此架构文档的引用
1775
- - PRD 中的关键 UI 需求
1776
- - 在此做出的任何与前端相关的决策
1777
- - 请求详细的前端架构
1778
- ==================== END: .xiaoma-core/templates/architecture-tmpl.yaml ====================
1779
-
1780
- ==================== START: .xiaoma-core/templates/brownfield-architecture-tmpl.yaml ====================
1781
- template:
1782
- id: brownfield-architecture-template-v2
1783
- name: 现有项目项目增强架构
1784
- version: 2.0
1785
- output:
1786
- format: markdown
1787
- filename: docs/architecture.md
1788
- title: "{{project_name}} Brownfield Enhancement Architecture"
1789
-
1790
- workflow:
1791
- mode: interactive
1792
- elicitation: advanced-elicitation
1793
-
1794
- sections:
1795
- - id: introduction
1796
- title: 引言
1797
- instruction: |
1798
- 重要 - 需要范围界定和评估:
1799
-
1800
- 本架构文档适用于需要全面架构规划的现有项目的**重大**增强。在继续之前:
1801
-
1802
- 1. **验证复杂性**:确认此增强功能需要进行架构规划。对于简单的添加,建议:“对于不需要架构规划的简单变更,请考虑与产品负责人一起使用 brownfield-create-epic 或 brownfield-create-story 任务。”
1803
-
1804
- 2. **必需的输入**:
1805
- - 已完成的 brownfield-prd.md
1806
- - 现有项目的技术文档(来自 docs 文件夹或用户提供)
1807
- - 对现有项目结构的访问权限(IDE 或上传的文件)
1808
-
1809
- 3. **深度分析指令**:在提出**任何**架构建议之前,您**必须**对现有代码库、架构模式和技术约束进行彻底分析。每一项建议都必须基于实际项目分析,而非假设。
1810
-
1811
- 4. **持续验证**:在此过程中,与用户明确验证您的理解。对于每一个架构决策,请确认:“根据我对您现有系统的分析,我建议 [决策],因为 [来自实际项目的证据]。这是否符合您系统的实际情况?”
1812
-
1813
- 如果缺少任何必需的输入,请在继续之前请求它们。
1814
- elicit: true
1815
- sections:
1816
- - id: intro-content
1817
- content: |
1818
- 本文档概述了使用 {{enhancement_description}} 来增强 {{project_name}} 的架构方法。其主要目标是作为 AI 驱动开发新功能的指导性架构蓝图,同时确保与现有系统的无缝集成。
1819
-
1820
- **与现有架构的关系:**
1821
- 本文档通过定义新组件将如何与当前系统集成来补充现有项目架构。当新旧模式之间出现冲突时,本文档为在实施增强功能的同时保持一致性提供指导。
1822
- - id: existing-project-analysis
1823
- title: 现有项目分析
1824
- instruction: |
1825
- 分析现有项目结构和架构:
1826
-
1827
- 1. 查看 docs 文件夹中的现有文档
1828
- 2. 检查当前技术栈和版本
1829
- 3. 识别现有架构模式和约定
1830
- 4. 注意当前的部署和基础设施设置
1831
- 5. 记录任何约束或限制
1832
-
1833
- 关键:分析后,明确验证您的发现:“根据我对您项目的分析,我识别出您现有系统的以下几点:[关键发现]。在我继续提出架构建议之前,请确认这些观察结果是否准确。”
1834
- elicit: true
1835
- sections:
1836
- - id: current-state
1837
- title: 项目当前状态
1838
- template: |
1839
- - **主要目的:** {{existing_project_purpose}}
1840
- - **当前技术栈:** {{existing_tech_summary}}
1841
- - **架构风格:** {{existing_architecture_style}}
1842
- - **部署方法:** {{existing_deployment_approach}}
1843
- - id: available-docs
1844
- title: 可用文档
1845
- type: bullet-list
1846
- template: "- {{existing_docs_summary}}"
1847
- - id: constraints
1848
- title: 已识别的约束
1849
- type: bullet-list
1850
- template: "- {{constraint}}"
1851
- - id: changelog
1852
- title: 变更日志
1853
- type: table
1854
- columns: [变更, 日期, 版本, 描述, 作者]
1855
- instruction: 跟踪文档版本和变更
1856
-
1857
- - id: enhancement-scope
1858
- title: 增强范围与集成策略
1859
- instruction: |
1860
- 定义增强功能将如何与现有系统集成:
1861
-
1862
- 1. 回顾现有项目项目 PRD 的增强范围
1863
- 2. 识别与现有代码的集成点
1864
- 3. 定义新旧功能之间的边界
1865
- 4. 建立兼容性要求
1866
-
1867
- 验证检查点:在提出集成策略之前,请确认:“根据我的分析,我提议的集成方法考虑了 [特定的现有系统特征]。这些集成点和边界尊重您当前的架构模式。此评估是否准确?”
1868
- elicit: true
1869
- sections:
1870
- - id: enhancement-overview
1871
- title: 增强概述
1872
- template: |
1873
- **增强类型:** {{enhancement_type}}
1874
- **范围:** {{enhancement_scope}}
1875
- **集成影响级别:** {{integration_impact_level}}
1876
- - id: integration-approach
1877
- title: 集成方法
1878
- template: |
1879
- **代码集成策略:** {{code_integration_approach}}
1880
- **数据库集成:** {{database_integration_approach}}
1881
- **API 集成:** {{api_integration_approach}}
1882
- **UI 集成:** {{ui_integration_approach}}
1883
- - id: compatibility-requirements
1884
- title: 兼容性要求
1885
- template: |
1886
- - **现有 API 兼容性:** {{api_compatibility}}
1887
- - **数据库模式兼容性:** {{db_compatibility}}
1888
- - **UI/UX 一致性:** {{ui_compatibility}}
1889
- - **性能影响:** {{performance_constraints}}
1890
-
1891
- - id: tech-stack-alignment
1892
- title: 技术栈对齐
1893
- instruction: |
1894
- 确保新组件与现有技术选择保持一致:
1895
-
1896
- 1. 使用现有技术栈作为基础
1897
- 2. 仅在绝对必要时才引入新技术
1898
- 3. 对任何新增内容提供明确的理由
1899
- 4. 确保与现有依赖项的版本兼容性
1900
- elicit: true
1901
- sections:
1902
- - id: existing-stack
1903
- title: 现有技术栈
1904
- type: table
1905
- columns: [类别, 当前技术, 版本, 在增强中的用途, 备注]
1906
- instruction: 记录必须维护或集成的当前技术栈
1907
- - id: new-tech-additions
1908
- title: 新增技术
1909
- condition: 增强功能需要新技术
1910
- type: table
1911
- columns: [技术, 版本, 目的, 理由, 集成方法]
1912
- instruction: 仅在增强功能需要新技术时包含此部分
1913
-
1914
- - id: data-models
1915
- title: 数据模型与模式变更
1916
- instruction: |
1917
- 定义新数据模型及其与现有模式的集成方式:
1918
-
1919
- 1. 识别增强功能所需的新实体
1920
- 2. 定义与现有数据模型的关系
1921
- 3. 规划数据库模式变更(新增、修改)
1922
- 4. 确保向后兼容性
1923
- elicit: true
1924
- sections:
1925
- - id: new-models
1926
- title: 新数据模型
1927
- repeatable: true
1928
- sections:
1929
- - id: model
1930
- title: "{{model_name}}"
1931
- template: |
1932
- **目的:** {{model_purpose}}
1933
- **集成:** {{integration_with_existing}}
1934
-
1935
- **关键属性:**
1936
- - {{attribute_1}}: {{type_1}} - {{description_1}}
1937
- - {{attribute_2}}: {{type_2}} - {{description_2}}
1938
-
1939
- **关系:**
1940
- - **与现有的关系:** {{existing_relationships}}
1941
- - **与新增的关系:** {{new_relationships}}
1942
- - id: schema-integration
1943
- title: 模式集成策略
1944
- template: |
1945
- **所需的数据库变更:**
1946
- - **新表:** {{new_tables_list}}
1947
- - **修改的表:** {{modified_tables_list}}
1948
- - **新索引:** {{new_indexes_list}}
1949
- - **迁移策略:** {{migration_approach}}
1950
-
1951
- **向后兼容性:**
1952
- - {{compatibility_measure_1}}
1953
- - {{compatibility_measure_2}}
1954
-
1955
- - id: component-architecture
1956
- title: 组件架构
1957
- instruction: |
1958
- 定义新组件及其与现有架构的集成:
1959
-
1960
- 1. 识别增强功能所需的新组件
1961
- 2. 定义与现有组件的接口
1962
- 3. 建立清晰的边界和职责
1963
- 4. 规划集成点和数据流
1964
-
1965
- 强制验证:在展示组件架构之前,请确认:“我提议的新组件遵循我在您代码库中识别出的现有架构模式:[具体模式]。集成接口尊重您当前的组件结构和通信模式。这是否与您项目的实际情况相符?”
1966
- elicit: true
1967
- sections:
1968
- - id: new-components
1969
- title: 新组件
1970
- repeatable: true
1971
- sections:
1972
- - id: component
1973
- title: "{{component_name}}"
1974
- template: |
1975
- **职责:** {{component_description}}
1976
- **集成点:** {{integration_points}}
1977
-
1978
- **关键接口:**
1979
- - {{interface_1}}
1980
- - {{interface_2}}
1981
-
1982
- **依赖:**
1983
- - **现有组件:** {{existing_dependencies}}
1984
- - **新组件:** {{new_dependencies}}
1985
-
1986
- **技术栈:** {{component_tech_details}}
1987
- - id: interaction-diagram
1988
- title: 组件交互图
1989
- type: mermaid
1990
- mermaid_type: graph
1991
- instruction: 创建 Mermaid 图,展示新组件如何与现有组件交互
1992
-
1993
- - id: api-design
1994
- title: API 设计与集成
1995
- condition: 增强功能需要 API 变更
1996
- instruction: |
1997
- 定义新 API 端点及其与现有 API 的集成:
1998
-
1999
- 1. 规划增强功能所需的新 API 端点
2000
- 2. 确保存与现有 API 模式的一致性
2001
- 3. 定义认证和授权集成
2002
- 4. 如果需要,规划版本控制策略
2003
- elicit: true
2004
- sections:
2005
- - id: api-strategy
2006
- title: API 集成策略
2007
- template: |
2008
- **API 集成策略:** {{api_integration_strategy}}
2009
- **认证:** {{auth_integration}}
2010
- **版本控制:** {{versioning_approach}}
2011
- - id: new-endpoints
2012
- title: 新 API 端点
2013
- repeatable: true
2014
- sections:
2015
- - id: endpoint
2016
- title: "{{endpoint_name}}"
2017
- template: |
2018
- - **方法:** {{http_method}}
2019
- - **端点:** {{endpoint_path}}
2020
- - **目的:** {{endpoint_purpose}}
2021
- - **集成:** {{integration_with_existing}}
2022
- sections:
2023
- - id: request
2024
- title: 请求
2025
- type: code
2026
- language: json
2027
- template: "{{request_schema}}"
2028
- - id: response
2029
- title: 响应
2030
- type: code
2031
- language: json
2032
- template: "{{response_schema}}"
2033
-
2034
- - id: external-api-integration
2035
- title: 外部 API 集成
2036
- condition: 增强功能需要新的外部 API
2037
- instruction: 记录增强功能所需的新外部 API 集成
2038
- repeatable: true
2039
- sections:
2040
- - id: external-api
2041
- title: "{{api_name}} API"
2042
- template: |
2043
- - **目的:** {{api_purpose}}
2044
- - **文档:** {{api_docs_url}}
2045
- - **基础 URL:** {{api_base_url}}
2046
- - **认证:** {{auth_method}}
2047
- - **集成方法:** {{integration_approach}}
2048
-
2049
- **使用的关键端点:**
2050
- - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
2051
-
2052
- **错误处理:** {{error_handling_strategy}}
2053
-
2054
- - id: source-tree-integration
2055
- title: 源码树集成
2056
- instruction: |
2057
- 定义新代码将如何与现有项目结构集成:
2058
-
2059
- 1. 遵循现有项目组织模式
2060
- 2. 确定新文件/文件夹的放置位置
2061
- 3. 确保与现有命名约定的一致性
2062
- 4. 规划以最小化对现有结构的干扰
2063
- elicit: true
2064
- sections:
2065
- - id: existing-structure
2066
- title: 现有项目结构
2067
- type: code
2068
- language: plaintext
2069
- instruction: 记录当前结构的相关部分
2070
- template: "{{existing_structure_relevant_parts}}"
2071
- - id: new-file-organization
2072
- title: 新文件组织
2073
- type: code
2074
- language: plaintext
2075
- instruction: 仅显示对现有结构的新增内容
2076
- template: |
2077
- {{project-root}}/
2078
- ├── {{existing_structure_context}}
2079
- │ ├── {{new_folder_1}}/ # {{purpose_1}}
2080
- │ │ ├── {{new_file_1}}
2081
- │ │ └── {{new_file_2}}
2082
- │ ├── {{existing_folder}}/ # 带有新增内容的现有文件夹
2083
- │ │ ├── {{existing_file}} # 现有文件
2084
- │ │ └── {{new_file_3}} # 新增文件
2085
- │ └── {{new_folder_2}}/ # {{purpose_2}}
2086
- - id: integration-guidelines
2087
- title: 集成指南
2088
- template: |
2089
- - **文件命名:** {{file_naming_consistency}}
2090
- - **文件夹组织:** {{folder_organization_approach}}
2091
- - **导入/导出模式:** {{import_export_consistency}}
2092
-
2093
- - id: infrastructure-deployment
2094
- title: 基础设施与部署集成
2095
- instruction: |
2096
- 定义增强功能将如何与现有基础设施一同部署:
2097
-
2098
- 1. 使用现有的部署流水线和基础设施
2099
- 2. 识别任何需要的基础设施变更
2100
- 3. 规划部署策略以最小化风险
2101
- 4. 定义回滚程序
2102
- elicit: true
2103
- sections:
2104
- - id: existing-infrastructure
2105
- title: 现有基础设施
2106
- template: |
2107
- **当前部署:** {{existing_deployment_summary}}
2108
- **基础设施工具:** {{existing_infrastructure_tools}}
2109
- **环境:** {{existing_environments}}
2110
- - id: enhancement-deployment
2111
- title: 增强部署策略
2112
- template: |
2113
- **部署方法:** {{deployment_approach}}
2114
- **基础设施变更:** {{infrastructure_changes}}
2115
- **流水线集成:** {{pipeline_integration}}
2116
- - id: rollback-strategy
2117
- title: 回滚策略
2118
- template: |
2119
- **回滚方法:** {{rollback_method}}
2120
- **风险缓解:** {{risk_mitigation}}
2121
- **监控:** {{monitoring_approach}}
2122
-
2123
- - id: coding-standards
2124
- title: 编码标准与约定
2125
- instruction: |
2126
- 确保新代码遵循现有项目约定:
2127
-
2128
- 1. 通过项目分析记录现有编码标准
2129
- 2. 识别任何针对增强功能的特定要求
2130
- 3. 确保与现有代码库模式的一致性
2131
- 4. 为新代码组织定义标准
2132
- elicit: true
2133
- sections:
2134
- - id: existing-standards
2135
- title: 现有标准合规性
2136
- template: |
2137
- **代码风格:** {{existing_code_style}}
2138
- **Linting 规则:** {{existing_linting}}
2139
- **测试模式:** {{existing_test_patterns}}
2140
- **文档风格:** {{existing_doc_style}}
2141
- - id: enhancement-standards
2142
- title: 增强功能的特定标准
2143
- condition: 增强功能需要新模式
2144
- repeatable: true
2145
- template: "- **{{standard_name}}:** {{standard_description}}"
2146
- - id: integration-rules
2147
- title: 关键集成规则
2148
- template: |
2149
- - **现有 API 兼容性:** {{api_compatibility_rule}}
2150
- - **数据库集成:** {{db_integration_rule}}
2151
- - **错误处理:** {{error_handling_integration}}
2152
- - **日志记录一致性:** {{logging_consistency}}
2153
-
2154
- - id: testing-strategy
2155
- title: 测试策略
2156
- instruction: |
2157
- 为增强功能定义测试方法:
2158
-
2159
- 1. 与现有测试套件集成
2160
- 2. 确保现有功能保持完好
2161
- 3. 规划新功能的测试
2162
- 4. 定义集成测试方法
2163
- elicit: true
2164
- sections:
2165
- - id: existing-test-integration
2166
- title: 与现有测试的集成
2167
- template: |
2168
- **现有测试框架:** {{existing_test_framework}}
2169
- **测试组织:** {{existing_test_organization}}
2170
- **覆盖率要求:** {{existing_coverage_requirements}}
2171
- - id: new-testing
2172
- title: 新测试要求
2173
- sections:
2174
- - id: unit-tests
2175
- title: 新组件的单元测试
2176
- template: |
2177
- - **框架:** {{test_framework}}
2178
- - **位置:** {{test_location}}
2179
- - **覆盖率目标:** {{coverage_target}}
2180
- - **与现有测试的集成:** {{test_integration}}
2181
- - id: integration-tests
2182
- title: 集成测试
2183
- template: |
2184
- - **范围:** {{integration_test_scope}}
2185
- - **现有系统验证:** {{existing_system_verification}}
2186
- - **新功能测试:** {{new_feature_testing}}
2187
- - id: regression-tests
2188
- title: 回归测试
2189
- template: |
2190
- - **现有功能验证:** {{regression_test_approach}}
2191
- - **自动化回归套件:** {{automated_regression}}
2192
- - **手动测试要求:** {{manual_testing_requirements}}
2193
-
2194
- - id: security-integration
2195
- title: 安全集成
2196
- instruction: |
2197
- 确保与现有系统的安全一致性:
2198
-
2199
- 1. 遵循现有的安全模式和工具
2200
- 2. 确保新功能不引入漏洞
2201
- 3. 维持现有安全状况
2202
- 4. 为新组件定义安全测试
2203
- elicit: true
2204
- sections:
2205
- - id: existing-security
2206
- title: 现有安全措施
2207
- template: |
2208
- **认证:** {{existing_auth}}
2209
- **授权:** {{existing_authz}}
2210
- **数据保护:** {{existing_data_protection}}
2211
- **安全工具:** {{existing_security_tools}}
2212
- - id: enhancement-security
2213
- title: 增强功能的安全要求
2214
- template: |
2215
- **新安全措施:** {{new_security_measures}}
2216
- **集成点:** {{security_integration_points}}
2217
- **合规性要求:** {{compliance_requirements}}
2218
- - id: security-testing
2219
- title: 安全测试
2220
- template: |
2221
- **现有安全测试:** {{existing_security_tests}}
2222
- **新安全测试要求:** {{new_security_tests}}
2223
- **渗透测试:** {{pentest_requirements}}
2224
-
2225
- - id: checklist-results
2226
- title: 清单结果报告
2227
- instruction: 执行 architect-checklist 并在此处填充结果,重点关注现有项目项目的特定验证
2228
-
2229
- - id: next-steps
2230
- title: 后续步骤
2231
- instruction: |
2232
- 完成现有项目项目架构后:
2233
-
2234
- 1. 审查与现有系统的集成点
2235
- 2. 与开发代理一起开始故事的实现
2236
- 3. 设置部署流水线集成
2237
- 4. 规划回滚和监控程序
2238
- sections:
2239
- - id: story-manager-handoff
2240
- title: 故事负责人交接
2241
- instruction: |
2242
- 为故事负责人创建一个简短的提示,以便处理此现有项目项目增强。包括:
2243
- - 引用此架构文档
2244
- - 与用户验证过的关键集成要求
2245
- - 基于实际项目分析的现有系统约束
2246
- - 第一个要实现的故事,带有明确的集成检查点
2247
- - 强调在整个实施过程中保持现有系统的完整性
2248
- - id: developer-handoff
2249
- title: 开发者交接
2250
- instruction: |
2251
- 为开始实施的开发人员创建一个简短的提示。包括:
2252
- - 引用此架构和从实际项目中分析出的现有编码标准
2253
- - 与用户验证过的与现有代码库的集成要求
2254
- - 基于真实项目约束的关键技术决策
2255
- - 现有系统的兼容性要求,附带具体的验证步骤
2256
- - 清晰的实施顺序,以最小化对现有功能的风险
2257
- ==================== END: .xiaoma-core/templates/brownfield-architecture-tmpl.yaml ====================
2258
-
2259
- ==================== START: .xiaoma-core/templates/front-end-architecture-tmpl.yaml ====================
2260
- template:
2261
- id: frontend-architecture-template-v2
2262
- name: 前端架构文档
2263
- version: 2.0
2264
- output:
2265
- format: markdown
2266
- filename: docs/ui-architecture.md
2267
- title: "{{project_name}} Frontend Architecture Document"
2268
-
2269
- workflow:
2270
- mode: interactive
2271
- elicitation: advanced-elicitation
2272
-
2273
- sections:
2274
- - id: template-framework-selection
2275
- title: 模板与框架选型
2276
- instruction: |
2277
- 审阅所提供的文档,包括产品需求文档(PRD)、用户体验与界面规范(UX-UI Specification)和主架构文档。重点提取 AI 前端工具和开发者代理所需的技术实现细节。如果你无法找到且未被提供这些文档,请向用户索取。
2278
-
2279
- 在进行前端架构设计之前,请检查项目是否正在使用前端启动模板或现有代码库:
2280
-
2281
- 1. 审阅 PRD、主架构文档和头脑风暴简报,查找是否提及:
2282
- - 前端启动模板(例如:Create React App, Next.js, Vite, Vue CLI, Angular CLI 等)
2283
- - UI 套件或组件库启动器
2284
- - 被用作基础的现有前端项目
2285
- - 后台管理仪表盘模板或其他专用启动器
2286
- - 设计系统的实现
2287
-
2288
- 2. 如果提到了前端启动模板或现有项目:
2289
- - 要求用户通过以下方式之一提供访问权限:
2290
- - 启动模板的文档链接
2291
- - 上传/附加项目文件(适用于小型项目)
2292
- - 分享项目仓库的链接
2293
- - 分析该启动器/现有项目以了解:
2294
- - 预装的依赖项及其版本
2295
- - 文件夹结构和文件组织方式
2296
- - 内置组件和实用工具
2297
- - 样式方案(例如:CSS modules, styled-components, Tailwind 等)
2298
- - 状态管理设置(如有)
2299
- - 路由配置
2300
- - 测试设置和模式
2301
- - 构建和开发脚本
2302
- - 利用此分析确保你的前端架构与该启动器的模式保持一致
2303
-
2304
- 3. 如果没有提到前端启动器,但这是一个新的 UI,请确保我们了解所用的 UI 语言和框架:
2305
- - 根据框架的选择,建议合适的启动器:
2306
- - React: Create React App, Next.js, Vite + React
2307
- - Vue: Vue CLI, Nuxt.js, Vite + Vue
2308
- - Angular: Angular CLI
2309
- - 或在适用时推荐流行的 UI 模板
2310
- - 解释针对前端开发的特定优势
2311
-
2312
- 4. 如果用户确认不使用任何启动模板:
2313
- - 请注意,所有的工具、打包和配置都需要手动设置
2314
- - 从头开始进行前端架构设计
2315
-
2316
- 在继续之前,记录下关于启动模板的决定及其带来的任何限制。
2317
- sections:
2318
- - id: changelog
2319
- title: 变更日志
2320
- type: table
2321
- columns: [日期, 版本, 描述, 作者]
2322
- instruction: 跟踪文档版本和变更
2323
-
2324
- - id: frontend-tech-stack
2325
- title: 前端技术栈
2326
- instruction: 从主架构文档的“技术栈表”中提取。本节内容必须与主架构文档保持同步。
2327
- elicit: true
2328
- sections:
2329
- - id: tech-stack-table
2330
- title: 技术栈表
2331
- type: table
2332
- columns: [类别, 技术, 版本, 用途, 选型理由]
2333
- instruction: 根据所选框架和项目需求,填写适当的技术选型。
2334
- rows:
2335
- - [
2336
- "框架",
2337
- "{{framework}}",
2338
- "{{version}}",
2339
- "{{purpose}}",
2340
- "{{why_chosen}}",
2341
- ]
2342
- - [
2343
- "UI 库",
2344
- "{{ui_library}}",
2345
- "{{version}}",
2346
- "{{purpose}}",
2347
- "{{why_chosen}}",
2348
- ]
2349
- - [
2350
- "状态管理",
2351
- "{{state_management}}",
2352
- "{{version}}",
2353
- "{{purpose}}",
2354
- "{{why_chosen}}",
2355
- ]
2356
- - [
2357
- "路由",
2358
- "{{routing_library}}",
2359
- "{{version}}",
2360
- "{{purpose}}",
2361
- "{{why_chosen}}",
2362
- ]
2363
- - [
2364
- "构建工具",
2365
- "{{build_tool}}",
2366
- "{{version}}",
2367
- "{{purpose}}",
2368
- "{{why_chosen}}",
2369
- ]
2370
- - [
2371
- "样式方案",
2372
- "{{styling_solution}}",
2373
- "{{version}}",
2374
- "{{purpose}}",
2375
- "{{why_chosen}}",
2376
- ]
2377
- - [
2378
- "测试",
2379
- "{{test_framework}}",
2380
- "{{version}}",
2381
- "{{purpose}}",
2382
- "{{why_chosen}}",
2383
- ]
2384
- - [
2385
- "组件库",
2386
- "{{component_lib}}",
2387
- "{{version}}",
2388
- "{{purpose}}",
2389
- "{{why_chosen}}",
2390
- ]
2391
- - [
2392
- "表单处理",
2393
- "{{form_library}}",
2394
- "{{version}}",
2395
- "{{purpose}}",
2396
- "{{why_chosen}}",
2397
- ]
2398
- - [
2399
- "动画",
2400
- "{{animation_lib}}",
2401
- "{{version}}",
2402
- "{{purpose}}",
2403
- "{{why_chosen}}",
2404
- ]
2405
- - [
2406
- "开发工具",
2407
- "{{dev_tools}}",
2408
- "{{version}}",
2409
- "{{purpose}}",
2410
- "{{why_chosen}}",
2411
- ]
2412
-
2413
- - id: project-structure
2414
- title: 项目结构
2415
- instruction: 根据所选框架,为 AI 工具定义确切的目录结构。请具体说明每种类型文件的存放位置。生成的结构需遵循框架的最佳实践和约定。
2416
- elicit: true
2417
- type: code
2418
- language: plaintext
2419
-
2420
- - id: component-standards
2421
- title: 组件标准
2422
- instruction: 根据所选框架,定义用于创建组件的确切模式。
2423
- elicit: true
2424
- sections:
2425
- - id: component-template
2426
- title: 组件模板
2427
- instruction: 遵循框架的最佳实践,生成一个最小但完整的组件模板。模板中应包含 TypeScript 类型、正确的导入语句和基本结构。
2428
- type: code
2429
- language: typescript
2430
- - id: naming-conventions
2431
- title: 命名约定
2432
- instruction: 为组件、文件、服务、状态管理以及其他架构元素,提供特定于所选框架的命名约定。
2433
-
2434
- - id: state-management
2435
- title: 状态管理
2436
- instruction: 根据所选框架,定义状态管理模式。
2437
- elicit: true
2438
- sections:
2439
- - id: store-structure
2440
- title: Store 结构
2441
- instruction: 为所选框架和状态管理方案,生成合适的目录结构。
2442
- type: code
2443
- language: plaintext
2444
- - id: state-template
2445
- title: 状态管理模板
2446
- instruction: 遵循框架推荐的模式,提供一个基本的状态管理模板/示例。其中应包含 TypeScript 类型以及设置、更新和清除状态等常见操作。
2447
- type: code
2448
- language: typescript
2449
-
2450
- - id: api-integration
2451
- title: API 集成
2452
- instruction: 根据所选框架,定义 API 服务模式。
2453
- elicit: true
2454
- sections:
2455
- - id: service-template
2456
- title: 服务模板
2457
- instruction: 提供一个遵循框架约定的 API 服务模板。其中应包含正确的 TypeScript 类型、错误处理和异步模式。
2458
- type: code
2459
- language: typescript
2460
- - id: api-client-config
2461
- title: API 客户端配置
2462
- instruction: 演示如何为所选框架配置 HTTP 客户端,包括身份验证拦截器/中间件和错误处理。
2463
- type: code
2464
- language: typescript
2465
-
2466
- - id: routing
2467
- title: 路由
2468
- instruction: 根据所选框架,定义路由结构和模式。
2469
- elicit: true
2470
- sections:
2471
- - id: route-configuration
2472
- title: 路由配置
2473
- instruction: 提供适用于所选框架的路由配置。其中应包含受保护的路由模式、适用时的懒加载以及身份验证守卫/中间件。
2474
- type: code
2475
- language: typescript
2476
-
2477
- - id: styling-guidelines
2478
- title: 样式指南
2479
- instruction: 根据所选框架,定义样式方案。
2480
- elicit: true
2481
- sections:
2482
- - id: styling-approach
2483
- title: 样式方案
2484
- instruction: 描述适用于所选框架的样式方法论(如 CSS Modules, Styled Components, Tailwind 等),并提供基本模式。
2485
- - id: global-theme
2486
- title: 全局主题变量
2487
- instruction: 提供一个可跨所有框架工作的 CSS 自定义属性(CSS 变量)主题系统。其中应包含颜色、间距、排版、阴影和暗黑模式支持。
2488
- type: code
2489
- language: css
2490
-
2491
- - id: testing-requirements
2492
- title: 测试要求
2493
- instruction: 根据所选框架,定义最低测试要求。
2494
- elicit: true
2495
- sections:
2496
- - id: component-test-template
2497
- title: 组件测试模板
2498
- instruction: 使用框架推荐的测试库,提供一个基本的组件测试模板。其中应包含渲染测试、用户交互测试和模拟(mocking)的示例。
2499
- type: code
2500
- language: typescript
2501
- - id: testing-best-practices
2502
- title: 测试最佳实践
2503
- type: numbered-list
2504
- items:
2505
- - "**单元测试**: 独立测试单个组件"
2506
- - "**集成测试**: 测试组件间的交互"
2507
- - "**端到端测试 (E2E Tests)**: 测试关键用户流程(使用 Cypress/Playwright)"
2508
- - "**覆盖率目标**: 目标为 80% 的代码覆盖率"
2509
- - "**测试结构**: 遵循 Arrange-Act-Assert(准备-执行-断言)模式"
2510
- - "**模拟外部依赖**: API 调用、路由、状态管理"
2511
-
2512
- - id: environment-configuration
2513
- title: 环境配置
2514
- instruction: 根据所选框架,列出所需的环境变量。展示适用于该框架的正确格式和命名约定。
2515
- elicit: true
2516
-
2517
- - id: frontend-developer-standards
2518
- title: 前端开发规范
2519
- sections:
2520
- - id: critical-coding-rules
2521
- title: 关键编码规则
2522
- instruction: 列出能够防止常见 AI 错误的必要规则,包括通用规则和特定于框架的规则。
2523
- elicit: true
2524
- - id: quick-reference
2525
- title: 快速参考
2526
- instruction: |
2527
- 创建一个针对特定框架的速查表,包含以下内容:
2528
- - 常用命令(例如启动开发服务器、构建、测试)
2529
- - 关键的导入模式
2530
- - 文件命名约定
2531
- - 项目特定的模式和实用工具
2532
- ==================== END: .xiaoma-core/templates/front-end-architecture-tmpl.yaml ====================
2533
-
2534
- ==================== START: .xiaoma-core/templates/fullstack-architecture-tmpl.yaml ====================
2535
- template:
2536
- id: fullstack-architecture-template-v2
2537
- name: 全栈架构文档
2538
- version: 2.0
2539
- output:
2540
- format: markdown
2541
- filename: docs/architecture.md
2542
- title: "{{project_name}} Fullstack Architecture Document"
2543
-
2544
- workflow:
2545
- mode: interactive
2546
- elicitation: advanced-elicitation
2547
-
2548
- sections:
2549
- - id: introduction
2550
- title: 引言
2551
- instruction: |
2552
- 如果可以,请在开始前审阅所有提供的相关文档以收集全部上下文。你至少应能访问 docs/prd.md 和 docs/front-end-spec.md。如果需要但找不到任何文档,请向用户索取。该模板旨在创建一个统一的架构,涵盖后端和前端的关注点,以指导 AI 驱动的全栈开发。
2553
- elicit: true
2554
- content: |
2555
- 本文档概述了 {{project_name}} 的完整全栈架构,包括后端系统、前端实现及其集成。它将作为 AI 驱动开发的唯一事实来源,确保整个技术栈的一致性。
2556
-
2557
- 这种统一的方法结合了传统上独立的后端和前端架构文档,为现代全栈应用简化了开发流程,因为在这些应用中,前后端的关注点日益交织在一起。
2558
- sections:
2559
- - id: starter-template
2560
- title: 启动模板或现有项目
2561
- instruction: |
2562
- 在进行架构设计之前,请检查项目是否基于任何启动模板或现有代码库:
2563
-
2564
- 1. 审阅 PRD 和其他文档,查找是否提及:
2565
- - 全栈启动模板 (例如, T3 Stack, MEAN/MERN starters, Django + React templates)
2566
- - Monorepo 模板 (例如, Nx, Turborepo starters)
2567
- - 特定平台的启动模板 (例如, Vercel templates, AWS Amplify starters)
2568
- - 正在扩展或克隆的现有项目
2569
-
2570
- 2. 如果提到了启动模板或现有项目:
2571
- - 请求用户提供访问权限 (链接、代码库或文件)
2572
- - 分析以理解预先配置的选择和约束
2573
- - 注意任何已经做出的架构决策
2574
- - 确定哪些可以修改,哪些必须保留
2575
-
2576
- 3. 如果没有提到启动模板但这是一个全新项目:
2577
- - 根据技术偏好建议合适的的全栈启动模板
2578
- - 考虑特定平台的选项 (Vercel, AWS, 等)
2579
- - 让用户决定是否使用
2580
-
2581
- 4. 记录下最终决定及其带来的任何约束
2582
-
2583
- 如果没有,请注明“N/A - 全新项目”
2584
- - id: changelog
2585
- title: 变更日志
2586
- type: table
2587
- columns: [日期, 版本, 描述, 作者]
2588
- instruction: 跟踪文档版本和变更
2589
-
2590
- - id: high-level-architecture
2591
- title: 高层架构
2592
- instruction: 本节包含多个用于奠定基础的子部分。请将所有子部分一并呈现,然后就整个部分征求反馈。
2593
- elicit: true
2594
- sections:
2595
- - id: technical-summary
2596
- title: 技术摘要
2597
- instruction: |
2598
- 提供一个全面的概述 (4-6句话),涵盖:
2599
- - 整体架构风格和部署方法
2600
- - 前端框架和后端技术的选择
2601
- - 前后端之间的关键集成点
2602
- - 基础设施平台与服务
2603
- - 该架构如何实现 PRD 目标
2604
- - id: platform-infrastructure
2605
- title: 平台与基础设施选择
2606
- instruction: |
2607
- 基于 PRD 需求和技术假设,提出平台建议:
2608
-
2609
- 1. 考虑常见模式 (非详尽列表,请运用你的最佳判断并根据需要搜索网络以了解新兴趋势):
2610
- - **Vercel + Supabase**: 用于 Next.js 的快速开发,内置认证/存储
2611
- - **AWS Full Stack**: 用于企业级规模,使用 Lambda, API Gateway, S3, Cognito
2612
- - **Azure**: 用于 .NET 生态系统或企业微软环境
2613
- - **Google Cloud**: 用于重度依赖 ML/AI 的应用或 Google 生态系统集成
2614
-
2615
- 2. 提出 2-3 个可行的选项,并清晰说明其优缺点
2616
- 3. 提出建议并附上理由
2617
- 4. 获得用户的明确确认
2618
-
2619
- 记录所选平台及将要使用的关键服务。
2620
- template: |
2621
- **平台:** {{selected_platform}}
2622
- **核心服务:** {{core_services_list}}
2623
- **部署主机与区域:** {{regions}}
2624
- - id: repository-structure
2625
- title: 代码仓库结构
2626
- instruction: |
2627
- 根据 PRD 需求和平台选择定义代码仓库方案,解释你的理由,如果不确定则向用户提问:
2628
-
2629
- 1. 对于现代全栈应用,通常首选 monorepo
2630
- 2. 考虑相关工具 (Nx, Turborepo, Lerna, npm workspaces)
2631
- 3. 定义包/应用的边界
2632
- 4. 为前后端之间的共享代码进行规划
2633
- template: |
2634
- **结构:** {{repo_structure_choice}}
2635
- **Monorepo 工具:** {{monorepo_tool_if_applicable}}
2636
- **包组织方式:** {{package_strategy}}
2637
- - id: architecture-diagram
2638
- title: 高层架构图
2639
- type: mermaid
2640
- mermaid_type: graph
2641
- instruction: |
2642
- 创建一个 Mermaid 图,展示完整的系统架构,包括:
2643
- - 用户入口点 (Web, 移动端)
2644
- - 前端应用部署
2645
- - API 层 (REST/GraphQL)
2646
- - 后端服务
2647
- - 数据库和存储
2648
- - 外部集成
2649
- - CDN 和缓存层
2650
-
2651
- 使用合适的图表类型以保证清晰。
2652
- - id: architectural-patterns
2653
- title: 架构模式
2654
- instruction: |
2655
- 列出将指导前后端开发的模式。包括以下模式:
2656
- - 整体架构 (例如, Jamstack, Serverless, Microservices)
2657
- - 前端模式 (例如, Component-based, State management)
2658
- - 后端模式 (例如, Repository, CQRS, Event-driven)
2659
- - 集成模式 (例如, BFF, API Gateway)
2660
-
2661
- 为每种模式提供建议和理由。
2662
- repeatable: true
2663
- template: "- **{{pattern_name}}:** {{pattern_description}} - _理由:_ {{rationale}}"
2664
- examples:
2665
- - "**Jamstack Architecture:** 静态站点生成与无服务器 API - _理由:_ 为内容密集型应用提供最佳性能和可伸缩性"
2666
- - "**Component-Based UI:** 使用 TypeScript 的可复用 React 组件 - _理由:_ 保证大型代码库的可维护性和类型安全"
2667
- - "**Repository Pattern:** 抽象数据访问逻辑 - _理由:_ 便于测试和未来的数据库迁移"
2668
- - "**API Gateway Pattern:** 所有 API 调用的单一入口点 - _理由:_ 集中进行认证、速率限制和监控"
2669
-
2670
- - id: tech-stack
2671
- title: 技术栈
2672
- instruction: |
2673
- 这是整个项目最终的技术选型。与用户合作敲定所有选择。此表是唯一的事实来源——所有开发都必须使用这些确切的版本。
2674
-
2675
- 需要涵盖的关键领域:
2676
- - 前后端语言/框架
2677
- - 数据库和缓存
2678
- - 认证和授权
2679
- - API 方案
2680
- - 前后端测试工具
2681
- - 构建和部署工具
2682
- - 监控和日志记录
2683
-
2684
- 渲染后,立即征求反馈。
2685
- elicit: true
2686
- sections:
2687
- - id: tech-stack-table
2688
- title: 技术栈表
2689
- type: table
2690
- columns: [类别, 技术, 版本, 用途, 理由]
2691
- rows:
2692
- - [
2693
- "前端语言",
2694
- "{{fe_language}}",
2695
- "{{version}}",
2696
- "{{purpose}}",
2697
- "{{why_chosen}}",
2698
- ]
2699
- - [
2700
- "前端框架",
2701
- "{{fe_framework}}",
2702
- "{{version}}",
2703
- "{{purpose}}",
2704
- "{{why_chosen}}",
2705
- ]
2706
- - [
2707
- "UI 组件库",
2708
- "{{ui_library}}",
2709
- "{{version}}",
2710
- "{{purpose}}",
2711
- "{{why_chosen}}",
2712
- ]
2713
- - [
2714
- "状态管理",
2715
- "{{state_mgmt}}",
2716
- "{{version}}",
2717
- "{{purpose}}",
2718
- "{{why_chosen}}",
2719
- ]
2720
- - [
2721
- "后端语言",
2722
- "{{be_language}}",
2723
- "{{version}}",
2724
- "{{purpose}}",
2725
- "{{why_chosen}}",
2726
- ]
2727
- - [
2728
- "后端框架",
2729
- "{{be_framework}}",
2730
- "{{version}}",
2731
- "{{purpose}}",
2732
- "{{why_chosen}}",
2733
- ]
2734
- - [
2735
- "API 风格",
2736
- "{{api_style}}",
2737
- "{{version}}",
2738
- "{{purpose}}",
2739
- "{{why_chosen}}",
2740
- ]
2741
- - [
2742
- "数据库",
2743
- "{{database}}",
2744
- "{{version}}",
2745
- "{{purpose}}",
2746
- "{{why_chosen}}",
2747
- ]
2748
- - [
2749
- "缓存",
2750
- "{{cache}}",
2751
- "{{version}}",
2752
- "{{purpose}}",
2753
- "{{why_chosen}}",
2754
- ]
2755
- - [
2756
- "文件存储",
2757
- "{{storage}}",
2758
- "{{version}}",
2759
- "{{purpose}}",
2760
- "{{why_chosen}}",
2761
- ]
2762
- - ["认证", "{{auth}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
2763
- - [
2764
- "前端测试",
2765
- "{{fe_test}}",
2766
- "{{version}}",
2767
- "{{purpose}}",
2768
- "{{why_chosen}}",
2769
- ]
2770
- - [
2771
- "后端测试",
2772
- "{{be_test}}",
2773
- "{{version}}",
2774
- "{{purpose}}",
2775
- "{{why_chosen}}",
2776
- ]
2777
- - [
2778
- "E2E 测试",
2779
- "{{e2e_test}}",
2780
- "{{version}}",
2781
- "{{purpose}}",
2782
- "{{why_chosen}}",
2783
- ]
2784
- - [
2785
- "构建工具",
2786
- "{{build_tool}}",
2787
- "{{version}}",
2788
- "{{purpose}}",
2789
- "{{why_chosen}}",
2790
- ]
2791
- - [
2792
- "打包工具",
2793
- "{{bundler}}",
2794
- "{{version}}",
2795
- "{{purpose}}",
2796
- "{{why_chosen}}",
2797
- ]
2798
- - [
2799
- "IaC 工具",
2800
- "{{iac_tool}}",
2801
- "{{version}}",
2802
- "{{purpose}}",
2803
- "{{why_chosen}}",
2804
- ]
2805
- - [
2806
- "CI/CD",
2807
- "{{cicd}}",
2808
- "{{version}}",
2809
- "{{purpose}}",
2810
- "{{why_chosen}}",
2811
- ]
2812
- - [
2813
- "监控",
2814
- "{{monitoring}}",
2815
- "{{version}}",
2816
- "{{purpose}}",
2817
- "{{why_chosen}}",
2818
- ]
2819
- - [
2820
- "日志",
2821
- "{{logging}}",
2822
- "{{version}}",
2823
- "{{purpose}}",
2824
- "{{why_chosen}}",
2825
- ]
2826
- - [
2827
- "CSS 框架",
2828
- "{{css_framework}}",
2829
- "{{version}}",
2830
- "{{purpose}}",
2831
- "{{why_chosen}}",
2832
- ]
2833
-
2834
- - id: data-models
2835
- title: 数据模型
2836
- instruction: |
2837
- 定义将在前后端共享的核心数据模型/实体:
2838
-
2839
- 1. 审阅 PRD 需求,识别关键业务实体
2840
- 2. 对每个模型,解释其用途和关系
2841
- 3. 包括关键属性和数据类型
2842
- 4. 展示模型之间的关系
2843
- 5. 创建可以共享的 TypeScript 接口
2844
- 6. 与用户讨论设计决策
2845
-
2846
- 在进入数据库模式设计之前,创建一个清晰的概念模型。
2847
- elicit: true
2848
- repeatable: true
2849
- sections:
2850
- - id: model
2851
- title: "{{model_name}}"
2852
- template: |
2853
- **用途:** {{model_purpose}}
2854
-
2855
- **关键属性:**
2856
- - {{attribute_1}}: {{type_1}} - {{description_1}}
2857
- - {{attribute_2}}: {{type_2}} - {{description_2}}
2858
- sections:
2859
- - id: typescript-interface
2860
- title: TypeScript 接口
2861
- type: code
2862
- language: typescript
2863
- template: "{{model_interface}}"
2864
- - id: relationships
2865
- title: 关系
2866
- type: bullet-list
2867
- template: "- {{relationship}}"
2868
-
2869
- - id: api-spec
2870
- title: API 规范
2871
- instruction: |
2872
- 基于在技术栈中选择的 API 风格:
2873
-
2874
- 1. 如果是 REST API, 创建一个 OpenAPI 3.0 规范
2875
- 2. 如果是 GraphQL, 提供 GraphQL 模式
2876
- 3. 如果是 tRPC, 展示路由定义
2877
- 4. 包括来自模块/故事的所有端点
2878
- 5. 基于数据模型定义请求/响应模式
2879
- 6. 记录认证要求
2880
- 7. 包括请求/响应示例
2881
-
2882
- 使用与所选 API 风格相符的格式。如果项目没有 API (例如, 静态网站),则跳过此部分。
2883
- elicit: true
2884
- sections:
2885
- - id: rest-api
2886
- title: REST API 规范
2887
- condition: API 风格为 REST
2888
- type: code
2889
- language: yaml
2890
- template: |
2891
- openapi: 3.0.0
2892
- info:
2893
- title: {{api_title}}
2894
- version: {{api_version}}
2895
- description: {{api_description}}
2896
- servers:
2897
- - url: {{server_url}}
2898
- description: {{server_description}}
2899
- - id: graphql-api
2900
- title: GraphQL 模式
2901
- condition: API 风格为 GraphQL
2902
- type: code
2903
- language: graphql
2904
- template: "{{graphql_schema}}"
2905
- - id: trpc-api
2906
- title: tRPC 路由定义
2907
- condition: API 风格为 tRPC
2908
- type: code
2909
- language: typescript
2910
- template: "{{trpc_routers}}"
2911
-
2912
- - id: components
2913
- title: 组件
2914
- instruction: |
2915
- 基于上述的架构模式、技术栈和数据模型:
2916
-
2917
- 1. 识别整个全栈中的主要逻辑组件/服务
2918
- 2. 同时考虑前端和后端组件
2919
- 3. 在组件之间定义清晰的边界和接口
2920
- 4. 对每个组件,指明:
2921
- - 主要职责
2922
- - 暴露的关键接口/API
2923
- - 对其他组件的依赖
2924
- - 基于技术栈选择的技术细节
2925
-
2926
- 5. 在有帮助的地方创建组件图
2927
- elicit: true
2928
- sections:
2929
- - id: component-list
2930
- repeatable: true
2931
- title: "{{component_name}}"
2932
- template: |
2933
- **职责:** {{component_description}}
2934
-
2935
- **关键接口:**
2936
- - {{interface_1}}
2937
- - {{interface_2}}
2938
-
2939
- **依赖:** {{dependencies}}
2940
-
2941
- **技术栈:** {{component_tech_details}}
2942
- - id: component-diagrams
2943
- title: 组件图
2944
- type: mermaid
2945
- instruction: |
2946
- 创建 Mermaid 图来可视化组件关系。选项包括:
2947
- - 用于高层视图的 C4 容器图
2948
- - 用于详细内部结构的组件图
2949
- - 用于复杂交互的时序图
2950
- 选择最合适的图以保证清晰。
2951
-
2952
- - id: external-apis
2953
- title: 外部 API
2954
- condition: 项目需要集成外部 API
2955
- instruction: |
2956
- 对于每个外部服务集成:
2957
-
2958
- 1. 根据 PRD 需求和组件设计,识别所需的 API
2959
- 2. 如果文档 URL 未知,向用户询问具体信息
2960
- 3. 记录认证方法和安全考量
2961
- 4. 列出将要使用的具体端点
2962
- 5. 注意任何速率限制或使用约束
2963
-
2964
- 如果不需要外部 API,请明确说明并跳到下一部分。
2965
- elicit: true
2966
- repeatable: true
2967
- sections:
2968
- - id: api
2969
- title: "{{api_name}} API"
2970
- template: |
2971
- - **用途:** {{api_purpose}}
2972
- - **文档:** {{api_docs_url}}
2973
- - **基础 URL(s):** {{api_base_url}}
2974
- - **认证:** {{auth_method}}
2975
- - **速率限制:** {{rate_limits}}
2976
-
2977
- **使用的关键端点:**
2978
- - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
2979
-
2980
- **集成说明:** {{integration_considerations}}
2981
-
2982
- - id: core-workflows
2983
- title: 核心工作流
2984
- type: mermaid
2985
- mermaid_type: sequence
2986
- instruction: |
2987
- 使用时序图阐释关键的系统工作流:
2988
-
2989
- 1. 从 PRD 中识别关键的用户旅程
2990
- 2. 展示包括外部 API 在内的组件交互
2991
- 3. 包括前端和后端的流程
2992
- 4. 包括错误处理路径
2993
- 5. 记录异步操作
2994
- 6. 根据需要创建高层和详细的图表
2995
-
2996
- 重点关注那些能阐明架构决策或复杂交互的工作流。
2997
- elicit: true
2998
-
2999
- - id: database-schema
3000
- title: 数据库模式
3001
- instruction: |
3002
- 将概念数据模型转换为具体的数据库模式:
3003
-
3004
- 1. 使用技术栈中选择的数据库类型
3005
- 2. 使用适当的表示法创建模式定义
3006
- 3. 包括索引、约束和关系
3007
- 4. 考虑性能和可伸缩性
3008
- 5. 对于 NoSQL, 展示文档结构
3009
-
3010
- 以适合数据库类型的格式呈现模式 (SQL DDL, JSON schema, 等)。
3011
- elicit: true
3012
-
3013
- - id: frontend-architecture
3014
- title: 前端架构
3015
- instruction: 定义前端特定的架构细节。在每个子部分之后,询问用户是否希望在继续前进行优化。
3016
- elicit: true
3017
- sections:
3018
- - id: component-architecture
3019
- title: 组件架构
3020
- instruction: 根据所选框架定义组件组织和模式。
3021
- sections:
3022
- - id: component-organization
3023
- title: 组件组织
3024
- type: code
3025
- language: text
3026
- template: "{{component_structure}}"
3027
- - id: component-template
3028
- title: 组件模板
3029
- type: code
3030
- language: typescript
3031
- template: "{{component_template}}"
3032
- - id: state-management
3033
- title: 状态管理架构
3034
- instruction: 基于所选方案详细说明状态管理方法。
3035
- sections:
3036
- - id: state-structure
3037
- title: 状态结构
3038
- type: code
3039
- language: typescript
3040
- template: "{{state_structure}}"
3041
- - id: state-patterns
3042
- title: 状态管理模式
3043
- type: bullet-list
3044
- template: "- {{pattern}}"
3045
- - id: routing-architecture
3046
- title: 路由架构
3047
- instruction: 根据框架选择定义路由结构。
3048
- sections:
3049
- - id: route-organization
3050
- title: 路由组织
3051
- type: code
3052
- language: text
3053
- template: "{{route_structure}}"
3054
- - id: protected-routes
3055
- title: 受保护路由模式
3056
- type: code
3057
- language: typescript
3058
- template: "{{protected_route_example}}"
3059
- - id: frontend-services
3060
- title: 前端服务层
3061
- instruction: 定义前端如何与后端通信。
3062
- sections:
3063
- - id: api-client-setup
3064
- title: API 客户端设置
3065
- type: code
3066
- language: typescript
3067
- template: "{{api_client_setup}}"
3068
- - id: service-example
3069
- title: 服务示例
3070
- type: code
3071
- language: typescript
3072
- template: "{{service_example}}"
3073
-
3074
- - id: backend-architecture
3075
- title: 后端架构
3076
- instruction: 定义后端特定的架构细节。考虑 serverless 与传统服务器方法。
3077
- elicit: true
3078
- sections:
3079
- - id: service-architecture
3080
- title: 服务架构
3081
- instruction: 基于平台选择,定义服务组织。
3082
- sections:
3083
- - id: serverless-architecture
3084
- condition: 选择 Serverless 架构时
3085
- sections:
3086
- - id: function-organization
3087
- title: 函数组织
3088
- type: code
3089
- language: text
3090
- template: "{{function_structure}}"
3091
- - id: function-template
3092
- title: 函数模板
3093
- type: code
3094
- language: typescript
3095
- template: "{{function_template}}"
3096
- - id: traditional-server
3097
- condition: 选择传统服务器架构时
3098
- sections:
3099
- - id: controller-organization
3100
- title: 控制器/路由组织
3101
- type: code
3102
- language: text
3103
- template: "{{controller_structure}}"
3104
- - id: controller-template
3105
- title: 控制器模板
3106
- type: code
3107
- language: typescript
3108
- template: "{{controller_template}}"
3109
- - id: database-architecture
3110
- title: 数据库架构
3111
- instruction: 定义数据库模式和访问模式。
3112
- sections:
3113
- - id: schema-design
3114
- title: 模式设计
3115
- type: code
3116
- language: sql
3117
- template: "{{database_schema}}"
3118
- - id: data-access-layer
3119
- title: 数据访问层
3120
- type: code
3121
- language: typescript
3122
- template: "{{repository_pattern}}"
3123
- - id: auth-architecture
3124
- title: 认证与授权
3125
- instruction: 定义认证实现的细节。
3126
- sections:
3127
- - id: auth-flow
3128
- title: 认证流程
3129
- type: mermaid
3130
- mermaid_type: sequence
3131
- template: "{{auth_flow_diagram}}"
3132
- - id: auth-middleware
3133
- title: 中间件/守卫
3134
- type: code
3135
- language: typescript
3136
- template: "{{auth_middleware}}"
3137
-
3138
- - id: unified-project-structure
3139
- title: 统一项目结构
3140
- instruction: 创建一个能够容纳前后端的 monorepo 结构。根据所选的工具和框架进行调整。
3141
- elicit: true
3142
- type: code
3143
- language: plaintext
3144
- examples:
3145
- - |
3146
- {{project-name}}/
3147
- ├── .github/ # CI/CD 工作流
3148
- │ └── workflows/
3149
- │ ├── ci.yaml
3150
- │ └── deploy.yaml
3151
- ├── apps/ # 应用包
3152
- │ ├── web/ # 前端应用
3153
- │ │ ├── src/
3154
- │ │ │ ├── components/ # UI 组件
3155
- │ │ │ ├── pages/ # 页面组件/路由
3156
- │ │ │ ├── hooks/ # 自定义 React 钩子
3157
- │ │ │ ├── services/ # API 客户端服务
3158
- │ │ │ ├── stores/ # 状态管理
3159
- │ │ │ ├── styles/ # 全局样式/主题
3160
- │ │ │ └── utils/ # 前端工具库
3161
- │ │ ├── public/ # 静态资源
3162
- │ │ ├── tests/ # 前端测试
3163
- │ │ └── package.json
3164
- │ └── api/ # 后端应用
3165
- │ ├── src/
3166
- │ │ ├── routes/ # API 路由/控制器
3167
- │ │ ├── services/ # 业务逻辑
3168
- │ │ ├── models/ # 数据模型
3169
- │ │ ├── middleware/ # Express/API 中间件
3170
- │ │ ├── utils/ # 后端工具库
3171
- │ │ └── {{serverless_or_server_entry}}
3172
- │ ├── tests/ # 后端测试
3173
- │ └── package.json
3174
- ├── packages/ # 共享包
3175
- │ ├── shared/ # 共享类型/工具库
3176
- │ │ ├── src/
3177
- │ │ │ ├── types/ # TypeScript 接口
3178
- │ │ │ ├── constants/ # 共享常量
3179
- │ │ │ └── utils/ # 共享工具库
3180
- │ │ └── package.json
3181
- │ ├── ui/ # 共享 UI 组件
3182
- │ │ ├── src/
3183
- │ │ └── package.json
3184
- │ └── config/ # 共享配置
3185
- │ ├── eslint/
3186
- │ ├── typescript/
3187
- │ └── jest/
3188
- ├── infrastructure/ # IaC 定义
3189
- │ └── {{iac_structure}}
3190
- ├── scripts/ # 构建/部署脚本
3191
- ├── docs/ # 文档
3192
- │ ├── prd.md
3193
- │ ├── front-end-spec.md
3194
- │ └── fullstack-architecture.md
3195
- ├── .env.example # 环境模板
3196
- ├── package.json # 根 package.json
3197
- ├── {{monorepo_config}} # Monorepo 配置文件
3198
- └── README.md
3199
-
3200
- - id: development-workflow
3201
- title: 开发工作流
3202
- instruction: 为全栈应用定义开发设置和工作流。
3203
- elicit: true
3204
- sections:
3205
- - id: local-setup
3206
- title: 本地开发设置
3207
- sections:
3208
- - id: prerequisites
3209
- title: 先决条件
3210
- type: code
3211
- language: bash
3212
- template: "{{prerequisites_commands}}"
3213
- - id: initial-setup
3214
- title: 初始设置
3215
- type: code
3216
- language: bash
3217
- template: "{{setup_commands}}"
3218
- - id: dev-commands
3219
- title: 开发命令
3220
- type: code
3221
- language: bash
3222
- template: |
3223
- # 启动所有服务
3224
- {{start_all_command}}
3225
-
3226
- # 仅启动前端
3227
- {{start_frontend_command}}
3228
-
3229
- # 仅启动后端
3230
- {{start_backend_command}}
3231
-
3232
- # 运行测试
3233
- {{test_commands}}
3234
- - id: environment-config
3235
- title: 环境配置
3236
- sections:
3237
- - id: env-vars
3238
- title: 所需环境变量
3239
- type: code
3240
- language: bash
3241
- template: |
3242
- # 前端 (.env.local)
3243
- {{frontend_env_vars}}
3244
-
3245
- # 后端 (.env)
3246
- {{backend_env_vars}}
3247
-
3248
- # 共享
3249
- {{shared_env_vars}}
3250
-
3251
- - id: deployment-architecture
3252
- title: 部署架构
3253
- instruction: 基于平台选择定义部署策略。
3254
- elicit: true
3255
- sections:
3256
- - id: deployment-strategy
3257
- title: 部署策略
3258
- template: |
3259
- **前端部署:**
3260
- - **平台:** {{frontend_deploy_platform}}
3261
- - **构建命令:** {{frontend_build_command}}
3262
- - **输出目录:** {{frontend_output_dir}}
3263
- - **CDN/边缘网络:** {{cdn_strategy}}
3264
-
3265
- **后端部署:**
3266
- - **平台:** {{backend_deploy_platform}}
3267
- - **构建命令:** {{backend_build_command}}
3268
- - **部署方法:** {{deployment_method}}
3269
- - id: cicd-pipeline
3270
- title: CI/CD 流水线
3271
- type: code
3272
- language: yaml
3273
- template: "{{cicd_pipeline_config}}"
3274
- - id: environments
3275
- title: 环境
3276
- type: table
3277
- columns: [环境, 前端 URL, 后端 URL, 用途]
3278
- rows:
3279
- - ["开发", "{{dev_fe_url}}", "{{dev_be_url}}", "本地开发"]
3280
- - ["预发布", "{{staging_fe_url}}", "{{staging_be_url}}", "生产前测试"]
3281
- - ["生产", "{{prod_fe_url}}", "{{prod_be_url}}", "线上环境"]
3282
-
3283
- - id: security-performance
3284
- title: 安全性与性能
3285
- instruction: 为全栈应用定义安全性和性能方面的考量。
3286
- elicit: true
3287
- sections:
3288
- - id: security-requirements
3289
- title: 安全要求
3290
- template: |
3291
- **前端安全:**
3292
- - CSP 头: {{csp_policy}}
3293
- - XSS 防护: {{xss_strategy}}
3294
- - 安全存储: {{storage_strategy}}
3295
-
3296
- **后端安全:**
3297
- - 输入验证: {{validation_approach}}
3298
- - 速率限制: {{rate_limit_config}}
3299
- - CORS 策略: {{cors_config}}
3300
-
3301
- **认证安全:**
3302
- - 令牌存储: {{token_strategy}}
3303
- - 会话管理: {{session_approach}}
3304
- - 密码策略: {{password_requirements}}
3305
- - id: performance-optimization
3306
- title: 性能优化
3307
- template: |
3308
- **前端性能:**
3309
- - 打包体积目标: {{bundle_size}}
3310
- - 加载策略: {{loading_approach}}
3311
- - 缓存策略: {{fe_cache_strategy}}
3312
-
3313
- **后端性能:**
3314
- - 响应时间目标: {{response_target}}
3315
- - 数据库优化: {{db_optimization}}
3316
- - 缓存策略: {{be_cache_strategy}}
3317
-
3318
- - id: testing-strategy
3319
- title: 测试策略
3320
- instruction: 为全栈应用定义全面的测试方法。
3321
- elicit: true
3322
- sections:
3323
- - id: testing-pyramid
3324
- title: 测试金字塔
3325
- type: code
3326
- language: text
3327
- template: |
3328
- E2E 测试
3329
- / \
3330
- 集成测试
3331
- / \
3332
- 前端单元测试 后端单元测试
3333
- - id: test-organization
3334
- title: 测试组织
3335
- sections:
3336
- - id: frontend-tests
3337
- title: 前端测试
3338
- type: code
3339
- language: text
3340
- template: "{{frontend_test_structure}}"
3341
- - id: backend-tests
3342
- title: 后端测试
3343
- type: code
3344
- language: text
3345
- template: "{{backend_test_structure}}"
3346
- - id: e2e-tests
3347
- title: E2E 测试
3348
- type: code
3349
- language: text
3350
- template: "{{e2e_test_structure}}"
3351
- - id: test-examples
3352
- title: 测试示例
3353
- sections:
3354
- - id: frontend-test
3355
- title: 前端组件测试
3356
- type: code
3357
- language: typescript
3358
- template: "{{frontend_test_example}}"
3359
- - id: backend-test
3360
- title: 后端 API 测试
3361
- type: code
3362
- language: typescript
3363
- template: "{{backend_test_example}}"
3364
- - id: e2e-test
3365
- title: E2E 测试
3366
- type: code
3367
- language: typescript
3368
- template: "{{e2e_test_example}}"
3369
-
3370
- - id: coding-standards
3371
- title: 编码规范
3372
- instruction: 为 AI 代理定义最少但关键的规范。仅关注能防止常见错误的项目特定规则。这些规范将由开发代理使用。
3373
- elicit: true
3374
- sections:
3375
- - id: critical-rules
3376
- title: 关键全栈规则
3377
- repeatable: true
3378
- template: "- **{{rule_name}}:** {{rule_description}}"
3379
- examples:
3380
- - "**类型共享:** 始终在 packages/shared 中定义类型并从那里导入"
3381
- - "**API 调用:** 绝不直接进行 HTTP 调用 - 使用服务层"
3382
- - "**环境变量:** 仅通过配置对象访问,绝不直接使用 process.env"
3383
- - "**错误处理:** 所有 API 路由必须使用标准的错误处理器"
3384
- - "**状态更新:** 绝不直接修改状态 - 使用正确的状态管理模式"
3385
- - id: naming-conventions
3386
- title: 命名约定
3387
- type: table
3388
- columns: [元素, 前端, 后端, 示例]
3389
- rows:
3390
- - ["组件", "PascalCase", "-", "`UserProfile.tsx`"]
3391
- - ["Hooks", "使用 'use' 前缀的 camelCase", "-", "`useAuth.ts`"]
3392
- - ["API 路由", "-", "kebab-case", "`/api/user-profile`"]
3393
- - ["数据库表", "-", "snake_case", "`user_profiles`"]
3394
-
3395
- - id: error-handling
3396
- title: 错误处理策略
3397
- instruction: 定义跨前后端的统一错误处理。
3398
- elicit: true
3399
- sections:
3400
- - id: error-flow
3401
- title: 错误流程
3402
- type: mermaid
3403
- mermaid_type: sequence
3404
- template: "{{error_flow_diagram}}"
3405
- - id: error-format
3406
- title: 错误响应格式
3407
- type: code
3408
- language: typescript
3409
- template: |
3410
- interface ApiError {
3411
- error: {
3412
- code: string;
3413
- message: string;
3414
- details?: Record<string, any>;
3415
- timestamp: string;
3416
- requestId: string;
3417
- };
3418
- }
3419
- - id: frontend-error-handling
3420
- title: 前端错误处理
3421
- type: code
3422
- language: typescript
3423
- template: "{{frontend_error_handler}}"
3424
- - id: backend-error-handling
3425
- title: 后端错误处理
3426
- type: code
3427
- language: typescript
3428
- template: "{{backend_error_handler}}"
3429
-
3430
- - id: monitoring
3431
- title: 监控与可观测性
3432
- instruction: 为全栈应用定义监控策略。
3433
- elicit: true
3434
- sections:
3435
- - id: monitoring-stack
3436
- title: 监控技术栈
3437
- template: |
3438
- - **前端监控:** {{frontend_monitoring}}
3439
- - **后端监控:** {{backend_monitoring}}
3440
- - **错误跟踪:** {{error_tracking}}
3441
- - **性能监控:** {{perf_monitoring}}
3442
- - id: key-metrics
3443
- title: 关键指标
3444
- template: |
3445
- **前端指标:**
3446
- - Core Web Vitals
3447
- - JavaScript 错误
3448
- - API 响应时间
3449
- - 用户交互
3450
-
3451
- **后端指标:**
3452
- - 请求速率
3453
- - 错误率
3454
- - 响应时间
3455
- - 数据库查询性能
3456
-
3457
- - id: checklist-results
3458
- title: 检查清单结果报告
3459
- instruction: 在运行检查清单前,提议输出完整的架构文档。一旦用户确认,执行 architect-checklist 并在此处填充结果。
3460
- ==================== END: .xiaoma-core/templates/fullstack-architecture-tmpl.yaml ====================
3461
-
3462
- ==================== START: .xiaoma-core/checklists/architect-checklist.md ====================
3463
- <!-- Powered by XiaoMa™ Core -->
3464
-
3465
- # Architect Solution Validation Checklist
3466
-
3467
- This checklist serves as a comprehensive framework for the Architect to validate the technical design and architecture before development execution. The Architect should systematically work through each item, ensuring the architecture is robust, scalable, secure, and aligned with the product requirements.
3468
-
3469
- [[LLM: INITIALIZATION INSTRUCTIONS - REQUIRED ARTIFACTS
3470
-
3471
- Before proceeding with this checklist, ensure you have access to:
3472
-
3473
- 1. architecture.md - The primary architecture document (check docs/architecture.md)
3474
- 2. prd.md - Product Requirements Document for requirements alignment (check docs/prd.md)
3475
- 3. frontend-architecture.md or fe-architecture.md - If this is a UI project (check docs/frontend-architecture.md)
3476
- 4. Any system diagrams referenced in the architecture
3477
- 5. API documentation if available
3478
- 6. Technology stack details and version specifications
3479
-
3480
- IMPORTANT: If any required documents are missing or inaccessible, immediately ask the user for their location or content before proceeding.
3481
-
3482
- PROJECT TYPE DETECTION:
3483
- First, determine the project type by checking:
3484
-
3485
- - Does the architecture include a frontend/UI component?
3486
- - Is there a frontend-architecture.md document?
3487
- - Does the PRD mention user interfaces or frontend requirements?
3488
-
3489
- If this is a backend-only or service-only project:
3490
-
3491
- - Skip sections marked with [[FRONTEND ONLY]]
3492
- - Focus extra attention on API design, service architecture, and integration patterns
3493
- - Note in your final report that frontend sections were skipped due to project type
3494
-
3495
- VALIDATION APPROACH:
3496
- For each section, you must:
3497
-
3498
- 1. Deep Analysis - Don't just check boxes, thoroughly analyze each item against the provided documentation
3499
- 2. Evidence-Based - Cite specific sections or quotes from the documents when validating
3500
- 3. Critical Thinking - Question assumptions and identify gaps, not just confirm what's present
3501
- 4. Risk Assessment - Consider what could go wrong with each architectural decision
3502
-
3503
- EXECUTION MODE:
3504
- Ask the user if they want to work through the checklist:
3505
-
3506
- - Section by section (interactive mode) - Review each section, present findings, get confirmation before proceeding
3507
- - All at once (comprehensive mode) - Complete full analysis and present comprehensive report at end]]
3508
-
3509
- ## 1. REQUIREMENTS ALIGNMENT
3510
-
3511
- [[LLM: Before evaluating this section, take a moment to fully understand the product's purpose and goals from the PRD. What is the core problem being solved? Who are the users? What are the critical success factors? Keep these in mind as you validate alignment. For each item, don't just check if it's mentioned - verify that the architecture provides a concrete technical solution.]]
3512
-
3513
- ### 1.1 Functional Requirements Coverage
3514
-
3515
- - [ ] Architecture supports all functional requirements in the PRD
3516
- - [ ] Technical approaches for all epics and stories are addressed
3517
- - [ ] Edge cases and performance scenarios are considered
3518
- - [ ] All required integrations are accounted for
3519
- - [ ] User journeys are supported by the technical architecture
3520
-
3521
- ### 1.2 Non-Functional Requirements Alignment
3522
-
3523
- - [ ] Performance requirements are addressed with specific solutions
3524
- - [ ] Scalability considerations are documented with approach
3525
- - [ ] Security requirements have corresponding technical controls
3526
- - [ ] Reliability and resilience approaches are defined
3527
- - [ ] Compliance requirements have technical implementations
3528
-
3529
- ### 1.3 Technical Constraints Adherence
3530
-
3531
- - [ ] All technical constraints from PRD are satisfied
3532
- - [ ] Platform/language requirements are followed
3533
- - [ ] Infrastructure constraints are accommodated
3534
- - [ ] Third-party service constraints are addressed
3535
- - [ ] Organizational technical standards are followed
3536
-
3537
- ## 2. ARCHITECTURE FUNDAMENTALS
3538
-
3539
- [[LLM: Architecture clarity is crucial for successful implementation. As you review this section, visualize the system as if you were explaining it to a new developer. Are there any ambiguities that could lead to misinterpretation? Would an AI agent be able to implement this architecture without confusion? Look for specific diagrams, component definitions, and clear interaction patterns.]]
3540
-
3541
- ### 2.1 Architecture Clarity
3542
-
3543
- - [ ] Architecture is documented with clear diagrams
3544
- - [ ] Major components and their responsibilities are defined
3545
- - [ ] Component interactions and dependencies are mapped
3546
- - [ ] Data flows are clearly illustrated
3547
- - [ ] Technology choices for each component are specified
3548
-
3549
- ### 2.2 Separation of Concerns
3550
-
3551
- - [ ] Clear boundaries between UI, business logic, and data layers
3552
- - [ ] Responsibilities are cleanly divided between components
3553
- - [ ] Interfaces between components are well-defined
3554
- - [ ] Components adhere to single responsibility principle
3555
- - [ ] Cross-cutting concerns (logging, auth, etc.) are properly addressed
3556
-
3557
- ### 2.3 Design Patterns & Best Practices
3558
-
3559
- - [ ] Appropriate design patterns are employed
3560
- - [ ] Industry best practices are followed
3561
- - [ ] Anti-patterns are avoided
3562
- - [ ] Consistent architectural style throughout
3563
- - [ ] Pattern usage is documented and explained
3564
-
3565
- ### 2.4 Modularity & Maintainability
3566
-
3567
- - [ ] System is divided into cohesive, loosely-coupled modules
3568
- - [ ] Components can be developed and tested independently
3569
- - [ ] Changes can be localized to specific components
3570
- - [ ] Code organization promotes discoverability
3571
- - [ ] Architecture specifically designed for AI agent implementation
3572
-
3573
- ## 3. TECHNICAL STACK & DECISIONS
3574
-
3575
- [[LLM: Technology choices have long-term implications. For each technology decision, consider: Is this the simplest solution that could work? Are we over-engineering? Will this scale? What are the maintenance implications? Are there security vulnerabilities in the chosen versions? Verify that specific versions are defined, not ranges.]]
3576
-
3577
- ### 3.1 Technology Selection
3578
-
3579
- - [ ] Selected technologies meet all requirements
3580
- - [ ] Technology versions are specifically defined (not ranges)
3581
- - [ ] Technology choices are justified with clear rationale
3582
- - [ ] Alternatives considered are documented with pros/cons
3583
- - [ ] Selected stack components work well together
3584
-
3585
- ### 3.2 Frontend Architecture [[FRONTEND ONLY]]
3586
-
3587
- [[LLM: Skip this entire section if this is a backend-only or service-only project. Only evaluate if the project includes a user interface.]]
3588
-
3589
- - [ ] UI framework and libraries are specifically selected
3590
- - [ ] State management approach is defined
3591
- - [ ] Component structure and organization is specified
3592
- - [ ] Responsive/adaptive design approach is outlined
3593
- - [ ] Build and bundling strategy is determined
3594
-
3595
- ### 3.3 Backend Architecture
3596
-
3597
- - [ ] API design and standards are defined
3598
- - [ ] Service organization and boundaries are clear
3599
- - [ ] Authentication and authorization approach is specified
3600
- - [ ] Error handling strategy is outlined
3601
- - [ ] Backend scaling approach is defined
3602
-
3603
- ### 3.4 Data Architecture
3604
-
3605
- - [ ] Data models are fully defined
3606
- - [ ] Database technologies are selected with justification
3607
- - [ ] Data access patterns are documented
3608
- - [ ] Data migration/seeding approach is specified
3609
- - [ ] Data backup and recovery strategies are outlined
3610
-
3611
- ## 4. FRONTEND DESIGN & IMPLEMENTATION [[FRONTEND ONLY]]
3612
-
3613
- [[LLM: This entire section should be skipped for backend-only projects. Only evaluate if the project includes a user interface. When evaluating, ensure alignment between the main architecture document and the frontend-specific architecture document.]]
3614
-
3615
- ### 4.1 Frontend Philosophy & Patterns
3616
-
3617
- - [ ] Framework & Core Libraries align with main architecture document
3618
- - [ ] Component Architecture (e.g., Atomic Design) is clearly described
3619
- - [ ] State Management Strategy is appropriate for application complexity
3620
- - [ ] Data Flow patterns are consistent and clear
3621
- - [ ] Styling Approach is defined and tooling specified
3622
-
3623
- ### 4.2 Frontend Structure & Organization
3624
-
3625
- - [ ] Directory structure is clearly documented with ASCII diagram
3626
- - [ ] Component organization follows stated patterns
3627
- - [ ] File naming conventions are explicit
3628
- - [ ] Structure supports chosen framework's best practices
3629
- - [ ] Clear guidance on where new components should be placed
3630
-
3631
- ### 4.3 Component Design
3632
-
3633
- - [ ] Component template/specification format is defined
3634
- - [ ] Component props, state, and events are well-documented
3635
- - [ ] Shared/foundational components are identified
3636
- - [ ] Component reusability patterns are established
3637
- - [ ] Accessibility requirements are built into component design
3638
-
3639
- ### 4.4 Frontend-Backend Integration
3640
-
3641
- - [ ] API interaction layer is clearly defined
3642
- - [ ] HTTP client setup and configuration documented
3643
- - [ ] Error handling for API calls is comprehensive
3644
- - [ ] Service definitions follow consistent patterns
3645
- - [ ] Authentication integration with backend is clear
3646
-
3647
- ### 4.5 Routing & Navigation
3648
-
3649
- - [ ] Routing strategy and library are specified
3650
- - [ ] Route definitions table is comprehensive
3651
- - [ ] Route protection mechanisms are defined
3652
- - [ ] Deep linking considerations addressed
3653
- - [ ] Navigation patterns are consistent
3654
-
3655
- ### 4.6 Frontend Performance
3656
-
3657
- - [ ] Image optimization strategies defined
3658
- - [ ] Code splitting approach documented
3659
- - [ ] Lazy loading patterns established
3660
- - [ ] Re-render optimization techniques specified
3661
- - [ ] Performance monitoring approach defined
3662
-
3663
- ## 5. RESILIENCE & OPERATIONAL READINESS
3664
-
3665
- [[LLM: Production systems fail in unexpected ways. As you review this section, think about Murphy's Law - what could go wrong? Consider real-world scenarios: What happens during peak load? How does the system behave when a critical service is down? Can the operations team diagnose issues at 3 AM? Look for specific resilience patterns, not just mentions of "error handling".]]
3666
-
3667
- ### 5.1 Error Handling & Resilience
3668
-
3669
- - [ ] Error handling strategy is comprehensive
3670
- - [ ] Retry policies are defined where appropriate
3671
- - [ ] Circuit breakers or fallbacks are specified for critical services
3672
- - [ ] Graceful degradation approaches are defined
3673
- - [ ] System can recover from partial failures
3674
-
3675
- ### 5.2 Monitoring & Observability
3676
-
3677
- - [ ] Logging strategy is defined
3678
- - [ ] Monitoring approach is specified
3679
- - [ ] Key metrics for system health are identified
3680
- - [ ] Alerting thresholds and strategies are outlined
3681
- - [ ] Debugging and troubleshooting capabilities are built in
3682
-
3683
- ### 5.3 Performance & Scaling
3684
-
3685
- - [ ] Performance bottlenecks are identified and addressed
3686
- - [ ] Caching strategy is defined where appropriate
3687
- - [ ] Load balancing approach is specified
3688
- - [ ] Horizontal and vertical scaling strategies are outlined
3689
- - [ ] Resource sizing recommendations are provided
3690
-
3691
- ### 5.4 Deployment & DevOps
3692
-
3693
- - [ ] Deployment strategy is defined
3694
- - [ ] CI/CD pipeline approach is outlined
3695
- - [ ] Environment strategy (dev, staging, prod) is specified
3696
- - [ ] Infrastructure as Code approach is defined
3697
- - [ ] Rollback and recovery procedures are outlined
3698
-
3699
- ## 6. SECURITY & COMPLIANCE
3700
-
3701
- [[LLM: Security is not optional. Review this section with a hacker's mindset - how could someone exploit this system? Also consider compliance: Are there industry-specific regulations that apply? GDPR? HIPAA? PCI? Ensure the architecture addresses these proactively. Look for specific security controls, not just general statements.]]
3702
-
3703
- ### 6.1 Authentication & Authorization
3704
-
3705
- - [ ] Authentication mechanism is clearly defined
3706
- - [ ] Authorization model is specified
3707
- - [ ] Role-based access control is outlined if required
3708
- - [ ] Session management approach is defined
3709
- - [ ] Credential management is addressed
3710
-
3711
- ### 6.2 Data Security
3712
-
3713
- - [ ] Data encryption approach (at rest and in transit) is specified
3714
- - [ ] Sensitive data handling procedures are defined
3715
- - [ ] Data retention and purging policies are outlined
3716
- - [ ] Backup encryption is addressed if required
3717
- - [ ] Data access audit trails are specified if required
3718
-
3719
- ### 6.3 API & Service Security
3720
-
3721
- - [ ] API security controls are defined
3722
- - [ ] Rate limiting and throttling approaches are specified
3723
- - [ ] Input validation strategy is outlined
3724
- - [ ] CSRF/XSS prevention measures are addressed
3725
- - [ ] Secure communication protocols are specified
3726
-
3727
- ### 6.4 Infrastructure Security
3728
-
3729
- - [ ] Network security design is outlined
3730
- - [ ] Firewall and security group configurations are specified
3731
- - [ ] Service isolation approach is defined
3732
- - [ ] Least privilege principle is applied
3733
- - [ ] Security monitoring strategy is outlined
3734
-
3735
- ## 7. IMPLEMENTATION GUIDANCE
3736
-
3737
- [[LLM: Clear implementation guidance prevents costly mistakes. As you review this section, imagine you're a developer starting on day one. Do they have everything they need to be productive? Are coding standards clear enough to maintain consistency across the team? Look for specific examples and patterns.]]
3738
-
3739
- ### 7.1 Coding Standards & Practices
3740
-
3741
- - [ ] Coding standards are defined
3742
- - [ ] Documentation requirements are specified
3743
- - [ ] Testing expectations are outlined
3744
- - [ ] Code organization principles are defined
3745
- - [ ] Naming conventions are specified
3746
-
3747
- ### 7.2 Testing Strategy
3748
-
3749
- - [ ] Unit testing approach is defined
3750
- - [ ] Integration testing strategy is outlined
3751
- - [ ] E2E testing approach is specified
3752
- - [ ] Performance testing requirements are outlined
3753
- - [ ] Security testing approach is defined
3754
-
3755
- ### 7.3 Frontend Testing [[FRONTEND ONLY]]
3756
-
3757
- [[LLM: Skip this subsection for backend-only projects.]]
3758
-
3759
- - [ ] Component testing scope and tools defined
3760
- - [ ] UI integration testing approach specified
3761
- - [ ] Visual regression testing considered
3762
- - [ ] Accessibility testing tools identified
3763
- - [ ] Frontend-specific test data management addressed
3764
-
3765
- ### 7.4 Development Environment
3766
-
3767
- - [ ] Local development environment setup is documented
3768
- - [ ] Required tools and configurations are specified
3769
- - [ ] Development workflows are outlined
3770
- - [ ] Source control practices are defined
3771
- - [ ] Dependency management approach is specified
3772
-
3773
- ### 7.5 Technical Documentation
3774
-
3775
- - [ ] API documentation standards are defined
3776
- - [ ] Architecture documentation requirements are specified
3777
- - [ ] Code documentation expectations are outlined
3778
- - [ ] System diagrams and visualizations are included
3779
- - [ ] Decision records for key choices are included
3780
-
3781
- ## 8. DEPENDENCY & INTEGRATION MANAGEMENT
3782
-
3783
- [[LLM: Dependencies are often the source of production issues. For each dependency, consider: What happens if it's unavailable? Is there a newer version with security patches? Are we locked into a vendor? What's our contingency plan? Verify specific versions and fallback strategies.]]
3784
-
3785
- ### 8.1 External Dependencies
3786
-
3787
- - [ ] All external dependencies are identified
3788
- - [ ] Versioning strategy for dependencies is defined
3789
- - [ ] Fallback approaches for critical dependencies are specified
3790
- - [ ] Licensing implications are addressed
3791
- - [ ] Update and patching strategy is outlined
3792
-
3793
- ### 8.2 Internal Dependencies
3794
-
3795
- - [ ] Component dependencies are clearly mapped
3796
- - [ ] Build order dependencies are addressed
3797
- - [ ] Shared services and utilities are identified
3798
- - [ ] Circular dependencies are eliminated
3799
- - [ ] Versioning strategy for internal components is defined
3800
-
3801
- ### 8.3 Third-Party Integrations
3802
-
3803
- - [ ] All third-party integrations are identified
3804
- - [ ] Integration approaches are defined
3805
- - [ ] Authentication with third parties is addressed
3806
- - [ ] Error handling for integration failures is specified
3807
- - [ ] Rate limits and quotas are considered
3808
-
3809
- ## 9. AI AGENT IMPLEMENTATION SUITABILITY
3810
-
3811
- [[LLM: This architecture may be implemented by AI agents. Review with extreme clarity in mind. Are patterns consistent? Is complexity minimized? Would an AI agent make incorrect assumptions? Remember: explicit is better than implicit. Look for clear file structures, naming conventions, and implementation patterns.]]
3812
-
3813
- ### 9.1 Modularity for AI Agents
3814
-
3815
- - [ ] Components are sized appropriately for AI agent implementation
3816
- - [ ] Dependencies between components are minimized
3817
- - [ ] Clear interfaces between components are defined
3818
- - [ ] Components have singular, well-defined responsibilities
3819
- - [ ] File and code organization optimized for AI agent understanding
3820
-
3821
- ### 9.2 Clarity & Predictability
3822
-
3823
- - [ ] Patterns are consistent and predictable
3824
- - [ ] Complex logic is broken down into simpler steps
3825
- - [ ] Architecture avoids overly clever or obscure approaches
3826
- - [ ] Examples are provided for unfamiliar patterns
3827
- - [ ] Component responsibilities are explicit and clear
3828
-
3829
- ### 9.3 Implementation Guidance
3830
-
3831
- - [ ] Detailed implementation guidance is provided
3832
- - [ ] Code structure templates are defined
3833
- - [ ] Specific implementation patterns are documented
3834
- - [ ] Common pitfalls are identified with solutions
3835
- - [ ] References to similar implementations are provided when helpful
3836
-
3837
- ### 9.4 Error Prevention & Handling
3838
-
3839
- - [ ] Design reduces opportunities for implementation errors
3840
- - [ ] Validation and error checking approaches are defined
3841
- - [ ] Self-healing mechanisms are incorporated where possible
3842
- - [ ] Testing patterns are clearly defined
3843
- - [ ] Debugging guidance is provided
3844
-
3845
- ## 10. ACCESSIBILITY IMPLEMENTATION [[FRONTEND ONLY]]
3846
-
3847
- [[LLM: Skip this section for backend-only projects. Accessibility is a core requirement for any user interface.]]
3848
-
3849
- ### 10.1 Accessibility Standards
3850
-
3851
- - [ ] Semantic HTML usage is emphasized
3852
- - [ ] ARIA implementation guidelines provided
3853
- - [ ] Keyboard navigation requirements defined
3854
- - [ ] Focus management approach specified
3855
- - [ ] Screen reader compatibility addressed
3856
-
3857
- ### 10.2 Accessibility Testing
3858
-
3859
- - [ ] Accessibility testing tools identified
3860
- - [ ] Testing process integrated into workflow
3861
- - [ ] Compliance targets (WCAG level) specified
3862
- - [ ] Manual testing procedures defined
3863
- - [ ] Automated testing approach outlined
3864
-
3865
- [[LLM: FINAL VALIDATION REPORT GENERATION
3866
-
3867
- Now that you've completed the checklist, generate a comprehensive validation report that includes:
3868
-
3869
- 1. Executive Summary
3870
- - Overall architecture readiness (High/Medium/Low)
3871
- - Critical risks identified
3872
- - Key strengths of the architecture
3873
- - Project type (Full-stack/Frontend/Backend) and sections evaluated
3874
-
3875
- 2. Section Analysis
3876
- - Pass rate for each major section (percentage of items passed)
3877
- - Most concerning failures or gaps
3878
- - Sections requiring immediate attention
3879
- - Note any sections skipped due to project type
3880
-
3881
- 3. Risk Assessment
3882
- - Top 5 risks by severity
3883
- - Mitigation recommendations for each
3884
- - Timeline impact of addressing issues
3885
-
3886
- 4. Recommendations
3887
- - Must-fix items before development
3888
- - Should-fix items for better quality
3889
- - Nice-to-have improvements
3890
-
3891
- 5. AI Implementation Readiness
3892
- - Specific concerns for AI agent implementation
3893
- - Areas needing additional clarification
3894
- - Complexity hotspots to address
3895
-
3896
- 6. Frontend-Specific Assessment (if applicable)
3897
- - Frontend architecture completeness
3898
- - Alignment between main and frontend architecture docs
3899
- - UI/UX specification coverage
3900
- - Component design clarity
3901
-
3902
- After presenting the report, ask the user if they would like detailed analysis of any specific section, especially those with warnings or failures.]]
3903
- ==================== END: .xiaoma-core/checklists/architect-checklist.md ====================
3904
-
3905
- ==================== START: .xiaoma-core/data/technical-preferences.md ====================
3906
- <!-- Powered by XiaoMa™ Core -->
3907
-
3908
- # User-Defined Preferred Patterns and Preferences
3909
-
3910
- None Listed
3911
- ==================== END: .xiaoma-core/data/technical-preferences.md ====================