bmad-method 4.37.0 → 4.39.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.
- package/.github/ISSUE_TEMPLATE/bug_report.md +3 -3
- package/.github/ISSUE_TEMPLATE/feature_request.md +3 -3
- package/.github/workflows/discord.yaml +11 -2
- package/.github/workflows/format-check.yaml +42 -0
- package/.github/workflows/manual-release.yaml +173 -0
- package/.husky/pre-commit +3 -0
- package/.vscode/settings.json +26 -1
- package/CHANGELOG.md +2 -23
- package/README.md +2 -0
- package/bmad-core/agent-teams/team-all.yaml +1 -1
- package/bmad-core/agents/analyst.md +16 -15
- package/bmad-core/agents/architect.md +11 -11
- package/bmad-core/agents/bmad-master.md +23 -22
- package/bmad-core/agents/bmad-orchestrator.md +13 -17
- package/bmad-core/agents/dev.md +14 -11
- package/bmad-core/agents/pm.md +15 -14
- package/bmad-core/agents/po.md +9 -8
- package/bmad-core/agents/qa.md +42 -22
- package/bmad-core/agents/sm.md +7 -6
- package/bmad-core/agents/ux-expert.md +6 -5
- package/bmad-core/core-config.yaml +2 -0
- package/bmad-core/data/bmad-kb.md +1 -1
- package/bmad-core/data/test-levels-framework.md +146 -0
- package/bmad-core/data/test-priorities-matrix.md +172 -0
- package/bmad-core/tasks/apply-qa-fixes.md +148 -0
- package/bmad-core/tasks/facilitate-brainstorming-session.md +1 -1
- package/bmad-core/tasks/nfr-assess.md +343 -0
- package/bmad-core/tasks/qa-gate.md +161 -0
- package/bmad-core/tasks/review-story.md +234 -74
- package/bmad-core/tasks/risk-profile.md +353 -0
- package/bmad-core/tasks/test-design.md +174 -0
- package/bmad-core/tasks/trace-requirements.md +264 -0
- package/bmad-core/templates/architecture-tmpl.yaml +49 -49
- package/bmad-core/templates/brainstorming-output-tmpl.yaml +5 -5
- package/bmad-core/templates/brownfield-architecture-tmpl.yaml +31 -31
- package/bmad-core/templates/brownfield-prd-tmpl.yaml +13 -13
- package/bmad-core/templates/competitor-analysis-tmpl.yaml +19 -6
- package/bmad-core/templates/front-end-architecture-tmpl.yaml +21 -9
- package/bmad-core/templates/front-end-spec-tmpl.yaml +24 -24
- package/bmad-core/templates/fullstack-architecture-tmpl.yaml +122 -104
- package/bmad-core/templates/market-research-tmpl.yaml +2 -2
- package/bmad-core/templates/prd-tmpl.yaml +9 -9
- package/bmad-core/templates/project-brief-tmpl.yaml +4 -4
- package/bmad-core/templates/qa-gate-tmpl.yaml +102 -0
- package/bmad-core/templates/story-tmpl.yaml +12 -12
- package/bmad-core/workflows/brownfield-fullstack.yaml +9 -9
- package/bmad-core/workflows/brownfield-service.yaml +1 -1
- package/bmad-core/workflows/brownfield-ui.yaml +1 -1
- package/bmad-core/workflows/greenfield-fullstack.yaml +1 -1
- package/bmad-core/workflows/greenfield-service.yaml +1 -1
- package/bmad-core/workflows/greenfield-ui.yaml +1 -1
- package/common/utils/bmad-doc-template.md +5 -5
- package/dist/agents/analyst.txt +1086 -1079
- package/dist/agents/architect.txt +1534 -1526
- package/dist/agents/bmad-master.txt +646 -632
- package/dist/agents/bmad-orchestrator.txt +40 -18
- package/dist/agents/dev.txt +158 -19
- package/dist/agents/pm.txt +1082 -1107
- package/dist/agents/po.txt +314 -332
- package/dist/agents/qa.txt +1754 -151
- package/dist/agents/sm.txt +88 -98
- package/dist/agents/ux-expert.txt +80 -87
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +109 -146
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +75 -86
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +41 -48
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +1903 -1941
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +15 -50
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +149 -195
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.txt +0 -15
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.txt +20 -37
- package/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +2660 -2752
- package/dist/expansion-packs/bmad-creative-writing/agents/beta-reader.txt +871 -0
- package/dist/expansion-packs/bmad-creative-writing/agents/book-critic.txt +78 -0
- package/dist/expansion-packs/bmad-creative-writing/agents/character-psychologist.txt +839 -0
- package/dist/expansion-packs/bmad-creative-writing/agents/cover-designer.txt +85 -0
- package/dist/expansion-packs/bmad-creative-writing/agents/dialog-specialist.txt +861 -0
- package/dist/expansion-packs/bmad-creative-writing/agents/editor.txt +796 -0
- package/dist/expansion-packs/bmad-creative-writing/agents/genre-specialist.txt +927 -0
- package/dist/expansion-packs/bmad-creative-writing/agents/narrative-designer.txt +842 -0
- package/dist/expansion-packs/bmad-creative-writing/agents/plot-architect.txt +1126 -0
- package/dist/expansion-packs/bmad-creative-writing/agents/world-builder.txt +864 -0
- package/dist/expansion-packs/bmad-creative-writing/teams/agent-team.txt +5917 -0
- package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +25 -27
- package/dist/teams/team-all.txt +5541 -3768
- package/dist/teams/team-fullstack.txt +3014 -2987
- package/dist/teams/team-ide-minimal.txt +2219 -469
- package/dist/teams/team-no-ui.txt +2993 -2966
- package/docs/enhanced-ide-development-workflow.md +220 -15
- package/docs/user-guide.md +271 -18
- package/docs/versioning-and-releases.md +122 -44
- package/docs/working-in-the-brownfield.md +264 -31
- package/eslint.config.mjs +119 -0
- package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +4 -4
- package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +1 -1
- package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +1 -1
- package/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +26 -28
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +50 -50
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +23 -23
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +24 -24
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +42 -42
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
- package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-dev-greenfield.yaml +5 -5
- package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-prototype.yaml +1 -1
- package/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.md +3 -3
- package/expansion-packs/bmad-2d-unity-game-dev/config.yaml +1 -1
- package/expansion-packs/bmad-2d-unity-game-dev/data/bmad-kb.md +1 -1
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-brief-tmpl.yaml +23 -23
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-design-doc-tmpl.yaml +63 -63
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml +20 -20
- package/expansion-packs/bmad-2d-unity-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
- package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-dev-greenfield.yaml +5 -5
- package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-prototype.yaml +1 -1
- package/expansion-packs/bmad-creative-writing/README.md +132 -0
- package/expansion-packs/bmad-creative-writing/agent-teams/agent-team.yaml +19 -0
- package/expansion-packs/bmad-creative-writing/agents/beta-reader.md +91 -0
- package/expansion-packs/bmad-creative-writing/agents/book-critic.md +35 -0
- package/expansion-packs/bmad-creative-writing/agents/character-psychologist.md +90 -0
- package/expansion-packs/bmad-creative-writing/agents/cover-designer.md +41 -0
- package/expansion-packs/bmad-creative-writing/agents/dialog-specialist.md +89 -0
- package/expansion-packs/bmad-creative-writing/agents/editor.md +90 -0
- package/expansion-packs/bmad-creative-writing/agents/genre-specialist.md +92 -0
- package/expansion-packs/bmad-creative-writing/agents/narrative-designer.md +90 -0
- package/expansion-packs/bmad-creative-writing/agents/plot-architect.md +92 -0
- package/expansion-packs/bmad-creative-writing/agents/world-builder.md +91 -0
- package/expansion-packs/bmad-creative-writing/checklists/beta-feedback-closure-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/character-consistency-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/comedic-timing-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/cyberpunk-aesthetic-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/ebook-formatting-checklist.md +15 -0
- package/expansion-packs/bmad-creative-writing/checklists/epic-poetry-meter-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/fantasy-magic-system-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/foreshadowing-payoff-checklist.md +15 -0
- package/expansion-packs/bmad-creative-writing/checklists/genre-tropes-checklist.md +15 -0
- package/expansion-packs/bmad-creative-writing/checklists/historical-accuracy-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/horror-suspense-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/kdp-cover-ready-checklist.md +18 -0
- package/expansion-packs/bmad-creative-writing/checklists/line-edit-quality-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/marketing-copy-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/mystery-clue-trail-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/orbital-mechanics-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/plot-structure-checklist.md +49 -0
- package/expansion-packs/bmad-creative-writing/checklists/publication-readiness-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/romance-emotional-beats-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/scene-quality-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/scifi-technology-plausibility-checklist.md +15 -0
- package/expansion-packs/bmad-creative-writing/checklists/sensitivity-representation-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/steampunk-gadget-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/thriller-pacing-stakes-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/timeline-continuity-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/world-building-continuity-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/checklists/ya-appropriateness-checklist.md +16 -0
- package/expansion-packs/bmad-creative-writing/config.yaml +11 -0
- package/expansion-packs/bmad-creative-writing/data/bmad-kb.md +197 -0
- package/expansion-packs/bmad-creative-writing/data/story-structures.md +58 -0
- package/expansion-packs/bmad-creative-writing/docs/brief.md +183 -0
- package/expansion-packs/bmad-creative-writing/tasks/advanced-elicitation.md +117 -0
- package/expansion-packs/bmad-creative-writing/tasks/analyze-reader-feedback.md +16 -0
- package/expansion-packs/bmad-creative-writing/tasks/analyze-story-structure.md +55 -0
- package/expansion-packs/bmad-creative-writing/tasks/assemble-kdp-package.md +22 -0
- package/expansion-packs/bmad-creative-writing/tasks/brainstorm-premise.md +16 -0
- package/expansion-packs/bmad-creative-writing/tasks/build-world.md +17 -0
- package/expansion-packs/bmad-creative-writing/tasks/character-depth-pass.md +15 -0
- package/expansion-packs/bmad-creative-writing/tasks/create-doc.md +101 -0
- package/expansion-packs/bmad-creative-writing/tasks/create-draft-section.md +19 -0
- package/expansion-packs/bmad-creative-writing/tasks/critical-review.md +19 -0
- package/expansion-packs/bmad-creative-writing/tasks/develop-character.md +17 -0
- package/expansion-packs/bmad-creative-writing/tasks/execute-checklist.md +93 -0
- package/expansion-packs/bmad-creative-writing/tasks/expand-premise.md +16 -0
- package/expansion-packs/bmad-creative-writing/tasks/expand-synopsis.md +16 -0
- package/expansion-packs/bmad-creative-writing/tasks/final-polish.md +16 -0
- package/expansion-packs/bmad-creative-writing/tasks/generate-cover-brief.md +18 -0
- package/expansion-packs/bmad-creative-writing/tasks/generate-cover-prompts.md +19 -0
- package/expansion-packs/bmad-creative-writing/tasks/generate-scene-list.md +16 -0
- package/expansion-packs/bmad-creative-writing/tasks/incorporate-feedback.md +18 -0
- package/expansion-packs/bmad-creative-writing/tasks/outline-scenes.md +16 -0
- package/expansion-packs/bmad-creative-writing/tasks/provide-feedback.md +17 -0
- package/expansion-packs/bmad-creative-writing/tasks/publish-chapter.md +16 -0
- package/expansion-packs/bmad-creative-writing/tasks/quick-feedback.md +15 -0
- package/expansion-packs/bmad-creative-writing/tasks/select-next-arc.md +16 -0
- package/expansion-packs/bmad-creative-writing/tasks/workshop-dialog.md +51 -0
- package/expansion-packs/bmad-creative-writing/templates/beta-feedback-form.yaml +96 -0
- package/expansion-packs/bmad-creative-writing/templates/chapter-draft-tmpl.yaml +81 -0
- package/expansion-packs/bmad-creative-writing/templates/character-profile-tmpl.yaml +92 -0
- package/expansion-packs/bmad-creative-writing/templates/cover-design-brief-tmpl.yaml +97 -0
- package/expansion-packs/bmad-creative-writing/templates/premise-brief-tmpl.yaml +77 -0
- package/expansion-packs/bmad-creative-writing/templates/scene-list-tmpl.yaml +54 -0
- package/expansion-packs/bmad-creative-writing/templates/story-outline-tmpl.yaml +96 -0
- package/expansion-packs/bmad-creative-writing/templates/world-guide-tmpl.yaml +88 -0
- package/expansion-packs/bmad-creative-writing/workflows/book-cover-design-workflow.md +176 -0
- package/expansion-packs/bmad-creative-writing/workflows/novel-greenfield-workflow.yaml +58 -0
- package/expansion-packs/bmad-creative-writing/workflows/novel-serial-workflow.yaml +51 -0
- package/expansion-packs/bmad-creative-writing/workflows/novel-snowflake-workflow.yaml +69 -0
- package/expansion-packs/bmad-creative-writing/workflows/novel-writing.yaml +92 -0
- package/expansion-packs/bmad-creative-writing/workflows/screenplay-development.yaml +86 -0
- package/expansion-packs/bmad-creative-writing/workflows/series-planning.yaml +79 -0
- package/expansion-packs/bmad-creative-writing/workflows/short-story-creation.yaml +65 -0
- package/expansion-packs/bmad-infrastructure-devops/config.yaml +1 -1
- package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +20 -20
- package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +7 -7
- package/package.json +62 -39
- package/prettier.config.mjs +32 -0
- package/sync-version.sh +23 -0
- package/tools/bmad-npx-wrapper.js +10 -10
- package/tools/builders/web-builder.js +124 -130
- package/tools/bump-all-versions.js +42 -33
- package/tools/bump-expansion-version.js +23 -16
- package/tools/cli.js +10 -12
- package/tools/flattener/aggregate.js +10 -10
- package/tools/flattener/binary.js +44 -17
- package/tools/flattener/discovery.js +19 -18
- package/tools/flattener/files.js +6 -6
- package/tools/flattener/ignoreRules.js +125 -125
- package/tools/flattener/main.js +426 -70
- package/tools/flattener/projectRoot.js +186 -25
- package/tools/flattener/prompts.js +9 -9
- package/tools/flattener/stats.helpers.js +395 -0
- package/tools/flattener/stats.js +64 -14
- package/tools/flattener/test-matrix.js +413 -0
- package/tools/flattener/xml.js +33 -31
- package/tools/installer/bin/bmad.js +156 -113
- package/tools/installer/config/ide-agent-config.yaml +1 -1
- package/tools/installer/config/install.config.yaml +13 -3
- package/tools/installer/lib/config-loader.js +46 -42
- package/tools/installer/lib/file-manager.js +91 -113
- package/tools/installer/lib/ide-base-setup.js +57 -56
- package/tools/installer/lib/ide-setup.js +545 -399
- package/tools/installer/lib/installer.js +875 -714
- package/tools/installer/lib/memory-profiler.js +54 -53
- package/tools/installer/lib/module-manager.js +19 -15
- package/tools/installer/lib/resource-locator.js +26 -28
- package/tools/installer/package.json +19 -19
- package/tools/lib/dependency-resolver.js +26 -30
- package/tools/lib/yaml-utils.js +7 -7
- package/tools/preview-release-notes.js +66 -0
- package/tools/shared/bannerArt.js +3 -3
- package/tools/sync-installer-version.js +7 -9
- package/tools/update-expansion-version.js +14 -15
- package/tools/upgraders/v3-to-v4-upgrader.js +203 -294
- package/tools/version-bump.js +41 -26
- package/tools/yaml-format.js +56 -43
- package/.github/workflows/release.yaml +0 -60
- package/.releaserc.json +0 -21
- package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/Complete AI Agent System - Flowchart.svg +0 -102
- package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.1 Google Cloud Project Setup/1.1.1 - Initial Project Configuration - bash copy.txt +0 -13
- package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.1 Google Cloud Project Setup/1.1.1 - Initial Project Configuration - bash.txt +0 -13
- package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.2 Agent Development Kit Installation/1.2.2 - Basic Project Structure - txt.txt +0 -25
- package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.3 Core Configuration Files/1.3.1 - settings.py +0 -34
- package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.3 Core Configuration Files/1.3.2 - main.py - Base Application.py +0 -70
- 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 +0 -26
- package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/README.md +0 -109
- package/tools/semantic-release-sync-installer.js +0 -30
|
@@ -50,7 +50,6 @@ activation-instructions:
|
|
|
50
50
|
- The agent.customization field ALWAYS takes precedence over any conflicting instructions
|
|
51
51
|
- When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
|
|
52
52
|
- STAY IN CHARACTER!
|
|
53
|
-
- When creating architecture, always start by understanding the complete picture - user needs, business constraints, team capabilities, and technical requirements.
|
|
54
53
|
agent:
|
|
55
54
|
name: Winston
|
|
56
55
|
id: architect
|
|
@@ -76,10 +75,10 @@ persona:
|
|
|
76
75
|
- Living Architecture - Design for change and adaptation
|
|
77
76
|
commands:
|
|
78
77
|
- help: Show numbered list of the following commands to allow selection
|
|
79
|
-
- create-full-stack-architecture: use create-doc with fullstack-architecture-tmpl.yaml
|
|
80
78
|
- create-backend-architecture: use create-doc with architecture-tmpl.yaml
|
|
81
|
-
- create-front-end-architecture: use create-doc with front-end-architecture-tmpl.yaml
|
|
82
79
|
- create-brownfield-architecture: use create-doc with brownfield-architecture-tmpl.yaml
|
|
80
|
+
- create-front-end-architecture: use create-doc with front-end-architecture-tmpl.yaml
|
|
81
|
+
- create-full-stack-architecture: use create-doc with fullstack-architecture-tmpl.yaml
|
|
83
82
|
- doc-out: Output full document to current destination file
|
|
84
83
|
- document-project: execute the task document-project.md
|
|
85
84
|
- execute-checklist {checklist}: Run task execute-checklist (default->architect-checklist)
|
|
@@ -88,127 +87,23 @@ commands:
|
|
|
88
87
|
- yolo: Toggle Yolo Mode
|
|
89
88
|
- exit: Say goodbye as the Architect, and then abandon inhabiting this persona
|
|
90
89
|
dependencies:
|
|
90
|
+
checklists:
|
|
91
|
+
- architect-checklist.md
|
|
92
|
+
data:
|
|
93
|
+
- technical-preferences.md
|
|
91
94
|
tasks:
|
|
92
|
-
- create-doc.md
|
|
93
95
|
- create-deep-research-prompt.md
|
|
96
|
+
- create-doc.md
|
|
94
97
|
- document-project.md
|
|
95
98
|
- execute-checklist.md
|
|
96
99
|
templates:
|
|
97
100
|
- architecture-tmpl.yaml
|
|
101
|
+
- brownfield-architecture-tmpl.yaml
|
|
98
102
|
- front-end-architecture-tmpl.yaml
|
|
99
103
|
- fullstack-architecture-tmpl.yaml
|
|
100
|
-
- brownfield-architecture-tmpl.yaml
|
|
101
|
-
checklists:
|
|
102
|
-
- architect-checklist.md
|
|
103
|
-
data:
|
|
104
|
-
- technical-preferences.md
|
|
105
104
|
```
|
|
106
105
|
==================== END: .bmad-core/agents/architect.md ====================
|
|
107
106
|
|
|
108
|
-
==================== START: .bmad-core/tasks/create-doc.md ====================
|
|
109
|
-
# Create Document from Template (YAML Driven)
|
|
110
|
-
|
|
111
|
-
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
|
|
112
|
-
|
|
113
|
-
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
|
|
114
|
-
|
|
115
|
-
When this task is invoked:
|
|
116
|
-
|
|
117
|
-
1. **DISABLE ALL EFFICIENCY OPTIMIZATIONS** - This workflow requires full user interaction
|
|
118
|
-
2. **MANDATORY STEP-BY-STEP EXECUTION** - Each section must be processed sequentially with user feedback
|
|
119
|
-
3. **ELICITATION IS REQUIRED** - When `elicit: true`, you MUST use the 1-9 format and wait for user response
|
|
120
|
-
4. **NO SHORTCUTS ALLOWED** - Complete documents cannot be created without following this workflow
|
|
121
|
-
|
|
122
|
-
**VIOLATION INDICATOR:** If you create a complete document without user interaction, you have violated this workflow.
|
|
123
|
-
|
|
124
|
-
## Critical: Template Discovery
|
|
125
|
-
|
|
126
|
-
If a YAML Template has not been provided, list all templates from .bmad-core/templates or ask the user to provide another.
|
|
127
|
-
|
|
128
|
-
## CRITICAL: Mandatory Elicitation Format
|
|
129
|
-
|
|
130
|
-
**When `elicit: true`, this is a HARD STOP requiring user interaction:**
|
|
131
|
-
|
|
132
|
-
**YOU MUST:**
|
|
133
|
-
|
|
134
|
-
1. Present section content
|
|
135
|
-
2. Provide detailed rationale (explain trade-offs, assumptions, decisions made)
|
|
136
|
-
3. **STOP and present numbered options 1-9:**
|
|
137
|
-
- **Option 1:** Always "Proceed to next section"
|
|
138
|
-
- **Options 2-9:** Select 8 methods from data/elicitation-methods
|
|
139
|
-
- End with: "Select 1-9 or just type your question/feedback:"
|
|
140
|
-
4. **WAIT FOR USER RESPONSE** - Do not proceed until user selects option or provides feedback
|
|
141
|
-
|
|
142
|
-
**WORKFLOW VIOLATION:** Creating content for elicit=true sections without user interaction violates this task.
|
|
143
|
-
|
|
144
|
-
**NEVER ask yes/no questions or use any other format.**
|
|
145
|
-
|
|
146
|
-
## Processing Flow
|
|
147
|
-
|
|
148
|
-
1. **Parse YAML template** - Load template metadata and sections
|
|
149
|
-
2. **Set preferences** - Show current mode (Interactive), confirm output file
|
|
150
|
-
3. **Process each section:**
|
|
151
|
-
- Skip if condition unmet
|
|
152
|
-
- Check agent permissions (owner/editors) - note if section is restricted to specific agents
|
|
153
|
-
- Draft content using section instruction
|
|
154
|
-
- Present content + detailed rationale
|
|
155
|
-
- **IF elicit: true** → MANDATORY 1-9 options format
|
|
156
|
-
- Save to file if possible
|
|
157
|
-
4. **Continue until complete**
|
|
158
|
-
|
|
159
|
-
## Detailed Rationale Requirements
|
|
160
|
-
|
|
161
|
-
When presenting section content, ALWAYS include rationale that explains:
|
|
162
|
-
|
|
163
|
-
- Trade-offs and choices made (what was chosen over alternatives and why)
|
|
164
|
-
- Key assumptions made during drafting
|
|
165
|
-
- Interesting or questionable decisions that need user attention
|
|
166
|
-
- Areas that might need validation
|
|
167
|
-
|
|
168
|
-
## Elicitation Results Flow
|
|
169
|
-
|
|
170
|
-
After user selects elicitation method (2-9):
|
|
171
|
-
|
|
172
|
-
1. Execute method from data/elicitation-methods
|
|
173
|
-
2. Present results with insights
|
|
174
|
-
3. Offer options:
|
|
175
|
-
- **1. Apply changes and update section**
|
|
176
|
-
- **2. Return to elicitation menu**
|
|
177
|
-
- **3. Ask any questions or engage further with this elicitation**
|
|
178
|
-
|
|
179
|
-
## Agent Permissions
|
|
180
|
-
|
|
181
|
-
When processing sections with agent permission fields:
|
|
182
|
-
|
|
183
|
-
- **owner**: Note which agent role initially creates/populates the section
|
|
184
|
-
- **editors**: List agent roles allowed to modify the section
|
|
185
|
-
- **readonly**: Mark sections that cannot be modified after creation
|
|
186
|
-
|
|
187
|
-
**For sections with restricted access:**
|
|
188
|
-
|
|
189
|
-
- Include a note in the generated document indicating the responsible agent
|
|
190
|
-
- Example: "_(This section is owned by dev-agent and can only be modified by dev-agent)_"
|
|
191
|
-
|
|
192
|
-
## YOLO Mode
|
|
193
|
-
|
|
194
|
-
User can type `#yolo` to toggle to YOLO mode (process all sections at once).
|
|
195
|
-
|
|
196
|
-
## CRITICAL REMINDERS
|
|
197
|
-
|
|
198
|
-
**❌ NEVER:**
|
|
199
|
-
|
|
200
|
-
- Ask yes/no questions for elicitation
|
|
201
|
-
- Use any format other than 1-9 numbered options
|
|
202
|
-
- Create new elicitation methods
|
|
203
|
-
|
|
204
|
-
**✅ ALWAYS:**
|
|
205
|
-
|
|
206
|
-
- Use exact 1-9 format when elicit: true
|
|
207
|
-
- Select options 2-9 from data/elicitation-methods only
|
|
208
|
-
- Provide detailed rationale explaining decisions
|
|
209
|
-
- End with "Select 1-9 or just type your question/feedback:"
|
|
210
|
-
==================== END: .bmad-core/tasks/create-doc.md ====================
|
|
211
|
-
|
|
212
107
|
==================== START: .bmad-core/tasks/create-deep-research-prompt.md ====================
|
|
213
108
|
# Create Deep Research Prompt Task
|
|
214
109
|
|
|
@@ -233,63 +128,54 @@ CRITICAL: First, help the user select the most appropriate research focus based
|
|
|
233
128
|
Present these numbered options to the user:
|
|
234
129
|
|
|
235
130
|
1. **Product Validation Research**
|
|
236
|
-
|
|
237
131
|
- Validate product hypotheses and market fit
|
|
238
132
|
- Test assumptions about user needs and solutions
|
|
239
133
|
- Assess technical and business feasibility
|
|
240
134
|
- Identify risks and mitigation strategies
|
|
241
135
|
|
|
242
136
|
2. **Market Opportunity Research**
|
|
243
|
-
|
|
244
137
|
- Analyze market size and growth potential
|
|
245
138
|
- Identify market segments and dynamics
|
|
246
139
|
- Assess market entry strategies
|
|
247
140
|
- Evaluate timing and market readiness
|
|
248
141
|
|
|
249
142
|
3. **User & Customer Research**
|
|
250
|
-
|
|
251
143
|
- Deep dive into user personas and behaviors
|
|
252
144
|
- Understand jobs-to-be-done and pain points
|
|
253
145
|
- Map customer journeys and touchpoints
|
|
254
146
|
- Analyze willingness to pay and value perception
|
|
255
147
|
|
|
256
148
|
4. **Competitive Intelligence Research**
|
|
257
|
-
|
|
258
149
|
- Detailed competitor analysis and positioning
|
|
259
150
|
- Feature and capability comparisons
|
|
260
151
|
- Business model and strategy analysis
|
|
261
152
|
- Identify competitive advantages and gaps
|
|
262
153
|
|
|
263
154
|
5. **Technology & Innovation Research**
|
|
264
|
-
|
|
265
155
|
- Assess technology trends and possibilities
|
|
266
156
|
- Evaluate technical approaches and architectures
|
|
267
157
|
- Identify emerging technologies and disruptions
|
|
268
158
|
- Analyze build vs. buy vs. partner options
|
|
269
159
|
|
|
270
160
|
6. **Industry & Ecosystem Research**
|
|
271
|
-
|
|
272
161
|
- Map industry value chains and dynamics
|
|
273
162
|
- Identify key players and relationships
|
|
274
163
|
- Analyze regulatory and compliance factors
|
|
275
164
|
- Understand partnership opportunities
|
|
276
165
|
|
|
277
166
|
7. **Strategic Options Research**
|
|
278
|
-
|
|
279
167
|
- Evaluate different strategic directions
|
|
280
168
|
- Assess business model alternatives
|
|
281
169
|
- Analyze go-to-market strategies
|
|
282
170
|
- Consider expansion and scaling paths
|
|
283
171
|
|
|
284
172
|
8. **Risk & Feasibility Research**
|
|
285
|
-
|
|
286
173
|
- Identify and assess various risk factors
|
|
287
174
|
- Evaluate implementation challenges
|
|
288
175
|
- Analyze resource requirements
|
|
289
176
|
- Consider regulatory and legal implications
|
|
290
177
|
|
|
291
178
|
9. **Custom Research Focus**
|
|
292
|
-
|
|
293
179
|
- User-defined research objectives
|
|
294
180
|
- Specialized domain investigation
|
|
295
181
|
- Cross-functional research needs
|
|
@@ -458,13 +344,11 @@ CRITICAL: collaborate with the user to develop specific, actionable research que
|
|
|
458
344
|
### 5. Review and Refinement
|
|
459
345
|
|
|
460
346
|
1. **Present Complete Prompt**
|
|
461
|
-
|
|
462
347
|
- Show the full research prompt
|
|
463
348
|
- Explain key elements and rationale
|
|
464
349
|
- Highlight any assumptions made
|
|
465
350
|
|
|
466
351
|
2. **Gather Feedback**
|
|
467
|
-
|
|
468
352
|
- Are the objectives clear and correct?
|
|
469
353
|
- Do the questions address all concerns?
|
|
470
354
|
- Is the scope appropriate?
|
|
@@ -501,6 +385,110 @@ CRITICAL: collaborate with the user to develop specific, actionable research que
|
|
|
501
385
|
- Plan for iterative refinement based on initial findings
|
|
502
386
|
==================== END: .bmad-core/tasks/create-deep-research-prompt.md ====================
|
|
503
387
|
|
|
388
|
+
==================== START: .bmad-core/tasks/create-doc.md ====================
|
|
389
|
+
# Create Document from Template (YAML Driven)
|
|
390
|
+
|
|
391
|
+
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
|
|
392
|
+
|
|
393
|
+
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
|
|
394
|
+
|
|
395
|
+
When this task is invoked:
|
|
396
|
+
|
|
397
|
+
1. **DISABLE ALL EFFICIENCY OPTIMIZATIONS** - This workflow requires full user interaction
|
|
398
|
+
2. **MANDATORY STEP-BY-STEP EXECUTION** - Each section must be processed sequentially with user feedback
|
|
399
|
+
3. **ELICITATION IS REQUIRED** - When `elicit: true`, you MUST use the 1-9 format and wait for user response
|
|
400
|
+
4. **NO SHORTCUTS ALLOWED** - Complete documents cannot be created without following this workflow
|
|
401
|
+
|
|
402
|
+
**VIOLATION INDICATOR:** If you create a complete document without user interaction, you have violated this workflow.
|
|
403
|
+
|
|
404
|
+
## Critical: Template Discovery
|
|
405
|
+
|
|
406
|
+
If a YAML Template has not been provided, list all templates from .bmad-core/templates or ask the user to provide another.
|
|
407
|
+
|
|
408
|
+
## CRITICAL: Mandatory Elicitation Format
|
|
409
|
+
|
|
410
|
+
**When `elicit: true`, this is a HARD STOP requiring user interaction:**
|
|
411
|
+
|
|
412
|
+
**YOU MUST:**
|
|
413
|
+
|
|
414
|
+
1. Present section content
|
|
415
|
+
2. Provide detailed rationale (explain trade-offs, assumptions, decisions made)
|
|
416
|
+
3. **STOP and present numbered options 1-9:**
|
|
417
|
+
- **Option 1:** Always "Proceed to next section"
|
|
418
|
+
- **Options 2-9:** Select 8 methods from data/elicitation-methods
|
|
419
|
+
- End with: "Select 1-9 or just type your question/feedback:"
|
|
420
|
+
4. **WAIT FOR USER RESPONSE** - Do not proceed until user selects option or provides feedback
|
|
421
|
+
|
|
422
|
+
**WORKFLOW VIOLATION:** Creating content for elicit=true sections without user interaction violates this task.
|
|
423
|
+
|
|
424
|
+
**NEVER ask yes/no questions or use any other format.**
|
|
425
|
+
|
|
426
|
+
## Processing Flow
|
|
427
|
+
|
|
428
|
+
1. **Parse YAML template** - Load template metadata and sections
|
|
429
|
+
2. **Set preferences** - Show current mode (Interactive), confirm output file
|
|
430
|
+
3. **Process each section:**
|
|
431
|
+
- Skip if condition unmet
|
|
432
|
+
- Check agent permissions (owner/editors) - note if section is restricted to specific agents
|
|
433
|
+
- Draft content using section instruction
|
|
434
|
+
- Present content + detailed rationale
|
|
435
|
+
- **IF elicit: true** → MANDATORY 1-9 options format
|
|
436
|
+
- Save to file if possible
|
|
437
|
+
4. **Continue until complete**
|
|
438
|
+
|
|
439
|
+
## Detailed Rationale Requirements
|
|
440
|
+
|
|
441
|
+
When presenting section content, ALWAYS include rationale that explains:
|
|
442
|
+
|
|
443
|
+
- Trade-offs and choices made (what was chosen over alternatives and why)
|
|
444
|
+
- Key assumptions made during drafting
|
|
445
|
+
- Interesting or questionable decisions that need user attention
|
|
446
|
+
- Areas that might need validation
|
|
447
|
+
|
|
448
|
+
## Elicitation Results Flow
|
|
449
|
+
|
|
450
|
+
After user selects elicitation method (2-9):
|
|
451
|
+
|
|
452
|
+
1. Execute method from data/elicitation-methods
|
|
453
|
+
2. Present results with insights
|
|
454
|
+
3. Offer options:
|
|
455
|
+
- **1. Apply changes and update section**
|
|
456
|
+
- **2. Return to elicitation menu**
|
|
457
|
+
- **3. Ask any questions or engage further with this elicitation**
|
|
458
|
+
|
|
459
|
+
## Agent Permissions
|
|
460
|
+
|
|
461
|
+
When processing sections with agent permission fields:
|
|
462
|
+
|
|
463
|
+
- **owner**: Note which agent role initially creates/populates the section
|
|
464
|
+
- **editors**: List agent roles allowed to modify the section
|
|
465
|
+
- **readonly**: Mark sections that cannot be modified after creation
|
|
466
|
+
|
|
467
|
+
**For sections with restricted access:**
|
|
468
|
+
|
|
469
|
+
- Include a note in the generated document indicating the responsible agent
|
|
470
|
+
- Example: "_(This section is owned by dev-agent and can only be modified by dev-agent)_"
|
|
471
|
+
|
|
472
|
+
## YOLO Mode
|
|
473
|
+
|
|
474
|
+
User can type `#yolo` to toggle to YOLO mode (process all sections at once).
|
|
475
|
+
|
|
476
|
+
## CRITICAL REMINDERS
|
|
477
|
+
|
|
478
|
+
**❌ NEVER:**
|
|
479
|
+
|
|
480
|
+
- Ask yes/no questions for elicitation
|
|
481
|
+
- Use any format other than 1-9 numbered options
|
|
482
|
+
- Create new elicitation methods
|
|
483
|
+
|
|
484
|
+
**✅ ALWAYS:**
|
|
485
|
+
|
|
486
|
+
- Use exact 1-9 format when elicit: true
|
|
487
|
+
- Select options 2-9 from data/elicitation-methods only
|
|
488
|
+
- Provide detailed rationale explaining decisions
|
|
489
|
+
- End with "Select 1-9 or just type your question/feedback:"
|
|
490
|
+
==================== END: .bmad-core/tasks/create-doc.md ====================
|
|
491
|
+
|
|
504
492
|
==================== START: .bmad-core/tasks/document-project.md ====================
|
|
505
493
|
# Document an Existing Project
|
|
506
494
|
|
|
@@ -615,9 +603,9 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
|
|
|
615
603
|
|
|
616
604
|
### Change Log
|
|
617
605
|
|
|
618
|
-
| Date
|
|
619
|
-
|
|
620
|
-
| [Date] | 1.0
|
|
606
|
+
| Date | Version | Description | Author |
|
|
607
|
+
| ------ | ------- | --------------------------- | --------- |
|
|
608
|
+
| [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
|
|
621
609
|
|
|
622
610
|
## Quick Reference - Key Files and Entry Points
|
|
623
611
|
|
|
@@ -640,11 +628,11 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
|
|
|
640
628
|
|
|
641
629
|
### Actual Tech Stack (from package.json/requirements.txt)
|
|
642
630
|
|
|
643
|
-
| Category
|
|
644
|
-
|
|
645
|
-
| Runtime
|
|
646
|
-
| Framework | Express
|
|
647
|
-
| Database
|
|
631
|
+
| Category | Technology | Version | Notes |
|
|
632
|
+
| --------- | ---------- | ------- | -------------------------- |
|
|
633
|
+
| Runtime | Node.js | 16.x | [Any constraints] |
|
|
634
|
+
| Framework | Express | 4.18.2 | [Custom middleware?] |
|
|
635
|
+
| Database | PostgreSQL | 13 | [Connection pooling setup] |
|
|
648
636
|
|
|
649
637
|
etc...
|
|
650
638
|
|
|
@@ -683,6 +671,7 @@ project-root/
|
|
|
683
671
|
### Data Models
|
|
684
672
|
|
|
685
673
|
Instead of duplicating, reference actual model files:
|
|
674
|
+
|
|
686
675
|
- **User Model**: See `src/models/User.js`
|
|
687
676
|
- **Order Model**: See `src/models/Order.js`
|
|
688
677
|
- **Related Types**: TypeScript definitions in `src/types/`
|
|
@@ -712,10 +701,10 @@ Instead of duplicating, reference actual model files:
|
|
|
712
701
|
|
|
713
702
|
### External Services
|
|
714
703
|
|
|
715
|
-
| Service
|
|
716
|
-
|
|
717
|
-
| Stripe
|
|
718
|
-
| SendGrid | Emails
|
|
704
|
+
| Service | Purpose | Integration Type | Key Files |
|
|
705
|
+
| -------- | -------- | ---------------- | ------------------------------ |
|
|
706
|
+
| Stripe | Payments | REST API | `src/integrations/stripe/` |
|
|
707
|
+
| SendGrid | Emails | SDK | `src/services/emailService.js` |
|
|
719
708
|
|
|
720
709
|
etc...
|
|
721
710
|
|
|
@@ -760,6 +749,7 @@ npm run test:integration # Runs integration tests (requires local DB)
|
|
|
760
749
|
### Files That Will Need Modification
|
|
761
750
|
|
|
762
751
|
Based on the enhancement requirements, these files will be affected:
|
|
752
|
+
|
|
763
753
|
- `src/services/userService.js` - Add new user fields
|
|
764
754
|
- `src/models/User.js` - Update schema
|
|
765
755
|
- `src/routes/userRoutes.js` - New endpoints
|
|
@@ -857,7 +847,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
|
|
857
847
|
## Instructions
|
|
858
848
|
|
|
859
849
|
1. **Initial Assessment**
|
|
860
|
-
|
|
861
850
|
- If user or the task being run provides a checklist name:
|
|
862
851
|
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
|
863
852
|
- If multiple matches found, ask user to clarify
|
|
@@ -870,14 +859,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
|
|
870
859
|
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
|
|
871
860
|
|
|
872
861
|
2. **Document and Artifact Gathering**
|
|
873
|
-
|
|
874
862
|
- Each checklist will specify its required documents/artifacts at the beginning
|
|
875
863
|
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
|
|
876
864
|
|
|
877
865
|
3. **Checklist Processing**
|
|
878
866
|
|
|
879
867
|
If in interactive mode:
|
|
880
|
-
|
|
881
868
|
- Work through each section of the checklist one at a time
|
|
882
869
|
- For each section:
|
|
883
870
|
- Review all items in the section following instructions for that section embedded in the checklist
|
|
@@ -886,7 +873,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
|
|
886
873
|
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
|
|
887
874
|
|
|
888
875
|
If in YOLO mode:
|
|
889
|
-
|
|
890
876
|
- Process all sections at once
|
|
891
877
|
- Create a comprehensive report of all findings
|
|
892
878
|
- Present the complete analysis to the user
|
|
@@ -894,7 +880,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
|
|
894
880
|
4. **Validation Approach**
|
|
895
881
|
|
|
896
882
|
For each checklist item:
|
|
897
|
-
|
|
898
883
|
- Read and understand the requirement
|
|
899
884
|
- Look for evidence in the documentation that satisfies the requirement
|
|
900
885
|
- Consider both explicit mentions and implicit coverage
|
|
@@ -908,7 +893,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
|
|
908
893
|
5. **Section Analysis**
|
|
909
894
|
|
|
910
895
|
For each section:
|
|
911
|
-
|
|
912
896
|
- think step by step to calculate pass rate
|
|
913
897
|
- Identify common themes in failed items
|
|
914
898
|
- Provide specific recommendations for improvement
|
|
@@ -918,7 +902,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
|
|
918
902
|
6. **Final Report**
|
|
919
903
|
|
|
920
904
|
Prepare a summary that includes:
|
|
921
|
-
|
|
922
905
|
- Overall checklist completion status
|
|
923
906
|
- Pass rates by section
|
|
924
907
|
- List of failed items with context
|
|
@@ -964,20 +947,20 @@ sections:
|
|
|
964
947
|
- id: intro-content
|
|
965
948
|
content: |
|
|
966
949
|
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.
|
|
967
|
-
|
|
950
|
+
|
|
968
951
|
**Relationship to Frontend Architecture:**
|
|
969
952
|
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.
|
|
970
953
|
- id: starter-template
|
|
971
954
|
title: Starter Template or Existing Project
|
|
972
955
|
instruction: |
|
|
973
956
|
Before proceeding further with architecture design, check if the project is based on a starter template or existing codebase:
|
|
974
|
-
|
|
957
|
+
|
|
975
958
|
1. Review the PRD and brainstorming brief for any mentions of:
|
|
976
959
|
- Starter templates (e.g., Create React App, Next.js, Vue CLI, Angular CLI, etc.)
|
|
977
960
|
- Existing projects or codebases being used as a foundation
|
|
978
961
|
- Boilerplate projects or scaffolding tools
|
|
979
962
|
- Previous projects to be cloned or adapted
|
|
980
|
-
|
|
963
|
+
|
|
981
964
|
2. If a starter template or existing project is mentioned:
|
|
982
965
|
- Ask the user to provide access via one of these methods:
|
|
983
966
|
- Link to the starter template documentation
|
|
@@ -990,16 +973,16 @@ sections:
|
|
|
990
973
|
- Existing architectural patterns and conventions
|
|
991
974
|
- Any limitations or constraints imposed by the starter
|
|
992
975
|
- Use this analysis to inform and align your architecture decisions
|
|
993
|
-
|
|
976
|
+
|
|
994
977
|
3. If no starter template is mentioned but this is a greenfield project:
|
|
995
978
|
- Suggest appropriate starter templates based on the tech stack preferences
|
|
996
979
|
- Explain the benefits (faster setup, best practices, community support)
|
|
997
980
|
- Let the user decide whether to use one
|
|
998
|
-
|
|
981
|
+
|
|
999
982
|
4. If the user confirms no starter template will be used:
|
|
1000
983
|
- Proceed with architecture design from scratch
|
|
1001
984
|
- Note that manual setup will be required for all tooling and configuration
|
|
1002
|
-
|
|
985
|
+
|
|
1003
986
|
Document the decision here before proceeding with the architecture design. If none, just say N/A
|
|
1004
987
|
elicit: true
|
|
1005
988
|
- id: changelog
|
|
@@ -1027,7 +1010,7 @@ sections:
|
|
|
1027
1010
|
title: High Level Overview
|
|
1028
1011
|
instruction: |
|
|
1029
1012
|
Based on the PRD's Technical Assumptions section, describe:
|
|
1030
|
-
|
|
1013
|
+
|
|
1031
1014
|
1. The main architectural style (e.g., Monolith, Microservices, Serverless, Event-Driven)
|
|
1032
1015
|
2. Repository structure decision from PRD (Monorepo/Polyrepo)
|
|
1033
1016
|
3. Service architecture decision from PRD
|
|
@@ -1044,17 +1027,17 @@ sections:
|
|
|
1044
1027
|
- Data flow directions
|
|
1045
1028
|
- External integrations
|
|
1046
1029
|
- User entry points
|
|
1047
|
-
|
|
1030
|
+
|
|
1048
1031
|
- id: architectural-patterns
|
|
1049
1032
|
title: Architectural and Design Patterns
|
|
1050
1033
|
instruction: |
|
|
1051
1034
|
List the key high-level patterns that will guide the architecture. For each pattern:
|
|
1052
|
-
|
|
1035
|
+
|
|
1053
1036
|
1. Present 2-3 viable options if multiple exist
|
|
1054
1037
|
2. Provide your recommendation with clear rationale
|
|
1055
1038
|
3. Get user confirmation before finalizing
|
|
1056
1039
|
4. These patterns should align with the PRD's technical assumptions and project goals
|
|
1057
|
-
|
|
1040
|
+
|
|
1058
1041
|
Common patterns to consider:
|
|
1059
1042
|
- Architectural style patterns (Serverless, Event-Driven, Microservices, CQRS, Hexagonal)
|
|
1060
1043
|
- Code organization patterns (Dependency Injection, Repository, Module, Factory)
|
|
@@ -1070,23 +1053,23 @@ sections:
|
|
|
1070
1053
|
title: Tech Stack
|
|
1071
1054
|
instruction: |
|
|
1072
1055
|
This is the DEFINITIVE technology selection section. Work with the user to make specific choices:
|
|
1073
|
-
|
|
1056
|
+
|
|
1074
1057
|
1. Review PRD technical assumptions and any preferences from .bmad-core/data/technical-preferences.yaml or an attached technical-preferences
|
|
1075
1058
|
2. For each category, present 2-3 viable options with pros/cons
|
|
1076
1059
|
3. Make a clear recommendation based on project needs
|
|
1077
1060
|
4. Get explicit user approval for each selection
|
|
1078
1061
|
5. Document exact versions (avoid "latest" - pin specific versions)
|
|
1079
1062
|
6. This table is the single source of truth - all other docs must reference these choices
|
|
1080
|
-
|
|
1063
|
+
|
|
1081
1064
|
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:
|
|
1082
|
-
|
|
1065
|
+
|
|
1083
1066
|
- Starter templates (if any)
|
|
1084
1067
|
- Languages and runtimes with exact versions
|
|
1085
1068
|
- Frameworks and libraries / packages
|
|
1086
1069
|
- Cloud provider and key services choices
|
|
1087
1070
|
- 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
|
|
1088
1071
|
- Development tools
|
|
1089
|
-
|
|
1072
|
+
|
|
1090
1073
|
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.
|
|
1091
1074
|
elicit: true
|
|
1092
1075
|
sections:
|
|
@@ -1110,13 +1093,13 @@ sections:
|
|
|
1110
1093
|
title: Data Models
|
|
1111
1094
|
instruction: |
|
|
1112
1095
|
Define the core data models/entities:
|
|
1113
|
-
|
|
1096
|
+
|
|
1114
1097
|
1. Review PRD requirements and identify key business entities
|
|
1115
1098
|
2. For each model, explain its purpose and relationships
|
|
1116
1099
|
3. Include key attributes and data types
|
|
1117
1100
|
4. Show relationships between models
|
|
1118
1101
|
5. Discuss design decisions with user
|
|
1119
|
-
|
|
1102
|
+
|
|
1120
1103
|
Create a clear conceptual model before moving to database schema.
|
|
1121
1104
|
elicit: true
|
|
1122
1105
|
repeatable: true
|
|
@@ -1125,11 +1108,11 @@ sections:
|
|
|
1125
1108
|
title: "{{model_name}}"
|
|
1126
1109
|
template: |
|
|
1127
1110
|
**Purpose:** {{model_purpose}}
|
|
1128
|
-
|
|
1111
|
+
|
|
1129
1112
|
**Key Attributes:**
|
|
1130
1113
|
- {{attribute_1}}: {{type_1}} - {{description_1}}
|
|
1131
1114
|
- {{attribute_2}}: {{type_2}} - {{description_2}}
|
|
1132
|
-
|
|
1115
|
+
|
|
1133
1116
|
**Relationships:**
|
|
1134
1117
|
- {{relationship_1}}
|
|
1135
1118
|
- {{relationship_2}}
|
|
@@ -1138,7 +1121,7 @@ sections:
|
|
|
1138
1121
|
title: Components
|
|
1139
1122
|
instruction: |
|
|
1140
1123
|
Based on the architectural patterns, tech stack, and data models from above:
|
|
1141
|
-
|
|
1124
|
+
|
|
1142
1125
|
1. Identify major logical components/services and their responsibilities
|
|
1143
1126
|
2. Consider the repository structure (monorepo/polyrepo) from PRD
|
|
1144
1127
|
3. Define clear boundaries and interfaces between components
|
|
@@ -1147,7 +1130,7 @@ sections:
|
|
|
1147
1130
|
- Key interfaces/APIs exposed
|
|
1148
1131
|
- Dependencies on other components
|
|
1149
1132
|
- Technology specifics based on tech stack choices
|
|
1150
|
-
|
|
1133
|
+
|
|
1151
1134
|
5. Create component diagrams where helpful
|
|
1152
1135
|
elicit: true
|
|
1153
1136
|
sections:
|
|
@@ -1156,13 +1139,13 @@ sections:
|
|
|
1156
1139
|
title: "{{component_name}}"
|
|
1157
1140
|
template: |
|
|
1158
1141
|
**Responsibility:** {{component_description}}
|
|
1159
|
-
|
|
1142
|
+
|
|
1160
1143
|
**Key Interfaces:**
|
|
1161
1144
|
- {{interface_1}}
|
|
1162
1145
|
- {{interface_2}}
|
|
1163
|
-
|
|
1146
|
+
|
|
1164
1147
|
**Dependencies:** {{dependencies}}
|
|
1165
|
-
|
|
1148
|
+
|
|
1166
1149
|
**Technology Stack:** {{component_tech_details}}
|
|
1167
1150
|
- id: component-diagrams
|
|
1168
1151
|
title: Component Diagrams
|
|
@@ -1179,13 +1162,13 @@ sections:
|
|
|
1179
1162
|
condition: Project requires external API integrations
|
|
1180
1163
|
instruction: |
|
|
1181
1164
|
For each external service integration:
|
|
1182
|
-
|
|
1165
|
+
|
|
1183
1166
|
1. Identify APIs needed based on PRD requirements and component design
|
|
1184
1167
|
2. If documentation URLs are unknown, ask user for specifics
|
|
1185
1168
|
3. Document authentication methods and security considerations
|
|
1186
1169
|
4. List specific endpoints that will be used
|
|
1187
1170
|
5. Note any rate limits or usage constraints
|
|
1188
|
-
|
|
1171
|
+
|
|
1189
1172
|
If no external APIs are needed, state this explicitly and skip to next section.
|
|
1190
1173
|
elicit: true
|
|
1191
1174
|
repeatable: true
|
|
@@ -1198,10 +1181,10 @@ sections:
|
|
|
1198
1181
|
- **Base URL(s):** {{api_base_url}}
|
|
1199
1182
|
- **Authentication:** {{auth_method}}
|
|
1200
1183
|
- **Rate Limits:** {{rate_limits}}
|
|
1201
|
-
|
|
1184
|
+
|
|
1202
1185
|
**Key Endpoints Used:**
|
|
1203
1186
|
- `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
|
|
1204
|
-
|
|
1187
|
+
|
|
1205
1188
|
**Integration Notes:** {{integration_considerations}}
|
|
1206
1189
|
|
|
1207
1190
|
- id: core-workflows
|
|
@@ -1210,13 +1193,13 @@ sections:
|
|
|
1210
1193
|
mermaid_type: sequence
|
|
1211
1194
|
instruction: |
|
|
1212
1195
|
Illustrate key system workflows using sequence diagrams:
|
|
1213
|
-
|
|
1196
|
+
|
|
1214
1197
|
1. Identify critical user journeys from PRD
|
|
1215
1198
|
2. Show component interactions including external APIs
|
|
1216
1199
|
3. Include error handling paths
|
|
1217
1200
|
4. Document async operations
|
|
1218
1201
|
5. Create both high-level and detailed diagrams as needed
|
|
1219
|
-
|
|
1202
|
+
|
|
1220
1203
|
Focus on workflows that clarify architecture decisions or complex interactions.
|
|
1221
1204
|
elicit: true
|
|
1222
1205
|
|
|
@@ -1227,13 +1210,13 @@ sections:
|
|
|
1227
1210
|
language: yaml
|
|
1228
1211
|
instruction: |
|
|
1229
1212
|
If the project includes a REST API:
|
|
1230
|
-
|
|
1213
|
+
|
|
1231
1214
|
1. Create an OpenAPI 3.0 specification
|
|
1232
1215
|
2. Include all endpoints from epics/stories
|
|
1233
1216
|
3. Define request/response schemas based on data models
|
|
1234
1217
|
4. Document authentication requirements
|
|
1235
1218
|
5. Include example requests/responses
|
|
1236
|
-
|
|
1219
|
+
|
|
1237
1220
|
Use YAML format for better readability. If no REST API, skip this section.
|
|
1238
1221
|
elicit: true
|
|
1239
1222
|
template: |
|
|
@@ -1250,13 +1233,13 @@ sections:
|
|
|
1250
1233
|
title: Database Schema
|
|
1251
1234
|
instruction: |
|
|
1252
1235
|
Transform the conceptual data models into concrete database schemas:
|
|
1253
|
-
|
|
1236
|
+
|
|
1254
1237
|
1. Use the database type(s) selected in Tech Stack
|
|
1255
1238
|
2. Create schema definitions using appropriate notation
|
|
1256
1239
|
3. Include indexes, constraints, and relationships
|
|
1257
1240
|
4. Consider performance and scalability
|
|
1258
1241
|
5. For NoSQL, show document structures
|
|
1259
|
-
|
|
1242
|
+
|
|
1260
1243
|
Present schema in format appropriate to database type (SQL DDL, JSON schema, etc.)
|
|
1261
1244
|
elicit: true
|
|
1262
1245
|
|
|
@@ -1266,14 +1249,14 @@ sections:
|
|
|
1266
1249
|
language: plaintext
|
|
1267
1250
|
instruction: |
|
|
1268
1251
|
Create a project folder structure that reflects:
|
|
1269
|
-
|
|
1252
|
+
|
|
1270
1253
|
1. The chosen repository structure (monorepo/polyrepo)
|
|
1271
1254
|
2. The service architecture (monolith/microservices/serverless)
|
|
1272
1255
|
3. The selected tech stack and languages
|
|
1273
1256
|
4. Component organization from above
|
|
1274
1257
|
5. Best practices for the chosen frameworks
|
|
1275
1258
|
6. Clear separation of concerns
|
|
1276
|
-
|
|
1259
|
+
|
|
1277
1260
|
Adapt the structure based on project needs. For monorepos, show service separation. For serverless, show function organization. Include language-specific conventions.
|
|
1278
1261
|
elicit: true
|
|
1279
1262
|
examples:
|
|
@@ -1291,13 +1274,13 @@ sections:
|
|
|
1291
1274
|
title: Infrastructure and Deployment
|
|
1292
1275
|
instruction: |
|
|
1293
1276
|
Define the deployment architecture and practices:
|
|
1294
|
-
|
|
1277
|
+
|
|
1295
1278
|
1. Use IaC tool selected in Tech Stack
|
|
1296
1279
|
2. Choose deployment strategy appropriate for the architecture
|
|
1297
1280
|
3. Define environments and promotion flow
|
|
1298
1281
|
4. Establish rollback procedures
|
|
1299
1282
|
5. Consider security, monitoring, and cost optimization
|
|
1300
|
-
|
|
1283
|
+
|
|
1301
1284
|
Get user input on deployment preferences and CI/CD tool choices.
|
|
1302
1285
|
elicit: true
|
|
1303
1286
|
sections:
|
|
@@ -1333,13 +1316,13 @@ sections:
|
|
|
1333
1316
|
title: Error Handling Strategy
|
|
1334
1317
|
instruction: |
|
|
1335
1318
|
Define comprehensive error handling approach:
|
|
1336
|
-
|
|
1319
|
+
|
|
1337
1320
|
1. Choose appropriate patterns for the language/framework from Tech Stack
|
|
1338
1321
|
2. Define logging standards and tools
|
|
1339
1322
|
3. Establish error categories and handling rules
|
|
1340
1323
|
4. Consider observability and debugging needs
|
|
1341
1324
|
5. Ensure security (no sensitive data in logs)
|
|
1342
|
-
|
|
1325
|
+
|
|
1343
1326
|
This section guides both AI and human developers in consistent error handling.
|
|
1344
1327
|
elicit: true
|
|
1345
1328
|
sections:
|
|
@@ -1386,13 +1369,13 @@ sections:
|
|
|
1386
1369
|
title: Coding Standards
|
|
1387
1370
|
instruction: |
|
|
1388
1371
|
These standards are MANDATORY for AI agents. Work with user to define ONLY the critical rules needed to prevent bad code. Explain that:
|
|
1389
|
-
|
|
1372
|
+
|
|
1390
1373
|
1. This section directly controls AI developer behavior
|
|
1391
1374
|
2. Keep it minimal - assume AI knows general best practices
|
|
1392
1375
|
3. Focus on project-specific conventions and gotchas
|
|
1393
1376
|
4. Overly detailed standards bloat context and slow development
|
|
1394
1377
|
5. Standards will be extracted to separate file for dev agent use
|
|
1395
|
-
|
|
1378
|
+
|
|
1396
1379
|
For each standard, get explicit user confirmation it's necessary.
|
|
1397
1380
|
elicit: true
|
|
1398
1381
|
sections:
|
|
@@ -1414,7 +1397,7 @@ sections:
|
|
|
1414
1397
|
- "Never use console.log in production code - use logger"
|
|
1415
1398
|
- "All API responses must use ApiResponse wrapper type"
|
|
1416
1399
|
- "Database queries must use repository pattern, never direct ORM"
|
|
1417
|
-
|
|
1400
|
+
|
|
1418
1401
|
Avoid obvious rules like "use SOLID principles" or "write clean code"
|
|
1419
1402
|
repeatable: true
|
|
1420
1403
|
template: "- **{{rule_name}}:** {{rule_description}}"
|
|
@@ -1432,14 +1415,14 @@ sections:
|
|
|
1432
1415
|
title: Test Strategy and Standards
|
|
1433
1416
|
instruction: |
|
|
1434
1417
|
Work with user to define comprehensive test strategy:
|
|
1435
|
-
|
|
1418
|
+
|
|
1436
1419
|
1. Use test frameworks from Tech Stack
|
|
1437
1420
|
2. Decide on TDD vs test-after approach
|
|
1438
1421
|
3. Define test organization and naming
|
|
1439
1422
|
4. Establish coverage goals
|
|
1440
1423
|
5. Determine integration test infrastructure
|
|
1441
1424
|
6. Plan for test data and external dependencies
|
|
1442
|
-
|
|
1425
|
+
|
|
1443
1426
|
Note: Basic info goes in Coding Standards for dev agent. This detailed section is for QA agent and team reference.
|
|
1444
1427
|
elicit: true
|
|
1445
1428
|
sections:
|
|
@@ -1460,7 +1443,7 @@ sections:
|
|
|
1460
1443
|
- **Location:** {{unit_test_location}}
|
|
1461
1444
|
- **Mocking Library:** {{mocking_library}}
|
|
1462
1445
|
- **Coverage Requirement:** {{unit_coverage}}
|
|
1463
|
-
|
|
1446
|
+
|
|
1464
1447
|
**AI Agent Requirements:**
|
|
1465
1448
|
- Generate tests for all public methods
|
|
1466
1449
|
- Cover edge cases and error conditions
|
|
@@ -1502,7 +1485,7 @@ sections:
|
|
|
1502
1485
|
title: Security
|
|
1503
1486
|
instruction: |
|
|
1504
1487
|
Define MANDATORY security requirements for AI and human developers:
|
|
1505
|
-
|
|
1488
|
+
|
|
1506
1489
|
1. Focus on implementation-specific rules
|
|
1507
1490
|
2. Reference security tools from Tech Stack
|
|
1508
1491
|
3. Define clear patterns for common scenarios
|
|
@@ -1571,16 +1554,16 @@ sections:
|
|
|
1571
1554
|
title: Next Steps
|
|
1572
1555
|
instruction: |
|
|
1573
1556
|
After completing the architecture:
|
|
1574
|
-
|
|
1557
|
+
|
|
1575
1558
|
1. If project has UI components:
|
|
1576
1559
|
- Use "Frontend Architecture Mode"
|
|
1577
1560
|
- Provide this document as input
|
|
1578
|
-
|
|
1561
|
+
|
|
1579
1562
|
2. For all projects:
|
|
1580
1563
|
- Review with Product Owner
|
|
1581
1564
|
- Begin story implementation with Dev agent
|
|
1582
1565
|
- Set up infrastructure with DevOps agent
|
|
1583
|
-
|
|
1566
|
+
|
|
1584
1567
|
3. Include specific prompts for next agents if needed
|
|
1585
1568
|
sections:
|
|
1586
1569
|
- id: architect-prompt
|
|
@@ -1594,1501 +1577,1531 @@ sections:
|
|
|
1594
1577
|
- Request for detailed frontend architecture
|
|
1595
1578
|
==================== END: .bmad-core/templates/architecture-tmpl.yaml ====================
|
|
1596
1579
|
|
|
1597
|
-
==================== START: .bmad-core/templates/
|
|
1580
|
+
==================== START: .bmad-core/templates/brownfield-architecture-tmpl.yaml ====================
|
|
1598
1581
|
template:
|
|
1599
|
-
id:
|
|
1600
|
-
name:
|
|
1582
|
+
id: brownfield-architecture-template-v2
|
|
1583
|
+
name: Brownfield Enhancement Architecture
|
|
1601
1584
|
version: 2.0
|
|
1602
1585
|
output:
|
|
1603
1586
|
format: markdown
|
|
1604
|
-
filename: docs/
|
|
1605
|
-
title: "{{project_name}}
|
|
1587
|
+
filename: docs/architecture.md
|
|
1588
|
+
title: "{{project_name}} Brownfield Enhancement Architecture"
|
|
1606
1589
|
|
|
1607
1590
|
workflow:
|
|
1608
1591
|
mode: interactive
|
|
1609
1592
|
elicitation: advanced-elicitation
|
|
1610
1593
|
|
|
1611
1594
|
sections:
|
|
1612
|
-
- id:
|
|
1613
|
-
title:
|
|
1595
|
+
- id: introduction
|
|
1596
|
+
title: Introduction
|
|
1614
1597
|
instruction: |
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
1.
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
-
|
|
1623
|
-
-
|
|
1624
|
-
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
- Pre-installed dependencies and versions
|
|
1633
|
-
- Folder structure and file organization
|
|
1634
|
-
- Built-in components and utilities
|
|
1635
|
-
- Styling approach (CSS modules, styled-components, Tailwind, etc.)
|
|
1636
|
-
- State management setup (if any)
|
|
1637
|
-
- Routing configuration
|
|
1638
|
-
- Testing setup and patterns
|
|
1639
|
-
- Build and development scripts
|
|
1640
|
-
- Use this analysis to ensure your frontend architecture aligns with the starter's patterns
|
|
1641
|
-
|
|
1642
|
-
3. If no frontend starter is mentioned but this is a new UI, ensure we know what the ui language and framework is:
|
|
1643
|
-
- Based on the framework choice, suggest appropriate starters:
|
|
1644
|
-
- React: Create React App, Next.js, Vite + React
|
|
1645
|
-
- Vue: Vue CLI, Nuxt.js, Vite + Vue
|
|
1646
|
-
- Angular: Angular CLI
|
|
1647
|
-
- Or suggest popular UI templates if applicable
|
|
1648
|
-
- Explain benefits specific to frontend development
|
|
1649
|
-
|
|
1650
|
-
4. If the user confirms no starter template will be used:
|
|
1651
|
-
- Note that all tooling, bundling, and configuration will need manual setup
|
|
1652
|
-
- Proceed with frontend architecture from scratch
|
|
1653
|
-
|
|
1654
|
-
Document the starter template decision and any constraints it imposes before proceeding.
|
|
1598
|
+
IMPORTANT - SCOPE AND ASSESSMENT REQUIRED:
|
|
1599
|
+
|
|
1600
|
+
This architecture document is for SIGNIFICANT enhancements to existing projects that require comprehensive architectural planning. Before proceeding:
|
|
1601
|
+
|
|
1602
|
+
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."
|
|
1603
|
+
|
|
1604
|
+
2. **REQUIRED INPUTS**:
|
|
1605
|
+
- Completed brownfield-prd.md
|
|
1606
|
+
- Existing project technical documentation (from docs folder or user-provided)
|
|
1607
|
+
- Access to existing project structure (IDE or uploaded files)
|
|
1608
|
+
|
|
1609
|
+
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.
|
|
1610
|
+
|
|
1611
|
+
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?"
|
|
1612
|
+
|
|
1613
|
+
If any required inputs are missing, request them before proceeding.
|
|
1614
|
+
elicit: true
|
|
1655
1615
|
sections:
|
|
1616
|
+
- id: intro-content
|
|
1617
|
+
content: |
|
|
1618
|
+
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.
|
|
1619
|
+
|
|
1620
|
+
**Relationship to Existing Architecture:**
|
|
1621
|
+
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.
|
|
1622
|
+
- id: existing-project-analysis
|
|
1623
|
+
title: Existing Project Analysis
|
|
1624
|
+
instruction: |
|
|
1625
|
+
Analyze the existing project structure and architecture:
|
|
1626
|
+
|
|
1627
|
+
1. Review existing documentation in docs folder
|
|
1628
|
+
2. Examine current technology stack and versions
|
|
1629
|
+
3. Identify existing architectural patterns and conventions
|
|
1630
|
+
4. Note current deployment and infrastructure setup
|
|
1631
|
+
5. Document any constraints or limitations
|
|
1632
|
+
|
|
1633
|
+
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."
|
|
1634
|
+
elicit: true
|
|
1635
|
+
sections:
|
|
1636
|
+
- id: current-state
|
|
1637
|
+
title: Current Project State
|
|
1638
|
+
template: |
|
|
1639
|
+
- **Primary Purpose:** {{existing_project_purpose}}
|
|
1640
|
+
- **Current Tech Stack:** {{existing_tech_summary}}
|
|
1641
|
+
- **Architecture Style:** {{existing_architecture_style}}
|
|
1642
|
+
- **Deployment Method:** {{existing_deployment_approach}}
|
|
1643
|
+
- id: available-docs
|
|
1644
|
+
title: Available Documentation
|
|
1645
|
+
type: bullet-list
|
|
1646
|
+
template: "- {{existing_docs_summary}}"
|
|
1647
|
+
- id: constraints
|
|
1648
|
+
title: Identified Constraints
|
|
1649
|
+
type: bullet-list
|
|
1650
|
+
template: "- {{constraint}}"
|
|
1656
1651
|
- id: changelog
|
|
1657
1652
|
title: Change Log
|
|
1658
1653
|
type: table
|
|
1659
|
-
columns: [Date, Version, Description, Author]
|
|
1654
|
+
columns: [Change, Date, Version, Description, Author]
|
|
1660
1655
|
instruction: Track document versions and changes
|
|
1661
1656
|
|
|
1662
|
-
- id:
|
|
1663
|
-
title:
|
|
1664
|
-
instruction:
|
|
1665
|
-
|
|
1666
|
-
sections:
|
|
1667
|
-
- id: tech-stack-table
|
|
1668
|
-
title: Technology Stack Table
|
|
1669
|
-
type: table
|
|
1670
|
-
columns: [Category, Technology, Version, Purpose, Rationale]
|
|
1671
|
-
instruction: Fill in appropriate technology choices based on the selected framework and project requirements.
|
|
1672
|
-
rows:
|
|
1673
|
-
- ["Framework", "{{framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1674
|
-
- ["UI Library", "{{ui_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1675
|
-
- ["State Management", "{{state_management}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1676
|
-
- ["Routing", "{{routing_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1677
|
-
- ["Build Tool", "{{build_tool}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1678
|
-
- ["Styling", "{{styling_solution}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1679
|
-
- ["Testing", "{{test_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1680
|
-
- ["Component Library", "{{component_lib}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1681
|
-
- ["Form Handling", "{{form_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1682
|
-
- ["Animation", "{{animation_lib}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1683
|
-
- ["Dev Tools", "{{dev_tools}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1657
|
+
- id: enhancement-scope
|
|
1658
|
+
title: Enhancement Scope and Integration Strategy
|
|
1659
|
+
instruction: |
|
|
1660
|
+
Define how the enhancement will integrate with the existing system:
|
|
1684
1661
|
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
type: code
|
|
1690
|
-
language: plaintext
|
|
1662
|
+
1. Review the brownfield PRD enhancement scope
|
|
1663
|
+
2. Identify integration points with existing code
|
|
1664
|
+
3. Define boundaries between new and existing functionality
|
|
1665
|
+
4. Establish compatibility requirements
|
|
1691
1666
|
|
|
1692
|
-
|
|
1693
|
-
title: Component Standards
|
|
1694
|
-
instruction: Define exact patterns for component creation based on the chosen framework.
|
|
1667
|
+
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?"
|
|
1695
1668
|
elicit: true
|
|
1696
1669
|
sections:
|
|
1697
|
-
- id:
|
|
1698
|
-
title:
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1670
|
+
- id: enhancement-overview
|
|
1671
|
+
title: Enhancement Overview
|
|
1672
|
+
template: |
|
|
1673
|
+
**Enhancement Type:** {{enhancement_type}}
|
|
1674
|
+
**Scope:** {{enhancement_scope}}
|
|
1675
|
+
**Integration Impact:** {{integration_impact_level}}
|
|
1676
|
+
- id: integration-approach
|
|
1677
|
+
title: Integration Approach
|
|
1678
|
+
template: |
|
|
1679
|
+
**Code Integration Strategy:** {{code_integration_approach}}
|
|
1680
|
+
**Database Integration:** {{database_integration_approach}}
|
|
1681
|
+
**API Integration:** {{api_integration_approach}}
|
|
1682
|
+
**UI Integration:** {{ui_integration_approach}}
|
|
1683
|
+
- id: compatibility-requirements
|
|
1684
|
+
title: Compatibility Requirements
|
|
1685
|
+
template: |
|
|
1686
|
+
- **Existing API Compatibility:** {{api_compatibility}}
|
|
1687
|
+
- **Database Schema Compatibility:** {{db_compatibility}}
|
|
1688
|
+
- **UI/UX Consistency:** {{ui_compatibility}}
|
|
1689
|
+
- **Performance Impact:** {{performance_constraints}}
|
|
1705
1690
|
|
|
1706
|
-
- id:
|
|
1707
|
-
title:
|
|
1708
|
-
instruction:
|
|
1691
|
+
- id: tech-stack-alignment
|
|
1692
|
+
title: Tech Stack Alignment
|
|
1693
|
+
instruction: |
|
|
1694
|
+
Ensure new components align with existing technology choices:
|
|
1695
|
+
|
|
1696
|
+
1. Use existing technology stack as the foundation
|
|
1697
|
+
2. Only introduce new technologies if absolutely necessary
|
|
1698
|
+
3. Justify any new additions with clear rationale
|
|
1699
|
+
4. Ensure version compatibility with existing dependencies
|
|
1709
1700
|
elicit: true
|
|
1710
1701
|
sections:
|
|
1711
|
-
- id:
|
|
1712
|
-
title:
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
- id:
|
|
1717
|
-
title:
|
|
1718
|
-
|
|
1719
|
-
type:
|
|
1720
|
-
|
|
1702
|
+
- id: existing-stack
|
|
1703
|
+
title: Existing Technology Stack
|
|
1704
|
+
type: table
|
|
1705
|
+
columns: [Category, Current Technology, Version, Usage in Enhancement, Notes]
|
|
1706
|
+
instruction: Document the current stack that must be maintained or integrated with
|
|
1707
|
+
- id: new-tech-additions
|
|
1708
|
+
title: New Technology Additions
|
|
1709
|
+
condition: Enhancement requires new technologies
|
|
1710
|
+
type: table
|
|
1711
|
+
columns: [Technology, Version, Purpose, Rationale, Integration Method]
|
|
1712
|
+
instruction: Only include if new technologies are required for the enhancement
|
|
1721
1713
|
|
|
1722
|
-
- id:
|
|
1723
|
-
title:
|
|
1724
|
-
instruction:
|
|
1714
|
+
- id: data-models
|
|
1715
|
+
title: Data Models and Schema Changes
|
|
1716
|
+
instruction: |
|
|
1717
|
+
Define new data models and how they integrate with existing schema:
|
|
1718
|
+
|
|
1719
|
+
1. Identify new entities required for the enhancement
|
|
1720
|
+
2. Define relationships with existing data models
|
|
1721
|
+
3. Plan database schema changes (additions, modifications)
|
|
1722
|
+
4. Ensure backward compatibility
|
|
1725
1723
|
elicit: true
|
|
1726
1724
|
sections:
|
|
1727
|
-
- id:
|
|
1728
|
-
title:
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
language: typescript
|
|
1725
|
+
- id: new-models
|
|
1726
|
+
title: New Data Models
|
|
1727
|
+
repeatable: true
|
|
1728
|
+
sections:
|
|
1729
|
+
- id: model
|
|
1730
|
+
title: "{{model_name}}"
|
|
1731
|
+
template: |
|
|
1732
|
+
**Purpose:** {{model_purpose}}
|
|
1733
|
+
**Integration:** {{integration_with_existing}}
|
|
1737
1734
|
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
elicit: true
|
|
1742
|
-
sections:
|
|
1743
|
-
- id: route-configuration
|
|
1744
|
-
title: Route Configuration
|
|
1745
|
-
instruction: Provide routing configuration appropriate for the chosen framework. Include protected route patterns, lazy loading where applicable, and authentication guards/middleware.
|
|
1746
|
-
type: code
|
|
1747
|
-
language: typescript
|
|
1735
|
+
**Key Attributes:**
|
|
1736
|
+
- {{attribute_1}}: {{type_1}} - {{description_1}}
|
|
1737
|
+
- {{attribute_2}}: {{type_2}} - {{description_2}}
|
|
1748
1738
|
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
type: code
|
|
1761
|
-
language: css
|
|
1739
|
+
**Relationships:**
|
|
1740
|
+
- **With Existing:** {{existing_relationships}}
|
|
1741
|
+
- **With New:** {{new_relationships}}
|
|
1742
|
+
- id: schema-integration
|
|
1743
|
+
title: Schema Integration Strategy
|
|
1744
|
+
template: |
|
|
1745
|
+
**Database Changes Required:**
|
|
1746
|
+
- **New Tables:** {{new_tables_list}}
|
|
1747
|
+
- **Modified Tables:** {{modified_tables_list}}
|
|
1748
|
+
- **New Indexes:** {{new_indexes_list}}
|
|
1749
|
+
- **Migration Strategy:** {{migration_approach}}
|
|
1762
1750
|
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1751
|
+
**Backward Compatibility:**
|
|
1752
|
+
- {{compatibility_measure_1}}
|
|
1753
|
+
- {{compatibility_measure_2}}
|
|
1754
|
+
|
|
1755
|
+
- id: component-architecture
|
|
1756
|
+
title: Component Architecture
|
|
1757
|
+
instruction: |
|
|
1758
|
+
Define new components and their integration with existing architecture:
|
|
1759
|
+
|
|
1760
|
+
1. Identify new components required for the enhancement
|
|
1761
|
+
2. Define interfaces with existing components
|
|
1762
|
+
3. Establish clear boundaries and responsibilities
|
|
1763
|
+
4. Plan integration points and data flow
|
|
1764
|
+
|
|
1765
|
+
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?"
|
|
1766
1766
|
elicit: true
|
|
1767
1767
|
sections:
|
|
1768
|
-
- id:
|
|
1769
|
-
title:
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
- "**Unit Tests**: Test individual components in isolation"
|
|
1778
|
-
- "**Integration Tests**: Test component interactions"
|
|
1779
|
-
- "**E2E Tests**: Test critical user flows (using Cypress/Playwright)"
|
|
1780
|
-
- "**Coverage Goals**: Aim for 80% code coverage"
|
|
1781
|
-
- "**Test Structure**: Arrange-Act-Assert pattern"
|
|
1782
|
-
- "**Mock External Dependencies**: API calls, routing, state management"
|
|
1768
|
+
- id: new-components
|
|
1769
|
+
title: New Components
|
|
1770
|
+
repeatable: true
|
|
1771
|
+
sections:
|
|
1772
|
+
- id: component
|
|
1773
|
+
title: "{{component_name}}"
|
|
1774
|
+
template: |
|
|
1775
|
+
**Responsibility:** {{component_description}}
|
|
1776
|
+
**Integration Points:** {{integration_points}}
|
|
1783
1777
|
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1778
|
+
**Key Interfaces:**
|
|
1779
|
+
- {{interface_1}}
|
|
1780
|
+
- {{interface_2}}
|
|
1781
|
+
|
|
1782
|
+
**Dependencies:**
|
|
1783
|
+
- **Existing Components:** {{existing_dependencies}}
|
|
1784
|
+
- **New Components:** {{new_dependencies}}
|
|
1785
|
+
|
|
1786
|
+
**Technology Stack:** {{component_tech_details}}
|
|
1787
|
+
- id: interaction-diagram
|
|
1788
|
+
title: Component Interaction Diagram
|
|
1789
|
+
type: mermaid
|
|
1790
|
+
mermaid_type: graph
|
|
1791
|
+
instruction: Create Mermaid diagram showing how new components interact with existing ones
|
|
1792
|
+
|
|
1793
|
+
- id: api-design
|
|
1794
|
+
title: API Design and Integration
|
|
1795
|
+
condition: Enhancement requires API changes
|
|
1796
|
+
instruction: |
|
|
1797
|
+
Define new API endpoints and integration with existing APIs:
|
|
1798
|
+
|
|
1799
|
+
1. Plan new API endpoints required for the enhancement
|
|
1800
|
+
2. Ensure consistency with existing API patterns
|
|
1801
|
+
3. Define authentication and authorization integration
|
|
1802
|
+
4. Plan versioning strategy if needed
|
|
1787
1803
|
elicit: true
|
|
1804
|
+
sections:
|
|
1805
|
+
- id: api-strategy
|
|
1806
|
+
title: API Integration Strategy
|
|
1807
|
+
template: |
|
|
1808
|
+
**API Integration Strategy:** {{api_integration_strategy}}
|
|
1809
|
+
**Authentication:** {{auth_integration}}
|
|
1810
|
+
**Versioning:** {{versioning_approach}}
|
|
1811
|
+
- id: new-endpoints
|
|
1812
|
+
title: New API Endpoints
|
|
1813
|
+
repeatable: true
|
|
1814
|
+
sections:
|
|
1815
|
+
- id: endpoint
|
|
1816
|
+
title: "{{endpoint_name}}"
|
|
1817
|
+
template: |
|
|
1818
|
+
- **Method:** {{http_method}}
|
|
1819
|
+
- **Endpoint:** {{endpoint_path}}
|
|
1820
|
+
- **Purpose:** {{endpoint_purpose}}
|
|
1821
|
+
- **Integration:** {{integration_with_existing}}
|
|
1822
|
+
sections:
|
|
1823
|
+
- id: request
|
|
1824
|
+
title: Request
|
|
1825
|
+
type: code
|
|
1826
|
+
language: json
|
|
1827
|
+
template: "{{request_schema}}"
|
|
1828
|
+
- id: response
|
|
1829
|
+
title: Response
|
|
1830
|
+
type: code
|
|
1831
|
+
language: json
|
|
1832
|
+
template: "{{response_schema}}"
|
|
1788
1833
|
|
|
1789
|
-
- id:
|
|
1790
|
-
title:
|
|
1834
|
+
- id: external-api-integration
|
|
1835
|
+
title: External API Integration
|
|
1836
|
+
condition: Enhancement requires new external APIs
|
|
1837
|
+
instruction: Document new external API integrations required for the enhancement
|
|
1838
|
+
repeatable: true
|
|
1791
1839
|
sections:
|
|
1792
|
-
- id:
|
|
1793
|
-
title:
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
- Common commands (dev server, build, test)
|
|
1801
|
-
- Key import patterns
|
|
1802
|
-
- File naming conventions
|
|
1803
|
-
- Project-specific patterns and utilities
|
|
1804
|
-
==================== END: .bmad-core/templates/front-end-architecture-tmpl.yaml ====================
|
|
1840
|
+
- id: external-api
|
|
1841
|
+
title: "{{api_name}} API"
|
|
1842
|
+
template: |
|
|
1843
|
+
- **Purpose:** {{api_purpose}}
|
|
1844
|
+
- **Documentation:** {{api_docs_url}}
|
|
1845
|
+
- **Base URL:** {{api_base_url}}
|
|
1846
|
+
- **Authentication:** {{auth_method}}
|
|
1847
|
+
- **Integration Method:** {{integration_approach}}
|
|
1805
1848
|
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
id: fullstack-architecture-template-v2
|
|
1809
|
-
name: Fullstack Architecture Document
|
|
1810
|
-
version: 2.0
|
|
1811
|
-
output:
|
|
1812
|
-
format: markdown
|
|
1813
|
-
filename: docs/architecture.md
|
|
1814
|
-
title: "{{project_name}} Fullstack Architecture Document"
|
|
1849
|
+
**Key Endpoints Used:**
|
|
1850
|
+
- `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
|
|
1815
1851
|
|
|
1816
|
-
|
|
1817
|
-
mode: interactive
|
|
1818
|
-
elicitation: advanced-elicitation
|
|
1852
|
+
**Error Handling:** {{error_handling_strategy}}
|
|
1819
1853
|
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
title: Introduction
|
|
1854
|
+
- id: source-tree-integration
|
|
1855
|
+
title: Source Tree Integration
|
|
1823
1856
|
instruction: |
|
|
1824
|
-
|
|
1825
|
-
elicit: true
|
|
1826
|
-
content: |
|
|
1827
|
-
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.
|
|
1828
|
-
|
|
1829
|
-
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.
|
|
1830
|
-
sections:
|
|
1831
|
-
- id: starter-template
|
|
1832
|
-
title: Starter Template or Existing Project
|
|
1833
|
-
instruction: |
|
|
1834
|
-
Before proceeding with architecture design, check if the project is based on any starter templates or existing codebases:
|
|
1835
|
-
|
|
1836
|
-
1. Review the PRD and other documents for mentions of:
|
|
1837
|
-
- Fullstack starter templates (e.g., T3 Stack, MEAN/MERN starters, Django + React templates)
|
|
1838
|
-
- Monorepo templates (e.g., Nx, Turborepo starters)
|
|
1839
|
-
- Platform-specific starters (e.g., Vercel templates, AWS Amplify starters)
|
|
1840
|
-
- Existing projects being extended or cloned
|
|
1841
|
-
|
|
1842
|
-
2. If starter templates or existing projects are mentioned:
|
|
1843
|
-
- Ask the user to provide access (links, repos, or files)
|
|
1844
|
-
- Analyze to understand pre-configured choices and constraints
|
|
1845
|
-
- Note any architectural decisions already made
|
|
1846
|
-
- Identify what can be modified vs what must be retained
|
|
1847
|
-
|
|
1848
|
-
3. If no starter is mentioned but this is greenfield:
|
|
1849
|
-
- Suggest appropriate fullstack starters based on tech preferences
|
|
1850
|
-
- Consider platform-specific options (Vercel, AWS, etc.)
|
|
1851
|
-
- Let user decide whether to use one
|
|
1852
|
-
|
|
1853
|
-
4. Document the decision and any constraints it imposes
|
|
1854
|
-
|
|
1855
|
-
If none, state "N/A - Greenfield project"
|
|
1856
|
-
- id: changelog
|
|
1857
|
-
title: Change Log
|
|
1858
|
-
type: table
|
|
1859
|
-
columns: [Date, Version, Description, Author]
|
|
1860
|
-
instruction: Track document versions and changes
|
|
1857
|
+
Define how new code will integrate with existing project structure:
|
|
1861
1858
|
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1859
|
+
1. Follow existing project organization patterns
|
|
1860
|
+
2. Identify where new files/folders will be placed
|
|
1861
|
+
3. Ensure consistency with existing naming conventions
|
|
1862
|
+
4. Plan for minimal disruption to existing structure
|
|
1865
1863
|
elicit: true
|
|
1866
1864
|
sections:
|
|
1867
|
-
- id:
|
|
1868
|
-
title:
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
instruction: |
|
|
1879
|
-
Based on PRD requirements and technical assumptions, make a platform recommendation:
|
|
1880
|
-
|
|
1881
|
-
1. Consider common patterns (not an exhaustive list, use your own best judgement and search the web as needed for emerging trends):
|
|
1882
|
-
- **Vercel + Supabase**: For rapid development with Next.js, built-in auth/storage
|
|
1883
|
-
- **AWS Full Stack**: For enterprise scale with Lambda, API Gateway, S3, Cognito
|
|
1884
|
-
- **Azure**: For .NET ecosystems or enterprise Microsoft environments
|
|
1885
|
-
- **Google Cloud**: For ML/AI heavy applications or Google ecosystem integration
|
|
1886
|
-
|
|
1887
|
-
2. Present 2-3 viable options with clear pros/cons
|
|
1888
|
-
3. Make a recommendation with rationale
|
|
1889
|
-
4. Get explicit user confirmation
|
|
1890
|
-
|
|
1891
|
-
Document the choice and key services that will be used.
|
|
1865
|
+
- id: existing-structure
|
|
1866
|
+
title: Existing Project Structure
|
|
1867
|
+
type: code
|
|
1868
|
+
language: plaintext
|
|
1869
|
+
instruction: Document relevant parts of current structure
|
|
1870
|
+
template: "{{existing_structure_relevant_parts}}"
|
|
1871
|
+
- id: new-file-organization
|
|
1872
|
+
title: New File Organization
|
|
1873
|
+
type: code
|
|
1874
|
+
language: plaintext
|
|
1875
|
+
instruction: Show only new additions to existing structure
|
|
1892
1876
|
template: |
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
4. Plan for shared code between frontend and backend
|
|
1877
|
+
{{project-root}}/
|
|
1878
|
+
├── {{existing_structure_context}}
|
|
1879
|
+
│ ├── {{new_folder_1}}/ # {{purpose_1}}
|
|
1880
|
+
│ │ ├── {{new_file_1}}
|
|
1881
|
+
│ │ └── {{new_file_2}}
|
|
1882
|
+
│ ├── {{existing_folder}}/ # Existing folder with additions
|
|
1883
|
+
│ │ ├── {{existing_file}} # Existing file
|
|
1884
|
+
│ │ └── {{new_file_3}} # New addition
|
|
1885
|
+
│ └── {{new_folder_2}}/ # {{purpose_2}}
|
|
1886
|
+
- id: integration-guidelines
|
|
1887
|
+
title: Integration Guidelines
|
|
1905
1888
|
template: |
|
|
1906
|
-
**
|
|
1907
|
-
**
|
|
1908
|
-
**
|
|
1909
|
-
- id: architecture-diagram
|
|
1910
|
-
title: High Level Architecture Diagram
|
|
1911
|
-
type: mermaid
|
|
1912
|
-
mermaid_type: graph
|
|
1913
|
-
instruction: |
|
|
1914
|
-
Create a Mermaid diagram showing the complete system architecture including:
|
|
1915
|
-
- User entry points (web, mobile)
|
|
1916
|
-
- Frontend application deployment
|
|
1917
|
-
- API layer (REST/GraphQL)
|
|
1918
|
-
- Backend services
|
|
1919
|
-
- Databases and storage
|
|
1920
|
-
- External integrations
|
|
1921
|
-
- CDN and caching layers
|
|
1922
|
-
|
|
1923
|
-
Use appropriate diagram type for clarity.
|
|
1924
|
-
- id: architectural-patterns
|
|
1925
|
-
title: Architectural Patterns
|
|
1926
|
-
instruction: |
|
|
1927
|
-
List patterns that will guide both frontend and backend development. Include patterns for:
|
|
1928
|
-
- Overall architecture (e.g., Jamstack, Serverless, Microservices)
|
|
1929
|
-
- Frontend patterns (e.g., Component-based, State management)
|
|
1930
|
-
- Backend patterns (e.g., Repository, CQRS, Event-driven)
|
|
1931
|
-
- Integration patterns (e.g., BFF, API Gateway)
|
|
1932
|
-
|
|
1933
|
-
For each pattern, provide recommendation and rationale.
|
|
1934
|
-
repeatable: true
|
|
1935
|
-
template: "- **{{pattern_name}}:** {{pattern_description}} - _Rationale:_ {{rationale}}"
|
|
1936
|
-
examples:
|
|
1937
|
-
- "**Jamstack Architecture:** Static site generation with serverless APIs - _Rationale:_ Optimal performance and scalability for content-heavy applications"
|
|
1938
|
-
- "**Component-Based UI:** Reusable React components with TypeScript - _Rationale:_ Maintainability and type safety across large codebases"
|
|
1939
|
-
- "**Repository Pattern:** Abstract data access logic - _Rationale:_ Enables testing and future database migration flexibility"
|
|
1940
|
-
- "**API Gateway Pattern:** Single entry point for all API calls - _Rationale:_ Centralized auth, rate limiting, and monitoring"
|
|
1889
|
+
- **File Naming:** {{file_naming_consistency}}
|
|
1890
|
+
- **Folder Organization:** {{folder_organization_approach}}
|
|
1891
|
+
- **Import/Export Patterns:** {{import_export_consistency}}
|
|
1941
1892
|
|
|
1942
|
-
- id:
|
|
1943
|
-
title:
|
|
1893
|
+
- id: infrastructure-deployment
|
|
1894
|
+
title: Infrastructure and Deployment Integration
|
|
1944
1895
|
instruction: |
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
Key areas to cover:
|
|
1948
|
-
- Frontend and backend languages/frameworks
|
|
1949
|
-
- Databases and caching
|
|
1950
|
-
- Authentication and authorization
|
|
1951
|
-
- API approach
|
|
1952
|
-
- Testing tools for both frontend and backend
|
|
1953
|
-
- Build and deployment tools
|
|
1954
|
-
- Monitoring and logging
|
|
1955
|
-
|
|
1956
|
-
Upon render, elicit feedback immediately.
|
|
1957
|
-
elicit: true
|
|
1958
|
-
sections:
|
|
1959
|
-
- id: tech-stack-table
|
|
1960
|
-
title: Technology Stack Table
|
|
1961
|
-
type: table
|
|
1962
|
-
columns: [Category, Technology, Version, Purpose, Rationale]
|
|
1963
|
-
rows:
|
|
1964
|
-
- ["Frontend Language", "{{fe_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1965
|
-
- ["Frontend Framework", "{{fe_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1966
|
-
- ["UI Component Library", "{{ui_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1967
|
-
- ["State Management", "{{state_mgmt}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1968
|
-
- ["Backend Language", "{{be_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1969
|
-
- ["Backend Framework", "{{be_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1970
|
-
- ["API Style", "{{api_style}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1971
|
-
- ["Database", "{{database}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1972
|
-
- ["Cache", "{{cache}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1973
|
-
- ["File Storage", "{{storage}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1974
|
-
- ["Authentication", "{{auth}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1975
|
-
- ["Frontend Testing", "{{fe_test}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1976
|
-
- ["Backend Testing", "{{be_test}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1977
|
-
- ["E2E Testing", "{{e2e_test}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1978
|
-
- ["Build Tool", "{{build_tool}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1979
|
-
- ["Bundler", "{{bundler}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1980
|
-
- ["IaC Tool", "{{iac_tool}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1981
|
-
- ["CI/CD", "{{cicd}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1982
|
-
- ["Monitoring", "{{monitoring}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1983
|
-
- ["Logging", "{{logging}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1984
|
-
- ["CSS Framework", "{{css_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
1896
|
+
Define how the enhancement will be deployed alongside existing infrastructure:
|
|
1985
1897
|
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
Define
|
|
1990
|
-
|
|
1991
|
-
1. Review PRD requirements and identify key business entities
|
|
1992
|
-
2. For each model, explain its purpose and relationships
|
|
1993
|
-
3. Include key attributes and data types
|
|
1994
|
-
4. Show relationships between models
|
|
1995
|
-
5. Create TypeScript interfaces that can be shared
|
|
1996
|
-
6. Discuss design decisions with user
|
|
1997
|
-
|
|
1998
|
-
Create a clear conceptual model before moving to database schema.
|
|
1898
|
+
1. Use existing deployment pipeline and infrastructure
|
|
1899
|
+
2. Identify any infrastructure changes needed
|
|
1900
|
+
3. Plan deployment strategy to minimize risk
|
|
1901
|
+
4. Define rollback procedures
|
|
1999
1902
|
elicit: true
|
|
2000
|
-
repeatable: true
|
|
2001
1903
|
sections:
|
|
2002
|
-
- id:
|
|
2003
|
-
title:
|
|
1904
|
+
- id: existing-infrastructure
|
|
1905
|
+
title: Existing Infrastructure
|
|
2004
1906
|
template: |
|
|
2005
|
-
**
|
|
2006
|
-
|
|
2007
|
-
**
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
1907
|
+
**Current Deployment:** {{existing_deployment_summary}}
|
|
1908
|
+
**Infrastructure Tools:** {{existing_infrastructure_tools}}
|
|
1909
|
+
**Environments:** {{existing_environments}}
|
|
1910
|
+
- id: enhancement-deployment
|
|
1911
|
+
title: Enhancement Deployment Strategy
|
|
1912
|
+
template: |
|
|
1913
|
+
**Deployment Approach:** {{deployment_approach}}
|
|
1914
|
+
**Infrastructure Changes:** {{infrastructure_changes}}
|
|
1915
|
+
**Pipeline Integration:** {{pipeline_integration}}
|
|
1916
|
+
- id: rollback-strategy
|
|
1917
|
+
title: Rollback Strategy
|
|
1918
|
+
template: |
|
|
1919
|
+
**Rollback Method:** {{rollback_method}}
|
|
1920
|
+
**Risk Mitigation:** {{risk_mitigation}}
|
|
1921
|
+
**Monitoring:** {{monitoring_approach}}
|
|
2020
1922
|
|
|
2021
|
-
- id:
|
|
2022
|
-
title:
|
|
1923
|
+
- id: coding-standards
|
|
1924
|
+
title: Coding Standards and Conventions
|
|
2023
1925
|
instruction: |
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
1.
|
|
2027
|
-
2.
|
|
2028
|
-
3.
|
|
2029
|
-
4.
|
|
2030
|
-
5. Define request/response schemas based on data models
|
|
2031
|
-
6. Document authentication requirements
|
|
2032
|
-
7. Include example requests/responses
|
|
2033
|
-
|
|
2034
|
-
Use appropriate format for the chosen API style. If no API (e.g., static site), skip this section.
|
|
1926
|
+
Ensure new code follows existing project conventions:
|
|
1927
|
+
|
|
1928
|
+
1. Document existing coding standards from project analysis
|
|
1929
|
+
2. Identify any enhancement-specific requirements
|
|
1930
|
+
3. Ensure consistency with existing codebase patterns
|
|
1931
|
+
4. Define standards for new code organization
|
|
2035
1932
|
elicit: true
|
|
2036
1933
|
sections:
|
|
2037
|
-
- id:
|
|
2038
|
-
title:
|
|
2039
|
-
condition: API style is REST
|
|
2040
|
-
type: code
|
|
2041
|
-
language: yaml
|
|
1934
|
+
- id: existing-standards
|
|
1935
|
+
title: Existing Standards Compliance
|
|
2042
1936
|
template: |
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
condition: API style is tRPC
|
|
2060
|
-
type: code
|
|
2061
|
-
language: typescript
|
|
2062
|
-
template: "{{trpc_routers}}"
|
|
1937
|
+
**Code Style:** {{existing_code_style}}
|
|
1938
|
+
**Linting Rules:** {{existing_linting}}
|
|
1939
|
+
**Testing Patterns:** {{existing_test_patterns}}
|
|
1940
|
+
**Documentation Style:** {{existing_doc_style}}
|
|
1941
|
+
- id: enhancement-standards
|
|
1942
|
+
title: Enhancement-Specific Standards
|
|
1943
|
+
condition: New patterns needed for enhancement
|
|
1944
|
+
repeatable: true
|
|
1945
|
+
template: "- **{{standard_name}}:** {{standard_description}}"
|
|
1946
|
+
- id: integration-rules
|
|
1947
|
+
title: Critical Integration Rules
|
|
1948
|
+
template: |
|
|
1949
|
+
- **Existing API Compatibility:** {{api_compatibility_rule}}
|
|
1950
|
+
- **Database Integration:** {{db_integration_rule}}
|
|
1951
|
+
- **Error Handling:** {{error_handling_integration}}
|
|
1952
|
+
- **Logging Consistency:** {{logging_consistency}}
|
|
2063
1953
|
|
|
2064
|
-
- id:
|
|
2065
|
-
title:
|
|
1954
|
+
- id: testing-strategy
|
|
1955
|
+
title: Testing Strategy
|
|
2066
1956
|
instruction: |
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
1.
|
|
2070
|
-
2.
|
|
2071
|
-
3.
|
|
2072
|
-
4.
|
|
2073
|
-
- Primary responsibility
|
|
2074
|
-
- Key interfaces/APIs exposed
|
|
2075
|
-
- Dependencies on other components
|
|
2076
|
-
- Technology specifics based on tech stack choices
|
|
2077
|
-
|
|
2078
|
-
5. Create component diagrams where helpful
|
|
1957
|
+
Define testing approach for the enhancement:
|
|
1958
|
+
|
|
1959
|
+
1. Integrate with existing test suite
|
|
1960
|
+
2. Ensure existing functionality remains intact
|
|
1961
|
+
3. Plan for testing new features
|
|
1962
|
+
4. Define integration testing approach
|
|
2079
1963
|
elicit: true
|
|
2080
1964
|
sections:
|
|
2081
|
-
- id:
|
|
2082
|
-
|
|
2083
|
-
title: "{{component_name}}"
|
|
1965
|
+
- id: existing-test-integration
|
|
1966
|
+
title: Integration with Existing Tests
|
|
2084
1967
|
template: |
|
|
2085
|
-
**
|
|
2086
|
-
|
|
2087
|
-
**
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
1968
|
+
**Existing Test Framework:** {{existing_test_framework}}
|
|
1969
|
+
**Test Organization:** {{existing_test_organization}}
|
|
1970
|
+
**Coverage Requirements:** {{existing_coverage_requirements}}
|
|
1971
|
+
- id: new-testing
|
|
1972
|
+
title: New Testing Requirements
|
|
1973
|
+
sections:
|
|
1974
|
+
- id: unit-tests
|
|
1975
|
+
title: Unit Tests for New Components
|
|
1976
|
+
template: |
|
|
1977
|
+
- **Framework:** {{test_framework}}
|
|
1978
|
+
- **Location:** {{test_location}}
|
|
1979
|
+
- **Coverage Target:** {{coverage_target}}
|
|
1980
|
+
- **Integration with Existing:** {{test_integration}}
|
|
1981
|
+
- id: integration-tests
|
|
1982
|
+
title: Integration Tests
|
|
1983
|
+
template: |
|
|
1984
|
+
- **Scope:** {{integration_test_scope}}
|
|
1985
|
+
- **Existing System Verification:** {{existing_system_verification}}
|
|
1986
|
+
- **New Feature Testing:** {{new_feature_testing}}
|
|
1987
|
+
- id: regression-tests
|
|
1988
|
+
title: Regression Testing
|
|
1989
|
+
template: |
|
|
1990
|
+
- **Existing Feature Verification:** {{regression_test_approach}}
|
|
1991
|
+
- **Automated Regression Suite:** {{automated_regression}}
|
|
1992
|
+
- **Manual Testing Requirements:** {{manual_testing_requirements}}
|
|
2103
1993
|
|
|
2104
|
-
- id:
|
|
2105
|
-
title:
|
|
2106
|
-
condition: Project requires external API integrations
|
|
1994
|
+
- id: security-integration
|
|
1995
|
+
title: Security Integration
|
|
2107
1996
|
instruction: |
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
1.
|
|
2111
|
-
2.
|
|
2112
|
-
3.
|
|
2113
|
-
4.
|
|
2114
|
-
5. Note any rate limits or usage constraints
|
|
2115
|
-
|
|
2116
|
-
If no external APIs are needed, state this explicitly and skip to next section.
|
|
1997
|
+
Ensure security consistency with existing system:
|
|
1998
|
+
|
|
1999
|
+
1. Follow existing security patterns and tools
|
|
2000
|
+
2. Ensure new features don't introduce vulnerabilities
|
|
2001
|
+
3. Maintain existing security posture
|
|
2002
|
+
4. Define security testing for new components
|
|
2117
2003
|
elicit: true
|
|
2118
|
-
repeatable: true
|
|
2119
2004
|
sections:
|
|
2120
|
-
- id:
|
|
2121
|
-
title:
|
|
2005
|
+
- id: existing-security
|
|
2006
|
+
title: Existing Security Measures
|
|
2122
2007
|
template: |
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
**
|
|
2008
|
+
**Authentication:** {{existing_auth}}
|
|
2009
|
+
**Authorization:** {{existing_authz}}
|
|
2010
|
+
**Data Protection:** {{existing_data_protection}}
|
|
2011
|
+
**Security Tools:** {{existing_security_tools}}
|
|
2012
|
+
- id: enhancement-security
|
|
2013
|
+
title: Enhancement Security Requirements
|
|
2014
|
+
template: |
|
|
2015
|
+
**New Security Measures:** {{new_security_measures}}
|
|
2016
|
+
**Integration Points:** {{security_integration_points}}
|
|
2017
|
+
**Compliance Requirements:** {{compliance_requirements}}
|
|
2018
|
+
- id: security-testing
|
|
2019
|
+
title: Security Testing
|
|
2020
|
+
template: |
|
|
2021
|
+
**Existing Security Tests:** {{existing_security_tests}}
|
|
2022
|
+
**New Security Test Requirements:** {{new_security_tests}}
|
|
2023
|
+
**Penetration Testing:** {{pentest_requirements}}
|
|
2133
2024
|
|
|
2134
|
-
- id:
|
|
2135
|
-
title:
|
|
2136
|
-
|
|
2137
|
-
|
|
2025
|
+
- id: checklist-results
|
|
2026
|
+
title: Checklist Results Report
|
|
2027
|
+
instruction: Execute the architect-checklist and populate results here, focusing on brownfield-specific validation
|
|
2028
|
+
|
|
2029
|
+
- id: next-steps
|
|
2030
|
+
title: Next Steps
|
|
2138
2031
|
instruction: |
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
1. Identify critical user journeys from PRD
|
|
2142
|
-
2. Show component interactions including external APIs
|
|
2143
|
-
3. Include both frontend and backend flows
|
|
2144
|
-
4. Include error handling paths
|
|
2145
|
-
5. Document async operations
|
|
2146
|
-
6. Create both high-level and detailed diagrams as needed
|
|
2147
|
-
|
|
2148
|
-
Focus on workflows that clarify architecture decisions or complex interactions.
|
|
2149
|
-
elicit: true
|
|
2032
|
+
After completing the brownfield architecture:
|
|
2150
2033
|
|
|
2151
|
-
|
|
2152
|
-
|
|
2034
|
+
1. Review integration points with existing system
|
|
2035
|
+
2. Begin story implementation with Dev agent
|
|
2036
|
+
3. Set up deployment pipeline integration
|
|
2037
|
+
4. Plan rollback and monitoring procedures
|
|
2038
|
+
sections:
|
|
2039
|
+
- id: story-manager-handoff
|
|
2040
|
+
title: Story Manager Handoff
|
|
2041
|
+
instruction: |
|
|
2042
|
+
Create a brief prompt for Story Manager to work with this brownfield enhancement. Include:
|
|
2043
|
+
- Reference to this architecture document
|
|
2044
|
+
- Key integration requirements validated with user
|
|
2045
|
+
- Existing system constraints based on actual project analysis
|
|
2046
|
+
- First story to implement with clear integration checkpoints
|
|
2047
|
+
- Emphasis on maintaining existing system integrity throughout implementation
|
|
2048
|
+
- id: developer-handoff
|
|
2049
|
+
title: Developer Handoff
|
|
2050
|
+
instruction: |
|
|
2051
|
+
Create a brief prompt for developers starting implementation. Include:
|
|
2052
|
+
- Reference to this architecture and existing coding standards analyzed from actual project
|
|
2053
|
+
- Integration requirements with existing codebase validated with user
|
|
2054
|
+
- Key technical decisions based on real project constraints
|
|
2055
|
+
- Existing system compatibility requirements with specific verification steps
|
|
2056
|
+
- Clear sequencing of implementation to minimize risk to existing functionality
|
|
2057
|
+
==================== END: .bmad-core/templates/brownfield-architecture-tmpl.yaml ====================
|
|
2058
|
+
|
|
2059
|
+
==================== START: .bmad-core/templates/front-end-architecture-tmpl.yaml ====================
|
|
2060
|
+
template:
|
|
2061
|
+
id: frontend-architecture-template-v2
|
|
2062
|
+
name: Frontend Architecture Document
|
|
2063
|
+
version: 2.0
|
|
2064
|
+
output:
|
|
2065
|
+
format: markdown
|
|
2066
|
+
filename: docs/ui-architecture.md
|
|
2067
|
+
title: "{{project_name}} Frontend Architecture Document"
|
|
2068
|
+
|
|
2069
|
+
workflow:
|
|
2070
|
+
mode: interactive
|
|
2071
|
+
elicitation: advanced-elicitation
|
|
2072
|
+
|
|
2073
|
+
sections:
|
|
2074
|
+
- id: template-framework-selection
|
|
2075
|
+
title: Template and Framework Selection
|
|
2153
2076
|
instruction: |
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2077
|
+
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.
|
|
2078
|
+
|
|
2079
|
+
Before proceeding with frontend architecture design, check if the project is using a frontend starter template or existing codebase:
|
|
2080
|
+
|
|
2081
|
+
1. Review the PRD, main architecture document, and brainstorming brief for mentions of:
|
|
2082
|
+
- Frontend starter templates (e.g., Create React App, Next.js, Vite, Vue CLI, Angular CLI, etc.)
|
|
2083
|
+
- UI kit or component library starters
|
|
2084
|
+
- Existing frontend projects being used as a foundation
|
|
2085
|
+
- Admin dashboard templates or other specialized starters
|
|
2086
|
+
- Design system implementations
|
|
2087
|
+
|
|
2088
|
+
2. If a frontend starter template or existing project is mentioned:
|
|
2089
|
+
- Ask the user to provide access via one of these methods:
|
|
2090
|
+
- Link to the starter template documentation
|
|
2091
|
+
- Upload/attach the project files (for small projects)
|
|
2092
|
+
- Share a link to the project repository
|
|
2093
|
+
- Analyze the starter/existing project to understand:
|
|
2094
|
+
- Pre-installed dependencies and versions
|
|
2095
|
+
- Folder structure and file organization
|
|
2096
|
+
- Built-in components and utilities
|
|
2097
|
+
- Styling approach (CSS modules, styled-components, Tailwind, etc.)
|
|
2098
|
+
- State management setup (if any)
|
|
2099
|
+
- Routing configuration
|
|
2100
|
+
- Testing setup and patterns
|
|
2101
|
+
- Build and development scripts
|
|
2102
|
+
- Use this analysis to ensure your frontend architecture aligns with the starter's patterns
|
|
2103
|
+
|
|
2104
|
+
3. If no frontend starter is mentioned but this is a new UI, ensure we know what the ui language and framework is:
|
|
2105
|
+
- Based on the framework choice, suggest appropriate starters:
|
|
2106
|
+
- React: Create React App, Next.js, Vite + React
|
|
2107
|
+
- Vue: Vue CLI, Nuxt.js, Vite + Vue
|
|
2108
|
+
- Angular: Angular CLI
|
|
2109
|
+
- Or suggest popular UI templates if applicable
|
|
2110
|
+
- Explain benefits specific to frontend development
|
|
2111
|
+
|
|
2112
|
+
4. If the user confirms no starter template will be used:
|
|
2113
|
+
- Note that all tooling, bundling, and configuration will need manual setup
|
|
2114
|
+
- Proceed with frontend architecture from scratch
|
|
2115
|
+
|
|
2116
|
+
Document the starter template decision and any constraints it imposes before proceeding.
|
|
2117
|
+
sections:
|
|
2118
|
+
- id: changelog
|
|
2119
|
+
title: Change Log
|
|
2120
|
+
type: table
|
|
2121
|
+
columns: [Date, Version, Description, Author]
|
|
2122
|
+
instruction: Track document versions and changes
|
|
2123
|
+
|
|
2124
|
+
- id: frontend-tech-stack
|
|
2125
|
+
title: Frontend Tech Stack
|
|
2126
|
+
instruction: Extract from main architecture's Technology Stack Table. This section MUST remain synchronized with the main architecture document.
|
|
2163
2127
|
elicit: true
|
|
2128
|
+
sections:
|
|
2129
|
+
- id: tech-stack-table
|
|
2130
|
+
title: Technology Stack Table
|
|
2131
|
+
type: table
|
|
2132
|
+
columns: [Category, Technology, Version, Purpose, Rationale]
|
|
2133
|
+
instruction: Fill in appropriate technology choices based on the selected framework and project requirements.
|
|
2134
|
+
rows:
|
|
2135
|
+
- ["Framework", "{{framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2136
|
+
- ["UI Library", "{{ui_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2137
|
+
- [
|
|
2138
|
+
"State Management",
|
|
2139
|
+
"{{state_management}}",
|
|
2140
|
+
"{{version}}",
|
|
2141
|
+
"{{purpose}}",
|
|
2142
|
+
"{{why_chosen}}",
|
|
2143
|
+
]
|
|
2144
|
+
- ["Routing", "{{routing_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2145
|
+
- ["Build Tool", "{{build_tool}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2146
|
+
- ["Styling", "{{styling_solution}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2147
|
+
- ["Testing", "{{test_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2148
|
+
- [
|
|
2149
|
+
"Component Library",
|
|
2150
|
+
"{{component_lib}}",
|
|
2151
|
+
"{{version}}",
|
|
2152
|
+
"{{purpose}}",
|
|
2153
|
+
"{{why_chosen}}",
|
|
2154
|
+
]
|
|
2155
|
+
- ["Form Handling", "{{form_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2156
|
+
- ["Animation", "{{animation_lib}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2157
|
+
- ["Dev Tools", "{{dev_tools}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2164
2158
|
|
|
2165
|
-
- id:
|
|
2166
|
-
title:
|
|
2167
|
-
instruction: Define
|
|
2159
|
+
- id: project-structure
|
|
2160
|
+
title: Project Structure
|
|
2161
|
+
instruction: Define exact directory structure for AI tools based on the chosen framework. Be specific about where each type of file goes. Generate a structure that follows the framework's best practices and conventions.
|
|
2162
|
+
elicit: true
|
|
2163
|
+
type: code
|
|
2164
|
+
language: plaintext
|
|
2165
|
+
|
|
2166
|
+
- id: component-standards
|
|
2167
|
+
title: Component Standards
|
|
2168
|
+
instruction: Define exact patterns for component creation based on the chosen framework.
|
|
2168
2169
|
elicit: true
|
|
2169
2170
|
sections:
|
|
2170
|
-
- id: component-
|
|
2171
|
-
title: Component
|
|
2172
|
-
instruction:
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
template: "{{component_structure}}"
|
|
2179
|
-
- id: component-template
|
|
2180
|
-
title: Component Template
|
|
2181
|
-
type: code
|
|
2182
|
-
language: typescript
|
|
2183
|
-
template: "{{component_template}}"
|
|
2184
|
-
- id: state-management
|
|
2185
|
-
title: State Management Architecture
|
|
2186
|
-
instruction: Detail state management approach based on chosen solution.
|
|
2187
|
-
sections:
|
|
2188
|
-
- id: state-structure
|
|
2189
|
-
title: State Structure
|
|
2190
|
-
type: code
|
|
2191
|
-
language: typescript
|
|
2192
|
-
template: "{{state_structure}}"
|
|
2193
|
-
- id: state-patterns
|
|
2194
|
-
title: State Management Patterns
|
|
2195
|
-
type: bullet-list
|
|
2196
|
-
template: "- {{pattern}}"
|
|
2197
|
-
- id: routing-architecture
|
|
2198
|
-
title: Routing Architecture
|
|
2199
|
-
instruction: Define routing structure based on framework choice.
|
|
2200
|
-
sections:
|
|
2201
|
-
- id: route-organization
|
|
2202
|
-
title: Route Organization
|
|
2203
|
-
type: code
|
|
2204
|
-
language: text
|
|
2205
|
-
template: "{{route_structure}}"
|
|
2206
|
-
- id: protected-routes
|
|
2207
|
-
title: Protected Route Pattern
|
|
2208
|
-
type: code
|
|
2209
|
-
language: typescript
|
|
2210
|
-
template: "{{protected_route_example}}"
|
|
2211
|
-
- id: frontend-services
|
|
2212
|
-
title: Frontend Services Layer
|
|
2213
|
-
instruction: Define how frontend communicates with backend.
|
|
2214
|
-
sections:
|
|
2215
|
-
- id: api-client-setup
|
|
2216
|
-
title: API Client Setup
|
|
2217
|
-
type: code
|
|
2218
|
-
language: typescript
|
|
2219
|
-
template: "{{api_client_setup}}"
|
|
2220
|
-
- id: service-example
|
|
2221
|
-
title: Service Example
|
|
2222
|
-
type: code
|
|
2223
|
-
language: typescript
|
|
2224
|
-
template: "{{service_example}}"
|
|
2171
|
+
- id: component-template
|
|
2172
|
+
title: Component Template
|
|
2173
|
+
instruction: Generate a minimal but complete component template following the framework's best practices. Include TypeScript types, proper imports, and basic structure.
|
|
2174
|
+
type: code
|
|
2175
|
+
language: typescript
|
|
2176
|
+
- id: naming-conventions
|
|
2177
|
+
title: Naming Conventions
|
|
2178
|
+
instruction: Provide naming conventions specific to the chosen framework for components, files, services, state management, and other architectural elements.
|
|
2225
2179
|
|
|
2226
|
-
- id:
|
|
2227
|
-
title:
|
|
2228
|
-
instruction: Define
|
|
2180
|
+
- id: state-management
|
|
2181
|
+
title: State Management
|
|
2182
|
+
instruction: Define state management patterns based on the chosen framework.
|
|
2229
2183
|
elicit: true
|
|
2230
2184
|
sections:
|
|
2231
|
-
- id:
|
|
2232
|
-
title:
|
|
2233
|
-
instruction:
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
language: text
|
|
2242
|
-
template: "{{function_structure}}"
|
|
2243
|
-
- id: function-template
|
|
2244
|
-
title: Function Template
|
|
2245
|
-
type: code
|
|
2246
|
-
language: typescript
|
|
2247
|
-
template: "{{function_template}}"
|
|
2248
|
-
- id: traditional-server
|
|
2249
|
-
condition: Traditional server architecture chosen
|
|
2250
|
-
sections:
|
|
2251
|
-
- id: controller-organization
|
|
2252
|
-
title: Controller/Route Organization
|
|
2253
|
-
type: code
|
|
2254
|
-
language: text
|
|
2255
|
-
template: "{{controller_structure}}"
|
|
2256
|
-
- id: controller-template
|
|
2257
|
-
title: Controller Template
|
|
2258
|
-
type: code
|
|
2259
|
-
language: typescript
|
|
2260
|
-
template: "{{controller_template}}"
|
|
2261
|
-
- id: database-architecture
|
|
2262
|
-
title: Database Architecture
|
|
2263
|
-
instruction: Define database schema and access patterns.
|
|
2264
|
-
sections:
|
|
2265
|
-
- id: schema-design
|
|
2266
|
-
title: Schema Design
|
|
2267
|
-
type: code
|
|
2268
|
-
language: sql
|
|
2269
|
-
template: "{{database_schema}}"
|
|
2270
|
-
- id: data-access-layer
|
|
2271
|
-
title: Data Access Layer
|
|
2272
|
-
type: code
|
|
2273
|
-
language: typescript
|
|
2274
|
-
template: "{{repository_pattern}}"
|
|
2275
|
-
- id: auth-architecture
|
|
2276
|
-
title: Authentication and Authorization
|
|
2277
|
-
instruction: Define auth implementation details.
|
|
2278
|
-
sections:
|
|
2279
|
-
- id: auth-flow
|
|
2280
|
-
title: Auth Flow
|
|
2281
|
-
type: mermaid
|
|
2282
|
-
mermaid_type: sequence
|
|
2283
|
-
template: "{{auth_flow_diagram}}"
|
|
2284
|
-
- id: auth-middleware
|
|
2285
|
-
title: Middleware/Guards
|
|
2286
|
-
type: code
|
|
2287
|
-
language: typescript
|
|
2288
|
-
template: "{{auth_middleware}}"
|
|
2185
|
+
- id: store-structure
|
|
2186
|
+
title: Store Structure
|
|
2187
|
+
instruction: Generate the state management directory structure appropriate for the chosen framework and selected state management solution.
|
|
2188
|
+
type: code
|
|
2189
|
+
language: plaintext
|
|
2190
|
+
- id: state-template
|
|
2191
|
+
title: State Management Template
|
|
2192
|
+
instruction: Provide a basic state management template/example following the framework's recommended patterns. Include TypeScript types and common operations like setting, updating, and clearing state.
|
|
2193
|
+
type: code
|
|
2194
|
+
language: typescript
|
|
2289
2195
|
|
|
2290
|
-
- id:
|
|
2291
|
-
title:
|
|
2292
|
-
instruction:
|
|
2196
|
+
- id: api-integration
|
|
2197
|
+
title: API Integration
|
|
2198
|
+
instruction: Define API service patterns based on the chosen framework.
|
|
2293
2199
|
elicit: true
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
│ │ ├── src/
|
|
2306
|
-
│ │ │ ├── components/ # UI components
|
|
2307
|
-
│ │ │ ├── pages/ # Page components/routes
|
|
2308
|
-
│ │ │ ├── hooks/ # Custom React hooks
|
|
2309
|
-
│ │ │ ├── services/ # API client services
|
|
2310
|
-
│ │ │ ├── stores/ # State management
|
|
2311
|
-
│ │ │ ├── styles/ # Global styles/themes
|
|
2312
|
-
│ │ │ └── utils/ # Frontend utilities
|
|
2313
|
-
│ │ ├── public/ # Static assets
|
|
2314
|
-
│ │ ├── tests/ # Frontend tests
|
|
2315
|
-
│ │ └── package.json
|
|
2316
|
-
│ └── api/ # Backend application
|
|
2317
|
-
│ ├── src/
|
|
2318
|
-
│ │ ├── routes/ # API routes/controllers
|
|
2319
|
-
│ │ ├── services/ # Business logic
|
|
2320
|
-
│ │ ├── models/ # Data models
|
|
2321
|
-
│ │ ├── middleware/ # Express/API middleware
|
|
2322
|
-
│ │ ├── utils/ # Backend utilities
|
|
2323
|
-
│ │ └── {{serverless_or_server_entry}}
|
|
2324
|
-
│ ├── tests/ # Backend tests
|
|
2325
|
-
│ └── package.json
|
|
2326
|
-
├── packages/ # Shared packages
|
|
2327
|
-
│ ├── shared/ # Shared types/utilities
|
|
2328
|
-
│ │ ├── src/
|
|
2329
|
-
│ │ │ ├── types/ # TypeScript interfaces
|
|
2330
|
-
│ │ │ ├── constants/ # Shared constants
|
|
2331
|
-
│ │ │ └── utils/ # Shared utilities
|
|
2332
|
-
│ │ └── package.json
|
|
2333
|
-
│ ├── ui/ # Shared UI components
|
|
2334
|
-
│ │ ├── src/
|
|
2335
|
-
│ │ └── package.json
|
|
2336
|
-
│ └── config/ # Shared configuration
|
|
2337
|
-
│ ├── eslint/
|
|
2338
|
-
│ ├── typescript/
|
|
2339
|
-
│ └── jest/
|
|
2340
|
-
├── infrastructure/ # IaC definitions
|
|
2341
|
-
│ └── {{iac_structure}}
|
|
2342
|
-
├── scripts/ # Build/deploy scripts
|
|
2343
|
-
├── docs/ # Documentation
|
|
2344
|
-
│ ├── prd.md
|
|
2345
|
-
│ ├── front-end-spec.md
|
|
2346
|
-
│ └── fullstack-architecture.md
|
|
2347
|
-
├── .env.example # Environment template
|
|
2348
|
-
├── package.json # Root package.json
|
|
2349
|
-
├── {{monorepo_config}} # Monorepo configuration
|
|
2350
|
-
└── README.md
|
|
2200
|
+
sections:
|
|
2201
|
+
- id: service-template
|
|
2202
|
+
title: Service Template
|
|
2203
|
+
instruction: Provide an API service template that follows the framework's conventions. Include proper TypeScript types, error handling, and async patterns.
|
|
2204
|
+
type: code
|
|
2205
|
+
language: typescript
|
|
2206
|
+
- id: api-client-config
|
|
2207
|
+
title: API Client Configuration
|
|
2208
|
+
instruction: Show how to configure the HTTP client for the chosen framework, including authentication interceptors/middleware and error handling.
|
|
2209
|
+
type: code
|
|
2210
|
+
language: typescript
|
|
2351
2211
|
|
|
2352
|
-
- id:
|
|
2353
|
-
title:
|
|
2354
|
-
instruction: Define
|
|
2212
|
+
- id: routing
|
|
2213
|
+
title: Routing
|
|
2214
|
+
instruction: Define routing structure and patterns based on the chosen framework.
|
|
2355
2215
|
elicit: true
|
|
2356
2216
|
sections:
|
|
2357
|
-
- id:
|
|
2358
|
-
title:
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
type: code
|
|
2363
|
-
language: bash
|
|
2364
|
-
template: "{{prerequisites_commands}}"
|
|
2365
|
-
- id: initial-setup
|
|
2366
|
-
title: Initial Setup
|
|
2367
|
-
type: code
|
|
2368
|
-
language: bash
|
|
2369
|
-
template: "{{setup_commands}}"
|
|
2370
|
-
- id: dev-commands
|
|
2371
|
-
title: Development Commands
|
|
2372
|
-
type: code
|
|
2373
|
-
language: bash
|
|
2374
|
-
template: |
|
|
2375
|
-
# Start all services
|
|
2376
|
-
{{start_all_command}}
|
|
2377
|
-
|
|
2378
|
-
# Start frontend only
|
|
2379
|
-
{{start_frontend_command}}
|
|
2380
|
-
|
|
2381
|
-
# Start backend only
|
|
2382
|
-
{{start_backend_command}}
|
|
2383
|
-
|
|
2384
|
-
# Run tests
|
|
2385
|
-
{{test_commands}}
|
|
2386
|
-
- id: environment-config
|
|
2387
|
-
title: Environment Configuration
|
|
2388
|
-
sections:
|
|
2389
|
-
- id: env-vars
|
|
2390
|
-
title: Required Environment Variables
|
|
2391
|
-
type: code
|
|
2392
|
-
language: bash
|
|
2393
|
-
template: |
|
|
2394
|
-
# Frontend (.env.local)
|
|
2395
|
-
{{frontend_env_vars}}
|
|
2396
|
-
|
|
2397
|
-
# Backend (.env)
|
|
2398
|
-
{{backend_env_vars}}
|
|
2399
|
-
|
|
2400
|
-
# Shared
|
|
2401
|
-
{{shared_env_vars}}
|
|
2217
|
+
- id: route-configuration
|
|
2218
|
+
title: Route Configuration
|
|
2219
|
+
instruction: Provide routing configuration appropriate for the chosen framework. Include protected route patterns, lazy loading where applicable, and authentication guards/middleware.
|
|
2220
|
+
type: code
|
|
2221
|
+
language: typescript
|
|
2402
2222
|
|
|
2403
|
-
- id:
|
|
2404
|
-
title:
|
|
2405
|
-
instruction: Define
|
|
2223
|
+
- id: styling-guidelines
|
|
2224
|
+
title: Styling Guidelines
|
|
2225
|
+
instruction: Define styling approach based on the chosen framework.
|
|
2406
2226
|
elicit: true
|
|
2407
2227
|
sections:
|
|
2408
|
-
- id:
|
|
2409
|
-
title:
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
- **Output Directory:** {{frontend_output_dir}}
|
|
2415
|
-
- **CDN/Edge:** {{cdn_strategy}}
|
|
2416
|
-
|
|
2417
|
-
**Backend Deployment:**
|
|
2418
|
-
- **Platform:** {{backend_deploy_platform}}
|
|
2419
|
-
- **Build Command:** {{backend_build_command}}
|
|
2420
|
-
- **Deployment Method:** {{deployment_method}}
|
|
2421
|
-
- id: cicd-pipeline
|
|
2422
|
-
title: CI/CD Pipeline
|
|
2228
|
+
- id: styling-approach
|
|
2229
|
+
title: Styling Approach
|
|
2230
|
+
instruction: Describe the styling methodology appropriate for the chosen framework (CSS Modules, Styled Components, Tailwind, etc.) and provide basic patterns.
|
|
2231
|
+
- id: global-theme
|
|
2232
|
+
title: Global Theme Variables
|
|
2233
|
+
instruction: Provide a CSS custom properties (CSS variables) theme system that works across all frameworks. Include colors, spacing, typography, shadows, and dark mode support.
|
|
2423
2234
|
type: code
|
|
2424
|
-
language:
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2235
|
+
language: css
|
|
2236
|
+
|
|
2237
|
+
- id: testing-requirements
|
|
2238
|
+
title: Testing Requirements
|
|
2239
|
+
instruction: Define minimal testing requirements based on the chosen framework.
|
|
2240
|
+
elicit: true
|
|
2241
|
+
sections:
|
|
2242
|
+
- id: component-test-template
|
|
2243
|
+
title: Component Test Template
|
|
2244
|
+
instruction: Provide a basic component test template using the framework's recommended testing library. Include examples of rendering tests, user interaction tests, and mocking.
|
|
2245
|
+
type: code
|
|
2246
|
+
language: typescript
|
|
2247
|
+
- id: testing-best-practices
|
|
2248
|
+
title: Testing Best Practices
|
|
2249
|
+
type: numbered-list
|
|
2250
|
+
items:
|
|
2251
|
+
- "**Unit Tests**: Test individual components in isolation"
|
|
2252
|
+
- "**Integration Tests**: Test component interactions"
|
|
2253
|
+
- "**E2E Tests**: Test critical user flows (using Cypress/Playwright)"
|
|
2254
|
+
- "**Coverage Goals**: Aim for 80% code coverage"
|
|
2255
|
+
- "**Test Structure**: Arrange-Act-Assert pattern"
|
|
2256
|
+
- "**Mock External Dependencies**: API calls, routing, state management"
|
|
2257
|
+
|
|
2258
|
+
- id: environment-configuration
|
|
2259
|
+
title: Environment Configuration
|
|
2260
|
+
instruction: List required environment variables based on the chosen framework. Show the appropriate format and naming conventions for the framework.
|
|
2261
|
+
elicit: true
|
|
2262
|
+
|
|
2263
|
+
- id: frontend-developer-standards
|
|
2264
|
+
title: Frontend Developer Standards
|
|
2265
|
+
sections:
|
|
2266
|
+
- id: critical-coding-rules
|
|
2267
|
+
title: Critical Coding Rules
|
|
2268
|
+
instruction: List essential rules that prevent common AI mistakes, including both universal rules and framework-specific ones.
|
|
2269
|
+
elicit: true
|
|
2270
|
+
- id: quick-reference
|
|
2271
|
+
title: Quick Reference
|
|
2272
|
+
instruction: |
|
|
2273
|
+
Create a framework-specific cheat sheet with:
|
|
2274
|
+
- Common commands (dev server, build, test)
|
|
2275
|
+
- Key import patterns
|
|
2276
|
+
- File naming conventions
|
|
2277
|
+
- Project-specific patterns and utilities
|
|
2278
|
+
==================== END: .bmad-core/templates/front-end-architecture-tmpl.yaml ====================
|
|
2279
|
+
|
|
2280
|
+
==================== START: .bmad-core/templates/fullstack-architecture-tmpl.yaml ====================
|
|
2281
|
+
template:
|
|
2282
|
+
id: fullstack-architecture-template-v2
|
|
2283
|
+
name: Fullstack Architecture Document
|
|
2284
|
+
version: 2.0
|
|
2285
|
+
output:
|
|
2286
|
+
format: markdown
|
|
2287
|
+
filename: docs/architecture.md
|
|
2288
|
+
title: "{{project_name}} Fullstack Architecture Document"
|
|
2289
|
+
|
|
2290
|
+
workflow:
|
|
2291
|
+
mode: interactive
|
|
2292
|
+
elicitation: advanced-elicitation
|
|
2293
|
+
|
|
2294
|
+
sections:
|
|
2295
|
+
- id: introduction
|
|
2296
|
+
title: Introduction
|
|
2297
|
+
instruction: |
|
|
2298
|
+
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.
|
|
2299
|
+
elicit: true
|
|
2300
|
+
content: |
|
|
2301
|
+
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.
|
|
2302
|
+
|
|
2303
|
+
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.
|
|
2304
|
+
sections:
|
|
2305
|
+
- id: starter-template
|
|
2306
|
+
title: Starter Template or Existing Project
|
|
2307
|
+
instruction: |
|
|
2308
|
+
Before proceeding with architecture design, check if the project is based on any starter templates or existing codebases:
|
|
2309
|
+
|
|
2310
|
+
1. Review the PRD and other documents for mentions of:
|
|
2311
|
+
- Fullstack starter templates (e.g., T3 Stack, MEAN/MERN starters, Django + React templates)
|
|
2312
|
+
- Monorepo templates (e.g., Nx, Turborepo starters)
|
|
2313
|
+
- Platform-specific starters (e.g., Vercel templates, AWS Amplify starters)
|
|
2314
|
+
- Existing projects being extended or cloned
|
|
2315
|
+
|
|
2316
|
+
2. If starter templates or existing projects are mentioned:
|
|
2317
|
+
- Ask the user to provide access (links, repos, or files)
|
|
2318
|
+
- Analyze to understand pre-configured choices and constraints
|
|
2319
|
+
- Note any architectural decisions already made
|
|
2320
|
+
- Identify what can be modified vs what must be retained
|
|
2321
|
+
|
|
2322
|
+
3. If no starter is mentioned but this is greenfield:
|
|
2323
|
+
- Suggest appropriate fullstack starters based on tech preferences
|
|
2324
|
+
- Consider platform-specific options (Vercel, AWS, etc.)
|
|
2325
|
+
- Let user decide whether to use one
|
|
2326
|
+
|
|
2327
|
+
4. Document the decision and any constraints it imposes
|
|
2328
|
+
|
|
2329
|
+
If none, state "N/A - Greenfield project"
|
|
2330
|
+
- id: changelog
|
|
2331
|
+
title: Change Log
|
|
2428
2332
|
type: table
|
|
2429
|
-
columns: [
|
|
2430
|
-
|
|
2431
|
-
- ["Development", "{{dev_fe_url}}", "{{dev_be_url}}", "Local development"]
|
|
2432
|
-
- ["Staging", "{{staging_fe_url}}", "{{staging_be_url}}", "Pre-production testing"]
|
|
2433
|
-
- ["Production", "{{prod_fe_url}}", "{{prod_be_url}}", "Live environment"]
|
|
2333
|
+
columns: [Date, Version, Description, Author]
|
|
2334
|
+
instruction: Track document versions and changes
|
|
2434
2335
|
|
|
2435
|
-
- id:
|
|
2436
|
-
title:
|
|
2437
|
-
instruction:
|
|
2336
|
+
- id: high-level-architecture
|
|
2337
|
+
title: High Level Architecture
|
|
2338
|
+
instruction: This section contains multiple subsections that establish the foundation. Present all subsections together, then elicit feedback on the complete section.
|
|
2438
2339
|
elicit: true
|
|
2439
2340
|
sections:
|
|
2440
|
-
- id:
|
|
2441
|
-
title:
|
|
2341
|
+
- id: technical-summary
|
|
2342
|
+
title: Technical Summary
|
|
2343
|
+
instruction: |
|
|
2344
|
+
Provide a comprehensive overview (4-6 sentences) covering:
|
|
2345
|
+
- Overall architectural style and deployment approach
|
|
2346
|
+
- Frontend framework and backend technology choices
|
|
2347
|
+
- Key integration points between frontend and backend
|
|
2348
|
+
- Infrastructure platform and services
|
|
2349
|
+
- How this architecture achieves PRD goals
|
|
2350
|
+
- id: platform-infrastructure
|
|
2351
|
+
title: Platform and Infrastructure Choice
|
|
2352
|
+
instruction: |
|
|
2353
|
+
Based on PRD requirements and technical assumptions, make a platform recommendation:
|
|
2354
|
+
|
|
2355
|
+
1. Consider common patterns (not an exhaustive list, use your own best judgement and search the web as needed for emerging trends):
|
|
2356
|
+
- **Vercel + Supabase**: For rapid development with Next.js, built-in auth/storage
|
|
2357
|
+
- **AWS Full Stack**: For enterprise scale with Lambda, API Gateway, S3, Cognito
|
|
2358
|
+
- **Azure**: For .NET ecosystems or enterprise Microsoft environments
|
|
2359
|
+
- **Google Cloud**: For ML/AI heavy applications or Google ecosystem integration
|
|
2360
|
+
|
|
2361
|
+
2. Present 2-3 viable options with clear pros/cons
|
|
2362
|
+
3. Make a recommendation with rationale
|
|
2363
|
+
4. Get explicit user confirmation
|
|
2364
|
+
|
|
2365
|
+
Document the choice and key services that will be used.
|
|
2442
2366
|
template: |
|
|
2443
|
-
**
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
- Session Management: {{session_approach}}
|
|
2456
|
-
- Password Policy: {{password_requirements}}
|
|
2457
|
-
- id: performance-optimization
|
|
2458
|
-
title: Performance Optimization
|
|
2367
|
+
**Platform:** {{selected_platform}}
|
|
2368
|
+
**Key Services:** {{core_services_list}}
|
|
2369
|
+
**Deployment Host and Regions:** {{regions}}
|
|
2370
|
+
- id: repository-structure
|
|
2371
|
+
title: Repository Structure
|
|
2372
|
+
instruction: |
|
|
2373
|
+
Define the repository approach based on PRD requirements and platform choice, explain your rationale or ask questions to the user if unsure:
|
|
2374
|
+
|
|
2375
|
+
1. For modern fullstack apps, monorepo is often preferred
|
|
2376
|
+
2. Consider tooling (Nx, Turborepo, Lerna, npm workspaces)
|
|
2377
|
+
3. Define package/app boundaries
|
|
2378
|
+
4. Plan for shared code between frontend and backend
|
|
2459
2379
|
template: |
|
|
2460
|
-
**
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2380
|
+
**Structure:** {{repo_structure_choice}}
|
|
2381
|
+
**Monorepo Tool:** {{monorepo_tool_if_applicable}}
|
|
2382
|
+
**Package Organization:** {{package_strategy}}
|
|
2383
|
+
- id: architecture-diagram
|
|
2384
|
+
title: High Level Architecture Diagram
|
|
2385
|
+
type: mermaid
|
|
2386
|
+
mermaid_type: graph
|
|
2387
|
+
instruction: |
|
|
2388
|
+
Create a Mermaid diagram showing the complete system architecture including:
|
|
2389
|
+
- User entry points (web, mobile)
|
|
2390
|
+
- Frontend application deployment
|
|
2391
|
+
- API layer (REST/GraphQL)
|
|
2392
|
+
- Backend services
|
|
2393
|
+
- Databases and storage
|
|
2394
|
+
- External integrations
|
|
2395
|
+
- CDN and caching layers
|
|
2396
|
+
|
|
2397
|
+
Use appropriate diagram type for clarity.
|
|
2398
|
+
- id: architectural-patterns
|
|
2399
|
+
title: Architectural Patterns
|
|
2400
|
+
instruction: |
|
|
2401
|
+
List patterns that will guide both frontend and backend development. Include patterns for:
|
|
2402
|
+
- Overall architecture (e.g., Jamstack, Serverless, Microservices)
|
|
2403
|
+
- Frontend patterns (e.g., Component-based, State management)
|
|
2404
|
+
- Backend patterns (e.g., Repository, CQRS, Event-driven)
|
|
2405
|
+
- Integration patterns (e.g., BFF, API Gateway)
|
|
2406
|
+
|
|
2407
|
+
For each pattern, provide recommendation and rationale.
|
|
2408
|
+
repeatable: true
|
|
2409
|
+
template: "- **{{pattern_name}}:** {{pattern_description}} - _Rationale:_ {{rationale}}"
|
|
2410
|
+
examples:
|
|
2411
|
+
- "**Jamstack Architecture:** Static site generation with serverless APIs - _Rationale:_ Optimal performance and scalability for content-heavy applications"
|
|
2412
|
+
- "**Component-Based UI:** Reusable React components with TypeScript - _Rationale:_ Maintainability and type safety across large codebases"
|
|
2413
|
+
- "**Repository Pattern:** Abstract data access logic - _Rationale:_ Enables testing and future database migration flexibility"
|
|
2414
|
+
- "**API Gateway Pattern:** Single entry point for all API calls - _Rationale:_ Centralized auth, rate limiting, and monitoring"
|
|
2415
|
+
|
|
2416
|
+
- id: tech-stack
|
|
2417
|
+
title: Tech Stack
|
|
2418
|
+
instruction: |
|
|
2419
|
+
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.
|
|
2420
|
+
|
|
2421
|
+
Key areas to cover:
|
|
2422
|
+
- Frontend and backend languages/frameworks
|
|
2423
|
+
- Databases and caching
|
|
2424
|
+
- Authentication and authorization
|
|
2425
|
+
- API approach
|
|
2426
|
+
- Testing tools for both frontend and backend
|
|
2427
|
+
- Build and deployment tools
|
|
2428
|
+
- Monitoring and logging
|
|
2429
|
+
|
|
2430
|
+
Upon render, elicit feedback immediately.
|
|
2431
|
+
elicit: true
|
|
2432
|
+
sections:
|
|
2433
|
+
- id: tech-stack-table
|
|
2434
|
+
title: Technology Stack Table
|
|
2435
|
+
type: table
|
|
2436
|
+
columns: [Category, Technology, Version, Purpose, Rationale]
|
|
2437
|
+
rows:
|
|
2438
|
+
- ["Frontend Language", "{{fe_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2439
|
+
- [
|
|
2440
|
+
"Frontend Framework",
|
|
2441
|
+
"{{fe_framework}}",
|
|
2442
|
+
"{{version}}",
|
|
2443
|
+
"{{purpose}}",
|
|
2444
|
+
"{{why_chosen}}",
|
|
2445
|
+
]
|
|
2446
|
+
- [
|
|
2447
|
+
"UI Component Library",
|
|
2448
|
+
"{{ui_library}}",
|
|
2449
|
+
"{{version}}",
|
|
2450
|
+
"{{purpose}}",
|
|
2451
|
+
"{{why_chosen}}",
|
|
2452
|
+
]
|
|
2453
|
+
- ["State Management", "{{state_mgmt}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2454
|
+
- ["Backend Language", "{{be_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2455
|
+
- [
|
|
2456
|
+
"Backend Framework",
|
|
2457
|
+
"{{be_framework}}",
|
|
2458
|
+
"{{version}}",
|
|
2459
|
+
"{{purpose}}",
|
|
2460
|
+
"{{why_chosen}}",
|
|
2461
|
+
]
|
|
2462
|
+
- ["API Style", "{{api_style}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2463
|
+
- ["Database", "{{database}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2464
|
+
- ["Cache", "{{cache}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2465
|
+
- ["File Storage", "{{storage}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2466
|
+
- ["Authentication", "{{auth}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2467
|
+
- ["Frontend Testing", "{{fe_test}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2468
|
+
- ["Backend Testing", "{{be_test}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2469
|
+
- ["E2E Testing", "{{e2e_test}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2470
|
+
- ["Build Tool", "{{build_tool}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2471
|
+
- ["Bundler", "{{bundler}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2472
|
+
- ["IaC Tool", "{{iac_tool}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2473
|
+
- ["CI/CD", "{{cicd}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2474
|
+
- ["Monitoring", "{{monitoring}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2475
|
+
- ["Logging", "{{logging}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2476
|
+
- ["CSS Framework", "{{css_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
2469
2477
|
|
|
2470
|
-
- id:
|
|
2471
|
-
title:
|
|
2472
|
-
instruction:
|
|
2478
|
+
- id: data-models
|
|
2479
|
+
title: Data Models
|
|
2480
|
+
instruction: |
|
|
2481
|
+
Define the core data models/entities that will be shared between frontend and backend:
|
|
2482
|
+
|
|
2483
|
+
1. Review PRD requirements and identify key business entities
|
|
2484
|
+
2. For each model, explain its purpose and relationships
|
|
2485
|
+
3. Include key attributes and data types
|
|
2486
|
+
4. Show relationships between models
|
|
2487
|
+
5. Create TypeScript interfaces that can be shared
|
|
2488
|
+
6. Discuss design decisions with user
|
|
2489
|
+
|
|
2490
|
+
Create a clear conceptual model before moving to database schema.
|
|
2473
2491
|
elicit: true
|
|
2492
|
+
repeatable: true
|
|
2474
2493
|
sections:
|
|
2475
|
-
- id:
|
|
2476
|
-
title:
|
|
2477
|
-
type: code
|
|
2478
|
-
language: text
|
|
2494
|
+
- id: model
|
|
2495
|
+
title: "{{model_name}}"
|
|
2479
2496
|
template: |
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
- id: test-organization
|
|
2486
|
-
title: Test Organization
|
|
2487
|
-
sections:
|
|
2488
|
-
- id: frontend-tests
|
|
2489
|
-
title: Frontend Tests
|
|
2490
|
-
type: code
|
|
2491
|
-
language: text
|
|
2492
|
-
template: "{{frontend_test_structure}}"
|
|
2493
|
-
- id: backend-tests
|
|
2494
|
-
title: Backend Tests
|
|
2495
|
-
type: code
|
|
2496
|
-
language: text
|
|
2497
|
-
template: "{{backend_test_structure}}"
|
|
2498
|
-
- id: e2e-tests
|
|
2499
|
-
title: E2E Tests
|
|
2500
|
-
type: code
|
|
2501
|
-
language: text
|
|
2502
|
-
template: "{{e2e_test_structure}}"
|
|
2503
|
-
- id: test-examples
|
|
2504
|
-
title: Test Examples
|
|
2497
|
+
**Purpose:** {{model_purpose}}
|
|
2498
|
+
|
|
2499
|
+
**Key Attributes:**
|
|
2500
|
+
- {{attribute_1}}: {{type_1}} - {{description_1}}
|
|
2501
|
+
- {{attribute_2}}: {{type_2}} - {{description_2}}
|
|
2505
2502
|
sections:
|
|
2506
|
-
- id:
|
|
2507
|
-
title:
|
|
2508
|
-
type: code
|
|
2509
|
-
language: typescript
|
|
2510
|
-
template: "{{frontend_test_example}}"
|
|
2511
|
-
- id: backend-test
|
|
2512
|
-
title: Backend API Test
|
|
2513
|
-
type: code
|
|
2514
|
-
language: typescript
|
|
2515
|
-
template: "{{backend_test_example}}"
|
|
2516
|
-
- id: e2e-test
|
|
2517
|
-
title: E2E Test
|
|
2503
|
+
- id: typescript-interface
|
|
2504
|
+
title: TypeScript Interface
|
|
2518
2505
|
type: code
|
|
2519
2506
|
language: typescript
|
|
2520
|
-
template: "{{
|
|
2507
|
+
template: "{{model_interface}}"
|
|
2508
|
+
- id: relationships
|
|
2509
|
+
title: Relationships
|
|
2510
|
+
type: bullet-list
|
|
2511
|
+
template: "- {{relationship}}"
|
|
2521
2512
|
|
|
2522
|
-
- id:
|
|
2523
|
-
title:
|
|
2524
|
-
instruction:
|
|
2525
|
-
|
|
2526
|
-
sections:
|
|
2527
|
-
- id: critical-rules
|
|
2528
|
-
title: Critical Fullstack Rules
|
|
2529
|
-
repeatable: true
|
|
2530
|
-
template: "- **{{rule_name}}:** {{rule_description}}"
|
|
2531
|
-
examples:
|
|
2532
|
-
- "**Type Sharing:** Always define types in packages/shared and import from there"
|
|
2533
|
-
- "**API Calls:** Never make direct HTTP calls - use the service layer"
|
|
2534
|
-
- "**Environment Variables:** Access only through config objects, never process.env directly"
|
|
2535
|
-
- "**Error Handling:** All API routes must use the standard error handler"
|
|
2536
|
-
- "**State Updates:** Never mutate state directly - use proper state management patterns"
|
|
2537
|
-
- id: naming-conventions
|
|
2538
|
-
title: Naming Conventions
|
|
2539
|
-
type: table
|
|
2540
|
-
columns: [Element, Frontend, Backend, Example]
|
|
2541
|
-
rows:
|
|
2542
|
-
- ["Components", "PascalCase", "-", "`UserProfile.tsx`"]
|
|
2543
|
-
- ["Hooks", "camelCase with 'use'", "-", "`useAuth.ts`"]
|
|
2544
|
-
- ["API Routes", "-", "kebab-case", "`/api/user-profile`"]
|
|
2545
|
-
- ["Database Tables", "-", "snake_case", "`user_profiles`"]
|
|
2513
|
+
- id: api-spec
|
|
2514
|
+
title: API Specification
|
|
2515
|
+
instruction: |
|
|
2516
|
+
Based on the chosen API style from Tech Stack:
|
|
2546
2517
|
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2518
|
+
1. If REST API, create an OpenAPI 3.0 specification
|
|
2519
|
+
2. If GraphQL, provide the GraphQL schema
|
|
2520
|
+
3. If tRPC, show router definitions
|
|
2521
|
+
4. Include all endpoints from epics/stories
|
|
2522
|
+
5. Define request/response schemas based on data models
|
|
2523
|
+
6. Document authentication requirements
|
|
2524
|
+
7. Include example requests/responses
|
|
2525
|
+
|
|
2526
|
+
Use appropriate format for the chosen API style. If no API (e.g., static site), skip this section.
|
|
2550
2527
|
elicit: true
|
|
2551
2528
|
sections:
|
|
2552
|
-
- id:
|
|
2553
|
-
title:
|
|
2554
|
-
|
|
2555
|
-
mermaid_type: sequence
|
|
2556
|
-
template: "{{error_flow_diagram}}"
|
|
2557
|
-
- id: error-format
|
|
2558
|
-
title: Error Response Format
|
|
2529
|
+
- id: rest-api
|
|
2530
|
+
title: REST API Specification
|
|
2531
|
+
condition: API style is REST
|
|
2559
2532
|
type: code
|
|
2560
|
-
language:
|
|
2533
|
+
language: yaml
|
|
2561
2534
|
template: |
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2535
|
+
openapi: 3.0.0
|
|
2536
|
+
info:
|
|
2537
|
+
title: {{api_title}}
|
|
2538
|
+
version: {{api_version}}
|
|
2539
|
+
description: {{api_description}}
|
|
2540
|
+
servers:
|
|
2541
|
+
- url: {{server_url}}
|
|
2542
|
+
description: {{server_description}}
|
|
2543
|
+
- id: graphql-api
|
|
2544
|
+
title: GraphQL Schema
|
|
2545
|
+
condition: API style is GraphQL
|
|
2573
2546
|
type: code
|
|
2574
|
-
language:
|
|
2575
|
-
template: "{{
|
|
2576
|
-
- id:
|
|
2577
|
-
title:
|
|
2547
|
+
language: graphql
|
|
2548
|
+
template: "{{graphql_schema}}"
|
|
2549
|
+
- id: trpc-api
|
|
2550
|
+
title: tRPC Router Definitions
|
|
2551
|
+
condition: API style is tRPC
|
|
2578
2552
|
type: code
|
|
2579
2553
|
language: typescript
|
|
2580
|
-
template: "{{
|
|
2554
|
+
template: "{{trpc_routers}}"
|
|
2581
2555
|
|
|
2582
|
-
- id:
|
|
2583
|
-
title:
|
|
2584
|
-
instruction:
|
|
2556
|
+
- id: components
|
|
2557
|
+
title: Components
|
|
2558
|
+
instruction: |
|
|
2559
|
+
Based on the architectural patterns, tech stack, and data models from above:
|
|
2560
|
+
|
|
2561
|
+
1. Identify major logical components/services across the fullstack
|
|
2562
|
+
2. Consider both frontend and backend components
|
|
2563
|
+
3. Define clear boundaries and interfaces between components
|
|
2564
|
+
4. For each component, specify:
|
|
2565
|
+
- Primary responsibility
|
|
2566
|
+
- Key interfaces/APIs exposed
|
|
2567
|
+
- Dependencies on other components
|
|
2568
|
+
- Technology specifics based on tech stack choices
|
|
2569
|
+
|
|
2570
|
+
5. Create component diagrams where helpful
|
|
2585
2571
|
elicit: true
|
|
2586
2572
|
sections:
|
|
2587
|
-
- id:
|
|
2588
|
-
|
|
2573
|
+
- id: component-list
|
|
2574
|
+
repeatable: true
|
|
2575
|
+
title: "{{component_name}}"
|
|
2589
2576
|
template: |
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2577
|
+
**Responsibility:** {{component_description}}
|
|
2578
|
+
|
|
2579
|
+
**Key Interfaces:**
|
|
2580
|
+
- {{interface_1}}
|
|
2581
|
+
- {{interface_2}}
|
|
2582
|
+
|
|
2583
|
+
**Dependencies:** {{dependencies}}
|
|
2584
|
+
|
|
2585
|
+
**Technology Stack:** {{component_tech_details}}
|
|
2586
|
+
- id: component-diagrams
|
|
2587
|
+
title: Component Diagrams
|
|
2588
|
+
type: mermaid
|
|
2589
|
+
instruction: |
|
|
2590
|
+
Create Mermaid diagrams to visualize component relationships. Options:
|
|
2591
|
+
- C4 Container diagram for high-level view
|
|
2592
|
+
- Component diagram for detailed internal structure
|
|
2593
|
+
- Sequence diagrams for complex interactions
|
|
2594
|
+
Choose the most appropriate for clarity
|
|
2595
|
+
|
|
2596
|
+
- id: external-apis
|
|
2597
|
+
title: External APIs
|
|
2598
|
+
condition: Project requires external API integrations
|
|
2599
|
+
instruction: |
|
|
2600
|
+
For each external service integration:
|
|
2601
|
+
|
|
2602
|
+
1. Identify APIs needed based on PRD requirements and component design
|
|
2603
|
+
2. If documentation URLs are unknown, ask user for specifics
|
|
2604
|
+
3. Document authentication methods and security considerations
|
|
2605
|
+
4. List specific endpoints that will be used
|
|
2606
|
+
5. Note any rate limits or usage constraints
|
|
2607
|
+
|
|
2608
|
+
If no external APIs are needed, state this explicitly and skip to next section.
|
|
2609
|
+
elicit: true
|
|
2610
|
+
repeatable: true
|
|
2611
|
+
sections:
|
|
2612
|
+
- id: api
|
|
2613
|
+
title: "{{api_name}} API"
|
|
2596
2614
|
template: |
|
|
2597
|
-
**
|
|
2598
|
-
-
|
|
2599
|
-
-
|
|
2600
|
-
-
|
|
2601
|
-
-
|
|
2602
|
-
|
|
2603
|
-
**Backend Metrics:**
|
|
2604
|
-
- Request rate
|
|
2605
|
-
- Error rate
|
|
2606
|
-
- Response time
|
|
2607
|
-
- Database query performance
|
|
2615
|
+
- **Purpose:** {{api_purpose}}
|
|
2616
|
+
- **Documentation:** {{api_docs_url}}
|
|
2617
|
+
- **Base URL(s):** {{api_base_url}}
|
|
2618
|
+
- **Authentication:** {{auth_method}}
|
|
2619
|
+
- **Rate Limits:** {{rate_limits}}
|
|
2608
2620
|
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2621
|
+
**Key Endpoints Used:**
|
|
2622
|
+
- `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
|
|
2623
|
+
|
|
2624
|
+
**Integration Notes:** {{integration_considerations}}
|
|
2625
|
+
|
|
2626
|
+
- id: core-workflows
|
|
2627
|
+
title: Core Workflows
|
|
2628
|
+
type: mermaid
|
|
2629
|
+
mermaid_type: sequence
|
|
2630
|
+
instruction: |
|
|
2631
|
+
Illustrate key system workflows using sequence diagrams:
|
|
2613
2632
|
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
format: markdown
|
|
2621
|
-
filename: docs/architecture.md
|
|
2622
|
-
title: "{{project_name}} Brownfield Enhancement Architecture"
|
|
2633
|
+
1. Identify critical user journeys from PRD
|
|
2634
|
+
2. Show component interactions including external APIs
|
|
2635
|
+
3. Include both frontend and backend flows
|
|
2636
|
+
4. Include error handling paths
|
|
2637
|
+
5. Document async operations
|
|
2638
|
+
6. Create both high-level and detailed diagrams as needed
|
|
2623
2639
|
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
elicitation: advanced-elicitation
|
|
2640
|
+
Focus on workflows that clarify architecture decisions or complex interactions.
|
|
2641
|
+
elicit: true
|
|
2627
2642
|
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
title: Introduction
|
|
2643
|
+
- id: database-schema
|
|
2644
|
+
title: Database Schema
|
|
2631
2645
|
instruction: |
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
If any required inputs are missing, request them before proceeding.
|
|
2646
|
+
Transform the conceptual data models into concrete database schemas:
|
|
2647
|
+
|
|
2648
|
+
1. Use the database type(s) selected in Tech Stack
|
|
2649
|
+
2. Create schema definitions using appropriate notation
|
|
2650
|
+
3. Include indexes, constraints, and relationships
|
|
2651
|
+
4. Consider performance and scalability
|
|
2652
|
+
5. For NoSQL, show document structures
|
|
2653
|
+
|
|
2654
|
+
Present schema in format appropriate to database type (SQL DDL, JSON schema, etc.)
|
|
2655
|
+
elicit: true
|
|
2656
|
+
|
|
2657
|
+
- id: frontend-architecture
|
|
2658
|
+
title: Frontend Architecture
|
|
2659
|
+
instruction: Define frontend-specific architecture details. After each subsection, note if user wants to refine before continuing.
|
|
2648
2660
|
elicit: true
|
|
2649
2661
|
sections:
|
|
2650
|
-
- id:
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
**Relationship to Existing Architecture:**
|
|
2655
|
-
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.
|
|
2656
|
-
- id: existing-project-analysis
|
|
2657
|
-
title: Existing Project Analysis
|
|
2658
|
-
instruction: |
|
|
2659
|
-
Analyze the existing project structure and architecture:
|
|
2660
|
-
|
|
2661
|
-
1. Review existing documentation in docs folder
|
|
2662
|
-
2. Examine current technology stack and versions
|
|
2663
|
-
3. Identify existing architectural patterns and conventions
|
|
2664
|
-
4. Note current deployment and infrastructure setup
|
|
2665
|
-
5. Document any constraints or limitations
|
|
2666
|
-
|
|
2667
|
-
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."
|
|
2668
|
-
elicit: true
|
|
2662
|
+
- id: component-architecture
|
|
2663
|
+
title: Component Architecture
|
|
2664
|
+
instruction: Define component organization and patterns based on chosen framework.
|
|
2669
2665
|
sections:
|
|
2670
|
-
- id:
|
|
2671
|
-
title:
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2666
|
+
- id: component-organization
|
|
2667
|
+
title: Component Organization
|
|
2668
|
+
type: code
|
|
2669
|
+
language: text
|
|
2670
|
+
template: "{{component_structure}}"
|
|
2671
|
+
- id: component-template
|
|
2672
|
+
title: Component Template
|
|
2673
|
+
type: code
|
|
2674
|
+
language: typescript
|
|
2675
|
+
template: "{{component_template}}"
|
|
2676
|
+
- id: state-management
|
|
2677
|
+
title: State Management Architecture
|
|
2678
|
+
instruction: Detail state management approach based on chosen solution.
|
|
2679
|
+
sections:
|
|
2680
|
+
- id: state-structure
|
|
2681
|
+
title: State Structure
|
|
2682
|
+
type: code
|
|
2683
|
+
language: typescript
|
|
2684
|
+
template: "{{state_structure}}"
|
|
2685
|
+
- id: state-patterns
|
|
2686
|
+
title: State Management Patterns
|
|
2683
2687
|
type: bullet-list
|
|
2684
|
-
template: "- {{
|
|
2685
|
-
- id:
|
|
2686
|
-
title:
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2688
|
+
template: "- {{pattern}}"
|
|
2689
|
+
- id: routing-architecture
|
|
2690
|
+
title: Routing Architecture
|
|
2691
|
+
instruction: Define routing structure based on framework choice.
|
|
2692
|
+
sections:
|
|
2693
|
+
- id: route-organization
|
|
2694
|
+
title: Route Organization
|
|
2695
|
+
type: code
|
|
2696
|
+
language: text
|
|
2697
|
+
template: "{{route_structure}}"
|
|
2698
|
+
- id: protected-routes
|
|
2699
|
+
title: Protected Route Pattern
|
|
2700
|
+
type: code
|
|
2701
|
+
language: typescript
|
|
2702
|
+
template: "{{protected_route_example}}"
|
|
2703
|
+
- id: frontend-services
|
|
2704
|
+
title: Frontend Services Layer
|
|
2705
|
+
instruction: Define how frontend communicates with backend.
|
|
2706
|
+
sections:
|
|
2707
|
+
- id: api-client-setup
|
|
2708
|
+
title: API Client Setup
|
|
2709
|
+
type: code
|
|
2710
|
+
language: typescript
|
|
2711
|
+
template: "{{api_client_setup}}"
|
|
2712
|
+
- id: service-example
|
|
2713
|
+
title: Service Example
|
|
2714
|
+
type: code
|
|
2715
|
+
language: typescript
|
|
2716
|
+
template: "{{service_example}}"
|
|
2690
2717
|
|
|
2691
|
-
- id:
|
|
2692
|
-
title:
|
|
2693
|
-
instruction:
|
|
2694
|
-
Define how the enhancement will integrate with the existing system:
|
|
2695
|
-
|
|
2696
|
-
1. Review the brownfield PRD enhancement scope
|
|
2697
|
-
2. Identify integration points with existing code
|
|
2698
|
-
3. Define boundaries between new and existing functionality
|
|
2699
|
-
4. Establish compatibility requirements
|
|
2700
|
-
|
|
2701
|
-
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?"
|
|
2718
|
+
- id: backend-architecture
|
|
2719
|
+
title: Backend Architecture
|
|
2720
|
+
instruction: Define backend-specific architecture details. Consider serverless vs traditional server approaches.
|
|
2702
2721
|
elicit: true
|
|
2703
2722
|
sections:
|
|
2704
|
-
- id:
|
|
2705
|
-
title:
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2723
|
+
- id: service-architecture
|
|
2724
|
+
title: Service Architecture
|
|
2725
|
+
instruction: Based on platform choice, define service organization.
|
|
2726
|
+
sections:
|
|
2727
|
+
- id: serverless-architecture
|
|
2728
|
+
condition: Serverless architecture chosen
|
|
2729
|
+
sections:
|
|
2730
|
+
- id: function-organization
|
|
2731
|
+
title: Function Organization
|
|
2732
|
+
type: code
|
|
2733
|
+
language: text
|
|
2734
|
+
template: "{{function_structure}}"
|
|
2735
|
+
- id: function-template
|
|
2736
|
+
title: Function Template
|
|
2737
|
+
type: code
|
|
2738
|
+
language: typescript
|
|
2739
|
+
template: "{{function_template}}"
|
|
2740
|
+
- id: traditional-server
|
|
2741
|
+
condition: Traditional server architecture chosen
|
|
2742
|
+
sections:
|
|
2743
|
+
- id: controller-organization
|
|
2744
|
+
title: Controller/Route Organization
|
|
2745
|
+
type: code
|
|
2746
|
+
language: text
|
|
2747
|
+
template: "{{controller_structure}}"
|
|
2748
|
+
- id: controller-template
|
|
2749
|
+
title: Controller Template
|
|
2750
|
+
type: code
|
|
2751
|
+
language: typescript
|
|
2752
|
+
template: "{{controller_template}}"
|
|
2753
|
+
- id: database-architecture
|
|
2754
|
+
title: Database Architecture
|
|
2755
|
+
instruction: Define database schema and access patterns.
|
|
2756
|
+
sections:
|
|
2757
|
+
- id: schema-design
|
|
2758
|
+
title: Schema Design
|
|
2759
|
+
type: code
|
|
2760
|
+
language: sql
|
|
2761
|
+
template: "{{database_schema}}"
|
|
2762
|
+
- id: data-access-layer
|
|
2763
|
+
title: Data Access Layer
|
|
2764
|
+
type: code
|
|
2765
|
+
language: typescript
|
|
2766
|
+
template: "{{repository_pattern}}"
|
|
2767
|
+
- id: auth-architecture
|
|
2768
|
+
title: Authentication and Authorization
|
|
2769
|
+
instruction: Define auth implementation details.
|
|
2770
|
+
sections:
|
|
2771
|
+
- id: auth-flow
|
|
2772
|
+
title: Auth Flow
|
|
2773
|
+
type: mermaid
|
|
2774
|
+
mermaid_type: sequence
|
|
2775
|
+
template: "{{auth_flow_diagram}}"
|
|
2776
|
+
- id: auth-middleware
|
|
2777
|
+
title: Middleware/Guards
|
|
2778
|
+
type: code
|
|
2779
|
+
language: typescript
|
|
2780
|
+
template: "{{auth_middleware}}"
|
|
2724
2781
|
|
|
2725
|
-
- id:
|
|
2726
|
-
title:
|
|
2727
|
-
instruction:
|
|
2728
|
-
Ensure new components align with existing technology choices:
|
|
2729
|
-
|
|
2730
|
-
1. Use existing technology stack as the foundation
|
|
2731
|
-
2. Only introduce new technologies if absolutely necessary
|
|
2732
|
-
3. Justify any new additions with clear rationale
|
|
2733
|
-
4. Ensure version compatibility with existing dependencies
|
|
2782
|
+
- id: unified-project-structure
|
|
2783
|
+
title: Unified Project Structure
|
|
2784
|
+
instruction: Create a monorepo structure that accommodates both frontend and backend. Adapt based on chosen tools and frameworks.
|
|
2734
2785
|
elicit: true
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2786
|
+
type: code
|
|
2787
|
+
language: plaintext
|
|
2788
|
+
examples:
|
|
2789
|
+
- |
|
|
2790
|
+
{{project-name}}/
|
|
2791
|
+
├── .github/ # CI/CD workflows
|
|
2792
|
+
│ └── workflows/
|
|
2793
|
+
│ ├── ci.yaml
|
|
2794
|
+
│ └── deploy.yaml
|
|
2795
|
+
├── apps/ # Application packages
|
|
2796
|
+
│ ├── web/ # Frontend application
|
|
2797
|
+
│ │ ├── src/
|
|
2798
|
+
│ │ │ ├── components/ # UI components
|
|
2799
|
+
│ │ │ ├── pages/ # Page components/routes
|
|
2800
|
+
│ │ │ ├── hooks/ # Custom React hooks
|
|
2801
|
+
│ │ │ ├── services/ # API client services
|
|
2802
|
+
│ │ │ ├── stores/ # State management
|
|
2803
|
+
│ │ │ ├── styles/ # Global styles/themes
|
|
2804
|
+
│ │ │ └── utils/ # Frontend utilities
|
|
2805
|
+
│ │ ├── public/ # Static assets
|
|
2806
|
+
│ │ ├── tests/ # Frontend tests
|
|
2807
|
+
│ │ └── package.json
|
|
2808
|
+
│ └── api/ # Backend application
|
|
2809
|
+
│ ├── src/
|
|
2810
|
+
│ │ ├── routes/ # API routes/controllers
|
|
2811
|
+
│ │ ├── services/ # Business logic
|
|
2812
|
+
│ │ ├── models/ # Data models
|
|
2813
|
+
│ │ ├── middleware/ # Express/API middleware
|
|
2814
|
+
│ │ ├── utils/ # Backend utilities
|
|
2815
|
+
│ │ └── {{serverless_or_server_entry}}
|
|
2816
|
+
│ ├── tests/ # Backend tests
|
|
2817
|
+
│ └── package.json
|
|
2818
|
+
├── packages/ # Shared packages
|
|
2819
|
+
│ ├── shared/ # Shared types/utilities
|
|
2820
|
+
│ │ ├── src/
|
|
2821
|
+
│ │ │ ├── types/ # TypeScript interfaces
|
|
2822
|
+
│ │ │ ├── constants/ # Shared constants
|
|
2823
|
+
│ │ │ └── utils/ # Shared utilities
|
|
2824
|
+
│ │ └── package.json
|
|
2825
|
+
│ ├── ui/ # Shared UI components
|
|
2826
|
+
│ │ ├── src/
|
|
2827
|
+
│ │ └── package.json
|
|
2828
|
+
│ └── config/ # Shared configuration
|
|
2829
|
+
│ ├── eslint/
|
|
2830
|
+
│ ├── typescript/
|
|
2831
|
+
│ └── jest/
|
|
2832
|
+
├── infrastructure/ # IaC definitions
|
|
2833
|
+
│ └── {{iac_structure}}
|
|
2834
|
+
├── scripts/ # Build/deploy scripts
|
|
2835
|
+
├── docs/ # Documentation
|
|
2836
|
+
│ ├── prd.md
|
|
2837
|
+
│ ├── front-end-spec.md
|
|
2838
|
+
│ └── fullstack-architecture.md
|
|
2839
|
+
├── .env.example # Environment template
|
|
2840
|
+
├── package.json # Root package.json
|
|
2841
|
+
├── {{monorepo_config}} # Monorepo configuration
|
|
2842
|
+
└── README.md
|
|
2747
2843
|
|
|
2748
|
-
- id:
|
|
2749
|
-
title:
|
|
2750
|
-
instruction:
|
|
2751
|
-
Define new data models and how they integrate with existing schema:
|
|
2752
|
-
|
|
2753
|
-
1. Identify new entities required for the enhancement
|
|
2754
|
-
2. Define relationships with existing data models
|
|
2755
|
-
3. Plan database schema changes (additions, modifications)
|
|
2756
|
-
4. Ensure backward compatibility
|
|
2844
|
+
- id: development-workflow
|
|
2845
|
+
title: Development Workflow
|
|
2846
|
+
instruction: Define the development setup and workflow for the fullstack application.
|
|
2757
2847
|
elicit: true
|
|
2758
2848
|
sections:
|
|
2759
|
-
- id:
|
|
2760
|
-
title:
|
|
2761
|
-
repeatable: true
|
|
2849
|
+
- id: local-setup
|
|
2850
|
+
title: Local Development Setup
|
|
2762
2851
|
sections:
|
|
2763
|
-
- id:
|
|
2764
|
-
title:
|
|
2852
|
+
- id: prerequisites
|
|
2853
|
+
title: Prerequisites
|
|
2854
|
+
type: code
|
|
2855
|
+
language: bash
|
|
2856
|
+
template: "{{prerequisites_commands}}"
|
|
2857
|
+
- id: initial-setup
|
|
2858
|
+
title: Initial Setup
|
|
2859
|
+
type: code
|
|
2860
|
+
language: bash
|
|
2861
|
+
template: "{{setup_commands}}"
|
|
2862
|
+
- id: dev-commands
|
|
2863
|
+
title: Development Commands
|
|
2864
|
+
type: code
|
|
2865
|
+
language: bash
|
|
2765
2866
|
template: |
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
**Key Attributes:**
|
|
2770
|
-
- {{attribute_1}}: {{type_1}} - {{description_1}}
|
|
2771
|
-
- {{attribute_2}}: {{type_2}} - {{description_2}}
|
|
2772
|
-
|
|
2773
|
-
**Relationships:**
|
|
2774
|
-
- **With Existing:** {{existing_relationships}}
|
|
2775
|
-
- **With New:** {{new_relationships}}
|
|
2776
|
-
- id: schema-integration
|
|
2777
|
-
title: Schema Integration Strategy
|
|
2778
|
-
template: |
|
|
2779
|
-
**Database Changes Required:**
|
|
2780
|
-
- **New Tables:** {{new_tables_list}}
|
|
2781
|
-
- **Modified Tables:** {{modified_tables_list}}
|
|
2782
|
-
- **New Indexes:** {{new_indexes_list}}
|
|
2783
|
-
- **Migration Strategy:** {{migration_approach}}
|
|
2784
|
-
|
|
2785
|
-
**Backward Compatibility:**
|
|
2786
|
-
- {{compatibility_measure_1}}
|
|
2787
|
-
- {{compatibility_measure_2}}
|
|
2867
|
+
# Start all services
|
|
2868
|
+
{{start_all_command}}
|
|
2788
2869
|
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
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?"
|
|
2800
|
-
elicit: true
|
|
2801
|
-
sections:
|
|
2802
|
-
- id: new-components
|
|
2803
|
-
title: New Components
|
|
2804
|
-
repeatable: true
|
|
2870
|
+
# Start frontend only
|
|
2871
|
+
{{start_frontend_command}}
|
|
2872
|
+
|
|
2873
|
+
# Start backend only
|
|
2874
|
+
{{start_backend_command}}
|
|
2875
|
+
|
|
2876
|
+
# Run tests
|
|
2877
|
+
{{test_commands}}
|
|
2878
|
+
- id: environment-config
|
|
2879
|
+
title: Environment Configuration
|
|
2805
2880
|
sections:
|
|
2806
|
-
- id:
|
|
2807
|
-
title:
|
|
2881
|
+
- id: env-vars
|
|
2882
|
+
title: Required Environment Variables
|
|
2883
|
+
type: code
|
|
2884
|
+
language: bash
|
|
2808
2885
|
template: |
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
**Key Interfaces:**
|
|
2813
|
-
- {{interface_1}}
|
|
2814
|
-
- {{interface_2}}
|
|
2815
|
-
|
|
2816
|
-
**Dependencies:**
|
|
2817
|
-
- **Existing Components:** {{existing_dependencies}}
|
|
2818
|
-
- **New Components:** {{new_dependencies}}
|
|
2819
|
-
|
|
2820
|
-
**Technology Stack:** {{component_tech_details}}
|
|
2821
|
-
- id: interaction-diagram
|
|
2822
|
-
title: Component Interaction Diagram
|
|
2823
|
-
type: mermaid
|
|
2824
|
-
mermaid_type: graph
|
|
2825
|
-
instruction: Create Mermaid diagram showing how new components interact with existing ones
|
|
2886
|
+
# Frontend (.env.local)
|
|
2887
|
+
{{frontend_env_vars}}
|
|
2826
2888
|
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
4. Plan versioning strategy if needed
|
|
2889
|
+
# Backend (.env)
|
|
2890
|
+
{{backend_env_vars}}
|
|
2891
|
+
|
|
2892
|
+
# Shared
|
|
2893
|
+
{{shared_env_vars}}
|
|
2894
|
+
|
|
2895
|
+
- id: deployment-architecture
|
|
2896
|
+
title: Deployment Architecture
|
|
2897
|
+
instruction: Define deployment strategy based on platform choice.
|
|
2837
2898
|
elicit: true
|
|
2838
2899
|
sections:
|
|
2839
|
-
- id:
|
|
2840
|
-
title:
|
|
2900
|
+
- id: deployment-strategy
|
|
2901
|
+
title: Deployment Strategy
|
|
2841
2902
|
template: |
|
|
2842
|
-
**
|
|
2843
|
-
**
|
|
2844
|
-
**
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
repeatable: true
|
|
2848
|
-
sections:
|
|
2849
|
-
- id: endpoint
|
|
2850
|
-
title: "{{endpoint_name}}"
|
|
2851
|
-
template: |
|
|
2852
|
-
- **Method:** {{http_method}}
|
|
2853
|
-
- **Endpoint:** {{endpoint_path}}
|
|
2854
|
-
- **Purpose:** {{endpoint_purpose}}
|
|
2855
|
-
- **Integration:** {{integration_with_existing}}
|
|
2856
|
-
sections:
|
|
2857
|
-
- id: request
|
|
2858
|
-
title: Request
|
|
2859
|
-
type: code
|
|
2860
|
-
language: json
|
|
2861
|
-
template: "{{request_schema}}"
|
|
2862
|
-
- id: response
|
|
2863
|
-
title: Response
|
|
2864
|
-
type: code
|
|
2865
|
-
language: json
|
|
2866
|
-
template: "{{response_schema}}"
|
|
2903
|
+
**Frontend Deployment:**
|
|
2904
|
+
- **Platform:** {{frontend_deploy_platform}}
|
|
2905
|
+
- **Build Command:** {{frontend_build_command}}
|
|
2906
|
+
- **Output Directory:** {{frontend_output_dir}}
|
|
2907
|
+
- **CDN/Edge:** {{cdn_strategy}}
|
|
2867
2908
|
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
template:
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
-
|
|
2885
|
-
|
|
2886
|
-
**Error Handling:** {{error_handling_strategy}}
|
|
2909
|
+
**Backend Deployment:**
|
|
2910
|
+
- **Platform:** {{backend_deploy_platform}}
|
|
2911
|
+
- **Build Command:** {{backend_build_command}}
|
|
2912
|
+
- **Deployment Method:** {{deployment_method}}
|
|
2913
|
+
- id: cicd-pipeline
|
|
2914
|
+
title: CI/CD Pipeline
|
|
2915
|
+
type: code
|
|
2916
|
+
language: yaml
|
|
2917
|
+
template: "{{cicd_pipeline_config}}"
|
|
2918
|
+
- id: environments
|
|
2919
|
+
title: Environments
|
|
2920
|
+
type: table
|
|
2921
|
+
columns: [Environment, Frontend URL, Backend URL, Purpose]
|
|
2922
|
+
rows:
|
|
2923
|
+
- ["Development", "{{dev_fe_url}}", "{{dev_be_url}}", "Local development"]
|
|
2924
|
+
- ["Staging", "{{staging_fe_url}}", "{{staging_be_url}}", "Pre-production testing"]
|
|
2925
|
+
- ["Production", "{{prod_fe_url}}", "{{prod_be_url}}", "Live environment"]
|
|
2887
2926
|
|
|
2888
|
-
- id:
|
|
2889
|
-
title:
|
|
2890
|
-
instruction:
|
|
2891
|
-
Define how new code will integrate with existing project structure:
|
|
2892
|
-
|
|
2893
|
-
1. Follow existing project organization patterns
|
|
2894
|
-
2. Identify where new files/folders will be placed
|
|
2895
|
-
3. Ensure consistency with existing naming conventions
|
|
2896
|
-
4. Plan for minimal disruption to existing structure
|
|
2927
|
+
- id: security-performance
|
|
2928
|
+
title: Security and Performance
|
|
2929
|
+
instruction: Define security and performance considerations for the fullstack application.
|
|
2897
2930
|
elicit: true
|
|
2898
2931
|
sections:
|
|
2899
|
-
- id:
|
|
2900
|
-
title:
|
|
2901
|
-
type: code
|
|
2902
|
-
language: plaintext
|
|
2903
|
-
instruction: Document relevant parts of current structure
|
|
2904
|
-
template: "{{existing_structure_relevant_parts}}"
|
|
2905
|
-
- id: new-file-organization
|
|
2906
|
-
title: New File Organization
|
|
2907
|
-
type: code
|
|
2908
|
-
language: plaintext
|
|
2909
|
-
instruction: Show only new additions to existing structure
|
|
2932
|
+
- id: security-requirements
|
|
2933
|
+
title: Security Requirements
|
|
2910
2934
|
template: |
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2935
|
+
**Frontend Security:**
|
|
2936
|
+
- CSP Headers: {{csp_policy}}
|
|
2937
|
+
- XSS Prevention: {{xss_strategy}}
|
|
2938
|
+
- Secure Storage: {{storage_strategy}}
|
|
2939
|
+
|
|
2940
|
+
**Backend Security:**
|
|
2941
|
+
- Input Validation: {{validation_approach}}
|
|
2942
|
+
- Rate Limiting: {{rate_limit_config}}
|
|
2943
|
+
- CORS Policy: {{cors_config}}
|
|
2944
|
+
|
|
2945
|
+
**Authentication Security:**
|
|
2946
|
+
- Token Storage: {{token_strategy}}
|
|
2947
|
+
- Session Management: {{session_approach}}
|
|
2948
|
+
- Password Policy: {{password_requirements}}
|
|
2949
|
+
- id: performance-optimization
|
|
2950
|
+
title: Performance Optimization
|
|
2922
2951
|
template: |
|
|
2923
|
-
|
|
2924
|
-
-
|
|
2925
|
-
-
|
|
2952
|
+
**Frontend Performance:**
|
|
2953
|
+
- Bundle Size Target: {{bundle_size}}
|
|
2954
|
+
- Loading Strategy: {{loading_approach}}
|
|
2955
|
+
- Caching Strategy: {{fe_cache_strategy}}
|
|
2926
2956
|
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
4. Define rollback procedures
|
|
2957
|
+
**Backend Performance:**
|
|
2958
|
+
- Response Time Target: {{response_target}}
|
|
2959
|
+
- Database Optimization: {{db_optimization}}
|
|
2960
|
+
- Caching Strategy: {{be_cache_strategy}}
|
|
2961
|
+
|
|
2962
|
+
- id: testing-strategy
|
|
2963
|
+
title: Testing Strategy
|
|
2964
|
+
instruction: Define comprehensive testing approach for fullstack application.
|
|
2936
2965
|
elicit: true
|
|
2937
2966
|
sections:
|
|
2938
|
-
- id:
|
|
2939
|
-
title:
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
**Infrastructure Tools:** {{existing_infrastructure_tools}}
|
|
2943
|
-
**Environments:** {{existing_environments}}
|
|
2944
|
-
- id: enhancement-deployment
|
|
2945
|
-
title: Enhancement Deployment Strategy
|
|
2946
|
-
template: |
|
|
2947
|
-
**Deployment Approach:** {{deployment_approach}}
|
|
2948
|
-
**Infrastructure Changes:** {{infrastructure_changes}}
|
|
2949
|
-
**Pipeline Integration:** {{pipeline_integration}}
|
|
2950
|
-
- id: rollback-strategy
|
|
2951
|
-
title: Rollback Strategy
|
|
2967
|
+
- id: testing-pyramid
|
|
2968
|
+
title: Testing Pyramid
|
|
2969
|
+
type: code
|
|
2970
|
+
language: text
|
|
2952
2971
|
template: |
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2972
|
+
E2E Tests
|
|
2973
|
+
/ \
|
|
2974
|
+
Integration Tests
|
|
2975
|
+
/ \
|
|
2976
|
+
Frontend Unit Backend Unit
|
|
2977
|
+
- id: test-organization
|
|
2978
|
+
title: Test Organization
|
|
2979
|
+
sections:
|
|
2980
|
+
- id: frontend-tests
|
|
2981
|
+
title: Frontend Tests
|
|
2982
|
+
type: code
|
|
2983
|
+
language: text
|
|
2984
|
+
template: "{{frontend_test_structure}}"
|
|
2985
|
+
- id: backend-tests
|
|
2986
|
+
title: Backend Tests
|
|
2987
|
+
type: code
|
|
2988
|
+
language: text
|
|
2989
|
+
template: "{{backend_test_structure}}"
|
|
2990
|
+
- id: e2e-tests
|
|
2991
|
+
title: E2E Tests
|
|
2992
|
+
type: code
|
|
2993
|
+
language: text
|
|
2994
|
+
template: "{{e2e_test_structure}}"
|
|
2995
|
+
- id: test-examples
|
|
2996
|
+
title: Test Examples
|
|
2997
|
+
sections:
|
|
2998
|
+
- id: frontend-test
|
|
2999
|
+
title: Frontend Component Test
|
|
3000
|
+
type: code
|
|
3001
|
+
language: typescript
|
|
3002
|
+
template: "{{frontend_test_example}}"
|
|
3003
|
+
- id: backend-test
|
|
3004
|
+
title: Backend API Test
|
|
3005
|
+
type: code
|
|
3006
|
+
language: typescript
|
|
3007
|
+
template: "{{backend_test_example}}"
|
|
3008
|
+
- id: e2e-test
|
|
3009
|
+
title: E2E Test
|
|
3010
|
+
type: code
|
|
3011
|
+
language: typescript
|
|
3012
|
+
template: "{{e2e_test_example}}"
|
|
2956
3013
|
|
|
2957
3014
|
- id: coding-standards
|
|
2958
|
-
title: Coding Standards
|
|
2959
|
-
instruction:
|
|
2960
|
-
Ensure new code follows existing project conventions:
|
|
2961
|
-
|
|
2962
|
-
1. Document existing coding standards from project analysis
|
|
2963
|
-
2. Identify any enhancement-specific requirements
|
|
2964
|
-
3. Ensure consistency with existing codebase patterns
|
|
2965
|
-
4. Define standards for new code organization
|
|
3015
|
+
title: Coding Standards
|
|
3016
|
+
instruction: 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.
|
|
2966
3017
|
elicit: true
|
|
2967
3018
|
sections:
|
|
2968
|
-
- id:
|
|
2969
|
-
title:
|
|
2970
|
-
template: |
|
|
2971
|
-
**Code Style:** {{existing_code_style}}
|
|
2972
|
-
**Linting Rules:** {{existing_linting}}
|
|
2973
|
-
**Testing Patterns:** {{existing_test_patterns}}
|
|
2974
|
-
**Documentation Style:** {{existing_doc_style}}
|
|
2975
|
-
- id: enhancement-standards
|
|
2976
|
-
title: Enhancement-Specific Standards
|
|
2977
|
-
condition: New patterns needed for enhancement
|
|
3019
|
+
- id: critical-rules
|
|
3020
|
+
title: Critical Fullstack Rules
|
|
2978
3021
|
repeatable: true
|
|
2979
|
-
template: "- **{{
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
- **
|
|
2984
|
-
- **
|
|
2985
|
-
- **
|
|
2986
|
-
|
|
3022
|
+
template: "- **{{rule_name}}:** {{rule_description}}"
|
|
3023
|
+
examples:
|
|
3024
|
+
- "**Type Sharing:** Always define types in packages/shared and import from there"
|
|
3025
|
+
- "**API Calls:** Never make direct HTTP calls - use the service layer"
|
|
3026
|
+
- "**Environment Variables:** Access only through config objects, never process.env directly"
|
|
3027
|
+
- "**Error Handling:** All API routes must use the standard error handler"
|
|
3028
|
+
- "**State Updates:** Never mutate state directly - use proper state management patterns"
|
|
3029
|
+
- id: naming-conventions
|
|
3030
|
+
title: Naming Conventions
|
|
3031
|
+
type: table
|
|
3032
|
+
columns: [Element, Frontend, Backend, Example]
|
|
3033
|
+
rows:
|
|
3034
|
+
- ["Components", "PascalCase", "-", "`UserProfile.tsx`"]
|
|
3035
|
+
- ["Hooks", "camelCase with 'use'", "-", "`useAuth.ts`"]
|
|
3036
|
+
- ["API Routes", "-", "kebab-case", "`/api/user-profile`"]
|
|
3037
|
+
- ["Database Tables", "-", "snake_case", "`user_profiles`"]
|
|
2987
3038
|
|
|
2988
|
-
- id:
|
|
2989
|
-
title:
|
|
2990
|
-
instruction:
|
|
2991
|
-
Define testing approach for the enhancement:
|
|
2992
|
-
|
|
2993
|
-
1. Integrate with existing test suite
|
|
2994
|
-
2. Ensure existing functionality remains intact
|
|
2995
|
-
3. Plan for testing new features
|
|
2996
|
-
4. Define integration testing approach
|
|
3039
|
+
- id: error-handling
|
|
3040
|
+
title: Error Handling Strategy
|
|
3041
|
+
instruction: Define unified error handling across frontend and backend.
|
|
2997
3042
|
elicit: true
|
|
2998
3043
|
sections:
|
|
2999
|
-
- id:
|
|
3000
|
-
title:
|
|
3044
|
+
- id: error-flow
|
|
3045
|
+
title: Error Flow
|
|
3046
|
+
type: mermaid
|
|
3047
|
+
mermaid_type: sequence
|
|
3048
|
+
template: "{{error_flow_diagram}}"
|
|
3049
|
+
- id: error-format
|
|
3050
|
+
title: Error Response Format
|
|
3051
|
+
type: code
|
|
3052
|
+
language: typescript
|
|
3001
3053
|
template: |
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
- id: regression-tests
|
|
3022
|
-
title: Regression Testing
|
|
3023
|
-
template: |
|
|
3024
|
-
- **Existing Feature Verification:** {{regression_test_approach}}
|
|
3025
|
-
- **Automated Regression Suite:** {{automated_regression}}
|
|
3026
|
-
- **Manual Testing Requirements:** {{manual_testing_requirements}}
|
|
3054
|
+
interface ApiError {
|
|
3055
|
+
error: {
|
|
3056
|
+
code: string;
|
|
3057
|
+
message: string;
|
|
3058
|
+
details?: Record<string, any>;
|
|
3059
|
+
timestamp: string;
|
|
3060
|
+
requestId: string;
|
|
3061
|
+
};
|
|
3062
|
+
}
|
|
3063
|
+
- id: frontend-error-handling
|
|
3064
|
+
title: Frontend Error Handling
|
|
3065
|
+
type: code
|
|
3066
|
+
language: typescript
|
|
3067
|
+
template: "{{frontend_error_handler}}"
|
|
3068
|
+
- id: backend-error-handling
|
|
3069
|
+
title: Backend Error Handling
|
|
3070
|
+
type: code
|
|
3071
|
+
language: typescript
|
|
3072
|
+
template: "{{backend_error_handler}}"
|
|
3027
3073
|
|
|
3028
|
-
- id:
|
|
3029
|
-
title:
|
|
3030
|
-
instruction:
|
|
3031
|
-
Ensure security consistency with existing system:
|
|
3032
|
-
|
|
3033
|
-
1. Follow existing security patterns and tools
|
|
3034
|
-
2. Ensure new features don't introduce vulnerabilities
|
|
3035
|
-
3. Maintain existing security posture
|
|
3036
|
-
4. Define security testing for new components
|
|
3074
|
+
- id: monitoring
|
|
3075
|
+
title: Monitoring and Observability
|
|
3076
|
+
instruction: Define monitoring strategy for fullstack application.
|
|
3037
3077
|
elicit: true
|
|
3038
3078
|
sections:
|
|
3039
|
-
- id:
|
|
3040
|
-
title:
|
|
3041
|
-
template: |
|
|
3042
|
-
**Authentication:** {{existing_auth}}
|
|
3043
|
-
**Authorization:** {{existing_authz}}
|
|
3044
|
-
**Data Protection:** {{existing_data_protection}}
|
|
3045
|
-
**Security Tools:** {{existing_security_tools}}
|
|
3046
|
-
- id: enhancement-security
|
|
3047
|
-
title: Enhancement Security Requirements
|
|
3079
|
+
- id: monitoring-stack
|
|
3080
|
+
title: Monitoring Stack
|
|
3048
3081
|
template: |
|
|
3049
|
-
**
|
|
3050
|
-
**
|
|
3051
|
-
**
|
|
3052
|
-
|
|
3053
|
-
|
|
3082
|
+
- **Frontend Monitoring:** {{frontend_monitoring}}
|
|
3083
|
+
- **Backend Monitoring:** {{backend_monitoring}}
|
|
3084
|
+
- **Error Tracking:** {{error_tracking}}
|
|
3085
|
+
- **Performance Monitoring:** {{perf_monitoring}}
|
|
3086
|
+
- id: key-metrics
|
|
3087
|
+
title: Key Metrics
|
|
3054
3088
|
template: |
|
|
3055
|
-
**
|
|
3056
|
-
|
|
3057
|
-
|
|
3089
|
+
**Frontend Metrics:**
|
|
3090
|
+
- Core Web Vitals
|
|
3091
|
+
- JavaScript errors
|
|
3092
|
+
- API response times
|
|
3093
|
+
- User interactions
|
|
3094
|
+
|
|
3095
|
+
**Backend Metrics:**
|
|
3096
|
+
- Request rate
|
|
3097
|
+
- Error rate
|
|
3098
|
+
- Response time
|
|
3099
|
+
- Database query performance
|
|
3058
3100
|
|
|
3059
3101
|
- id: checklist-results
|
|
3060
3102
|
title: Checklist Results Report
|
|
3061
|
-
instruction:
|
|
3062
|
-
|
|
3063
|
-
- id: next-steps
|
|
3064
|
-
title: Next Steps
|
|
3065
|
-
instruction: |
|
|
3066
|
-
After completing the brownfield architecture:
|
|
3067
|
-
|
|
3068
|
-
1. Review integration points with existing system
|
|
3069
|
-
2. Begin story implementation with Dev agent
|
|
3070
|
-
3. Set up deployment pipeline integration
|
|
3071
|
-
4. Plan rollback and monitoring procedures
|
|
3072
|
-
sections:
|
|
3073
|
-
- id: story-manager-handoff
|
|
3074
|
-
title: Story Manager Handoff
|
|
3075
|
-
instruction: |
|
|
3076
|
-
Create a brief prompt for Story Manager to work with this brownfield enhancement. Include:
|
|
3077
|
-
- Reference to this architecture document
|
|
3078
|
-
- Key integration requirements validated with user
|
|
3079
|
-
- Existing system constraints based on actual project analysis
|
|
3080
|
-
- First story to implement with clear integration checkpoints
|
|
3081
|
-
- Emphasis on maintaining existing system integrity throughout implementation
|
|
3082
|
-
- id: developer-handoff
|
|
3083
|
-
title: Developer Handoff
|
|
3084
|
-
instruction: |
|
|
3085
|
-
Create a brief prompt for developers starting implementation. Include:
|
|
3086
|
-
- Reference to this architecture and existing coding standards analyzed from actual project
|
|
3087
|
-
- Integration requirements with existing codebase validated with user
|
|
3088
|
-
- Key technical decisions based on real project constraints
|
|
3089
|
-
- Existing system compatibility requirements with specific verification steps
|
|
3090
|
-
- Clear sequencing of implementation to minimize risk to existing functionality
|
|
3091
|
-
==================== END: .bmad-core/templates/brownfield-architecture-tmpl.yaml ====================
|
|
3103
|
+
instruction: Before running the checklist, offer to output the full architecture document. Once user confirms, execute the architect-checklist and populate results here.
|
|
3104
|
+
==================== END: .bmad-core/templates/fullstack-architecture-tmpl.yaml ====================
|
|
3092
3105
|
|
|
3093
3106
|
==================== START: .bmad-core/checklists/architect-checklist.md ====================
|
|
3094
3107
|
# Architect Solution Validation Checklist
|
|
@@ -3496,33 +3509,28 @@ Ask the user if they want to work through the checklist:
|
|
|
3496
3509
|
Now that you've completed the checklist, generate a comprehensive validation report that includes:
|
|
3497
3510
|
|
|
3498
3511
|
1. Executive Summary
|
|
3499
|
-
|
|
3500
3512
|
- Overall architecture readiness (High/Medium/Low)
|
|
3501
3513
|
- Critical risks identified
|
|
3502
3514
|
- Key strengths of the architecture
|
|
3503
3515
|
- Project type (Full-stack/Frontend/Backend) and sections evaluated
|
|
3504
3516
|
|
|
3505
3517
|
2. Section Analysis
|
|
3506
|
-
|
|
3507
3518
|
- Pass rate for each major section (percentage of items passed)
|
|
3508
3519
|
- Most concerning failures or gaps
|
|
3509
3520
|
- Sections requiring immediate attention
|
|
3510
3521
|
- Note any sections skipped due to project type
|
|
3511
3522
|
|
|
3512
3523
|
3. Risk Assessment
|
|
3513
|
-
|
|
3514
3524
|
- Top 5 risks by severity
|
|
3515
3525
|
- Mitigation recommendations for each
|
|
3516
3526
|
- Timeline impact of addressing issues
|
|
3517
3527
|
|
|
3518
3528
|
4. Recommendations
|
|
3519
|
-
|
|
3520
3529
|
- Must-fix items before development
|
|
3521
3530
|
- Should-fix items for better quality
|
|
3522
3531
|
- Nice-to-have improvements
|
|
3523
3532
|
|
|
3524
3533
|
5. AI Implementation Readiness
|
|
3525
|
-
|
|
3526
3534
|
- Specific concerns for AI agent implementation
|
|
3527
3535
|
- Areas needing additional clarification
|
|
3528
3536
|
- Complexity hotspots to address
|