bmad-method 4.27.6 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/.bmad-core/agent-teams/team-all.yml +16 -0
  2. package/.bmad-core/agent-teams/team-fullstack.yml +26 -0
  3. package/.bmad-core/agent-teams/team-no-ui.yml +15 -0
  4. package/{bmad-core → .bmad-core}/agents/analyst.md +23 -29
  5. package/.bmad-core/agents/architect.md +66 -0
  6. package/.bmad-core/agents/bmad-master.md +104 -0
  7. package/.bmad-core/agents/bmad-orchestrator.md +81 -0
  8. package/.bmad-core/agents/dev.md +70 -0
  9. package/{bmad-core → .bmad-core}/agents/pm.md +24 -24
  10. package/{bmad-core → .bmad-core}/agents/po.md +24 -27
  11. package/.bmad-core/agents/qa.md +52 -0
  12. package/.bmad-core/agents/sm.md +55 -0
  13. package/.bmad-core/agents/ux-expert.md +66 -0
  14. package/{bmad-core → .bmad-core}/checklists/change-checklist.md +2 -2
  15. package/{bmad-core → .bmad-core}/checklists/story-draft-checklist.md +1 -1
  16. package/.bmad-core/data/bmad-kb.md +47 -0
  17. package/.bmad-core/schemas/agent-team-schema.yml +153 -0
  18. package/.bmad-core/tasks/advanced-elicitation.md +92 -0
  19. package/.bmad-core/tasks/brainstorming-techniques.md +238 -0
  20. package/.bmad-core/tasks/core-dump.md +74 -0
  21. package/{expansion-packs/bmad-creator-tools → .bmad-core}/tasks/create-agent.md +11 -9
  22. package/.bmad-core/tasks/create-doc.md +74 -0
  23. package/.bmad-core/tasks/create-expansion-pack.md +425 -0
  24. package/.bmad-core/tasks/create-next-story.md +206 -0
  25. package/.bmad-core/tasks/create-team.md +229 -0
  26. package/{bmad-core → .bmad-core}/tasks/doc-migration-task.md +9 -9
  27. package/{common → .bmad-core}/tasks/execute-checklist.md +6 -2
  28. package/.bmad-core/tasks/generate-ai-frontend-prompt.md +58 -0
  29. package/{bmad-core → .bmad-core}/tasks/index-docs.md +7 -3
  30. package/{bmad-core → .bmad-core}/tasks/shard-doc.md +7 -25
  31. package/.bmad-core/templates/agent-tmpl.md +58 -0
  32. package/.bmad-core/templates/architecture-tmpl.md +771 -0
  33. package/.bmad-core/templates/brownfield-architecture-tmpl.md +542 -0
  34. package/.bmad-core/templates/brownfield-prd-tmpl.md +240 -0
  35. package/.bmad-core/templates/competitor-analysis-tmpl.md +289 -0
  36. package/.bmad-core/templates/expansion-pack-plan-tmpl.md +91 -0
  37. package/.bmad-core/templates/front-end-architecture-tmpl.md +173 -0
  38. package/.bmad-core/templates/front-end-spec-tmpl.md +411 -0
  39. package/.bmad-core/templates/fullstack-architecture-tmpl.md +1016 -0
  40. package/.bmad-core/templates/market-research-tmpl.md +261 -0
  41. package/.bmad-core/templates/prd-tmpl.md +200 -0
  42. package/.bmad-core/templates/project-brief-tmpl.md +228 -0
  43. package/.bmad-core/templates/simple-project-prd-tmpl.md +461 -0
  44. package/.bmad-core/templates/story-tmpl.md +61 -0
  45. package/.bmad-core/templates/web-agent-startup-instructions-template.md +39 -0
  46. package/.bmad-core/utils/agent-switcher.ide.md +112 -0
  47. package/.bmad-core/utils/template-format.md +26 -0
  48. package/.bmad-core/utils/workflow-management.md +224 -0
  49. package/.bmad-core/web-bundles/agents/analyst.txt +1684 -0
  50. package/.bmad-core/web-bundles/agents/architect.txt +3584 -0
  51. package/.bmad-core/web-bundles/agents/bmad-master.txt +9491 -0
  52. package/.bmad-core/web-bundles/agents/bmad-orchestrator.txt +1466 -0
  53. package/{dist → .bmad-core/web-bundles}/agents/dev.txt +71 -179
  54. package/{dist → .bmad-core/web-bundles}/agents/pm.txt +1058 -624
  55. package/{dist → .bmad-core/web-bundles}/agents/po.txt +138 -337
  56. package/.bmad-core/web-bundles/agents/qa.txt +129 -0
  57. package/.bmad-core/web-bundles/agents/sm.txt +658 -0
  58. package/.bmad-core/web-bundles/agents/ux-expert.txt +1099 -0
  59. package/.bmad-core/web-bundles/teams/team-all.txt +10757 -0
  60. package/.bmad-core/web-bundles/teams/team-fullstack.txt +10109 -0
  61. package/.bmad-core/web-bundles/teams/team-no-ui.txt +8950 -0
  62. package/.bmad-core/workflows/brownfield-fullstack.yml +116 -0
  63. package/.bmad-core/workflows/brownfield-service.yml +117 -0
  64. package/.bmad-core/workflows/brownfield-ui.yml +127 -0
  65. package/.bmad-core/workflows/greenfield-fullstack.yml +177 -0
  66. package/.bmad-core/workflows/greenfield-service.yml +143 -0
  67. package/.bmad-core/workflows/greenfield-ui.yml +172 -0
  68. package/.claude/commands/analyst.md +63 -0
  69. package/.claude/commands/architect.md +70 -0
  70. package/.claude/commands/bmad-master.md +108 -0
  71. package/.claude/commands/bmad-orchestrator.md +85 -0
  72. package/.claude/commands/dev.md +74 -0
  73. package/.claude/commands/pm.md +63 -0
  74. package/.claude/commands/po.md +64 -0
  75. package/.claude/commands/qa.md +56 -0
  76. package/.claude/commands/sm.md +59 -0
  77. package/.claude/commands/ux-expert.md +70 -0
  78. package/.cursor/rules/analyst.mdc +77 -0
  79. package/.cursor/rules/architect.mdc +84 -0
  80. package/.cursor/rules/bmad-master.mdc +122 -0
  81. package/.cursor/rules/bmad-orchestrator.mdc +99 -0
  82. package/.cursor/rules/dev.mdc +88 -0
  83. package/.cursor/rules/pm.mdc +77 -0
  84. package/.cursor/rules/po.mdc +78 -0
  85. package/.cursor/rules/qa.mdc +70 -0
  86. package/.cursor/rules/sm.mdc +73 -0
  87. package/.cursor/rules/ux-expert.mdc +84 -0
  88. package/.roo/.roomodes +95 -0
  89. package/.roo/README.md +38 -0
  90. package/.vscode/extensions.json +6 -0
  91. package/.vscode/settings.json +75 -49
  92. package/.windsurf/rules/analyst.md +71 -0
  93. package/.windsurf/rules/architect.md +78 -0
  94. package/.windsurf/rules/bmad-master.md +116 -0
  95. package/.windsurf/rules/bmad-orchestrator.md +93 -0
  96. package/.windsurf/rules/dev.md +82 -0
  97. package/.windsurf/rules/pm.md +71 -0
  98. package/.windsurf/rules/po.md +72 -0
  99. package/.windsurf/rules/qa.md +64 -0
  100. package/.windsurf/rules/sm.md +67 -0
  101. package/.windsurf/rules/ux-expert.md +78 -0
  102. package/CHANGELOG.md +16 -459
  103. package/CONTRIBUTING.md +5 -168
  104. package/LICENSE +1 -1
  105. package/README.md +230 -77
  106. package/docs/bmad-workflow-guide.md +15 -19
  107. package/docs/claude-code-guide.md +119 -0
  108. package/docs/cursor-guide.md +127 -0
  109. package/docs/roo-code-guide.md +140 -0
  110. package/docs/sample-output/simple-fullstack-greenfield/prd.md +42 -0
  111. package/docs/versioning-and-releases.md +16 -8
  112. package/docs/versions.md +5 -4
  113. package/docs/windsurf-guide.md +127 -0
  114. package/expansion-packs/README.md +112 -2
  115. package/expansion-packs/{bmad-infrastructure-devops → infrastructure-devops}/README.md +9 -9
  116. package/expansion-packs/{bmad-infrastructure-devops → infrastructure-devops}/agents/infra-devops-platform.md +15 -14
  117. package/expansion-packs/{bmad-infrastructure-devops → infrastructure-devops}/checklists/infrastructure-checklist.md +1 -1
  118. package/expansion-packs/infrastructure-devops/manifest.yml +38 -0
  119. package/expansion-packs/{bmad-infrastructure-devops → infrastructure-devops}/tasks/review-infrastructure.md +4 -4
  120. package/expansion-packs/{bmad-infrastructure-devops → infrastructure-devops}/tasks/validate-infrastructure.md +4 -4
  121. package/expansion-packs/infrastructure-devops/templates/infrastructure-architecture-tmpl.md +415 -0
  122. package/expansion-packs/infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.md +0 -0
  123. package/package.json +11 -19
  124. package/tools/bmad-npx-wrapper.js +1 -1
  125. package/tools/builders/web-builder.js +28 -563
  126. package/tools/cli.js +22 -55
  127. package/tools/installer/README.md +53 -3
  128. package/tools/installer/bin/bmad.js +56 -294
  129. package/tools/installer/config/install.config.yml +139 -0
  130. package/tools/installer/lib/config-loader.js +34 -198
  131. package/tools/installer/lib/file-manager.js +7 -200
  132. package/tools/installer/lib/ide-setup.js +189 -545
  133. package/tools/installer/lib/installer.js +61 -1171
  134. package/tools/installer/package-lock.json +3 -3
  135. package/tools/installer/package.json +4 -4
  136. package/tools/installer/templates/claude-commands.md +7 -0
  137. package/tools/installer/templates/cursor-rules.md +22 -0
  138. package/tools/installer/templates/windsurf-rules.md +22 -0
  139. package/tools/lib/dependency-resolver.js +22 -22
  140. package/tools/upgraders/v3-to-v4-upgrader.js +43 -35
  141. package/tools/version-bump.js +1 -1
  142. package/tools/yaml-format.js +2 -2
  143. package/.github/FUNDING.yaml +0 -15
  144. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -32
  145. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -22
  146. package/.prettierignore +0 -21
  147. package/.prettierrc +0 -23
  148. package/bmad-core/agent-teams/team-all.yaml +0 -14
  149. package/bmad-core/agent-teams/team-fullstack.yaml +0 -18
  150. package/bmad-core/agent-teams/team-ide-minimal.yaml +0 -10
  151. package/bmad-core/agent-teams/team-no-ui.yaml +0 -13
  152. package/bmad-core/agents/architect.md +0 -62
  153. package/bmad-core/agents/bmad-master.md +0 -88
  154. package/bmad-core/agents/bmad-orchestrator.md +0 -135
  155. package/bmad-core/agents/dev.md +0 -56
  156. package/bmad-core/agents/qa.md +0 -54
  157. package/bmad-core/agents/sm.md +0 -45
  158. package/bmad-core/agents/ux-expert.md +0 -53
  159. package/bmad-core/core-config.yaml +0 -25
  160. package/bmad-core/data/bmad-kb.md +0 -803
  161. package/bmad-core/data/brainstorming-techniques.md +0 -36
  162. package/bmad-core/data/elicitation-methods.md +0 -134
  163. package/bmad-core/tasks/advanced-elicitation.md +0 -117
  164. package/bmad-core/tasks/create-brownfield-story.md +0 -355
  165. package/bmad-core/tasks/create-next-story.md +0 -113
  166. package/bmad-core/tasks/create-workflow-plan.md +0 -289
  167. package/bmad-core/tasks/document-project.md +0 -317
  168. package/bmad-core/tasks/facilitate-brainstorming-session.md +0 -136
  169. package/bmad-core/tasks/generate-ai-frontend-prompt.md +0 -51
  170. package/bmad-core/tasks/kb-mode-interaction.md +0 -70
  171. package/bmad-core/tasks/review-story.md +0 -145
  172. package/bmad-core/tasks/update-workflow-plan.md +0 -248
  173. package/bmad-core/tasks/validate-next-story.md +0 -134
  174. package/bmad-core/templates/architecture-tmpl.yaml +0 -650
  175. package/bmad-core/templates/brainstorming-output-tmpl.yaml +0 -156
  176. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +0 -476
  177. package/bmad-core/templates/brownfield-prd-tmpl.yaml +0 -280
  178. package/bmad-core/templates/competitor-analysis-tmpl.yaml +0 -293
  179. package/bmad-core/templates/front-end-architecture-tmpl.yaml +0 -206
  180. package/bmad-core/templates/front-end-spec-tmpl.yaml +0 -349
  181. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +0 -805
  182. package/bmad-core/templates/market-research-tmpl.yaml +0 -252
  183. package/bmad-core/templates/prd-tmpl.yaml +0 -202
  184. package/bmad-core/templates/project-brief-tmpl.yaml +0 -221
  185. package/bmad-core/templates/story-tmpl.yaml +0 -137
  186. package/bmad-core/workflows/brownfield-fullstack.yaml +0 -297
  187. package/bmad-core/workflows/brownfield-service.yaml +0 -187
  188. package/bmad-core/workflows/brownfield-ui.yaml +0 -197
  189. package/bmad-core/workflows/greenfield-fullstack.yaml +0 -240
  190. package/bmad-core/workflows/greenfield-service.yaml +0 -206
  191. package/bmad-core/workflows/greenfield-ui.yaml +0 -235
  192. package/common/tasks/create-doc.md +0 -79
  193. package/common/utils/bmad-doc-template.md +0 -325
  194. package/common/utils/workflow-management.md +0 -69
  195. package/dist/agents/analyst.txt +0 -2849
  196. package/dist/agents/architect.txt +0 -3505
  197. package/dist/agents/bmad-master.txt +0 -9271
  198. package/dist/agents/bmad-orchestrator.txt +0 -2006
  199. package/dist/agents/qa.txt +0 -388
  200. package/dist/agents/sm.txt +0 -672
  201. package/dist/agents/ux-expert.txt +0 -987
  202. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +0 -2401
  203. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +0 -1635
  204. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +0 -825
  205. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +0 -11504
  206. package/dist/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.txt +0 -2023
  207. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +0 -2052
  208. package/dist/teams/team-all.txt +0 -11572
  209. package/dist/teams/team-fullstack.txt +0 -10903
  210. package/dist/teams/team-ide-minimal.txt +0 -4346
  211. package/dist/teams/team-no-ui.txt +0 -9458
  212. package/docs/GUIDING-PRINCIPLES.md +0 -91
  213. package/docs/agentic-tools/claude-code-guide.md +0 -19
  214. package/docs/agentic-tools/cline-guide.md +0 -16
  215. package/docs/agentic-tools/cursor-guide.md +0 -14
  216. package/docs/agentic-tools/gemini-cli-guide.md +0 -32
  217. package/docs/agentic-tools/github-copilot-guide.md +0 -42
  218. package/docs/agentic-tools/roo-code-guide.md +0 -15
  219. package/docs/agentic-tools/trae-guide.md +0 -14
  220. package/docs/agentic-tools/windsurf-guide.md +0 -14
  221. package/docs/core-architecture.md +0 -219
  222. package/docs/expansion-packs.md +0 -280
  223. package/docs/how-to-contribute-with-pull-requests.md +0 -158
  224. package/docs/template-markup-references.md +0 -86
  225. package/docs/user-guide.md +0 -1142
  226. package/docs/working-in-the-brownfield.md +0 -361
  227. package/expansion-packs/bmad-2d-phaser-game-dev/agent-teams/phaser-2d-nodejs-game-team.yaml +0 -13
  228. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.md +0 -59
  229. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +0 -67
  230. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +0 -52
  231. package/expansion-packs/bmad-2d-phaser-game-dev/checklists/game-design-checklist.md +0 -201
  232. package/expansion-packs/bmad-2d-phaser-game-dev/checklists/game-story-dod-checklist.md +0 -160
  233. package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +0 -7
  234. package/expansion-packs/bmad-2d-phaser-game-dev/data/bmad-kb.md +0 -254
  235. package/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +0 -651
  236. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/advanced-elicitation.md +0 -111
  237. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/create-game-story.md +0 -216
  238. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/game-design-brainstorming.md +0 -308
  239. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +0 -613
  240. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +0 -356
  241. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +0 -343
  242. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +0 -253
  243. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +0 -484
  244. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-dev-greenfield.yaml +0 -183
  245. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-prototype.yaml +0 -175
  246. package/expansion-packs/bmad-creator-tools/README.md +0 -8
  247. package/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.md +0 -54
  248. package/expansion-packs/bmad-creator-tools/config.yaml +0 -5
  249. package/expansion-packs/bmad-creator-tools/tasks/generate-expansion-pack.md +0 -1020
  250. package/expansion-packs/bmad-creator-tools/templates/agent-teams-tmpl.yaml +0 -178
  251. package/expansion-packs/bmad-creator-tools/templates/agent-tmpl.yaml +0 -154
  252. package/expansion-packs/bmad-creator-tools/templates/expansion-pack-plan-tmpl.yaml +0 -120
  253. package/expansion-packs/bmad-infrastructure-devops/config.yaml +0 -8
  254. package/expansion-packs/bmad-infrastructure-devops/data/bmad-kb.md +0 -308
  255. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +0 -424
  256. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +0 -629
  257. package/tools/bump-all-versions.js +0 -107
  258. package/tools/bump-core-version.js +0 -57
  259. package/tools/bump-expansion-version.js +0 -78
  260. package/tools/installer/config/ide-agent-config.yaml +0 -58
  261. package/tools/installer/config/install.config.yaml +0 -91
  262. package/tools/lib/yaml-utils.js +0 -29
  263. package/tools/md-assets/web-agent-startup-instructions.md +0 -39
  264. package/tools/update-expansion-version.js +0 -54
  265. /package/{bmad-core → .bmad-core}/checklists/architect-checklist.md +0 -0
  266. /package/{bmad-core → .bmad-core}/checklists/pm-checklist.md +0 -0
  267. /package/{bmad-core → .bmad-core}/checklists/po-master-checklist.md +0 -0
  268. /package/{bmad-core → .bmad-core}/checklists/story-dod-checklist.md +0 -0
  269. /package/{bmad-core → .bmad-core}/data/technical-preferences.md +0 -0
  270. /package/{bmad-core → .bmad-core}/tasks/brownfield-create-epic.md +0 -0
  271. /package/{bmad-core → .bmad-core}/tasks/brownfield-create-story.md +0 -0
  272. /package/{bmad-core → .bmad-core}/tasks/correct-course.md +0 -0
  273. /package/{bmad-core → .bmad-core}/tasks/create-deep-research-prompt.md +0 -0
  274. /package/.github/workflows/{release.yaml → release.yml} +0 -0
@@ -0,0 +1,771 @@
1
+ # {{Project Name}} Architecture Document
2
+
3
+ [[LLM: If available, review any provided relevant documents to gather all relevant context before beginning. If at a minimum you cannot local `docs/prd.md` ask the user what docs will provide the basis for the architecture.]]
4
+
5
+ ## Introduction
6
+
7
+ [[LLM: This section establishes the document's purpose and scope. Keep the content below but ensure project name is properly substituted.
8
+
9
+ After presenting this section, apply `tasks#advanced-elicitation` protocol]]
10
+
11
+ This document outlines the overall project architecture for {{Project Name}}, including backend systems, shared services, and non-UI specific concerns. Its primary goal is to serve as the guiding architectural blueprint for AI-driven development, ensuring consistency and adherence to chosen patterns and technologies.
12
+
13
+ **Relationship to Frontend Architecture:**
14
+ If the project includes a significant user interface, a separate Frontend Architecture Document will detail the frontend-specific design and MUST be used in conjunction with this document. Core technology stack choices documented herein (see "Tech Stack") are definitive for the entire project, including any frontend components.
15
+
16
+ ### Starter Template or Existing Project
17
+
18
+ [[LLM: Before proceeding further with architecture design, check if the project is based on a starter template or existing codebase:
19
+
20
+ 1. Review the PRD and brainstorming brief for any mentions of:
21
+
22
+ - Starter templates (e.g., Create React App, Next.js, Vue CLI, Angular CLI, etc.)
23
+ - Existing projects or codebases being used as a foundation
24
+ - Boilerplate projects or scaffolding tools
25
+ - Previous projects to be cloned or adapted
26
+
27
+ 2. If a starter template or existing project is mentioned:
28
+
29
+ - Ask the user to provide access via one of these methods:
30
+ - Link to the starter template documentation
31
+ - Upload/attach the project files (for small projects)
32
+ - Share a link to the project repository (GitHub, GitLab, etc.)
33
+ - Analyze the starter/existing project to understand:
34
+ - Pre-configured technology stack and versions
35
+ - Project structure and organization patterns
36
+ - Built-in scripts and tooling
37
+ - Existing architectural patterns and conventions
38
+ - Any limitations or constraints imposed by the starter
39
+ - Use this analysis to inform and align your architecture decisions
40
+
41
+ 3. If no starter template is mentioned but this is a greenfield project:
42
+
43
+ - Suggest appropriate starter templates based on the tech stack preferences
44
+ - Explain the benefits (faster setup, best practices, community support)
45
+ - Let the user decide whether to use one
46
+
47
+ 4. If the user confirms no starter template will be used:
48
+
49
+ - Proceed with architecture design from scratch
50
+ - Note that manual setup will be required for all tooling and configuration
51
+
52
+ Document the decision here before proceeding with the architecture design. In none, just say N/A
53
+
54
+ After presenting this starter template section, apply `tasks#advanced-elicitation` protocol]]
55
+
56
+ ### Change Log
57
+
58
+ [[LLM: Track document versions and changes]]
59
+
60
+ | Date | Version | Description | Author |
61
+ | :--- | :------ | :---------- | :----- |
62
+
63
+ ## High Level Architecture
64
+
65
+ [[LLM: This section contains multiple subsections that establish the foundation of the architecture. Present all subsections together (Introduction, Technical Summary, High Level Overview, Project Diagram, and Architectural Patterns), then apply `tasks#advanced-elicitation` protocol to the complete High Level Architecture section. The user can choose to refine the entire section or specific subsections.]]
66
+
67
+ ### Technical Summary
68
+
69
+ [[LLM: Provide a brief paragraph (3-5 sentences) overview of:
70
+
71
+ - The system's overall architecture style
72
+ - Key components and their relationships
73
+ - Primary technology choices
74
+ - Core architectural patterns being used
75
+ - Reference back to the PRD goals and how this architecture supports them]]
76
+
77
+ ### High Level Overview
78
+
79
+ [[LLM: Based on the PRD's Technical Assumptions section, describe:
80
+
81
+ 1. The main architectural style (e.g., Monolith, Microservices, Serverless, Event-Driven)
82
+ 2. Repository structure decision from PRD (Monorepo/Polyrepo)
83
+ 3. Service architecture decision from PRD
84
+ 4. Primary user interaction flow or data flow at a conceptual level
85
+ 5. Key architectural decisions and their rationale
86
+
87
+ After presenting this section, apply `tasks#advanced-elicitation` protocol]]
88
+
89
+ ### High Level Project Diagram
90
+
91
+ [[LLM: Create a Mermaid diagram that visualizes the high-level architecture. Consider:
92
+
93
+ - System boundaries
94
+ - Major components/services
95
+ - Data flow directions
96
+ - External integrations
97
+ - User entry points
98
+
99
+ Use appropriate Mermaid diagram type (graph TD, C4, sequence) based on what best represents the architecture
100
+
101
+ After presenting the diagram, apply `tasks#advanced-elicitation` protocol]]
102
+
103
+ ### Architectural and Design Patterns
104
+
105
+ [[LLM: List the key high-level patterns that will guide the architecture. For each pattern:
106
+
107
+ 1. Present 2-3 viable options if multiple exist
108
+ 2. Provide your recommendation with clear rationale
109
+ 3. Get user confirmation before finalizing
110
+ 4. These patterns should align with the PRD's technical assumptions and project goals
111
+
112
+ Common patterns to consider:
113
+
114
+ - Architectural style patterns (Serverless, Event-Driven, Microservices, CQRS, Hexagonal)
115
+ - Code organization patterns (Dependency Injection, Repository, Module, Factory)
116
+ - Data patterns (Event Sourcing, Saga, Database per Service)
117
+ - Communication patterns (REST, GraphQL, Message Queue, Pub/Sub)]]
118
+
119
+ <<REPEAT: pattern>>
120
+
121
+ - **{{pattern_name}}:** {{pattern_description}} - _Rationale:_ {{rationale}}
122
+
123
+ <</REPEAT>>
124
+
125
+ @{example: patterns}
126
+
127
+ - **Serverless Architecture:** Using AWS Lambda for compute - _Rationale:_ Aligns with PRD requirement for cost optimization and automatic scaling
128
+ - **Repository Pattern:** Abstract data access logic - _Rationale:_ Enables testing and future database migration flexibility
129
+ - **Event-Driven Communication:** Using SNS/SQS for service decoupling - _Rationale:_ Supports async processing and system resilience
130
+
131
+ @{/example}
132
+
133
+ [[LLM: After presenting the patterns, apply `tasks#advanced-elicitation` protocol]]
134
+
135
+ ## Tech Stack
136
+
137
+ [[LLM: This is the DEFINITIVE technology selection section. Work with the user to make specific choices:
138
+
139
+ 1. Review PRD technical assumptions and any preferences from `data#technical-preferences`
140
+ 2. For each category, present 2-3 viable options with pros/cons
141
+ 3. Make a clear recommendation based on project needs
142
+ 4. Get explicit user approval for each selection
143
+ 5. Document exact versions (avoid "latest" - pin specific versions)
144
+ 6. This table is the single source of truth - all other docs must reference these choices
145
+
146
+ Key decisions to finalize - before displaying the table, ensure you are aware of or ask the user about - let the user know if they are not sure on any that you can also provide suggestions with rationale:
147
+
148
+ - Starter templates (if any)
149
+ - Languages and runtimes with exact versions
150
+ - Frameworks and libraries / packages
151
+ - Cloud provider and key services choices
152
+ - Database and storage solutions - if unclear suggest sql or nosql or other types depending on the project and depending on cloud provider offer a suggestion
153
+ - Development tools
154
+
155
+ Upon render of the table, ensure the user is aware of the importance of this sections choices, should also look for gaps or disagreements with anything, ask for any clarifications if something is unclear why its in the list, and also right away apply `tasks#advanced-elicitation` display - this statement and the options should be rendered and then prompt right all before allowing user input.]]
156
+
157
+ ### Cloud Infrastructure
158
+
159
+ - **Provider:** {{cloud_provider}}
160
+ - **Key Services:** {{core_services_list}}
161
+ - **Deployment Regions:** {{regions}}
162
+
163
+ ### Technology Stack Table
164
+
165
+ | Category | Technology | Version | Purpose | Rationale |
166
+ | :----------------- | :----------------- | :---------- | :---------- | :------------- |
167
+ | **Language** | {{language}} | {{version}} | {{purpose}} | {{why_chosen}} |
168
+ | **Runtime** | {{runtime}} | {{version}} | {{purpose}} | {{why_chosen}} |
169
+ | **Framework** | {{framework}} | {{version}} | {{purpose}} | {{why_chosen}} |
170
+ | **Database** | {{database}} | {{version}} | {{purpose}} | {{why_chosen}} |
171
+ | **Cache** | {{cache}} | {{version}} | {{purpose}} | {{why_chosen}} |
172
+ | **Message Queue** | {{queue}} | {{version}} | {{purpose}} | {{why_chosen}} |
173
+ | **API Style** | {{api_style}} | {{version}} | {{purpose}} | {{why_chosen}} |
174
+ | **Authentication** | {{auth}} | {{version}} | {{purpose}} | {{why_chosen}} |
175
+ | **Testing** | {{test_framework}} | {{version}} | {{purpose}} | {{why_chosen}} |
176
+ | **Build Tool** | {{build_tool}} | {{version}} | {{purpose}} | {{why_chosen}} |
177
+ | **IaC Tool** | {{iac_tool}} | {{version}} | {{purpose}} | {{why_chosen}} |
178
+ | **Monitoring** | {{monitoring}} | {{version}} | {{purpose}} | {{why_chosen}} |
179
+ | **Logging** | {{logging}} | {{version}} | {{purpose}} | {{why_chosen}} |
180
+
181
+ @{example: tech_stack_row}
182
+ | **Language** | TypeScript | 5.3.3 | Primary development language | Strong typing, excellent tooling, team expertise |
183
+ | **Runtime** | Node.js | 20.11.0 | JavaScript runtime | LTS version, stable performance, wide ecosystem |
184
+ | **Framework** | NestJS | 10.3.2 | Backend framework | Enterprise-ready, good DI, matches team patterns |
185
+ @{/example}
186
+
187
+ ## Data Models
188
+
189
+ [[LLM: Define the core data models/entities:
190
+
191
+ 1. Review PRD requirements and identify key business entities
192
+ 2. For each model, explain its purpose and relationships
193
+ 3. Include key attributes and data types
194
+ 4. Show relationships between models
195
+ 5. Discuss design decisions with user
196
+
197
+ Create a clear conceptual model before moving to database schema.
198
+
199
+ After presenting all data models, apply `tasks#advanced-elicitation` protocol]]
200
+
201
+ <<REPEAT: data_model>>
202
+
203
+ ### {{model_name}}
204
+
205
+ **Purpose:** {{model_purpose}}
206
+
207
+ **Key Attributes:**
208
+
209
+ - {{attribute_1}}: {{type_1}} - {{description_1}}
210
+ - {{attribute_2}}: {{type_2}} - {{description_2}}
211
+
212
+ **Relationships:**
213
+
214
+ - {{relationship_1}}
215
+ - {{relationship_2}}
216
+ <</REPEAT>>
217
+
218
+ ## Components
219
+
220
+ [[LLM: Based on the architectural patterns, tech stack, and data models from above:
221
+
222
+ 1. Identify major logical components/services and their responsibilities
223
+ 2. Consider the repository structure (monorepo/polyrepo) from PRD
224
+ 3. Define clear boundaries and interfaces between components
225
+ 4. For each component, specify:
226
+
227
+ - Primary responsibility
228
+ - Key interfaces/APIs exposed
229
+ - Dependencies on other components
230
+ - Technology specifics based on tech stack choices
231
+
232
+ 5. Create component diagrams where helpful
233
+ 6. After presenting all components, apply `tasks#advanced-elicitation` protocol]]
234
+
235
+ <<REPEAT: component>>
236
+
237
+ ### {{component_name}}
238
+
239
+ **Responsibility:** {{component_description}}
240
+
241
+ **Key Interfaces:**
242
+
243
+ - {{interface_1}}
244
+ - {{interface_2}}
245
+
246
+ **Dependencies:** {{dependencies}}
247
+
248
+ **Technology Stack:** {{component_tech_details}}
249
+ <</REPEAT>>
250
+
251
+ ### Component Diagrams
252
+
253
+ [[LLM: Create Mermaid diagrams to visualize component relationships. Options:
254
+
255
+ - C4 Container diagram for high-level view
256
+ - Component diagram for detailed internal structure
257
+ - Sequence diagrams for complex interactions
258
+ Choose the most appropriate for clarity
259
+
260
+ After presenting the diagrams, apply `tasks#advanced-elicitation` protocol]]
261
+
262
+ ## External APIs
263
+
264
+ [[LLM: For each external service integration:
265
+
266
+ 1. Identify APIs needed based on PRD requirements and component design
267
+ 2. If documentation URLs are unknown, ask user for specifics
268
+ 3. Document authentication methods and security considerations
269
+ 4. List specific endpoints that will be used
270
+ 5. Note any rate limits or usage constraints
271
+
272
+ If no external APIs are needed, state this explicitly and skip to next section.]]
273
+
274
+ ^^CONDITION: has_external_apis^^
275
+
276
+ <<REPEAT: external_api>>
277
+
278
+ ### {{api_name}} API
279
+
280
+ - **Purpose:** {{api_purpose}}
281
+ - **Documentation:** {{api_docs_url}}
282
+ - **Base URL(s):** {{api_base_url}}
283
+ - **Authentication:** {{auth_method}}
284
+ - **Rate Limits:** {{rate_limits}}
285
+
286
+ **Key Endpoints Used:**
287
+ <<REPEAT: endpoint>>
288
+
289
+ - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
290
+ <</REPEAT>>
291
+
292
+ **Integration Notes:** {{integration_considerations}}
293
+ <</REPEAT>>
294
+
295
+ @{example: external_api}
296
+
297
+ ### Stripe API
298
+
299
+ - **Purpose:** Payment processing and subscription management
300
+ - **Documentation:** https://stripe.com/docs/api
301
+ - **Base URL(s):** `https://api.stripe.com/v1`
302
+ - **Authentication:** Bearer token with secret key
303
+ - **Rate Limits:** 100 requests per second
304
+
305
+ **Key Endpoints Used:**
306
+
307
+ - `POST /customers` - Create customer profiles
308
+ - `POST /payment_intents` - Process payments
309
+ - `POST /subscriptions` - Manage subscriptions
310
+ @{/example}
311
+
312
+ ^^/CONDITION: has_external_apis^^
313
+
314
+ [[LLM: After presenting external APIs (or noting their absence), apply `tasks#advanced-elicitation` protocol]]
315
+
316
+ ## Core Workflows
317
+
318
+ [[LLM: Illustrate key system workflows using sequence diagrams:
319
+
320
+ 1. Identify critical user journeys from PRD
321
+ 2. Show component interactions including external APIs
322
+ 3. Include error handling paths
323
+ 4. Document async operations
324
+ 5. Create both high-level and detailed diagrams as needed
325
+
326
+ Focus on workflows that clarify architecture decisions or complex interactions.
327
+
328
+ After presenting the workflow diagrams, apply `tasks#advanced-elicitation` protocol]]
329
+
330
+ ## REST API Spec
331
+
332
+ [[LLM: If the project includes a REST API:
333
+
334
+ 1. Create an OpenAPI 3.0 specification
335
+ 2. Include all endpoints from epics/stories
336
+ 3. Define request/response schemas based on data models
337
+ 4. Document authentication requirements
338
+ 5. Include example requests/responses
339
+
340
+ Use YAML format for better readability. If no REST API, skip this section.]]
341
+
342
+ ^^CONDITION: has_rest_api^^
343
+
344
+ ```yaml
345
+ openapi: 3.0.0
346
+ info:
347
+ title: { { api_title } }
348
+ version: { { api_version } }
349
+ description: { { api_description } }
350
+
351
+ servers:
352
+ - url: { { api_base_url } }
353
+ description: { { environment } }
354
+ # ... OpenAPI specification continues
355
+ ```
356
+
357
+ ^^/CONDITION: has_rest_api^^
358
+
359
+ [[LLM: After presenting the REST API spec (or noting its absence if not applicable), apply `tasks#advanced-elicitation` protocol]]
360
+
361
+ ## Database Schema
362
+
363
+ [[LLM: Transform the conceptual data models into concrete database schemas:
364
+
365
+ 1. Use the database type(s) selected in Tech Stack
366
+ 2. Create schema definitions using appropriate notation
367
+ 3. Include indexes, constraints, and relationships
368
+ 4. Consider performance and scalability
369
+ 5. For NoSQL, show document structures
370
+
371
+ Present schema in format appropriate to database type (SQL DDL, JSON schema, etc.)
372
+
373
+ After presenting the database schema, apply `tasks#advanced-elicitation` protocol]]
374
+
375
+ ## Source Tree
376
+
377
+ [[LLM: Create a project folder structure that reflects:
378
+
379
+ 1. The chosen repository structure (monorepo/polyrepo)
380
+ 2. The service architecture (monolith/microservices/serverless)
381
+ 3. The selected tech stack and languages
382
+ 4. Component organization from above
383
+ 5. Best practices for the chosen frameworks
384
+ 6. Clear separation of concerns
385
+
386
+ Adapt the structure based on project needs. For monorepos, show service separation. For serverless, show function organization. Include language-specific conventions.
387
+
388
+ After presenting the structure, apply `tasks#advanced-elicitation` protocol to refine based on user feedback.]]
389
+
390
+ ```plaintext
391
+ {{project-root}}/
392
+ ├── .github/ # CI/CD workflows
393
+ │ └── workflows/
394
+ │ └── main.yml
395
+ ├── .vscode/ # VSCode settings (optional)
396
+ │ └── settings.json
397
+ ├── build/ # Compiled output (git-ignored)
398
+ ├── config/ # Configuration files
399
+ ├── docs/ # Project documentation
400
+ │ ├── PRD.md
401
+ │ ├── architecture.md
402
+ │ └── ...
403
+ ├── infra/ # Infrastructure as Code
404
+ │ └── {{iac-structure}}
405
+ ├── {{dependencies-dir}}/ # Dependencies (git-ignored)
406
+ ├── scripts/ # Utility scripts
407
+ ├── src/ # Application source code
408
+ │ └── {{source-structure}}
409
+ ├── tests/ # Test files
410
+ │ ├── unit/
411
+ │ ├── integration/
412
+ │ └── e2e/
413
+ ├── .env.example # Environment variables template
414
+ ├── .gitignore # Git ignore rules
415
+ ├── {{package-manifest}} # Dependencies manifest
416
+ ├── {{config-files}} # Language/framework configs
417
+ └── README.md # Project documentation
418
+ ```
419
+
420
+ @{example: monorepo-structure}
421
+ project-root/
422
+ ├── packages/
423
+ │ ├── api/ # Backend API service
424
+ │ ├── web/ # Frontend application
425
+ │ ├── shared/ # Shared utilities/types
426
+ │ └── infrastructure/ # IaC definitions
427
+ ├── scripts/ # Monorepo management scripts
428
+ └── package.json # Root package.json with workspaces
429
+ @{/example}
430
+
431
+ [[LLM: After presenting the source tree structure, apply `tasks#advanced-elicitation` protocol]]
432
+
433
+ ## Infrastructure and Deployment
434
+
435
+ [[LLM: Define the deployment architecture and practices:
436
+
437
+ 1. Use IaC tool selected in Tech Stack
438
+ 2. Choose deployment strategy appropriate for the architecture
439
+ 3. Define environments and promotion flow
440
+ 4. Establish rollback procedures
441
+ 5. Consider security, monitoring, and cost optimization
442
+
443
+ Get user input on deployment preferences and CI/CD tool choices.]]
444
+
445
+ ### Infrastructure as Code
446
+
447
+ - **Tool:** {{iac_tool}} {{version}}
448
+ - **Location:** `{{iac_directory}}`
449
+ - **Approach:** {{iac_approach}}
450
+
451
+ ### Deployment Strategy
452
+
453
+ - **Strategy:** {{deployment_strategy}}
454
+ - **CI/CD Platform:** {{cicd_platform}}
455
+ - **Pipeline Configuration:** `{{pipeline_config_location}}`
456
+
457
+ ### Environments
458
+
459
+ <<REPEAT: environment>>
460
+
461
+ - **{{env_name}}:** {{env_purpose}} - {{env_details}}
462
+ <</REPEAT>>
463
+
464
+ ### Environment Promotion Flow
465
+
466
+ ```
467
+ {{promotion_flow_diagram}}
468
+ ```
469
+
470
+ ### Rollback Strategy
471
+
472
+ - **Primary Method:** {{rollback_method}}
473
+ - **Trigger Conditions:** {{rollback_triggers}}
474
+ - **Recovery Time Objective:** {{rto}}
475
+
476
+ [[LLM: After presenting the infrastructure and deployment section, apply `tasks#advanced-elicitation` protocol]]
477
+
478
+ ## Error Handling Strategy
479
+
480
+ [[LLM: Define comprehensive error handling approach:
481
+
482
+ 1. Choose appropriate patterns for the language/framework from Tech Stack
483
+ 2. Define logging standards and tools
484
+ 3. Establish error categories and handling rules
485
+ 4. Consider observability and debugging needs
486
+ 5. Ensure security (no sensitive data in logs)
487
+
488
+ This section guides both AI and human developers in consistent error handling.]]
489
+
490
+ ### General Approach
491
+
492
+ - **Error Model:** {{error_model}}
493
+ - **Exception Hierarchy:** {{exception_structure}}
494
+ - **Error Propagation:** {{propagation_rules}}
495
+
496
+ ### Logging Standards
497
+
498
+ - **Library:** {{logging_library}} {{version}}
499
+ - **Format:** {{log_format}}
500
+ - **Levels:** {{log_levels_definition}}
501
+ - **Required Context:**
502
+ - Correlation ID: {{correlation_id_format}}
503
+ - Service Context: {{service_context}}
504
+ - User Context: {{user_context_rules}}
505
+
506
+ ### Error Handling Patterns
507
+
508
+ #### External API Errors
509
+
510
+ - **Retry Policy:** {{retry_strategy}}
511
+ - **Circuit Breaker:** {{circuit_breaker_config}}
512
+ - **Timeout Configuration:** {{timeout_settings}}
513
+ - **Error Translation:** {{error_mapping_rules}}
514
+
515
+ #### Business Logic Errors
516
+
517
+ - **Custom Exceptions:** {{business_exception_types}}
518
+ - **User-Facing Errors:** {{user_error_format}}
519
+ - **Error Codes:** {{error_code_system}}
520
+
521
+ #### Data Consistency
522
+
523
+ - **Transaction Strategy:** {{transaction_approach}}
524
+ - **Compensation Logic:** {{compensation_patterns}}
525
+ - **Idempotency:** {{idempotency_approach}}
526
+
527
+ [[LLM: After presenting the error handling strategy, apply `tasks#advanced-elicitation` protocol]]
528
+
529
+ ## Coding Standards
530
+
531
+ [[LLM: These standards are MANDATORY for AI agents. Work with user to define ONLY the critical rules needed to prevent bad code. Explain that:
532
+
533
+ 1. This section directly controls AI developer behavior
534
+ 2. Keep it minimal - assume AI knows general best practices
535
+ 3. Focus on project-specific conventions and gotchas
536
+ 4. Overly detailed standards bloat context and slow development
537
+ 5. Standards will be extracted to separate file for dev agent use
538
+
539
+ For each standard, get explicit user confirmation it's necessary.]]
540
+
541
+ ### Core Standards
542
+
543
+ - **Languages & Runtimes:** {{languages_and_versions}}
544
+ - **Style & Linting:** {{linter_config}}
545
+ - **Test Organization:** {{test_file_convention}}
546
+
547
+ ### Naming Conventions
548
+
549
+ [[LLM: Only include if deviating from language defaults]]
550
+
551
+ | Element | Convention | Example |
552
+ | :-------- | :------------------- | :---------------- |
553
+ | Variables | {{var_convention}} | {{var_example}} |
554
+ | Functions | {{func_convention}} | {{func_example}} |
555
+ | Classes | {{class_convention}} | {{class_example}} |
556
+ | Files | {{file_convention}} | {{file_example}} |
557
+
558
+ ### Critical Rules
559
+
560
+ [[LLM: List ONLY rules that AI might violate or project-specific requirements. Examples:
561
+
562
+ - "Never use console.log in production code - use logger"
563
+ - "All API responses must use ApiResponse wrapper type"
564
+ - "Database queries must use repository pattern, never direct ORM"
565
+
566
+ Avoid obvious rules like "use SOLID principles" or "write clean code"]]
567
+
568
+ <<REPEAT: critical_rule>>
569
+
570
+ - **{{rule_name}}:** {{rule_description}}
571
+ <</REPEAT>>
572
+
573
+ ### Language-Specific Guidelines
574
+
575
+ [[LLM: Add ONLY if critical for preventing AI mistakes. Most teams don't need this section.]]
576
+
577
+ ^^CONDITION: has_language_specifics^^
578
+
579
+ #### {{language_name}} Specifics
580
+
581
+ <<REPEAT: language_rule>>
582
+
583
+ - **{{rule_topic}}:** {{rule_detail}}
584
+ <</REPEAT>>
585
+
586
+ ^^/CONDITION: has_language_specifics^^
587
+
588
+ [[LLM: After presenting the coding standards, apply `tasks#advanced-elicitation` protocol]]
589
+
590
+ ## Test Strategy and Standards
591
+
592
+ [[LLM: Work with user to define comprehensive test strategy:
593
+
594
+ 1. Use test frameworks from Tech Stack
595
+ 2. Decide on TDD vs test-after approach
596
+ 3. Define test organization and naming
597
+ 4. Establish coverage goals
598
+ 5. Determine integration test infrastructure
599
+ 6. Plan for test data and external dependencies
600
+
601
+ Note: Basic info goes in Coding Standards for dev agent. This detailed section is for QA agent and team reference. Apply `tasks#advanced-elicitation` after initial draft.]]
602
+
603
+ ### Testing Philosophy
604
+
605
+ - **Approach:** {{test_approach}}
606
+ - **Coverage Goals:** {{coverage_targets}}
607
+ - **Test Pyramid:** {{test_distribution}}
608
+
609
+ ### Test Types and Organization
610
+
611
+ #### Unit Tests
612
+
613
+ - **Framework:** {{unit_test_framework}} {{version}}
614
+ - **File Convention:** {{unit_test_naming}}
615
+ - **Location:** {{unit_test_location}}
616
+ - **Mocking Library:** {{mocking_library}}
617
+ - **Coverage Requirement:** {{unit_coverage}}
618
+
619
+ **AI Agent Requirements:**
620
+
621
+ - Generate tests for all public methods
622
+ - Cover edge cases and error conditions
623
+ - Follow AAA pattern (Arrange, Act, Assert)
624
+ - Mock all external dependencies
625
+
626
+ #### Integration Tests
627
+
628
+ - **Scope:** {{integration_scope}}
629
+ - **Location:** {{integration_test_location}}
630
+ - **Test Infrastructure:**
631
+ <<REPEAT: test_dependency>>
632
+ - **{{dependency_name}}:** {{test_approach}} ({{test_tool}})
633
+ <</REPEAT>>
634
+
635
+ @{example: test_dependencies}
636
+
637
+ - **Database:** In-memory H2 for unit tests, Testcontainers PostgreSQL for integration
638
+ - **Message Queue:** Embedded Kafka for tests
639
+ - **External APIs:** WireMock for stubbing
640
+ @{/example}
641
+
642
+ #### End-to-End Tests
643
+
644
+ - **Framework:** {{e2e_framework}} {{version}}
645
+ - **Scope:** {{e2e_scope}}
646
+ - **Environment:** {{e2e_environment}}
647
+ - **Test Data:** {{e2e_data_strategy}}
648
+
649
+ ### Test Data Management
650
+
651
+ - **Strategy:** {{test_data_approach}}
652
+ - **Fixtures:** {{fixture_location}}
653
+ - **Factories:** {{factory_pattern}}
654
+ - **Cleanup:** {{cleanup_strategy}}
655
+
656
+ ### Continuous Testing
657
+
658
+ - **CI Integration:** {{ci_test_stages}}
659
+ - **Performance Tests:** {{perf_test_approach}}
660
+ - **Security Tests:** {{security_test_approach}}
661
+
662
+ [[LLM: After presenting the test strategy section, apply `tasks#advanced-elicitation` protocol]]
663
+
664
+ ## Security
665
+
666
+ [[LLM: Define MANDATORY security requirements for AI and human developers:
667
+
668
+ 1. Focus on implementation-specific rules
669
+ 2. Reference security tools from Tech Stack
670
+ 3. Define clear patterns for common scenarios
671
+ 4. These rules directly impact code generation
672
+ 5. Work with user to ensure completeness without redundancy]]
673
+
674
+ ### Input Validation
675
+
676
+ - **Validation Library:** {{validation_library}}
677
+ - **Validation Location:** {{where_to_validate}}
678
+ - **Required Rules:**
679
+ - All external inputs MUST be validated
680
+ - Validation at API boundary before processing
681
+ - Whitelist approach preferred over blacklist
682
+
683
+ ### Authentication & Authorization
684
+
685
+ - **Auth Method:** {{auth_implementation}}
686
+ - **Session Management:** {{session_approach}}
687
+ - **Required Patterns:**
688
+ - {{auth_pattern_1}}
689
+ - {{auth_pattern_2}}
690
+
691
+ ### Secrets Management
692
+
693
+ - **Development:** {{dev_secrets_approach}}
694
+ - **Production:** {{prod_secrets_service}}
695
+ - **Code Requirements:**
696
+ - NEVER hardcode secrets
697
+ - Access via configuration service only
698
+ - No secrets in logs or error messages
699
+
700
+ ### API Security
701
+
702
+ - **Rate Limiting:** {{rate_limit_implementation}}
703
+ - **CORS Policy:** {{cors_configuration}}
704
+ - **Security Headers:** {{required_headers}}
705
+ - **HTTPS Enforcement:** {{https_approach}}
706
+
707
+ ### Data Protection
708
+
709
+ - **Encryption at Rest:** {{encryption_at_rest}}
710
+ - **Encryption in Transit:** {{encryption_in_transit}}
711
+ - **PII Handling:** {{pii_rules}}
712
+ - **Logging Restrictions:** {{what_not_to_log}}
713
+
714
+ ### Dependency Security
715
+
716
+ - **Scanning Tool:** {{dependency_scanner}}
717
+ - **Update Policy:** {{update_frequency}}
718
+ - **Approval Process:** {{new_dep_process}}
719
+
720
+ ### Security Testing
721
+
722
+ - **SAST Tool:** {{static_analysis}}
723
+ - **DAST Tool:** {{dynamic_analysis}}
724
+ - **Penetration Testing:** {{pentest_schedule}}
725
+
726
+ [[LLM: After presenting the security section, apply `tasks#advanced-elicitation` protocol]]
727
+
728
+ ## Checklist Results Report
729
+
730
+ [[LLM: Before running the checklist, offer to output the full architecture document. Once user confirms, execute the `architect-checklist` and populate results here.]]
731
+
732
+ ---
733
+
734
+ ## Next Steps
735
+
736
+ [[LLM: After completing the architecture:
737
+
738
+ 1. If project has UI components:
739
+
740
+ - Recommend engaging Design Architect agent
741
+ - Use "Frontend Architecture Mode"
742
+ - Provide this document as input
743
+
744
+ 2. For all projects:
745
+
746
+ - Review with Product Owner
747
+ - Begin story implementation with Dev agent
748
+ - Set up infrastructure with DevOps agent
749
+
750
+ 3. Include specific prompts for next agents if needed]]
751
+
752
+ ^^CONDITION: has_ui^^
753
+
754
+ ### Design Architect Prompt
755
+
756
+ [[LLM: Create a brief prompt to hand off to Design Architect for Frontend Architecture creation. Include:
757
+
758
+ - Reference to this architecture document
759
+ - Key UI requirements from PRD
760
+ - Any frontend-specific decisions made here
761
+ - Request for detailed frontend architecture]]
762
+
763
+ ^^/CONDITION: has_ui^^
764
+
765
+ ### Developer Handoff
766
+
767
+ [[LLM: Create a brief prompt for developers starting implementation. Include:
768
+
769
+ - Reference to this architecture and coding standards
770
+ - First epic/story to implement
771
+ - Key technical decisions to follow]]