bmad-method 5.0.0-beta.2 → 5.0.1

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 (131) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +3 -3
  2. package/.github/ISSUE_TEMPLATE/feature_request.md +3 -3
  3. package/.github/workflows/discord.yaml +11 -2
  4. package/.github/workflows/format-check.yaml +42 -0
  5. package/.github/workflows/manual-release.yaml +173 -0
  6. package/.husky/pre-commit +3 -0
  7. package/.vscode/settings.json +26 -1
  8. package/CHANGELOG.md +0 -11
  9. package/README.md +2 -0
  10. package/bmad-core/agent-teams/team-all.yaml +1 -1
  11. package/bmad-core/agents/bmad-orchestrator.md +1 -1
  12. package/bmad-core/agents/dev.md +4 -4
  13. package/bmad-core/data/bmad-kb.md +1 -1
  14. package/bmad-core/data/test-levels-framework.md +12 -12
  15. package/bmad-core/tasks/facilitate-brainstorming-session.md +1 -1
  16. package/bmad-core/tasks/nfr-assess.md +10 -10
  17. package/bmad-core/tasks/qa-gate.md +23 -23
  18. package/bmad-core/tasks/review-story.md +18 -18
  19. package/bmad-core/tasks/risk-profile.md +25 -25
  20. package/bmad-core/tasks/test-design.md +9 -9
  21. package/bmad-core/tasks/trace-requirements.md +21 -21
  22. package/bmad-core/templates/architecture-tmpl.yaml +49 -49
  23. package/bmad-core/templates/brainstorming-output-tmpl.yaml +5 -5
  24. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +31 -31
  25. package/bmad-core/templates/brownfield-prd-tmpl.yaml +13 -13
  26. package/bmad-core/templates/competitor-analysis-tmpl.yaml +19 -6
  27. package/bmad-core/templates/front-end-architecture-tmpl.yaml +21 -9
  28. package/bmad-core/templates/front-end-spec-tmpl.yaml +24 -24
  29. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +122 -104
  30. package/bmad-core/templates/market-research-tmpl.yaml +2 -2
  31. package/bmad-core/templates/prd-tmpl.yaml +9 -9
  32. package/bmad-core/templates/project-brief-tmpl.yaml +4 -4
  33. package/bmad-core/templates/qa-gate-tmpl.yaml +9 -9
  34. package/bmad-core/templates/story-tmpl.yaml +12 -12
  35. package/bmad-core/workflows/brownfield-fullstack.yaml +9 -9
  36. package/bmad-core/workflows/brownfield-service.yaml +1 -1
  37. package/bmad-core/workflows/brownfield-ui.yaml +1 -1
  38. package/bmad-core/workflows/greenfield-fullstack.yaml +1 -1
  39. package/bmad-core/workflows/greenfield-service.yaml +1 -1
  40. package/bmad-core/workflows/greenfield-ui.yaml +1 -1
  41. package/common/utils/bmad-doc-template.md +5 -5
  42. package/dist/agents/analyst.txt +28 -15
  43. package/dist/agents/architect.txt +220 -190
  44. package/dist/agents/bmad-master.txt +298 -255
  45. package/dist/agents/bmad-orchestrator.txt +1 -1
  46. package/dist/agents/pm.txt +20 -20
  47. package/dist/agents/po.txt +11 -11
  48. package/dist/agents/qa.txt +275 -618
  49. package/dist/agents/sm.txt +11 -11
  50. package/dist/agents/ux-expert.txt +23 -23
  51. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +109 -109
  52. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +75 -77
  53. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +41 -41
  54. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +483 -474
  55. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +1 -1
  56. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +149 -149
  57. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.txt +20 -20
  58. package/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +371 -358
  59. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +25 -25
  60. package/dist/teams/team-all.txt +581 -881
  61. package/dist/teams/team-fullstack.txt +316 -273
  62. package/dist/teams/team-ide-minimal.txt +276 -619
  63. package/dist/teams/team-no-ui.txt +281 -238
  64. package/docs/versioning-and-releases.md +114 -44
  65. package/eslint.config.mjs +119 -0
  66. package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.4 Deployment Configuration/1.4.2 - cloudbuild.yaml +26 -26
  67. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +4 -4
  68. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +1 -1
  69. package/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +26 -28
  70. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +50 -50
  71. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +23 -23
  72. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +24 -24
  73. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +42 -42
  74. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
  75. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-dev-greenfield.yaml +5 -5
  76. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-prototype.yaml +1 -1
  77. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.md +3 -3
  78. package/expansion-packs/bmad-2d-unity-game-dev/data/bmad-kb.md +1 -1
  79. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-brief-tmpl.yaml +23 -23
  80. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-design-doc-tmpl.yaml +63 -63
  81. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml +20 -20
  82. package/expansion-packs/bmad-2d-unity-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
  83. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-dev-greenfield.yaml +5 -5
  84. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-prototype.yaml +1 -1
  85. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +20 -20
  86. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +7 -7
  87. package/package.json +62 -39
  88. package/prettier.config.mjs +32 -0
  89. package/release_notes.md +30 -0
  90. package/tools/bmad-npx-wrapper.js +10 -10
  91. package/tools/builders/web-builder.js +124 -130
  92. package/tools/bump-all-versions.js +42 -33
  93. package/tools/bump-expansion-version.js +23 -16
  94. package/tools/cli.js +10 -12
  95. package/tools/flattener/aggregate.js +10 -10
  96. package/tools/flattener/binary.js +44 -17
  97. package/tools/flattener/discovery.js +19 -18
  98. package/tools/flattener/files.js +6 -6
  99. package/tools/flattener/ignoreRules.js +125 -125
  100. package/tools/flattener/main.js +201 -304
  101. package/tools/flattener/projectRoot.js +75 -73
  102. package/tools/flattener/prompts.js +9 -9
  103. package/tools/flattener/stats.helpers.js +131 -67
  104. package/tools/flattener/stats.js +3 -3
  105. package/tools/flattener/test-matrix.js +201 -193
  106. package/tools/flattener/xml.js +33 -31
  107. package/tools/installer/bin/bmad.js +130 -89
  108. package/tools/installer/config/ide-agent-config.yaml +1 -1
  109. package/tools/installer/config/install.config.yaml +2 -2
  110. package/tools/installer/lib/config-loader.js +46 -42
  111. package/tools/installer/lib/file-manager.js +91 -113
  112. package/tools/installer/lib/ide-base-setup.js +57 -56
  113. package/tools/installer/lib/ide-setup.js +375 -343
  114. package/tools/installer/lib/installer.js +875 -714
  115. package/tools/installer/lib/memory-profiler.js +54 -53
  116. package/tools/installer/lib/module-manager.js +19 -15
  117. package/tools/installer/lib/resource-locator.js +26 -28
  118. package/tools/installer/package.json +19 -19
  119. package/tools/lib/dependency-resolver.js +26 -30
  120. package/tools/lib/yaml-utils.js +7 -7
  121. package/tools/preview-release-notes.js +66 -0
  122. package/tools/shared/bannerArt.js +3 -3
  123. package/tools/sync-installer-version.js +7 -9
  124. package/tools/update-expansion-version.js +14 -15
  125. package/tools/upgraders/v3-to-v4-upgrader.js +203 -294
  126. package/tools/version-bump.js +41 -26
  127. package/tools/yaml-format.js +56 -43
  128. package/.github/workflows/promote-to-stable.yml +0 -144
  129. package/.github/workflows/release.yaml +0 -60
  130. package/.releaserc.json +0 -21
  131. package/tools/semantic-release-sync-installer.js +0 -30
@@ -948,20 +948,20 @@ sections:
948
948
  - id: intro-content
949
949
  content: |
950
950
  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.
951
-
951
+
952
952
  **Relationship to Frontend Architecture:**
953
953
  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.
954
954
  - id: starter-template
955
955
  title: Starter Template or Existing Project
956
956
  instruction: |
957
957
  Before proceeding further with architecture design, check if the project is based on a starter template or existing codebase:
958
-
958
+
959
959
  1. Review the PRD and brainstorming brief for any mentions of:
960
960
  - Starter templates (e.g., Create React App, Next.js, Vue CLI, Angular CLI, etc.)
961
961
  - Existing projects or codebases being used as a foundation
962
962
  - Boilerplate projects or scaffolding tools
963
963
  - Previous projects to be cloned or adapted
964
-
964
+
965
965
  2. If a starter template or existing project is mentioned:
966
966
  - Ask the user to provide access via one of these methods:
967
967
  - Link to the starter template documentation
@@ -974,16 +974,16 @@ sections:
974
974
  - Existing architectural patterns and conventions
975
975
  - Any limitations or constraints imposed by the starter
976
976
  - Use this analysis to inform and align your architecture decisions
977
-
977
+
978
978
  3. If no starter template is mentioned but this is a greenfield project:
979
979
  - Suggest appropriate starter templates based on the tech stack preferences
980
980
  - Explain the benefits (faster setup, best practices, community support)
981
981
  - Let the user decide whether to use one
982
-
982
+
983
983
  4. If the user confirms no starter template will be used:
984
984
  - Proceed with architecture design from scratch
985
985
  - Note that manual setup will be required for all tooling and configuration
986
-
986
+
987
987
  Document the decision here before proceeding with the architecture design. If none, just say N/A
988
988
  elicit: true
989
989
  - id: changelog
@@ -1011,7 +1011,7 @@ sections:
1011
1011
  title: High Level Overview
1012
1012
  instruction: |
1013
1013
  Based on the PRD's Technical Assumptions section, describe:
1014
-
1014
+
1015
1015
  1. The main architectural style (e.g., Monolith, Microservices, Serverless, Event-Driven)
1016
1016
  2. Repository structure decision from PRD (Monorepo/Polyrepo)
1017
1017
  3. Service architecture decision from PRD
@@ -1028,17 +1028,17 @@ sections:
1028
1028
  - Data flow directions
1029
1029
  - External integrations
1030
1030
  - User entry points
1031
-
1031
+
1032
1032
  - id: architectural-patterns
1033
1033
  title: Architectural and Design Patterns
1034
1034
  instruction: |
1035
1035
  List the key high-level patterns that will guide the architecture. For each pattern:
1036
-
1036
+
1037
1037
  1. Present 2-3 viable options if multiple exist
1038
1038
  2. Provide your recommendation with clear rationale
1039
1039
  3. Get user confirmation before finalizing
1040
1040
  4. These patterns should align with the PRD's technical assumptions and project goals
1041
-
1041
+
1042
1042
  Common patterns to consider:
1043
1043
  - Architectural style patterns (Serverless, Event-Driven, Microservices, CQRS, Hexagonal)
1044
1044
  - Code organization patterns (Dependency Injection, Repository, Module, Factory)
@@ -1054,23 +1054,23 @@ sections:
1054
1054
  title: Tech Stack
1055
1055
  instruction: |
1056
1056
  This is the DEFINITIVE technology selection section. Work with the user to make specific choices:
1057
-
1057
+
1058
1058
  1. Review PRD technical assumptions and any preferences from .bmad-core/data/technical-preferences.yaml or an attached technical-preferences
1059
1059
  2. For each category, present 2-3 viable options with pros/cons
1060
1060
  3. Make a clear recommendation based on project needs
1061
1061
  4. Get explicit user approval for each selection
1062
1062
  5. Document exact versions (avoid "latest" - pin specific versions)
1063
1063
  6. This table is the single source of truth - all other docs must reference these choices
1064
-
1064
+
1065
1065
  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:
1066
-
1066
+
1067
1067
  - Starter templates (if any)
1068
1068
  - Languages and runtimes with exact versions
1069
1069
  - Frameworks and libraries / packages
1070
1070
  - Cloud provider and key services choices
1071
1071
  - 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
1072
1072
  - Development tools
1073
-
1073
+
1074
1074
  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 elicit feedback - this statement and the options should be rendered and then prompt right all before allowing user input.
1075
1075
  elicit: true
1076
1076
  sections:
@@ -1094,13 +1094,13 @@ sections:
1094
1094
  title: Data Models
1095
1095
  instruction: |
1096
1096
  Define the core data models/entities:
1097
-
1097
+
1098
1098
  1. Review PRD requirements and identify key business entities
1099
1099
  2. For each model, explain its purpose and relationships
1100
1100
  3. Include key attributes and data types
1101
1101
  4. Show relationships between models
1102
1102
  5. Discuss design decisions with user
1103
-
1103
+
1104
1104
  Create a clear conceptual model before moving to database schema.
1105
1105
  elicit: true
1106
1106
  repeatable: true
@@ -1109,11 +1109,11 @@ sections:
1109
1109
  title: "{{model_name}}"
1110
1110
  template: |
1111
1111
  **Purpose:** {{model_purpose}}
1112
-
1112
+
1113
1113
  **Key Attributes:**
1114
1114
  - {{attribute_1}}: {{type_1}} - {{description_1}}
1115
1115
  - {{attribute_2}}: {{type_2}} - {{description_2}}
1116
-
1116
+
1117
1117
  **Relationships:**
1118
1118
  - {{relationship_1}}
1119
1119
  - {{relationship_2}}
@@ -1122,7 +1122,7 @@ sections:
1122
1122
  title: Components
1123
1123
  instruction: |
1124
1124
  Based on the architectural patterns, tech stack, and data models from above:
1125
-
1125
+
1126
1126
  1. Identify major logical components/services and their responsibilities
1127
1127
  2. Consider the repository structure (monorepo/polyrepo) from PRD
1128
1128
  3. Define clear boundaries and interfaces between components
@@ -1131,7 +1131,7 @@ sections:
1131
1131
  - Key interfaces/APIs exposed
1132
1132
  - Dependencies on other components
1133
1133
  - Technology specifics based on tech stack choices
1134
-
1134
+
1135
1135
  5. Create component diagrams where helpful
1136
1136
  elicit: true
1137
1137
  sections:
@@ -1140,13 +1140,13 @@ sections:
1140
1140
  title: "{{component_name}}"
1141
1141
  template: |
1142
1142
  **Responsibility:** {{component_description}}
1143
-
1143
+
1144
1144
  **Key Interfaces:**
1145
1145
  - {{interface_1}}
1146
1146
  - {{interface_2}}
1147
-
1147
+
1148
1148
  **Dependencies:** {{dependencies}}
1149
-
1149
+
1150
1150
  **Technology Stack:** {{component_tech_details}}
1151
1151
  - id: component-diagrams
1152
1152
  title: Component Diagrams
@@ -1163,13 +1163,13 @@ sections:
1163
1163
  condition: Project requires external API integrations
1164
1164
  instruction: |
1165
1165
  For each external service integration:
1166
-
1166
+
1167
1167
  1. Identify APIs needed based on PRD requirements and component design
1168
1168
  2. If documentation URLs are unknown, ask user for specifics
1169
1169
  3. Document authentication methods and security considerations
1170
1170
  4. List specific endpoints that will be used
1171
1171
  5. Note any rate limits or usage constraints
1172
-
1172
+
1173
1173
  If no external APIs are needed, state this explicitly and skip to next section.
1174
1174
  elicit: true
1175
1175
  repeatable: true
@@ -1182,10 +1182,10 @@ sections:
1182
1182
  - **Base URL(s):** {{api_base_url}}
1183
1183
  - **Authentication:** {{auth_method}}
1184
1184
  - **Rate Limits:** {{rate_limits}}
1185
-
1185
+
1186
1186
  **Key Endpoints Used:**
1187
1187
  - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
1188
-
1188
+
1189
1189
  **Integration Notes:** {{integration_considerations}}
1190
1190
 
1191
1191
  - id: core-workflows
@@ -1194,13 +1194,13 @@ sections:
1194
1194
  mermaid_type: sequence
1195
1195
  instruction: |
1196
1196
  Illustrate key system workflows using sequence diagrams:
1197
-
1197
+
1198
1198
  1. Identify critical user journeys from PRD
1199
1199
  2. Show component interactions including external APIs
1200
1200
  3. Include error handling paths
1201
1201
  4. Document async operations
1202
1202
  5. Create both high-level and detailed diagrams as needed
1203
-
1203
+
1204
1204
  Focus on workflows that clarify architecture decisions or complex interactions.
1205
1205
  elicit: true
1206
1206
 
@@ -1211,13 +1211,13 @@ sections:
1211
1211
  language: yaml
1212
1212
  instruction: |
1213
1213
  If the project includes a REST API:
1214
-
1214
+
1215
1215
  1. Create an OpenAPI 3.0 specification
1216
1216
  2. Include all endpoints from epics/stories
1217
1217
  3. Define request/response schemas based on data models
1218
1218
  4. Document authentication requirements
1219
1219
  5. Include example requests/responses
1220
-
1220
+
1221
1221
  Use YAML format for better readability. If no REST API, skip this section.
1222
1222
  elicit: true
1223
1223
  template: |
@@ -1234,13 +1234,13 @@ sections:
1234
1234
  title: Database Schema
1235
1235
  instruction: |
1236
1236
  Transform the conceptual data models into concrete database schemas:
1237
-
1237
+
1238
1238
  1. Use the database type(s) selected in Tech Stack
1239
1239
  2. Create schema definitions using appropriate notation
1240
1240
  3. Include indexes, constraints, and relationships
1241
1241
  4. Consider performance and scalability
1242
1242
  5. For NoSQL, show document structures
1243
-
1243
+
1244
1244
  Present schema in format appropriate to database type (SQL DDL, JSON schema, etc.)
1245
1245
  elicit: true
1246
1246
 
@@ -1250,14 +1250,14 @@ sections:
1250
1250
  language: plaintext
1251
1251
  instruction: |
1252
1252
  Create a project folder structure that reflects:
1253
-
1253
+
1254
1254
  1. The chosen repository structure (monorepo/polyrepo)
1255
1255
  2. The service architecture (monolith/microservices/serverless)
1256
1256
  3. The selected tech stack and languages
1257
1257
  4. Component organization from above
1258
1258
  5. Best practices for the chosen frameworks
1259
1259
  6. Clear separation of concerns
1260
-
1260
+
1261
1261
  Adapt the structure based on project needs. For monorepos, show service separation. For serverless, show function organization. Include language-specific conventions.
1262
1262
  elicit: true
1263
1263
  examples:
@@ -1275,13 +1275,13 @@ sections:
1275
1275
  title: Infrastructure and Deployment
1276
1276
  instruction: |
1277
1277
  Define the deployment architecture and practices:
1278
-
1278
+
1279
1279
  1. Use IaC tool selected in Tech Stack
1280
1280
  2. Choose deployment strategy appropriate for the architecture
1281
1281
  3. Define environments and promotion flow
1282
1282
  4. Establish rollback procedures
1283
1283
  5. Consider security, monitoring, and cost optimization
1284
-
1284
+
1285
1285
  Get user input on deployment preferences and CI/CD tool choices.
1286
1286
  elicit: true
1287
1287
  sections:
@@ -1317,13 +1317,13 @@ sections:
1317
1317
  title: Error Handling Strategy
1318
1318
  instruction: |
1319
1319
  Define comprehensive error handling approach:
1320
-
1320
+
1321
1321
  1. Choose appropriate patterns for the language/framework from Tech Stack
1322
1322
  2. Define logging standards and tools
1323
1323
  3. Establish error categories and handling rules
1324
1324
  4. Consider observability and debugging needs
1325
1325
  5. Ensure security (no sensitive data in logs)
1326
-
1326
+
1327
1327
  This section guides both AI and human developers in consistent error handling.
1328
1328
  elicit: true
1329
1329
  sections:
@@ -1370,13 +1370,13 @@ sections:
1370
1370
  title: Coding Standards
1371
1371
  instruction: |
1372
1372
  These standards are MANDATORY for AI agents. Work with user to define ONLY the critical rules needed to prevent bad code. Explain that:
1373
-
1373
+
1374
1374
  1. This section directly controls AI developer behavior
1375
1375
  2. Keep it minimal - assume AI knows general best practices
1376
1376
  3. Focus on project-specific conventions and gotchas
1377
1377
  4. Overly detailed standards bloat context and slow development
1378
1378
  5. Standards will be extracted to separate file for dev agent use
1379
-
1379
+
1380
1380
  For each standard, get explicit user confirmation it's necessary.
1381
1381
  elicit: true
1382
1382
  sections:
@@ -1398,7 +1398,7 @@ sections:
1398
1398
  - "Never use console.log in production code - use logger"
1399
1399
  - "All API responses must use ApiResponse wrapper type"
1400
1400
  - "Database queries must use repository pattern, never direct ORM"
1401
-
1401
+
1402
1402
  Avoid obvious rules like "use SOLID principles" or "write clean code"
1403
1403
  repeatable: true
1404
1404
  template: "- **{{rule_name}}:** {{rule_description}}"
@@ -1416,14 +1416,14 @@ sections:
1416
1416
  title: Test Strategy and Standards
1417
1417
  instruction: |
1418
1418
  Work with user to define comprehensive test strategy:
1419
-
1419
+
1420
1420
  1. Use test frameworks from Tech Stack
1421
1421
  2. Decide on TDD vs test-after approach
1422
1422
  3. Define test organization and naming
1423
1423
  4. Establish coverage goals
1424
1424
  5. Determine integration test infrastructure
1425
1425
  6. Plan for test data and external dependencies
1426
-
1426
+
1427
1427
  Note: Basic info goes in Coding Standards for dev agent. This detailed section is for QA agent and team reference.
1428
1428
  elicit: true
1429
1429
  sections:
@@ -1444,7 +1444,7 @@ sections:
1444
1444
  - **Location:** {{unit_test_location}}
1445
1445
  - **Mocking Library:** {{mocking_library}}
1446
1446
  - **Coverage Requirement:** {{unit_coverage}}
1447
-
1447
+
1448
1448
  **AI Agent Requirements:**
1449
1449
  - Generate tests for all public methods
1450
1450
  - Cover edge cases and error conditions
@@ -1486,7 +1486,7 @@ sections:
1486
1486
  title: Security
1487
1487
  instruction: |
1488
1488
  Define MANDATORY security requirements for AI and human developers:
1489
-
1489
+
1490
1490
  1. Focus on implementation-specific rules
1491
1491
  2. Reference security tools from Tech Stack
1492
1492
  3. Define clear patterns for common scenarios
@@ -1555,16 +1555,16 @@ sections:
1555
1555
  title: Next Steps
1556
1556
  instruction: |
1557
1557
  After completing the architecture:
1558
-
1558
+
1559
1559
  1. If project has UI components:
1560
1560
  - Use "Frontend Architecture Mode"
1561
1561
  - Provide this document as input
1562
-
1562
+
1563
1563
  2. For all projects:
1564
1564
  - Review with Product Owner
1565
1565
  - Begin story implementation with Dev agent
1566
1566
  - Set up infrastructure with DevOps agent
1567
-
1567
+
1568
1568
  3. Include specific prompts for next agents if needed
1569
1569
  sections:
1570
1570
  - id: architect-prompt
@@ -1597,16 +1597,16 @@ sections:
1597
1597
  title: Template and Framework Selection
1598
1598
  instruction: |
1599
1599
  Review provided documents including PRD, UX-UI Specification, and main Architecture Document. Focus on extracting technical implementation details needed for AI frontend tools and developer agents. Ask the user for any of these documents if you are unable to locate and were not provided.
1600
-
1600
+
1601
1601
  Before proceeding with frontend architecture design, check if the project is using a frontend starter template or existing codebase:
1602
-
1602
+
1603
1603
  1. Review the PRD, main architecture document, and brainstorming brief for mentions of:
1604
1604
  - Frontend starter templates (e.g., Create React App, Next.js, Vite, Vue CLI, Angular CLI, etc.)
1605
1605
  - UI kit or component library starters
1606
1606
  - Existing frontend projects being used as a foundation
1607
1607
  - Admin dashboard templates or other specialized starters
1608
1608
  - Design system implementations
1609
-
1609
+
1610
1610
  2. If a frontend starter template or existing project is mentioned:
1611
1611
  - Ask the user to provide access via one of these methods:
1612
1612
  - Link to the starter template documentation
@@ -1622,7 +1622,7 @@ sections:
1622
1622
  - Testing setup and patterns
1623
1623
  - Build and development scripts
1624
1624
  - Use this analysis to ensure your frontend architecture aligns with the starter's patterns
1625
-
1625
+
1626
1626
  3. If no frontend starter is mentioned but this is a new UI, ensure we know what the ui language and framework is:
1627
1627
  - Based on the framework choice, suggest appropriate starters:
1628
1628
  - React: Create React App, Next.js, Vite + React
@@ -1630,11 +1630,11 @@ sections:
1630
1630
  - Angular: Angular CLI
1631
1631
  - Or suggest popular UI templates if applicable
1632
1632
  - Explain benefits specific to frontend development
1633
-
1633
+
1634
1634
  4. If the user confirms no starter template will be used:
1635
1635
  - Note that all tooling, bundling, and configuration will need manual setup
1636
1636
  - Proceed with frontend architecture from scratch
1637
-
1637
+
1638
1638
  Document the starter template decision and any constraints it imposes before proceeding.
1639
1639
  sections:
1640
1640
  - id: changelog
@@ -1656,12 +1656,24 @@ sections:
1656
1656
  rows:
1657
1657
  - ["Framework", "{{framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1658
1658
  - ["UI Library", "{{ui_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1659
- - ["State Management", "{{state_management}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1659
+ - [
1660
+ "State Management",
1661
+ "{{state_management}}",
1662
+ "{{version}}",
1663
+ "{{purpose}}",
1664
+ "{{why_chosen}}",
1665
+ ]
1660
1666
  - ["Routing", "{{routing_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1661
1667
  - ["Build Tool", "{{build_tool}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1662
1668
  - ["Styling", "{{styling_solution}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1663
1669
  - ["Testing", "{{test_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1664
- - ["Component Library", "{{component_lib}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1670
+ - [
1671
+ "Component Library",
1672
+ "{{component_lib}}",
1673
+ "{{version}}",
1674
+ "{{purpose}}",
1675
+ "{{why_chosen}}",
1676
+ ]
1665
1677
  - ["Form Handling", "{{form_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1666
1678
  - ["Animation", "{{animation_lib}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1667
1679
  - ["Dev Tools", "{{dev_tools}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
@@ -1809,33 +1821,33 @@ sections:
1809
1821
  elicit: true
1810
1822
  content: |
1811
1823
  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.
1812
-
1824
+
1813
1825
  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.
1814
1826
  sections:
1815
1827
  - id: starter-template
1816
1828
  title: Starter Template or Existing Project
1817
1829
  instruction: |
1818
1830
  Before proceeding with architecture design, check if the project is based on any starter templates or existing codebases:
1819
-
1831
+
1820
1832
  1. Review the PRD and other documents for mentions of:
1821
1833
  - Fullstack starter templates (e.g., T3 Stack, MEAN/MERN starters, Django + React templates)
1822
1834
  - Monorepo templates (e.g., Nx, Turborepo starters)
1823
1835
  - Platform-specific starters (e.g., Vercel templates, AWS Amplify starters)
1824
1836
  - Existing projects being extended or cloned
1825
-
1837
+
1826
1838
  2. If starter templates or existing projects are mentioned:
1827
1839
  - Ask the user to provide access (links, repos, or files)
1828
1840
  - Analyze to understand pre-configured choices and constraints
1829
1841
  - Note any architectural decisions already made
1830
1842
  - Identify what can be modified vs what must be retained
1831
-
1843
+
1832
1844
  3. If no starter is mentioned but this is greenfield:
1833
1845
  - Suggest appropriate fullstack starters based on tech preferences
1834
1846
  - Consider platform-specific options (Vercel, AWS, etc.)
1835
1847
  - Let user decide whether to use one
1836
-
1848
+
1837
1849
  4. Document the decision and any constraints it imposes
1838
-
1850
+
1839
1851
  If none, state "N/A - Greenfield project"
1840
1852
  - id: changelog
1841
1853
  title: Change Log
@@ -1861,17 +1873,17 @@ sections:
1861
1873
  title: Platform and Infrastructure Choice
1862
1874
  instruction: |
1863
1875
  Based on PRD requirements and technical assumptions, make a platform recommendation:
1864
-
1876
+
1865
1877
  1. Consider common patterns (not an exhaustive list, use your own best judgement and search the web as needed for emerging trends):
1866
1878
  - **Vercel + Supabase**: For rapid development with Next.js, built-in auth/storage
1867
1879
  - **AWS Full Stack**: For enterprise scale with Lambda, API Gateway, S3, Cognito
1868
1880
  - **Azure**: For .NET ecosystems or enterprise Microsoft environments
1869
1881
  - **Google Cloud**: For ML/AI heavy applications or Google ecosystem integration
1870
-
1882
+
1871
1883
  2. Present 2-3 viable options with clear pros/cons
1872
1884
  3. Make a recommendation with rationale
1873
1885
  4. Get explicit user confirmation
1874
-
1886
+
1875
1887
  Document the choice and key services that will be used.
1876
1888
  template: |
1877
1889
  **Platform:** {{selected_platform}}
@@ -1881,7 +1893,7 @@ sections:
1881
1893
  title: Repository Structure
1882
1894
  instruction: |
1883
1895
  Define the repository approach based on PRD requirements and platform choice, explain your rationale or ask questions to the user if unsure:
1884
-
1896
+
1885
1897
  1. For modern fullstack apps, monorepo is often preferred
1886
1898
  2. Consider tooling (Nx, Turborepo, Lerna, npm workspaces)
1887
1899
  3. Define package/app boundaries
@@ -1903,7 +1915,7 @@ sections:
1903
1915
  - Databases and storage
1904
1916
  - External integrations
1905
1917
  - CDN and caching layers
1906
-
1918
+
1907
1919
  Use appropriate diagram type for clarity.
1908
1920
  - id: architectural-patterns
1909
1921
  title: Architectural Patterns
@@ -1913,7 +1925,7 @@ sections:
1913
1925
  - Frontend patterns (e.g., Component-based, State management)
1914
1926
  - Backend patterns (e.g., Repository, CQRS, Event-driven)
1915
1927
  - Integration patterns (e.g., BFF, API Gateway)
1916
-
1928
+
1917
1929
  For each pattern, provide recommendation and rationale.
1918
1930
  repeatable: true
1919
1931
  template: "- **{{pattern_name}}:** {{pattern_description}} - _Rationale:_ {{rationale}}"
@@ -1927,7 +1939,7 @@ sections:
1927
1939
  title: Tech Stack
1928
1940
  instruction: |
1929
1941
  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.
1930
-
1942
+
1931
1943
  Key areas to cover:
1932
1944
  - Frontend and backend languages/frameworks
1933
1945
  - Databases and caching
@@ -1936,7 +1948,7 @@ sections:
1936
1948
  - Testing tools for both frontend and backend
1937
1949
  - Build and deployment tools
1938
1950
  - Monitoring and logging
1939
-
1951
+
1940
1952
  Upon render, elicit feedback immediately.
1941
1953
  elicit: true
1942
1954
  sections:
@@ -1946,11 +1958,29 @@ sections:
1946
1958
  columns: [Category, Technology, Version, Purpose, Rationale]
1947
1959
  rows:
1948
1960
  - ["Frontend Language", "{{fe_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1949
- - ["Frontend Framework", "{{fe_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1950
- - ["UI Component Library", "{{ui_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1961
+ - [
1962
+ "Frontend Framework",
1963
+ "{{fe_framework}}",
1964
+ "{{version}}",
1965
+ "{{purpose}}",
1966
+ "{{why_chosen}}",
1967
+ ]
1968
+ - [
1969
+ "UI Component Library",
1970
+ "{{ui_library}}",
1971
+ "{{version}}",
1972
+ "{{purpose}}",
1973
+ "{{why_chosen}}",
1974
+ ]
1951
1975
  - ["State Management", "{{state_mgmt}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1952
1976
  - ["Backend Language", "{{be_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1953
- - ["Backend Framework", "{{be_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1977
+ - [
1978
+ "Backend Framework",
1979
+ "{{be_framework}}",
1980
+ "{{version}}",
1981
+ "{{purpose}}",
1982
+ "{{why_chosen}}",
1983
+ ]
1954
1984
  - ["API Style", "{{api_style}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1955
1985
  - ["Database", "{{database}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
1956
1986
  - ["Cache", "{{cache}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
@@ -1971,14 +2001,14 @@ sections:
1971
2001
  title: Data Models
1972
2002
  instruction: |
1973
2003
  Define the core data models/entities that will be shared between frontend and backend:
1974
-
2004
+
1975
2005
  1. Review PRD requirements and identify key business entities
1976
2006
  2. For each model, explain its purpose and relationships
1977
2007
  3. Include key attributes and data types
1978
2008
  4. Show relationships between models
1979
2009
  5. Create TypeScript interfaces that can be shared
1980
2010
  6. Discuss design decisions with user
1981
-
2011
+
1982
2012
  Create a clear conceptual model before moving to database schema.
1983
2013
  elicit: true
1984
2014
  repeatable: true
@@ -1987,7 +2017,7 @@ sections:
1987
2017
  title: "{{model_name}}"
1988
2018
  template: |
1989
2019
  **Purpose:** {{model_purpose}}
1990
-
2020
+
1991
2021
  **Key Attributes:**
1992
2022
  - {{attribute_1}}: {{type_1}} - {{description_1}}
1993
2023
  - {{attribute_2}}: {{type_2}} - {{description_2}}
@@ -2006,7 +2036,7 @@ sections:
2006
2036
  title: API Specification
2007
2037
  instruction: |
2008
2038
  Based on the chosen API style from Tech Stack:
2009
-
2039
+
2010
2040
  1. If REST API, create an OpenAPI 3.0 specification
2011
2041
  2. If GraphQL, provide the GraphQL schema
2012
2042
  3. If tRPC, show router definitions
@@ -2014,7 +2044,7 @@ sections:
2014
2044
  5. Define request/response schemas based on data models
2015
2045
  6. Document authentication requirements
2016
2046
  7. Include example requests/responses
2017
-
2047
+
2018
2048
  Use appropriate format for the chosen API style. If no API (e.g., static site), skip this section.
2019
2049
  elicit: true
2020
2050
  sections:
@@ -2049,7 +2079,7 @@ sections:
2049
2079
  title: Components
2050
2080
  instruction: |
2051
2081
  Based on the architectural patterns, tech stack, and data models from above:
2052
-
2082
+
2053
2083
  1. Identify major logical components/services across the fullstack
2054
2084
  2. Consider both frontend and backend components
2055
2085
  3. Define clear boundaries and interfaces between components
@@ -2058,7 +2088,7 @@ sections:
2058
2088
  - Key interfaces/APIs exposed
2059
2089
  - Dependencies on other components
2060
2090
  - Technology specifics based on tech stack choices
2061
-
2091
+
2062
2092
  5. Create component diagrams where helpful
2063
2093
  elicit: true
2064
2094
  sections:
@@ -2067,13 +2097,13 @@ sections:
2067
2097
  title: "{{component_name}}"
2068
2098
  template: |
2069
2099
  **Responsibility:** {{component_description}}
2070
-
2100
+
2071
2101
  **Key Interfaces:**
2072
2102
  - {{interface_1}}
2073
2103
  - {{interface_2}}
2074
-
2104
+
2075
2105
  **Dependencies:** {{dependencies}}
2076
-
2106
+
2077
2107
  **Technology Stack:** {{component_tech_details}}
2078
2108
  - id: component-diagrams
2079
2109
  title: Component Diagrams
@@ -2090,13 +2120,13 @@ sections:
2090
2120
  condition: Project requires external API integrations
2091
2121
  instruction: |
2092
2122
  For each external service integration:
2093
-
2123
+
2094
2124
  1. Identify APIs needed based on PRD requirements and component design
2095
2125
  2. If documentation URLs are unknown, ask user for specifics
2096
2126
  3. Document authentication methods and security considerations
2097
2127
  4. List specific endpoints that will be used
2098
2128
  5. Note any rate limits or usage constraints
2099
-
2129
+
2100
2130
  If no external APIs are needed, state this explicitly and skip to next section.
2101
2131
  elicit: true
2102
2132
  repeatable: true
@@ -2109,10 +2139,10 @@ sections:
2109
2139
  - **Base URL(s):** {{api_base_url}}
2110
2140
  - **Authentication:** {{auth_method}}
2111
2141
  - **Rate Limits:** {{rate_limits}}
2112
-
2142
+
2113
2143
  **Key Endpoints Used:**
2114
2144
  - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
2115
-
2145
+
2116
2146
  **Integration Notes:** {{integration_considerations}}
2117
2147
 
2118
2148
  - id: core-workflows
@@ -2121,14 +2151,14 @@ sections:
2121
2151
  mermaid_type: sequence
2122
2152
  instruction: |
2123
2153
  Illustrate key system workflows using sequence diagrams:
2124
-
2154
+
2125
2155
  1. Identify critical user journeys from PRD
2126
2156
  2. Show component interactions including external APIs
2127
2157
  3. Include both frontend and backend flows
2128
2158
  4. Include error handling paths
2129
2159
  5. Document async operations
2130
2160
  6. Create both high-level and detailed diagrams as needed
2131
-
2161
+
2132
2162
  Focus on workflows that clarify architecture decisions or complex interactions.
2133
2163
  elicit: true
2134
2164
 
@@ -2136,13 +2166,13 @@ sections:
2136
2166
  title: Database Schema
2137
2167
  instruction: |
2138
2168
  Transform the conceptual data models into concrete database schemas:
2139
-
2169
+
2140
2170
  1. Use the database type(s) selected in Tech Stack
2141
2171
  2. Create schema definitions using appropriate notation
2142
2172
  3. Include indexes, constraints, and relationships
2143
2173
  4. Consider performance and scalability
2144
2174
  5. For NoSQL, show document structures
2145
-
2175
+
2146
2176
  Present schema in format appropriate to database type (SQL DDL, JSON schema, etc.)
2147
2177
  elicit: true
2148
2178
 
@@ -2278,60 +2308,60 @@ sections:
2278
2308
  type: code
2279
2309
  language: plaintext
2280
2310
  examples:
2281
- - |
2282
- {{project-name}}/
2283
- ├── .github/ # CI/CD workflows
2284
- │ └── workflows/
2285
- │ ├── ci.yaml
2286
- │ └── deploy.yaml
2287
- ├── apps/ # Application packages
2288
- │ ├── web/ # Frontend application
2289
- │ │ ├── src/
2290
- │ │ │ ├── components/ # UI components
2291
- │ │ │ ├── pages/ # Page components/routes
2292
- │ │ │ ├── hooks/ # Custom React hooks
2293
- │ │ │ ├── services/ # API client services
2294
- │ │ │ ├── stores/ # State management
2295
- │ │ │ ├── styles/ # Global styles/themes
2296
- │ │ │ └── utils/ # Frontend utilities
2297
- │ │ ├── public/ # Static assets
2298
- │ │ ├── tests/ # Frontend tests
2299
- │ │ └── package.json
2300
- │ └── api/ # Backend application
2301
- │ ├── src/
2302
- │ │ ├── routes/ # API routes/controllers
2303
- │ │ ├── services/ # Business logic
2304
- │ │ ├── models/ # Data models
2305
- │ │ ├── middleware/ # Express/API middleware
2306
- │ │ ├── utils/ # Backend utilities
2307
- │ │ └── {{serverless_or_server_entry}}
2308
- │ ├── tests/ # Backend tests
2309
- │ └── package.json
2310
- ├── packages/ # Shared packages
2311
- │ ├── shared/ # Shared types/utilities
2312
- │ │ ├── src/
2313
- │ │ │ ├── types/ # TypeScript interfaces
2314
- │ │ │ ├── constants/ # Shared constants
2315
- │ │ │ └── utils/ # Shared utilities
2316
- │ │ └── package.json
2317
- │ ├── ui/ # Shared UI components
2318
- │ │ ├── src/
2319
- │ │ └── package.json
2320
- │ └── config/ # Shared configuration
2321
- │ ├── eslint/
2322
- │ ├── typescript/
2323
- │ └── jest/
2324
- ├── infrastructure/ # IaC definitions
2325
- │ └── {{iac_structure}}
2326
- ├── scripts/ # Build/deploy scripts
2327
- ├── docs/ # Documentation
2328
- │ ├── prd.md
2329
- │ ├── front-end-spec.md
2330
- │ └── fullstack-architecture.md
2331
- ├── .env.example # Environment template
2332
- ├── package.json # Root package.json
2333
- ├── {{monorepo_config}} # Monorepo configuration
2334
- └── README.md
2311
+ - |
2312
+ {{project-name}}/
2313
+ ├── .github/ # CI/CD workflows
2314
+ │ └── workflows/
2315
+ │ ├── ci.yaml
2316
+ │ └── deploy.yaml
2317
+ ├── apps/ # Application packages
2318
+ │ ├── web/ # Frontend application
2319
+ │ │ ├── src/
2320
+ │ │ │ ├── components/ # UI components
2321
+ │ │ │ ├── pages/ # Page components/routes
2322
+ │ │ │ ├── hooks/ # Custom React hooks
2323
+ │ │ │ ├── services/ # API client services
2324
+ │ │ │ ├── stores/ # State management
2325
+ │ │ │ ├── styles/ # Global styles/themes
2326
+ │ │ │ └── utils/ # Frontend utilities
2327
+ │ │ ├── public/ # Static assets
2328
+ │ │ ├── tests/ # Frontend tests
2329
+ │ │ └── package.json
2330
+ │ └── api/ # Backend application
2331
+ │ ├── src/
2332
+ │ │ ├── routes/ # API routes/controllers
2333
+ │ │ ├── services/ # Business logic
2334
+ │ │ ├── models/ # Data models
2335
+ │ │ ├── middleware/ # Express/API middleware
2336
+ │ │ ├── utils/ # Backend utilities
2337
+ │ │ └── {{serverless_or_server_entry}}
2338
+ │ ├── tests/ # Backend tests
2339
+ │ └── package.json
2340
+ ├── packages/ # Shared packages
2341
+ │ ├── shared/ # Shared types/utilities
2342
+ │ │ ├── src/
2343
+ │ │ │ ├── types/ # TypeScript interfaces
2344
+ │ │ │ ├── constants/ # Shared constants
2345
+ │ │ │ └── utils/ # Shared utilities
2346
+ │ │ └── package.json
2347
+ │ ├── ui/ # Shared UI components
2348
+ │ │ ├── src/
2349
+ │ │ └── package.json
2350
+ │ └── config/ # Shared configuration
2351
+ │ ├── eslint/
2352
+ │ ├── typescript/
2353
+ │ └── jest/
2354
+ ├── infrastructure/ # IaC definitions
2355
+ │ └── {{iac_structure}}
2356
+ ├── scripts/ # Build/deploy scripts
2357
+ ├── docs/ # Documentation
2358
+ │ ├── prd.md
2359
+ │ ├── front-end-spec.md
2360
+ │ └── fullstack-architecture.md
2361
+ ├── .env.example # Environment template
2362
+ ├── package.json # Root package.json
2363
+ ├── {{monorepo_config}} # Monorepo configuration
2364
+ └── README.md
2335
2365
 
2336
2366
  - id: development-workflow
2337
2367
  title: Development Workflow
@@ -2358,13 +2388,13 @@ sections:
2358
2388
  template: |
2359
2389
  # Start all services
2360
2390
  {{start_all_command}}
2361
-
2391
+
2362
2392
  # Start frontend only
2363
2393
  {{start_frontend_command}}
2364
-
2394
+
2365
2395
  # Start backend only
2366
2396
  {{start_backend_command}}
2367
-
2397
+
2368
2398
  # Run tests
2369
2399
  {{test_commands}}
2370
2400
  - id: environment-config
@@ -2377,10 +2407,10 @@ sections:
2377
2407
  template: |
2378
2408
  # Frontend (.env.local)
2379
2409
  {{frontend_env_vars}}
2380
-
2410
+
2381
2411
  # Backend (.env)
2382
2412
  {{backend_env_vars}}
2383
-
2413
+
2384
2414
  # Shared
2385
2415
  {{shared_env_vars}}
2386
2416
 
@@ -2397,7 +2427,7 @@ sections:
2397
2427
  - **Build Command:** {{frontend_build_command}}
2398
2428
  - **Output Directory:** {{frontend_output_dir}}
2399
2429
  - **CDN/Edge:** {{cdn_strategy}}
2400
-
2430
+
2401
2431
  **Backend Deployment:**
2402
2432
  - **Platform:** {{backend_deploy_platform}}
2403
2433
  - **Build Command:** {{backend_build_command}}
@@ -2428,12 +2458,12 @@ sections:
2428
2458
  - CSP Headers: {{csp_policy}}
2429
2459
  - XSS Prevention: {{xss_strategy}}
2430
2460
  - Secure Storage: {{storage_strategy}}
2431
-
2461
+
2432
2462
  **Backend Security:**
2433
2463
  - Input Validation: {{validation_approach}}
2434
2464
  - Rate Limiting: {{rate_limit_config}}
2435
2465
  - CORS Policy: {{cors_config}}
2436
-
2466
+
2437
2467
  **Authentication Security:**
2438
2468
  - Token Storage: {{token_strategy}}
2439
2469
  - Session Management: {{session_approach}}
@@ -2445,7 +2475,7 @@ sections:
2445
2475
  - Bundle Size Target: {{bundle_size}}
2446
2476
  - Loading Strategy: {{loading_approach}}
2447
2477
  - Caching Strategy: {{fe_cache_strategy}}
2448
-
2478
+
2449
2479
  **Backend Performance:**
2450
2480
  - Response Time Target: {{response_target}}
2451
2481
  - Database Optimization: {{db_optimization}}
@@ -2461,10 +2491,10 @@ sections:
2461
2491
  type: code
2462
2492
  language: text
2463
2493
  template: |
2464
- E2E Tests
2465
- / \
2466
- Integration Tests
2467
- / \
2494
+ E2E Tests
2495
+ / \
2496
+ Integration Tests
2497
+ / \
2468
2498
  Frontend Unit Backend Unit
2469
2499
  - id: test-organization
2470
2500
  title: Test Organization
@@ -2583,7 +2613,7 @@ sections:
2583
2613
  - JavaScript errors
2584
2614
  - API response times
2585
2615
  - User interactions
2586
-
2616
+
2587
2617
  **Backend Metrics:**
2588
2618
  - Request rate
2589
2619
  - Error rate
@@ -2614,40 +2644,40 @@ sections:
2614
2644
  title: Introduction
2615
2645
  instruction: |
2616
2646
  IMPORTANT - SCOPE AND ASSESSMENT REQUIRED:
2617
-
2647
+
2618
2648
  This architecture document is for SIGNIFICANT enhancements to existing projects that require comprehensive architectural planning. Before proceeding:
2619
-
2649
+
2620
2650
  1. **Verify Complexity**: Confirm this enhancement requires architectural planning. For simple additions, recommend: "For simpler changes that don't require architectural planning, consider using the brownfield-create-epic or brownfield-create-story task with the Product Owner instead."
2621
-
2651
+
2622
2652
  2. **REQUIRED INPUTS**:
2623
2653
  - Completed brownfield-prd.md
2624
2654
  - Existing project technical documentation (from docs folder or user-provided)
2625
2655
  - Access to existing project structure (IDE or uploaded files)
2626
-
2656
+
2627
2657
  3. **DEEP ANALYSIS MANDATE**: You MUST conduct thorough analysis of the existing codebase, architecture patterns, and technical constraints before making ANY architectural recommendations. Every suggestion must be based on actual project analysis, not assumptions.
2628
-
2658
+
2629
2659
  4. **CONTINUOUS VALIDATION**: Throughout this process, explicitly validate your understanding with the user. For every architectural decision, confirm: "Based on my analysis of your existing system, I recommend [decision] because [evidence from actual project]. Does this align with your system's reality?"
2630
-
2660
+
2631
2661
  If any required inputs are missing, request them before proceeding.
2632
2662
  elicit: true
2633
2663
  sections:
2634
2664
  - id: intro-content
2635
2665
  content: |
2636
2666
  This document outlines the architectural approach for enhancing {{project_name}} with {{enhancement_description}}. Its primary goal is to serve as the guiding architectural blueprint for AI-driven development of new features while ensuring seamless integration with the existing system.
2637
-
2667
+
2638
2668
  **Relationship to Existing Architecture:**
2639
2669
  This document supplements existing project architecture by defining how new components will integrate with current systems. Where conflicts arise between new and existing patterns, this document provides guidance on maintaining consistency while implementing enhancements.
2640
2670
  - id: existing-project-analysis
2641
2671
  title: Existing Project Analysis
2642
2672
  instruction: |
2643
2673
  Analyze the existing project structure and architecture:
2644
-
2674
+
2645
2675
  1. Review existing documentation in docs folder
2646
2676
  2. Examine current technology stack and versions
2647
2677
  3. Identify existing architectural patterns and conventions
2648
2678
  4. Note current deployment and infrastructure setup
2649
2679
  5. Document any constraints or limitations
2650
-
2680
+
2651
2681
  CRITICAL: After your analysis, explicitly validate your findings: "Based on my analysis of your project, I've identified the following about your existing system: [key findings]. Please confirm these observations are accurate before I proceed with architectural recommendations."
2652
2682
  elicit: true
2653
2683
  sections:
@@ -2676,12 +2706,12 @@ sections:
2676
2706
  title: Enhancement Scope and Integration Strategy
2677
2707
  instruction: |
2678
2708
  Define how the enhancement will integrate with the existing system:
2679
-
2709
+
2680
2710
  1. Review the brownfield PRD enhancement scope
2681
2711
  2. Identify integration points with existing code
2682
2712
  3. Define boundaries between new and existing functionality
2683
2713
  4. Establish compatibility requirements
2684
-
2714
+
2685
2715
  VALIDATION CHECKPOINT: Before presenting the integration strategy, confirm: "Based on my analysis, the integration approach I'm proposing takes into account [specific existing system characteristics]. These integration points and boundaries respect your current architecture patterns. Is this assessment accurate?"
2686
2716
  elicit: true
2687
2717
  sections:
@@ -2710,7 +2740,7 @@ sections:
2710
2740
  title: Tech Stack Alignment
2711
2741
  instruction: |
2712
2742
  Ensure new components align with existing technology choices:
2713
-
2743
+
2714
2744
  1. Use existing technology stack as the foundation
2715
2745
  2. Only introduce new technologies if absolutely necessary
2716
2746
  3. Justify any new additions with clear rationale
@@ -2733,7 +2763,7 @@ sections:
2733
2763
  title: Data Models and Schema Changes
2734
2764
  instruction: |
2735
2765
  Define new data models and how they integrate with existing schema:
2736
-
2766
+
2737
2767
  1. Identify new entities required for the enhancement
2738
2768
  2. Define relationships with existing data models
2739
2769
  3. Plan database schema changes (additions, modifications)
@@ -2749,11 +2779,11 @@ sections:
2749
2779
  template: |
2750
2780
  **Purpose:** {{model_purpose}}
2751
2781
  **Integration:** {{integration_with_existing}}
2752
-
2782
+
2753
2783
  **Key Attributes:**
2754
2784
  - {{attribute_1}}: {{type_1}} - {{description_1}}
2755
2785
  - {{attribute_2}}: {{type_2}} - {{description_2}}
2756
-
2786
+
2757
2787
  **Relationships:**
2758
2788
  - **With Existing:** {{existing_relationships}}
2759
2789
  - **With New:** {{new_relationships}}
@@ -2765,7 +2795,7 @@ sections:
2765
2795
  - **Modified Tables:** {{modified_tables_list}}
2766
2796
  - **New Indexes:** {{new_indexes_list}}
2767
2797
  - **Migration Strategy:** {{migration_approach}}
2768
-
2798
+
2769
2799
  **Backward Compatibility:**
2770
2800
  - {{compatibility_measure_1}}
2771
2801
  - {{compatibility_measure_2}}
@@ -2774,12 +2804,12 @@ sections:
2774
2804
  title: Component Architecture
2775
2805
  instruction: |
2776
2806
  Define new components and their integration with existing architecture:
2777
-
2807
+
2778
2808
  1. Identify new components required for the enhancement
2779
2809
  2. Define interfaces with existing components
2780
2810
  3. Establish clear boundaries and responsibilities
2781
2811
  4. Plan integration points and data flow
2782
-
2812
+
2783
2813
  MANDATORY VALIDATION: Before presenting component architecture, confirm: "The new components I'm proposing follow the existing architectural patterns I identified in your codebase: [specific patterns]. The integration interfaces respect your current component structure and communication patterns. Does this match your project's reality?"
2784
2814
  elicit: true
2785
2815
  sections:
@@ -2792,15 +2822,15 @@ sections:
2792
2822
  template: |
2793
2823
  **Responsibility:** {{component_description}}
2794
2824
  **Integration Points:** {{integration_points}}
2795
-
2825
+
2796
2826
  **Key Interfaces:**
2797
2827
  - {{interface_1}}
2798
2828
  - {{interface_2}}
2799
-
2829
+
2800
2830
  **Dependencies:**
2801
2831
  - **Existing Components:** {{existing_dependencies}}
2802
2832
  - **New Components:** {{new_dependencies}}
2803
-
2833
+
2804
2834
  **Technology Stack:** {{component_tech_details}}
2805
2835
  - id: interaction-diagram
2806
2836
  title: Component Interaction Diagram
@@ -2813,7 +2843,7 @@ sections:
2813
2843
  condition: Enhancement requires API changes
2814
2844
  instruction: |
2815
2845
  Define new API endpoints and integration with existing APIs:
2816
-
2846
+
2817
2847
  1. Plan new API endpoints required for the enhancement
2818
2848
  2. Ensure consistency with existing API patterns
2819
2849
  3. Define authentication and authorization integration
@@ -2863,17 +2893,17 @@ sections:
2863
2893
  - **Base URL:** {{api_base_url}}
2864
2894
  - **Authentication:** {{auth_method}}
2865
2895
  - **Integration Method:** {{integration_approach}}
2866
-
2896
+
2867
2897
  **Key Endpoints Used:**
2868
2898
  - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
2869
-
2899
+
2870
2900
  **Error Handling:** {{error_handling_strategy}}
2871
2901
 
2872
2902
  - id: source-tree-integration
2873
2903
  title: Source Tree Integration
2874
2904
  instruction: |
2875
2905
  Define how new code will integrate with existing project structure:
2876
-
2906
+
2877
2907
  1. Follow existing project organization patterns
2878
2908
  2. Identify where new files/folders will be placed
2879
2909
  3. Ensure consistency with existing naming conventions
@@ -2912,7 +2942,7 @@ sections:
2912
2942
  title: Infrastructure and Deployment Integration
2913
2943
  instruction: |
2914
2944
  Define how the enhancement will be deployed alongside existing infrastructure:
2915
-
2945
+
2916
2946
  1. Use existing deployment pipeline and infrastructure
2917
2947
  2. Identify any infrastructure changes needed
2918
2948
  3. Plan deployment strategy to minimize risk
@@ -2942,7 +2972,7 @@ sections:
2942
2972
  title: Coding Standards and Conventions
2943
2973
  instruction: |
2944
2974
  Ensure new code follows existing project conventions:
2945
-
2975
+
2946
2976
  1. Document existing coding standards from project analysis
2947
2977
  2. Identify any enhancement-specific requirements
2948
2978
  3. Ensure consistency with existing codebase patterns
@@ -2973,7 +3003,7 @@ sections:
2973
3003
  title: Testing Strategy
2974
3004
  instruction: |
2975
3005
  Define testing approach for the enhancement:
2976
-
3006
+
2977
3007
  1. Integrate with existing test suite
2978
3008
  2. Ensure existing functionality remains intact
2979
3009
  3. Plan for testing new features
@@ -3013,7 +3043,7 @@ sections:
3013
3043
  title: Security Integration
3014
3044
  instruction: |
3015
3045
  Ensure security consistency with existing system:
3016
-
3046
+
3017
3047
  1. Follow existing security patterns and tools
3018
3048
  2. Ensure new features don't introduce vulnerabilities
3019
3049
  3. Maintain existing security posture
@@ -3048,7 +3078,7 @@ sections:
3048
3078
  title: Next Steps
3049
3079
  instruction: |
3050
3080
  After completing the brownfield architecture:
3051
-
3081
+
3052
3082
  1. Review integration points with existing system
3053
3083
  2. Begin story implementation with Dev agent
3054
3084
  3. Set up deployment pipeline integration