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,1016 @@
1
+ # {{Project Name}} Fullstack Architecture Document
2
+
3
+ [[LLM: If available, review any provided relevant documents to gather all relevant context before beginning. At minimum, you should have access to docs/prd.md and docs/front-end-spec.md. Ask the user for any documents you need but cannot locate. This template creates a unified architecture that covers both backend and frontend concerns to guide AI-driven fullstack development.]]
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 complete fullstack architecture for {{Project Name}}, including backend systems, frontend implementation, and their integration. It serves as the single source of truth for AI-driven development, ensuring consistency across the entire technology stack.
12
+
13
+ This unified approach combines what would traditionally be separate backend and frontend architecture documents, streamlining the development process for modern fullstack applications where these concerns are increasingly intertwined.
14
+
15
+ ### Starter Template or Existing Project
16
+
17
+ [[LLM: Before proceeding with architecture design, check if the project is based on any starter templates or existing codebases:
18
+
19
+ 1. Review the PRD and other documents for mentions of:
20
+
21
+ - Fullstack starter templates (e.g., T3 Stack, MEAN/MERN starters, Django + React templates)
22
+ - Monorepo templates (e.g., Nx, Turborepo starters)
23
+ - Platform-specific starters (e.g., Vercel templates, AWS Amplify starters)
24
+ - Existing projects being extended or cloned
25
+
26
+ 2. If starter templates or existing projects are mentioned:
27
+
28
+ - Ask the user to provide access (links, repos, or files)
29
+ - Analyze to understand pre-configured choices and constraints
30
+ - Note any architectural decisions already made
31
+ - Identify what can be modified vs what must be retained
32
+
33
+ 3. If no starter is mentioned but this is greenfield:
34
+
35
+ - Suggest appropriate fullstack starters based on tech preferences
36
+ - Consider platform-specific options (Vercel, AWS, etc.)
37
+ - Let user decide whether to use one
38
+
39
+ 4. Document the decision and any constraints it imposes
40
+
41
+ If none, state "N/A - Greenfield project"
42
+
43
+ ### Change Log
44
+
45
+ [[LLM: Track document versions and changes]]
46
+
47
+ | Date | Version | Description | Author |
48
+ | :--- | :------ | :---------- | :----- |
49
+
50
+ ## High Level Architecture
51
+
52
+ [[LLM: This section contains multiple subsections that establish the foundation. Present all subsections together, then apply `tasks#advanced-elicitation` protocol to the complete section.]]
53
+
54
+ ### Technical Summary
55
+
56
+ [[LLM: Provide a comprehensive overview (4-6 sentences) covering:
57
+
58
+ - Overall architectural style and deployment approach
59
+ - Frontend framework and backend technology choices
60
+ - Key integration points between frontend and backend
61
+ - Infrastructure platform and services
62
+ - How this architecture achieves PRD goals]]
63
+
64
+ ### Platform and Infrastructure Choice
65
+
66
+ [[LLM: Based on PRD requirements and technical assumptions, make a platform recommendation:
67
+
68
+ 1. Consider common patterns (not an exhaustive list, use your own best judgement and search the web as needed for emerging trends):
69
+
70
+ - **Vercel + Supabase**: For rapid development with Next.js, built-in auth/storage
71
+ - **AWS Full Stack**: For enterprise scale with Lambda, API Gateway, S3, Cognito
72
+ - **Azure**: For .NET ecosystems or enterprise Microsoft environments
73
+ - **Google Cloud**: For ML/AI heavy applications or Google ecosystem integration
74
+
75
+ 2. Present 2-3 viable options with clear pros/cons
76
+ 3. Make a recommendation with rationale
77
+ 4. Get explicit user confirmation
78
+
79
+ Document the choice and key services that will be used.]]
80
+
81
+ **Platform:** {{selected_platform}}
82
+ **Key Services:** {{core_services_list}}
83
+ **Deployment Host and Regions:** {{regions}}
84
+
85
+ ### Repository Structure
86
+
87
+ [[LLM: Define the repository approach based on PRD requirements and platform choice:
88
+
89
+ 1. For modern fullstack apps, monorepo is often preferred
90
+ 2. Consider tooling (Nx, Turborepo, Lerna, npm workspaces)
91
+ 3. Define package/app boundaries
92
+ 4. Plan for shared code between frontend and backend]]
93
+
94
+ **Structure:** {{repo_structure_choice}}
95
+ **Monorepo Tool:** {{monorepo_tool_if_applicable}}
96
+ **Package Organization:** {{package_strategy}}
97
+
98
+ ### High Level Architecture Diagram
99
+
100
+ [[LLM: Create a Mermaid diagram showing the complete system architecture including:
101
+
102
+ - User entry points (web, mobile)
103
+ - Frontend application deployment
104
+ - API layer (REST/GraphQL)
105
+ - Backend services
106
+ - Databases and storage
107
+ - External integrations
108
+ - CDN and caching layers
109
+
110
+ Use appropriate diagram type for clarity.]]
111
+
112
+ ````mermaid
113
+ {{architecture_diagram}}
114
+ ```text
115
+
116
+ ### Architectural Patterns
117
+
118
+ [[LLM: List patterns that will guide both frontend and backend development. Include patterns for:
119
+
120
+ - Overall architecture (e.g., Jamstack, Serverless, Microservices)
121
+ - Frontend patterns (e.g., Component-based, State management)
122
+ - Backend patterns (e.g., Repository, CQRS, Event-driven)
123
+ - Integration patterns (e.g., BFF, API Gateway)
124
+
125
+ For each pattern, provide recommendation and rationale.]]
126
+
127
+ <<REPEAT: pattern>>
128
+
129
+ - **{{pattern_name}}:** {{pattern_description}} - _Rationale:_ {{rationale}}
130
+ <</REPEAT>>
131
+
132
+ @{example: patterns}
133
+
134
+ - **Jamstack Architecture:** Static site generation with serverless APIs - _Rationale:_ Optimal performance and scalability for content-heavy applications
135
+ - **Component-Based UI:** Reusable React components with TypeScript - _Rationale:_ Maintainability and type safety across large codebases
136
+ - **Repository Pattern:** Abstract data access logic - _Rationale:_ Enables testing and future database migration flexibility
137
+ - **API Gateway Pattern:** Single entry point for all API calls - _Rationale:_ Centralized auth, rate limiting, and monitoring
138
+ @{/example}
139
+
140
+ ## Tech Stack
141
+
142
+ [[LLM: This is the DEFINITIVE technology selection for the entire project. Work with user to finalize all choices. This table is the single source of truth - all development must use these exact versions.
143
+
144
+ Key areas to cover:
145
+
146
+ - Frontend and backend languages/frameworks
147
+ - Databases and caching
148
+ - Authentication and authorization
149
+ - API approach
150
+ - Testing tools for both frontend and backend
151
+ - Build and deployment tools
152
+ - Monitoring and logging
153
+
154
+ Upon render, apply `tasks#advanced-elicitation` display immediately.]]
155
+
156
+ ### Technology Stack Table
157
+
158
+ | Category | Technology | Version | Purpose | Rationale |
159
+ | :----------------------- | :---------------- | :---------- | :---------- | :------------- |
160
+ | **Frontend Language** | {{fe_language}} | {{version}} | {{purpose}} | {{why_chosen}} |
161
+ | **Frontend Framework** | {{fe_framework}} | {{version}} | {{purpose}} | {{why_chosen}} |
162
+ | **UI Component Library** | {{ui_library}} | {{version}} | {{purpose}} | {{why_chosen}} |
163
+ | **State Management** | {{state_mgmt}} | {{version}} | {{purpose}} | {{why_chosen}} |
164
+ | **Backend Language** | {{be_language}} | {{version}} | {{purpose}} | {{why_chosen}} |
165
+ | **Backend Framework** | {{be_framework}} | {{version}} | {{purpose}} | {{why_chosen}} |
166
+ | **API Style** | {{api_style}} | {{version}} | {{purpose}} | {{why_chosen}} |
167
+ | **Database** | {{database}} | {{version}} | {{purpose}} | {{why_chosen}} |
168
+ | **Cache** | {{cache}} | {{version}} | {{purpose}} | {{why_chosen}} |
169
+ | **File Storage** | {{storage}} | {{version}} | {{purpose}} | {{why_chosen}} |
170
+ | **Authentication** | {{auth}} | {{version}} | {{purpose}} | {{why_chosen}} |
171
+ | **Frontend Testing** | {{fe_test}} | {{version}} | {{purpose}} | {{why_chosen}} |
172
+ | **Backend Testing** | {{be_test}} | {{version}} | {{purpose}} | {{why_chosen}} |
173
+ | **E2E Testing** | {{e2e_test}} | {{version}} | {{purpose}} | {{why_chosen}} |
174
+ | **Build Tool** | {{build_tool}} | {{version}} | {{purpose}} | {{why_chosen}} |
175
+ | **Bundler** | {{bundler}} | {{version}} | {{purpose}} | {{why_chosen}} |
176
+ | **IaC Tool** | {{iac_tool}} | {{version}} | {{purpose}} | {{why_chosen}} |
177
+ | **CI/CD** | {{cicd}} | {{version}} | {{purpose}} | {{why_chosen}} |
178
+ | **Monitoring** | {{monitoring}} | {{version}} | {{purpose}} | {{why_chosen}} |
179
+ | **Logging** | {{logging}} | {{version}} | {{purpose}} | {{why_chosen}} |
180
+ | **CSS Framework** | {{css_framework}} | {{version}} | {{purpose}} | {{why_chosen}} |
181
+
182
+ @{example: tech_stack_rows}
183
+ | **Frontend Language** | TypeScript | 5.3.3 | Type-safe frontend development | Strong typing, excellent tooling |
184
+ | **Frontend Framework** | Next.js | 14.1.0 | React framework with SSR/SSG | SEO, performance, Vercel integration |
185
+ | **Backend Language** | TypeScript | 5.3.3 | Type-safe backend development | Code sharing with frontend |
186
+ | **API Style** | REST + tRPC | - | Type-safe API communication | End-to-end type safety |
187
+ | **Database** | PostgreSQL | 16.1 | Primary data store | ACID compliance, JSON support |
188
+ | **Authentication** | Supabase Auth | 2.39.0 | User authentication | Built-in auth flows, social providers |
189
+ @{/example}
190
+
191
+ ## Data Models
192
+
193
+ [[LLM: Define the core data models/entities that will be shared between frontend and backend:
194
+
195
+ 1. Review PRD requirements and identify key business entities
196
+ 2. For each model, explain its purpose and relationships
197
+ 3. Include key attributes and data types
198
+ 4. Show relationships between models
199
+ 5. Create TypeScript interfaces that can be shared
200
+ 6. Discuss design decisions with user
201
+
202
+ Create a clear conceptual model before moving to database schema.
203
+
204
+ After presenting all data models, apply `tasks#advanced-elicitation` protocol]]
205
+
206
+ <<REPEAT: data_model>>
207
+
208
+ ### {{model_name}}
209
+
210
+ **Purpose:** {{model_purpose}}
211
+
212
+ **Key Attributes:**
213
+
214
+ - {{attribute_1}}: {{type_1}} - {{description_1}}
215
+ - {{attribute_2}}: {{type_2}} - {{description_2}}
216
+
217
+ **TypeScript Interface:**
218
+
219
+ ```typescript
220
+ {
221
+ {
222
+ model_interface;
223
+ }
224
+ }
225
+ ````
226
+
227
+ **Relationships:**
228
+
229
+ - {{relationship_1}}
230
+ - {{relationship_2}}
231
+ <</REPEAT>>
232
+
233
+ @{example: data_model}
234
+
235
+ ### User
236
+
237
+ **Purpose:** Represents authenticated users in the system
238
+
239
+ **Key Attributes:**
240
+
241
+ - id: string - Unique identifier
242
+ - email: string - User's email address
243
+ - name: string - Display name
244
+ - role: enum - User permission level
245
+ - timestamps: Date - Created and updated times
246
+
247
+ **TypeScript Interface:**
248
+
249
+ ````typescript
250
+ interface User {
251
+ id: string;
252
+ email: string;
253
+ name: string;
254
+ role: "admin" | "user" | "guest";
255
+ createdAt: Date;
256
+ updatedAt: Date;
257
+ profile?: UserProfile;
258
+ }
259
+
260
+ interface UserProfile {
261
+ avatarUrl?: string;
262
+ bio?: string;
263
+ preferences: Record<string, any>;
264
+ }
265
+ ```text
266
+
267
+ **Relationships:**
268
+
269
+ - Has many Posts (1:n)
270
+ - Has one Profile (1:1)
271
+ @{/example}
272
+
273
+ ## REST API Spec
274
+
275
+ [[LLM: Based on the chosen API style from Tech Stack:
276
+
277
+ 1. If REST API, create an OpenAPI 3.0 specification
278
+ 2. If GraphQL, provide the GraphQL schema
279
+ 3. If tRPC, show router definitions
280
+ 4. Include all endpoints from epics/stories
281
+ 5. Define request/response schemas based on data models
282
+ 6. Document authentication requirements
283
+ 7. Include example requests/responses
284
+
285
+ Use appropriate format for the chosen API style. If no API (e.g., static site), skip this section.]]
286
+
287
+ ^^CONDITION: has_rest_api^^
288
+
289
+ ```yml
290
+ openapi: 3.0.0
291
+ info:
292
+ title:
293
+ '[object Object]': null
294
+ version:
295
+ '[object Object]': null
296
+ description:
297
+ '[object Object]': null
298
+ servers:
299
+ - url:
300
+ '[object Object]': null
301
+ description:
302
+ '[object Object]': null
303
+ ````
304
+
305
+ ^^/CONDITION: has_rest_api^^
306
+
307
+ ^^CONDITION: has_graphql_api^^
308
+
309
+ ````graphql
310
+ # GraphQL Schema
311
+ {{graphql_schema}}
312
+ ```text
313
+
314
+ ^^/CONDITION: has_graphql_api^^
315
+
316
+ ^^CONDITION: has_trpc_api^^
317
+
318
+ ```typescript
319
+ // tRPC Router Definitions
320
+ {
321
+ {
322
+ trpc_routers;
323
+ }
324
+ }
325
+ ````
326
+
327
+ ^^/CONDITION: has_trpc_api^^
328
+
329
+ [[LLM: After presenting the API spec (or noting its absence if not applicable), apply `tasks#advanced-elicitation` protocol]]
330
+
331
+ ## Components
332
+
333
+ [[LLM: Based on the architectural patterns, tech stack, and data models from above:
334
+
335
+ 1. Identify major logical components/services across the fullstack
336
+ 2. Consider both frontend and backend components
337
+ 3. Define clear boundaries and interfaces between components
338
+ 4. For each component, specify:
339
+
340
+ - Primary responsibility
341
+ - Key interfaces/APIs exposed
342
+ - Dependencies on other components
343
+ - Technology specifics based on tech stack choices
344
+
345
+ 5. Create component diagrams where helpful
346
+ 6. After presenting all components, apply `tasks#advanced-elicitation` protocol]]
347
+
348
+ <<REPEAT: component>>
349
+
350
+ ### {{component_name}}
351
+
352
+ **Responsibility:** {{component_description}}
353
+
354
+ **Key Interfaces:**
355
+
356
+ - {{interface_1}}
357
+ - {{interface_2}}
358
+
359
+ **Dependencies:** {{dependencies}}
360
+
361
+ **Technology Stack:** {{component_tech_details}}
362
+ <</REPEAT>>
363
+
364
+ ### Component Diagrams
365
+
366
+ [[LLM: Create Mermaid diagrams to visualize component relationships. Options:
367
+
368
+ - C4 Container diagram for high-level view
369
+ - Component diagram for detailed internal structure
370
+ - Sequence diagrams for complex interactions
371
+ Choose the most appropriate for clarity
372
+
373
+ After presenting the diagrams, apply `tasks#advanced-elicitation` protocol]]
374
+
375
+ ## External APIs
376
+
377
+ [[LLM: For each external service integration:
378
+
379
+ 1. Identify APIs needed based on PRD requirements and component design
380
+ 2. If documentation URLs are unknown, ask user for specifics
381
+ 3. Document authentication methods and security considerations
382
+ 4. List specific endpoints that will be used
383
+ 5. Note any rate limits or usage constraints
384
+
385
+ If no external APIs are needed, state this explicitly and skip to next section.]]
386
+
387
+ ^^CONDITION: has_external_apis^^
388
+
389
+ <<REPEAT: external_api>>
390
+
391
+ ### {{api_name}} API
392
+
393
+ - **Purpose:** {{api_purpose}}
394
+ - **Documentation:** {{api_docs_url}}
395
+ - **Base URL(s):** {{api_base_url}}
396
+ - **Authentication:** {{auth_method}}
397
+ - **Rate Limits:** {{rate_limits}}
398
+
399
+ **Key Endpoints Used:**
400
+ <<REPEAT: endpoint>>
401
+
402
+ - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
403
+ <</REPEAT>>
404
+
405
+ **Integration Notes:** {{integration_considerations}}
406
+ <</REPEAT>>
407
+
408
+ @{example: external_api}
409
+
410
+ ### Stripe API
411
+
412
+ - **Purpose:** Payment processing and subscription management
413
+ - **Documentation:** https://stripe.com/docs/api
414
+ - **Base URL(s):** `https://api.stripe.com/v1`
415
+ - **Authentication:** Bearer token with secret key
416
+ - **Rate Limits:** 100 requests per second
417
+
418
+ **Key Endpoints Used:**
419
+
420
+ - `POST /customers` - Create customer profiles
421
+ - `POST /payment_intents` - Process payments
422
+ - `POST /subscriptions` - Manage subscriptions
423
+ @{/example}
424
+
425
+ ^^/CONDITION: has_external_apis^^
426
+
427
+ [[LLM: After presenting external APIs (or noting their absence), apply `tasks#advanced-elicitation` protocol]]
428
+
429
+ ## Core Workflows
430
+
431
+ [[LLM: Illustrate key system workflows using sequence diagrams:
432
+
433
+ 1. Identify critical user journeys from PRD
434
+ 2. Show component interactions including external APIs
435
+ 3. Include both frontend and backend flows
436
+ 4. Include error handling paths
437
+ 5. Document async operations
438
+ 6. Create both high-level and detailed diagrams as needed
439
+
440
+ Focus on workflows that clarify architecture decisions or complex interactions.
441
+
442
+ After presenting the workflow diagrams, apply `tasks#advanced-elicitation` protocol]]
443
+
444
+ ## Database Schema
445
+
446
+ [[LLM: Transform the conceptual data models into concrete database schemas:
447
+
448
+ 1. Use the database type(s) selected in Tech Stack
449
+ 2. Create schema definitions using appropriate notation
450
+ 3. Include indexes, constraints, and relationships
451
+ 4. Consider performance and scalability
452
+ 5. For NoSQL, show document structures
453
+
454
+ Present schema in format appropriate to database type (SQL DDL, JSON schema, etc.)
455
+
456
+ After presenting the database schema, apply `tasks#advanced-elicitation` protocol]]
457
+
458
+ ## Frontend Architecture
459
+
460
+ [[LLM: Define frontend-specific architecture details. After each subsection, note if user wants to refine before continuing.
461
+
462
+ After presenting this section, apply `tasks#advanced-elicitation` protocol]]
463
+
464
+ ### Component Architecture
465
+
466
+ [[LLM: Define component organization and patterns based on chosen framework.]]
467
+
468
+ **Component Organization:**
469
+
470
+ `````text
471
+ {{component_structure}}
472
+ ```text
473
+
474
+ **Component Template:**
475
+
476
+ ````typescript
477
+ {
478
+ {
479
+ component_template;
480
+ }
481
+ }
482
+ ```text
483
+
484
+ ### State Management Architecture
485
+
486
+ [[LLM: Detail state management approach based on chosen solution.]]
487
+
488
+ **State Structure:**
489
+
490
+ ```typescript
491
+ {
492
+ {
493
+ state_structure;
494
+ }
495
+ }
496
+ `````
497
+
498
+ **State Management Patterns:**
499
+
500
+ - {{pattern_1}}
501
+ - {{pattern_2}}
502
+
503
+ ### Routing Architecture
504
+
505
+ [[LLM: Define routing structure based on framework choice.]]
506
+
507
+ **Route Organization:**
508
+
509
+ `````text
510
+ {{route_structure}}
511
+ ```text
512
+
513
+ **Protected Route Pattern:**
514
+
515
+ ````typescript
516
+ {
517
+ {
518
+ protected_route_example;
519
+ }
520
+ }
521
+ ```text
522
+
523
+ ### Frontend Services Layer
524
+
525
+ [[LLM: Define how frontend communicates with backend.]]
526
+
527
+ **API Client Setup:**
528
+
529
+ ```typescript
530
+ {
531
+ {
532
+ api_client_setup;
533
+ }
534
+ }
535
+ `````
536
+
537
+ **Service Example:**
538
+
539
+ ````typescript
540
+ {
541
+ {
542
+ service_example;
543
+ }
544
+ }
545
+ ```text
546
+
547
+ ## Backend Architecture
548
+
549
+ [[LLM: Define backend-specific architecture details. Consider serverless vs traditional server approaches.
550
+
551
+ After presenting this section, apply `tasks#advanced-elicitation` protocol]]
552
+
553
+ ### Service Architecture
554
+
555
+ [[LLM: Based on platform choice, define service organization.]]
556
+
557
+ ^^CONDITION: serverless^^
558
+ **Function Organization:**
559
+
560
+ ````
561
+
562
+ {{function_structure}}
563
+
564
+ ````text
565
+
566
+ **Function Template:**
567
+
568
+ ```typescript
569
+ {
570
+ {
571
+ function_template;
572
+ }
573
+ }
574
+ ````
575
+
576
+ ^^/CONDITION: serverless^^
577
+
578
+ ^^CONDITION: traditional_server^^
579
+ **Controller/Route Organization:**
580
+
581
+ `````text
582
+ {{controller_structure}}
583
+ ```text
584
+
585
+ **Controller Template:**
586
+
587
+ ````typescript
588
+ {
589
+ {
590
+ controller_template;
591
+ }
592
+ }
593
+ ```text
594
+
595
+ ^^/CONDITION: traditional_server^^
596
+
597
+ ### Database Architecture
598
+
599
+ [[LLM: Define database schema and access patterns.]]
600
+
601
+ **Schema Design:**
602
+
603
+ ```sql
604
+ {{database_schema}}
605
+ `````
606
+
607
+ **Data Access Layer:**
608
+
609
+ ````typescript
610
+ {
611
+ {
612
+ repository_pattern;
613
+ }
614
+ }
615
+ ```text
616
+
617
+ ### Authentication and Authorization
618
+
619
+ [[LLM: Define auth implementation details.]]
620
+
621
+ **Auth Flow:**
622
+
623
+ ```mermaid
624
+ {{auth_flow_diagram}}
625
+ ````
626
+
627
+ **Middleware/Guards:**
628
+
629
+ ````typescript
630
+ {
631
+ {
632
+ auth_middleware;
633
+ }
634
+ }
635
+ ```text
636
+
637
+ ## Unified Project Structure
638
+
639
+ [[LLM: Create a monorepo structure that accommodates both frontend and backend. Adapt based on chosen tools and frameworks. After presenting, apply `tasks#advanced-elicitation` protocol.]]
640
+
641
+ ```plaintext
642
+ {{project-name}}/
643
+ ├── .github/ # CI/CD workflows
644
+ │ └── workflows/
645
+ │ ├── ci.yml
646
+ │ └── deploy.yml
647
+ ├── apps/ # Application packages
648
+ │ ├── web/ # Frontend application
649
+ │ │ ├── src/
650
+ │ │ │ ├── components/ # UI components
651
+ │ │ │ ├── pages/ # Page components/routes
652
+ │ │ │ ├── hooks/ # Custom React hooks
653
+ │ │ │ ├── services/ # API client services
654
+ │ │ │ ├── stores/ # State management
655
+ │ │ │ ├── styles/ # Global styles/themes
656
+ │ │ │ └── utils/ # Frontend utilities
657
+ │ │ ├── public/ # Static assets
658
+ │ │ ├── tests/ # Frontend tests
659
+ │ │ └── package.json
660
+ │ └── api/ # Backend application
661
+ │ ├── src/
662
+ │ │ ├── routes/ # API routes/controllers
663
+ │ │ ├── services/ # Business logic
664
+ │ │ ├── models/ # Data models
665
+ │ │ ├── middleware/ # Express/API middleware
666
+ │ │ ├── utils/ # Backend utilities
667
+ │ │ └── {{serverless_or_server_entry}}
668
+ │ ├── tests/ # Backend tests
669
+ │ └── package.json
670
+ ├── packages/ # Shared packages
671
+ │ ├── shared/ # Shared types/utilities
672
+ │ │ ├── src/
673
+ │ │ │ ├── types/ # TypeScript interfaces
674
+ │ │ │ ├── constants/ # Shared constants
675
+ │ │ │ └── utils/ # Shared utilities
676
+ │ │ └── package.json
677
+ │ ├── ui/ # Shared UI components
678
+ │ │ ├── src/
679
+ │ │ └── package.json
680
+ │ └── config/ # Shared configuration
681
+ │ ├── eslint/
682
+ │ ├── typescript/
683
+ │ └── jest/
684
+ ├── infrastructure/ # IaC definitions
685
+ │ └── {{iac_structure}}
686
+ ├── scripts/ # Build/deploy scripts
687
+ ├── docs/ # Documentation
688
+ │ ├── prd.md
689
+ │ ├── front-end-spec.md
690
+ │ └── fullstack-architecture.md
691
+ ├── .env.example # Environment template
692
+ ├── package.json # Root package.json
693
+ ├── {{monorepo_config}} # Monorepo configuration
694
+ └── README.md
695
+ ````
696
+
697
+ @{example: vercel_structure}
698
+ apps/
699
+ ├── web/ # Next.js app
700
+ │ ├── app/ # App directory (Next.js 14+)
701
+ │ ├── components/
702
+ │ └── lib/
703
+ └── api/ # API routes in Next.js or separate
704
+ └── pages/api/ # API routes
705
+ @{/example}
706
+
707
+ ## Development Workflow
708
+
709
+ [[LLM: Define the development setup and workflow for the fullstack application.
710
+
711
+ After presenting this section, apply `tasks#advanced-elicitation` protocol]]
712
+
713
+ ### Local Development Setup
714
+
715
+ **Prerequisites:**
716
+
717
+ ````bash
718
+ {{prerequisites_commands}}
719
+ ```text
720
+
721
+ **Initial Setup:**
722
+
723
+ ```bash
724
+ {{setup_commands}}
725
+ ````
726
+
727
+ **Development Commands:**
728
+
729
+ ````bash
730
+ # Start all services
731
+ {{start_all_command}}
732
+
733
+ # Start frontend only
734
+ {{start_frontend_command}}
735
+
736
+ # Start backend only
737
+ {{start_backend_command}}
738
+
739
+ # Run tests
740
+ {{test_commands}}
741
+ ```text
742
+
743
+ ### Environment Configuration
744
+
745
+ **Required Environment Variables:**
746
+
747
+ ```bash
748
+ # Frontend (.env.local)
749
+ {{frontend_env_vars}}
750
+
751
+ # Backend (.env)
752
+ {{backend_env_vars}}
753
+
754
+ # Shared
755
+ {{shared_env_vars}}
756
+ ````
757
+
758
+ ## Deployment Architecture
759
+
760
+ [[LLM: Define deployment strategy based on platform choice. After presenting, apply `tasks#advanced-elicitation` protocol.]]
761
+
762
+ ### Deployment Strategy
763
+
764
+ **Frontend Deployment:**
765
+
766
+ - **Platform:** {{frontend_deploy_platform}}
767
+ - **Build Command:** {{frontend_build_command}}
768
+ - **Output Directory:** {{frontend_output_dir}}
769
+ - **CDN/Edge:** {{cdn_strategy}}
770
+
771
+ **Backend Deployment:**
772
+
773
+ - **Platform:** {{backend_deploy_platform}}
774
+ - **Build Command:** {{backend_build_command}}
775
+ - **Deployment Method:** {{deployment_method}}
776
+
777
+ ### CI/CD Pipeline
778
+
779
+ ````yaml
780
+ '[object Object]': null
781
+ ```text
782
+
783
+ ### Environments
784
+
785
+ | Environment | Frontend URL | Backend URL | Purpose |
786
+ | :---------- | :----------------- | :----------------- | :--------------------- |
787
+ | Development | {{dev_fe_url}} | {{dev_be_url}} | Local development |
788
+ | Staging | {{staging_fe_url}} | {{staging_be_url}} | Pre-production testing |
789
+ | Production | {{prod_fe_url}} | {{prod_be_url}} | Live environment |
790
+
791
+ ## Security and Performance
792
+
793
+ [[LLM: Define security and performance considerations for the fullstack application.
794
+
795
+ After presenting this section, apply `tasks#advanced-elicitation` protocol]]
796
+
797
+ ### Security Requirements
798
+
799
+ **Frontend Security:**
800
+
801
+ - CSP Headers: {{csp_policy}}
802
+ - XSS Prevention: {{xss_strategy}}
803
+ - Secure Storage: {{storage_strategy}}
804
+
805
+ **Backend Security:**
806
+
807
+ - Input Validation: {{validation_approach}}
808
+ - Rate Limiting: {{rate_limit_config}}
809
+ - CORS Policy: {{cors_config}}
810
+
811
+ **Authentication Security:**
812
+
813
+ - Token Storage: {{token_strategy}}
814
+ - Session Management: {{session_approach}}
815
+ - Password Policy: {{password_requirements}}
816
+
817
+ ### Performance Optimization
818
+
819
+ **Frontend Performance:**
820
+
821
+ - Bundle Size Target: {{bundle_size}}
822
+ - Loading Strategy: {{loading_approach}}
823
+ - Caching Strategy: {{fe_cache_strategy}}
824
+
825
+ **Backend Performance:**
826
+
827
+ - Response Time Target: {{response_target}}
828
+ - Database Optimization: {{db_optimization}}
829
+ - Caching Strategy: {{be_cache_strategy}}
830
+
831
+ ## Testing Strategy
832
+
833
+ [[LLM: Define comprehensive testing approach for fullstack application.
834
+
835
+ After presenting this section, apply `tasks#advanced-elicitation` protocol]]
836
+
837
+ ### Testing Pyramid
838
+
839
+ ````
840
+
841
+ E2E Tests
842
+ / \
843
+ Integration Tests
844
+
845
+ / \
846
+ Frontend Unit Backend Unit
847
+
848
+ ```text
849
+
850
+ ### Test Organization
851
+
852
+ **Frontend Tests:**
853
+
854
+ ```
855
+
856
+ {{frontend_test_structure}}
857
+
858
+ ````text
859
+
860
+ **Backend Tests:**
861
+
862
+ ```text
863
+
864
+ {{backend_test_structure}}
865
+
866
+ ```text
867
+
868
+ **E2E Tests:**
869
+
870
+ ````
871
+
872
+ {{e2e_test_structure}}
873
+
874
+ ````text
875
+
876
+ ### Test Examples
877
+
878
+ **Frontend Component Test:**
879
+
880
+ ```typescript
881
+ {
882
+ {
883
+ frontend_test_example;
884
+ }
885
+ }
886
+ ````
887
+
888
+ **Backend API Test:**
889
+
890
+ ````typescript
891
+ {
892
+ {
893
+ backend_test_example;
894
+ }
895
+ }
896
+ ```text
897
+
898
+ **E2E Test:**
899
+
900
+ ```typescript
901
+ {
902
+ {
903
+ e2e_test_example;
904
+ }
905
+ }
906
+ ````
907
+
908
+ ## Coding Standards
909
+
910
+ [[LLM: Define MINIMAL but CRITICAL standards for AI agents. Focus only on project-specific rules that prevent common mistakes. These will be used by dev agents.
911
+
912
+ After presenting this section, apply `tasks#advanced-elicitation` protocol]]
913
+
914
+ ### Critical Fullstack Rules
915
+
916
+ <<REPEAT: critical_rule>>
917
+
918
+ - **{{rule_name}}:** {{rule_description}}
919
+ <</REPEAT>>
920
+
921
+ @{example: critical_rules}
922
+
923
+ - **Type Sharing:** Always define types in packages/shared and import from there
924
+ - **API Calls:** Never make direct HTTP calls - use the service layer
925
+ - **Environment Variables:** Access only through config objects, never process.env directly
926
+ - **Error Handling:** All API routes must use the standard error handler
927
+ - **State Updates:** Never mutate state directly - use proper state management patterns
928
+ @{/example}
929
+
930
+ ### Naming Conventions
931
+
932
+ | Element | Frontend | Backend | Example |
933
+ | :-------------- | :------------------- | :--------- | :------------------ |
934
+ | Components | PascalCase | - | `UserProfile.tsx` |
935
+ | Hooks | camelCase with 'use' | - | `useAuth.ts` |
936
+ | API Routes | - | kebab-case | `/api/user-profile` |
937
+ | Database Tables | - | snake_case | `user_profiles` |
938
+
939
+ ## Error Handling Strategy
940
+
941
+ [[LLM: Define unified error handling across frontend and backend.
942
+
943
+ After presenting this section, apply `tasks#advanced-elicitation` protocol]]
944
+
945
+ ### Error Flow
946
+
947
+ ````mermaid
948
+ {{error_flow_diagram}}
949
+ ```text
950
+
951
+ ### Error Response Format
952
+
953
+ ```typescript
954
+ interface ApiError {
955
+ error: {
956
+ code: string;
957
+ message: string;
958
+ details?: Record<string, any>;
959
+ timestamp: string;
960
+ requestId: string;
961
+ };
962
+ }
963
+ ````
964
+
965
+ ### Frontend Error Handling
966
+
967
+ ````typescript
968
+ {
969
+ {
970
+ frontend_error_handler;
971
+ }
972
+ }
973
+ ```text
974
+
975
+ ### Backend Error Handling
976
+
977
+ ```typescript
978
+ {
979
+ {
980
+ backend_error_handler;
981
+ }
982
+ }
983
+ ````
984
+
985
+ ## Monitoring and Observability
986
+
987
+ [[LLM: Define monitoring strategy for fullstack application.
988
+
989
+ After presenting this section, apply `tasks#advanced-elicitation` protocol]]
990
+
991
+ ### Monitoring Stack
992
+
993
+ - **Frontend Monitoring:** {{frontend_monitoring}}
994
+ - **Backend Monitoring:** {{backend_monitoring}}
995
+ - **Error Tracking:** {{error_tracking}}
996
+ - **Performance Monitoring:** {{perf_monitoring}}
997
+
998
+ ### Key Metrics
999
+
1000
+ **Frontend Metrics:**
1001
+
1002
+ - Core Web Vitals
1003
+ - JavaScript errors
1004
+ - API response times
1005
+ - User interactions
1006
+
1007
+ **Backend Metrics:**
1008
+
1009
+ - Request rate
1010
+ - Error rate
1011
+ - Response time
1012
+ - Database query performance
1013
+
1014
+ ## Checklist Results Report
1015
+
1016
+ [[LLM: Before running the checklist, offer to output the full architecture document. Once user confirms, execute the `architect-checklist` and populate results here.]]