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