bmad-method 5.0.0-beta.2 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +3 -3
  2. package/.github/ISSUE_TEMPLATE/feature_request.md +3 -3
  3. package/.github/workflows/discord.yaml +11 -2
  4. package/.github/workflows/format-check.yaml +42 -0
  5. package/.github/workflows/manual-release.yaml +173 -0
  6. package/.husky/pre-commit +3 -0
  7. package/.vscode/settings.json +26 -1
  8. package/CHANGELOG.md +0 -11
  9. package/README.md +2 -0
  10. package/bmad-core/agent-teams/team-all.yaml +1 -1
  11. package/bmad-core/agents/bmad-orchestrator.md +1 -1
  12. package/bmad-core/agents/dev.md +4 -4
  13. package/bmad-core/data/bmad-kb.md +1 -1
  14. package/bmad-core/data/test-levels-framework.md +12 -12
  15. package/bmad-core/tasks/facilitate-brainstorming-session.md +1 -1
  16. package/bmad-core/tasks/nfr-assess.md +10 -10
  17. package/bmad-core/tasks/qa-gate.md +23 -23
  18. package/bmad-core/tasks/review-story.md +18 -18
  19. package/bmad-core/tasks/risk-profile.md +25 -25
  20. package/bmad-core/tasks/test-design.md +9 -9
  21. package/bmad-core/tasks/trace-requirements.md +21 -21
  22. package/bmad-core/templates/architecture-tmpl.yaml +49 -49
  23. package/bmad-core/templates/brainstorming-output-tmpl.yaml +5 -5
  24. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +31 -31
  25. package/bmad-core/templates/brownfield-prd-tmpl.yaml +13 -13
  26. package/bmad-core/templates/competitor-analysis-tmpl.yaml +19 -6
  27. package/bmad-core/templates/front-end-architecture-tmpl.yaml +21 -9
  28. package/bmad-core/templates/front-end-spec-tmpl.yaml +24 -24
  29. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +122 -104
  30. package/bmad-core/templates/market-research-tmpl.yaml +2 -2
  31. package/bmad-core/templates/prd-tmpl.yaml +9 -9
  32. package/bmad-core/templates/project-brief-tmpl.yaml +4 -4
  33. package/bmad-core/templates/qa-gate-tmpl.yaml +9 -9
  34. package/bmad-core/templates/story-tmpl.yaml +12 -12
  35. package/bmad-core/workflows/brownfield-fullstack.yaml +9 -9
  36. package/bmad-core/workflows/brownfield-service.yaml +1 -1
  37. package/bmad-core/workflows/brownfield-ui.yaml +1 -1
  38. package/bmad-core/workflows/greenfield-fullstack.yaml +1 -1
  39. package/bmad-core/workflows/greenfield-service.yaml +1 -1
  40. package/bmad-core/workflows/greenfield-ui.yaml +1 -1
  41. package/common/utils/bmad-doc-template.md +5 -5
  42. package/dist/agents/analyst.txt +28 -15
  43. package/dist/agents/architect.txt +220 -190
  44. package/dist/agents/bmad-master.txt +298 -255
  45. package/dist/agents/bmad-orchestrator.txt +1 -1
  46. package/dist/agents/pm.txt +20 -20
  47. package/dist/agents/po.txt +11 -11
  48. package/dist/agents/qa.txt +275 -618
  49. package/dist/agents/sm.txt +11 -11
  50. package/dist/agents/ux-expert.txt +23 -23
  51. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +109 -109
  52. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +75 -77
  53. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +41 -41
  54. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +483 -474
  55. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +1 -1
  56. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +149 -149
  57. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.txt +20 -20
  58. package/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +371 -358
  59. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +25 -25
  60. package/dist/teams/team-all.txt +581 -881
  61. package/dist/teams/team-fullstack.txt +316 -273
  62. package/dist/teams/team-ide-minimal.txt +276 -619
  63. package/dist/teams/team-no-ui.txt +281 -238
  64. package/docs/versioning-and-releases.md +114 -44
  65. package/eslint.config.mjs +119 -0
  66. package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.4 Deployment Configuration/1.4.2 - cloudbuild.yaml +26 -26
  67. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +4 -4
  68. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +1 -1
  69. package/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +26 -28
  70. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +50 -50
  71. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +23 -23
  72. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +24 -24
  73. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +42 -42
  74. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
  75. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-dev-greenfield.yaml +5 -5
  76. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-prototype.yaml +1 -1
  77. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.md +3 -3
  78. package/expansion-packs/bmad-2d-unity-game-dev/data/bmad-kb.md +1 -1
  79. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-brief-tmpl.yaml +23 -23
  80. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-design-doc-tmpl.yaml +63 -63
  81. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml +20 -20
  82. package/expansion-packs/bmad-2d-unity-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
  83. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-dev-greenfield.yaml +5 -5
  84. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-prototype.yaml +1 -1
  85. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +20 -20
  86. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +7 -7
  87. package/package.json +62 -39
  88. package/prettier.config.mjs +32 -0
  89. package/release_notes.md +30 -0
  90. package/tools/bmad-npx-wrapper.js +10 -10
  91. package/tools/builders/web-builder.js +124 -130
  92. package/tools/bump-all-versions.js +42 -33
  93. package/tools/bump-expansion-version.js +23 -16
  94. package/tools/cli.js +10 -12
  95. package/tools/flattener/aggregate.js +10 -10
  96. package/tools/flattener/binary.js +44 -17
  97. package/tools/flattener/discovery.js +19 -18
  98. package/tools/flattener/files.js +6 -6
  99. package/tools/flattener/ignoreRules.js +125 -125
  100. package/tools/flattener/main.js +201 -304
  101. package/tools/flattener/projectRoot.js +75 -73
  102. package/tools/flattener/prompts.js +9 -9
  103. package/tools/flattener/stats.helpers.js +131 -67
  104. package/tools/flattener/stats.js +3 -3
  105. package/tools/flattener/test-matrix.js +201 -193
  106. package/tools/flattener/xml.js +33 -31
  107. package/tools/installer/bin/bmad.js +130 -89
  108. package/tools/installer/config/ide-agent-config.yaml +1 -1
  109. package/tools/installer/config/install.config.yaml +2 -2
  110. package/tools/installer/lib/config-loader.js +46 -42
  111. package/tools/installer/lib/file-manager.js +91 -113
  112. package/tools/installer/lib/ide-base-setup.js +57 -56
  113. package/tools/installer/lib/ide-setup.js +375 -343
  114. package/tools/installer/lib/installer.js +875 -714
  115. package/tools/installer/lib/memory-profiler.js +54 -53
  116. package/tools/installer/lib/module-manager.js +19 -15
  117. package/tools/installer/lib/resource-locator.js +26 -28
  118. package/tools/installer/package.json +19 -19
  119. package/tools/lib/dependency-resolver.js +26 -30
  120. package/tools/lib/yaml-utils.js +7 -7
  121. package/tools/preview-release-notes.js +66 -0
  122. package/tools/shared/bannerArt.js +3 -3
  123. package/tools/sync-installer-version.js +7 -9
  124. package/tools/update-expansion-version.js +14 -15
  125. package/tools/upgraders/v3-to-v4-upgrader.js +203 -294
  126. package/tools/version-bump.js +41 -26
  127. package/tools/yaml-format.js +56 -43
  128. package/.github/workflows/promote-to-stable.yml +0 -144
  129. package/.github/workflows/release.yaml +0 -60
  130. package/.releaserc.json +0 -21
  131. package/tools/semantic-release-sync-installer.js +0 -30
@@ -46,7 +46,7 @@ bundle:
46
46
  description: Includes every core system agent.
47
47
  agents:
48
48
  - bmad-orchestrator
49
- - '*'
49
+ - "*"
50
50
  workflows:
51
51
  - brownfield-fullstack.yaml
52
52
  - brownfield-service.yaml
@@ -1261,7 +1261,7 @@ You are the "Vibe CEO" - thinking like a CEO with unlimited resources and a sing
1261
1261
 
1262
1262
  - **Claude Code**: `/agent-name` (e.g., `/bmad-master`)
1263
1263
  - **Cursor**: `@agent-name` (e.g., `@bmad-master`)
1264
- - **Windsurf**: `@agent-name` (e.g., `@bmad-master`)
1264
+ - **Windsurf**: `/agent-name` (e.g., `/bmad-master`)
1265
1265
  - **Trae**: `@agent-name` (e.g., `@bmad-master`)
1266
1266
  - **Roo Code**: Select mode from mode selector (e.g., `bmad-master`)
1267
1267
  - **GitHub Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
@@ -2001,7 +2001,7 @@ Agents should be workflow-aware: know active workflow, their role, access artifa
2001
2001
  ==================== START: .bmad-core/tasks/facilitate-brainstorming-session.md ====================
2002
2002
  ---
2003
2003
  docOutputLocation: docs/brainstorming-session-results.md
2004
- template: ".bmad-core/templates/brainstorming-output-tmpl.yaml"
2004
+ template: '.bmad-core/templates/brainstorming-output-tmpl.yaml'
2005
2005
  ---
2006
2006
 
2007
2007
  # Facilitate Brainstorming Session Task
@@ -2795,12 +2795,12 @@ sections:
2795
2795
  - id: introduction
2796
2796
  instruction: |
2797
2797
  This template guides creation of a comprehensive Project Brief that serves as the foundational input for product development.
2798
-
2798
+
2799
2799
  Start by asking the user which mode they prefer:
2800
-
2800
+
2801
2801
  1. **Interactive Mode** - Work through each section collaboratively
2802
2802
  2. **YOLO Mode** - Generate complete draft for review and refinement
2803
-
2803
+
2804
2804
  Before beginning, understand what inputs are available (brainstorming results, market research, competitive analysis, initial ideas) and gather project context.
2805
2805
 
2806
2806
  - id: executive-summary
@@ -3121,7 +3121,7 @@ sections:
3121
3121
  instruction: Map the end-to-end customer experience for primary segments
3122
3122
  template: |
3123
3123
  For primary customer segment:
3124
-
3124
+
3125
3125
  1. **Awareness:** {{discovery_process}}
3126
3126
  2. **Consideration:** {{evaluation_criteria}}
3127
3127
  3. **Purchase:** {{decision_triggers}}
@@ -3322,7 +3322,7 @@ sections:
3322
3322
  title: Competitor Prioritization Matrix
3323
3323
  instruction: |
3324
3324
  Help categorize competitors by market share and strategic threat level
3325
-
3325
+
3326
3326
  Create a 2x2 matrix:
3327
3327
  - Priority 1 (Core Competitors): High Market Share + High Threat
3328
3328
  - Priority 2 (Emerging Threats): Low Market Share + High Threat
@@ -3387,7 +3387,14 @@ sections:
3387
3387
  title: Feature Comparison Matrix
3388
3388
  instruction: Create a detailed comparison table of key features across competitors
3389
3389
  type: table
3390
- columns: ["Feature Category", "{{your_company}}", "{{competitor_1}}", "{{competitor_2}}", "{{competitor_3}}"]
3390
+ columns:
3391
+ [
3392
+ "Feature Category",
3393
+ "{{your_company}}",
3394
+ "{{competitor_1}}",
3395
+ "{{competitor_2}}",
3396
+ "{{competitor_3}}",
3397
+ ]
3391
3398
  rows:
3392
3399
  - category: "Core Functionality"
3393
3400
  items:
@@ -3399,7 +3406,13 @@ sections:
3399
3406
  - ["Onboarding Time", "{{time}}", "{{time}}", "{{time}}", "{{time}}"]
3400
3407
  - category: "Integration & Ecosystem"
3401
3408
  items:
3402
- - ["API Availability", "{{availability}}", "{{availability}}", "{{availability}}", "{{availability}}"]
3409
+ - [
3410
+ "API Availability",
3411
+ "{{availability}}",
3412
+ "{{availability}}",
3413
+ "{{availability}}",
3414
+ "{{availability}}",
3415
+ ]
3403
3416
  - ["Third-party Integrations", "{{number}}", "{{number}}", "{{number}}", "{{number}}"]
3404
3417
  - category: "Pricing & Plans"
3405
3418
  items:
@@ -3426,7 +3439,7 @@ sections:
3426
3439
  title: Positioning Map
3427
3440
  instruction: |
3428
3441
  Describe competitor positions on key dimensions
3429
-
3442
+
3430
3443
  Create a positioning description using 2 key dimensions relevant to the market, such as:
3431
3444
  - Price vs. Features
3432
3445
  - Ease of Use vs. Power
@@ -3461,7 +3474,7 @@ sections:
3461
3474
  title: Blue Ocean Opportunities
3462
3475
  instruction: |
3463
3476
  Identify uncontested market spaces
3464
-
3477
+
3465
3478
  List opportunities to create new market space:
3466
3479
  - Underserved segments
3467
3480
  - Unaddressed use cases
@@ -3565,11 +3578,11 @@ sections:
3565
3578
  - id: summary-details
3566
3579
  template: |
3567
3580
  **Topic:** {{session_topic}}
3568
-
3581
+
3569
3582
  **Session Goals:** {{stated_goals}}
3570
-
3583
+
3571
3584
  **Techniques Used:** {{techniques_list}}
3572
-
3585
+
3573
3586
  **Total Ideas Generated:** {{total_ideas}}
3574
3587
  - id: key-themes
3575
3588
  title: "Key Themes Identified:"
@@ -3694,7 +3707,7 @@ sections:
3694
3707
  - id: footer
3695
3708
  content: |
3696
3709
  ---
3697
-
3710
+
3698
3711
  *Session facilitated using the BMAD-METHOD brainstorming framework*
3699
3712
  ==================== END: .bmad-core/templates/brainstorming-output-tmpl.yaml ====================
3700
3713
 
@@ -3849,20 +3862,20 @@ sections:
3849
3862
  - id: intro-content
3850
3863
  content: |
3851
3864
  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.
3852
-
3865
+
3853
3866
  **Relationship to Frontend Architecture:**
3854
3867
  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.
3855
3868
  - id: starter-template
3856
3869
  title: Starter Template or Existing Project
3857
3870
  instruction: |
3858
3871
  Before proceeding further with architecture design, check if the project is based on a starter template or existing codebase:
3859
-
3872
+
3860
3873
  1. Review the PRD and brainstorming brief for any mentions of:
3861
3874
  - Starter templates (e.g., Create React App, Next.js, Vue CLI, Angular CLI, etc.)
3862
3875
  - Existing projects or codebases being used as a foundation
3863
3876
  - Boilerplate projects or scaffolding tools
3864
3877
  - Previous projects to be cloned or adapted
3865
-
3878
+
3866
3879
  2. If a starter template or existing project is mentioned:
3867
3880
  - Ask the user to provide access via one of these methods:
3868
3881
  - Link to the starter template documentation
@@ -3875,16 +3888,16 @@ sections:
3875
3888
  - Existing architectural patterns and conventions
3876
3889
  - Any limitations or constraints imposed by the starter
3877
3890
  - Use this analysis to inform and align your architecture decisions
3878
-
3891
+
3879
3892
  3. If no starter template is mentioned but this is a greenfield project:
3880
3893
  - Suggest appropriate starter templates based on the tech stack preferences
3881
3894
  - Explain the benefits (faster setup, best practices, community support)
3882
3895
  - Let the user decide whether to use one
3883
-
3896
+
3884
3897
  4. If the user confirms no starter template will be used:
3885
3898
  - Proceed with architecture design from scratch
3886
3899
  - Note that manual setup will be required for all tooling and configuration
3887
-
3900
+
3888
3901
  Document the decision here before proceeding with the architecture design. If none, just say N/A
3889
3902
  elicit: true
3890
3903
  - id: changelog
@@ -3912,7 +3925,7 @@ sections:
3912
3925
  title: High Level Overview
3913
3926
  instruction: |
3914
3927
  Based on the PRD's Technical Assumptions section, describe:
3915
-
3928
+
3916
3929
  1. The main architectural style (e.g., Monolith, Microservices, Serverless, Event-Driven)
3917
3930
  2. Repository structure decision from PRD (Monorepo/Polyrepo)
3918
3931
  3. Service architecture decision from PRD
@@ -3929,17 +3942,17 @@ sections:
3929
3942
  - Data flow directions
3930
3943
  - External integrations
3931
3944
  - User entry points
3932
-
3945
+
3933
3946
  - id: architectural-patterns
3934
3947
  title: Architectural and Design Patterns
3935
3948
  instruction: |
3936
3949
  List the key high-level patterns that will guide the architecture. For each pattern:
3937
-
3950
+
3938
3951
  1. Present 2-3 viable options if multiple exist
3939
3952
  2. Provide your recommendation with clear rationale
3940
3953
  3. Get user confirmation before finalizing
3941
3954
  4. These patterns should align with the PRD's technical assumptions and project goals
3942
-
3955
+
3943
3956
  Common patterns to consider:
3944
3957
  - Architectural style patterns (Serverless, Event-Driven, Microservices, CQRS, Hexagonal)
3945
3958
  - Code organization patterns (Dependency Injection, Repository, Module, Factory)
@@ -3955,23 +3968,23 @@ sections:
3955
3968
  title: Tech Stack
3956
3969
  instruction: |
3957
3970
  This is the DEFINITIVE technology selection section. Work with the user to make specific choices:
3958
-
3971
+
3959
3972
  1. Review PRD technical assumptions and any preferences from .bmad-core/data/technical-preferences.yaml or an attached technical-preferences
3960
3973
  2. For each category, present 2-3 viable options with pros/cons
3961
3974
  3. Make a clear recommendation based on project needs
3962
3975
  4. Get explicit user approval for each selection
3963
3976
  5. Document exact versions (avoid "latest" - pin specific versions)
3964
3977
  6. This table is the single source of truth - all other docs must reference these choices
3965
-
3978
+
3966
3979
  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:
3967
-
3980
+
3968
3981
  - Starter templates (if any)
3969
3982
  - Languages and runtimes with exact versions
3970
3983
  - Frameworks and libraries / packages
3971
3984
  - Cloud provider and key services choices
3972
3985
  - 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
3973
3986
  - Development tools
3974
-
3987
+
3975
3988
  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.
3976
3989
  elicit: true
3977
3990
  sections:
@@ -3995,13 +4008,13 @@ sections:
3995
4008
  title: Data Models
3996
4009
  instruction: |
3997
4010
  Define the core data models/entities:
3998
-
4011
+
3999
4012
  1. Review PRD requirements and identify key business entities
4000
4013
  2. For each model, explain its purpose and relationships
4001
4014
  3. Include key attributes and data types
4002
4015
  4. Show relationships between models
4003
4016
  5. Discuss design decisions with user
4004
-
4017
+
4005
4018
  Create a clear conceptual model before moving to database schema.
4006
4019
  elicit: true
4007
4020
  repeatable: true
@@ -4010,11 +4023,11 @@ sections:
4010
4023
  title: "{{model_name}}"
4011
4024
  template: |
4012
4025
  **Purpose:** {{model_purpose}}
4013
-
4026
+
4014
4027
  **Key Attributes:**
4015
4028
  - {{attribute_1}}: {{type_1}} - {{description_1}}
4016
4029
  - {{attribute_2}}: {{type_2}} - {{description_2}}
4017
-
4030
+
4018
4031
  **Relationships:**
4019
4032
  - {{relationship_1}}
4020
4033
  - {{relationship_2}}
@@ -4023,7 +4036,7 @@ sections:
4023
4036
  title: Components
4024
4037
  instruction: |
4025
4038
  Based on the architectural patterns, tech stack, and data models from above:
4026
-
4039
+
4027
4040
  1. Identify major logical components/services and their responsibilities
4028
4041
  2. Consider the repository structure (monorepo/polyrepo) from PRD
4029
4042
  3. Define clear boundaries and interfaces between components
@@ -4032,7 +4045,7 @@ sections:
4032
4045
  - Key interfaces/APIs exposed
4033
4046
  - Dependencies on other components
4034
4047
  - Technology specifics based on tech stack choices
4035
-
4048
+
4036
4049
  5. Create component diagrams where helpful
4037
4050
  elicit: true
4038
4051
  sections:
@@ -4041,13 +4054,13 @@ sections:
4041
4054
  title: "{{component_name}}"
4042
4055
  template: |
4043
4056
  **Responsibility:** {{component_description}}
4044
-
4057
+
4045
4058
  **Key Interfaces:**
4046
4059
  - {{interface_1}}
4047
4060
  - {{interface_2}}
4048
-
4061
+
4049
4062
  **Dependencies:** {{dependencies}}
4050
-
4063
+
4051
4064
  **Technology Stack:** {{component_tech_details}}
4052
4065
  - id: component-diagrams
4053
4066
  title: Component Diagrams
@@ -4064,13 +4077,13 @@ sections:
4064
4077
  condition: Project requires external API integrations
4065
4078
  instruction: |
4066
4079
  For each external service integration:
4067
-
4080
+
4068
4081
  1. Identify APIs needed based on PRD requirements and component design
4069
4082
  2. If documentation URLs are unknown, ask user for specifics
4070
4083
  3. Document authentication methods and security considerations
4071
4084
  4. List specific endpoints that will be used
4072
4085
  5. Note any rate limits or usage constraints
4073
-
4086
+
4074
4087
  If no external APIs are needed, state this explicitly and skip to next section.
4075
4088
  elicit: true
4076
4089
  repeatable: true
@@ -4083,10 +4096,10 @@ sections:
4083
4096
  - **Base URL(s):** {{api_base_url}}
4084
4097
  - **Authentication:** {{auth_method}}
4085
4098
  - **Rate Limits:** {{rate_limits}}
4086
-
4099
+
4087
4100
  **Key Endpoints Used:**
4088
4101
  - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
4089
-
4102
+
4090
4103
  **Integration Notes:** {{integration_considerations}}
4091
4104
 
4092
4105
  - id: core-workflows
@@ -4095,13 +4108,13 @@ sections:
4095
4108
  mermaid_type: sequence
4096
4109
  instruction: |
4097
4110
  Illustrate key system workflows using sequence diagrams:
4098
-
4111
+
4099
4112
  1. Identify critical user journeys from PRD
4100
4113
  2. Show component interactions including external APIs
4101
4114
  3. Include error handling paths
4102
4115
  4. Document async operations
4103
4116
  5. Create both high-level and detailed diagrams as needed
4104
-
4117
+
4105
4118
  Focus on workflows that clarify architecture decisions or complex interactions.
4106
4119
  elicit: true
4107
4120
 
@@ -4112,13 +4125,13 @@ sections:
4112
4125
  language: yaml
4113
4126
  instruction: |
4114
4127
  If the project includes a REST API:
4115
-
4128
+
4116
4129
  1. Create an OpenAPI 3.0 specification
4117
4130
  2. Include all endpoints from epics/stories
4118
4131
  3. Define request/response schemas based on data models
4119
4132
  4. Document authentication requirements
4120
4133
  5. Include example requests/responses
4121
-
4134
+
4122
4135
  Use YAML format for better readability. If no REST API, skip this section.
4123
4136
  elicit: true
4124
4137
  template: |
@@ -4135,13 +4148,13 @@ sections:
4135
4148
  title: Database Schema
4136
4149
  instruction: |
4137
4150
  Transform the conceptual data models into concrete database schemas:
4138
-
4151
+
4139
4152
  1. Use the database type(s) selected in Tech Stack
4140
4153
  2. Create schema definitions using appropriate notation
4141
4154
  3. Include indexes, constraints, and relationships
4142
4155
  4. Consider performance and scalability
4143
4156
  5. For NoSQL, show document structures
4144
-
4157
+
4145
4158
  Present schema in format appropriate to database type (SQL DDL, JSON schema, etc.)
4146
4159
  elicit: true
4147
4160
 
@@ -4151,14 +4164,14 @@ sections:
4151
4164
  language: plaintext
4152
4165
  instruction: |
4153
4166
  Create a project folder structure that reflects:
4154
-
4167
+
4155
4168
  1. The chosen repository structure (monorepo/polyrepo)
4156
4169
  2. The service architecture (monolith/microservices/serverless)
4157
4170
  3. The selected tech stack and languages
4158
4171
  4. Component organization from above
4159
4172
  5. Best practices for the chosen frameworks
4160
4173
  6. Clear separation of concerns
4161
-
4174
+
4162
4175
  Adapt the structure based on project needs. For monorepos, show service separation. For serverless, show function organization. Include language-specific conventions.
4163
4176
  elicit: true
4164
4177
  examples:
@@ -4176,13 +4189,13 @@ sections:
4176
4189
  title: Infrastructure and Deployment
4177
4190
  instruction: |
4178
4191
  Define the deployment architecture and practices:
4179
-
4192
+
4180
4193
  1. Use IaC tool selected in Tech Stack
4181
4194
  2. Choose deployment strategy appropriate for the architecture
4182
4195
  3. Define environments and promotion flow
4183
4196
  4. Establish rollback procedures
4184
4197
  5. Consider security, monitoring, and cost optimization
4185
-
4198
+
4186
4199
  Get user input on deployment preferences and CI/CD tool choices.
4187
4200
  elicit: true
4188
4201
  sections:
@@ -4218,13 +4231,13 @@ sections:
4218
4231
  title: Error Handling Strategy
4219
4232
  instruction: |
4220
4233
  Define comprehensive error handling approach:
4221
-
4234
+
4222
4235
  1. Choose appropriate patterns for the language/framework from Tech Stack
4223
4236
  2. Define logging standards and tools
4224
4237
  3. Establish error categories and handling rules
4225
4238
  4. Consider observability and debugging needs
4226
4239
  5. Ensure security (no sensitive data in logs)
4227
-
4240
+
4228
4241
  This section guides both AI and human developers in consistent error handling.
4229
4242
  elicit: true
4230
4243
  sections:
@@ -4271,13 +4284,13 @@ sections:
4271
4284
  title: Coding Standards
4272
4285
  instruction: |
4273
4286
  These standards are MANDATORY for AI agents. Work with user to define ONLY the critical rules needed to prevent bad code. Explain that:
4274
-
4287
+
4275
4288
  1. This section directly controls AI developer behavior
4276
4289
  2. Keep it minimal - assume AI knows general best practices
4277
4290
  3. Focus on project-specific conventions and gotchas
4278
4291
  4. Overly detailed standards bloat context and slow development
4279
4292
  5. Standards will be extracted to separate file for dev agent use
4280
-
4293
+
4281
4294
  For each standard, get explicit user confirmation it's necessary.
4282
4295
  elicit: true
4283
4296
  sections:
@@ -4299,7 +4312,7 @@ sections:
4299
4312
  - "Never use console.log in production code - use logger"
4300
4313
  - "All API responses must use ApiResponse wrapper type"
4301
4314
  - "Database queries must use repository pattern, never direct ORM"
4302
-
4315
+
4303
4316
  Avoid obvious rules like "use SOLID principles" or "write clean code"
4304
4317
  repeatable: true
4305
4318
  template: "- **{{rule_name}}:** {{rule_description}}"
@@ -4317,14 +4330,14 @@ sections:
4317
4330
  title: Test Strategy and Standards
4318
4331
  instruction: |
4319
4332
  Work with user to define comprehensive test strategy:
4320
-
4333
+
4321
4334
  1. Use test frameworks from Tech Stack
4322
4335
  2. Decide on TDD vs test-after approach
4323
4336
  3. Define test organization and naming
4324
4337
  4. Establish coverage goals
4325
4338
  5. Determine integration test infrastructure
4326
4339
  6. Plan for test data and external dependencies
4327
-
4340
+
4328
4341
  Note: Basic info goes in Coding Standards for dev agent. This detailed section is for QA agent and team reference.
4329
4342
  elicit: true
4330
4343
  sections:
@@ -4345,7 +4358,7 @@ sections:
4345
4358
  - **Location:** {{unit_test_location}}
4346
4359
  - **Mocking Library:** {{mocking_library}}
4347
4360
  - **Coverage Requirement:** {{unit_coverage}}
4348
-
4361
+
4349
4362
  **AI Agent Requirements:**
4350
4363
  - Generate tests for all public methods
4351
4364
  - Cover edge cases and error conditions
@@ -4387,7 +4400,7 @@ sections:
4387
4400
  title: Security
4388
4401
  instruction: |
4389
4402
  Define MANDATORY security requirements for AI and human developers:
4390
-
4403
+
4391
4404
  1. Focus on implementation-specific rules
4392
4405
  2. Reference security tools from Tech Stack
4393
4406
  3. Define clear patterns for common scenarios
@@ -4456,16 +4469,16 @@ sections:
4456
4469
  title: Next Steps
4457
4470
  instruction: |
4458
4471
  After completing the architecture:
4459
-
4472
+
4460
4473
  1. If project has UI components:
4461
4474
  - Use "Frontend Architecture Mode"
4462
4475
  - Provide this document as input
4463
-
4476
+
4464
4477
  2. For all projects:
4465
4478
  - Review with Product Owner
4466
4479
  - Begin story implementation with Dev agent
4467
4480
  - Set up infrastructure with DevOps agent
4468
-
4481
+
4469
4482
  3. Include specific prompts for next agents if needed
4470
4483
  sections:
4471
4484
  - id: architect-prompt
@@ -4498,16 +4511,16 @@ sections:
4498
4511
  title: Template and Framework Selection
4499
4512
  instruction: |
4500
4513
  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.
4501
-
4514
+
4502
4515
  Before proceeding with frontend architecture design, check if the project is using a frontend starter template or existing codebase:
4503
-
4516
+
4504
4517
  1. Review the PRD, main architecture document, and brainstorming brief for mentions of:
4505
4518
  - Frontend starter templates (e.g., Create React App, Next.js, Vite, Vue CLI, Angular CLI, etc.)
4506
4519
  - UI kit or component library starters
4507
4520
  - Existing frontend projects being used as a foundation
4508
4521
  - Admin dashboard templates or other specialized starters
4509
4522
  - Design system implementations
4510
-
4523
+
4511
4524
  2. If a frontend starter template or existing project is mentioned:
4512
4525
  - Ask the user to provide access via one of these methods:
4513
4526
  - Link to the starter template documentation
@@ -4523,7 +4536,7 @@ sections:
4523
4536
  - Testing setup and patterns
4524
4537
  - Build and development scripts
4525
4538
  - Use this analysis to ensure your frontend architecture aligns with the starter's patterns
4526
-
4539
+
4527
4540
  3. If no frontend starter is mentioned but this is a new UI, ensure we know what the ui language and framework is:
4528
4541
  - Based on the framework choice, suggest appropriate starters:
4529
4542
  - React: Create React App, Next.js, Vite + React
@@ -4531,11 +4544,11 @@ sections:
4531
4544
  - Angular: Angular CLI
4532
4545
  - Or suggest popular UI templates if applicable
4533
4546
  - Explain benefits specific to frontend development
4534
-
4547
+
4535
4548
  4. If the user confirms no starter template will be used:
4536
4549
  - Note that all tooling, bundling, and configuration will need manual setup
4537
4550
  - Proceed with frontend architecture from scratch
4538
-
4551
+
4539
4552
  Document the starter template decision and any constraints it imposes before proceeding.
4540
4553
  sections:
4541
4554
  - id: changelog
@@ -4557,12 +4570,24 @@ sections:
4557
4570
  rows:
4558
4571
  - ["Framework", "{{framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4559
4572
  - ["UI Library", "{{ui_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4560
- - ["State Management", "{{state_management}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4573
+ - [
4574
+ "State Management",
4575
+ "{{state_management}}",
4576
+ "{{version}}",
4577
+ "{{purpose}}",
4578
+ "{{why_chosen}}",
4579
+ ]
4561
4580
  - ["Routing", "{{routing_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4562
4581
  - ["Build Tool", "{{build_tool}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4563
4582
  - ["Styling", "{{styling_solution}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4564
4583
  - ["Testing", "{{test_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4565
- - ["Component Library", "{{component_lib}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4584
+ - [
4585
+ "Component Library",
4586
+ "{{component_lib}}",
4587
+ "{{version}}",
4588
+ "{{purpose}}",
4589
+ "{{why_chosen}}",
4590
+ ]
4566
4591
  - ["Form Handling", "{{form_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4567
4592
  - ["Animation", "{{animation_lib}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4568
4593
  - ["Dev Tools", "{{dev_tools}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
@@ -4710,33 +4735,33 @@ sections:
4710
4735
  elicit: true
4711
4736
  content: |
4712
4737
  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.
4713
-
4738
+
4714
4739
  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.
4715
4740
  sections:
4716
4741
  - id: starter-template
4717
4742
  title: Starter Template or Existing Project
4718
4743
  instruction: |
4719
4744
  Before proceeding with architecture design, check if the project is based on any starter templates or existing codebases:
4720
-
4745
+
4721
4746
  1. Review the PRD and other documents for mentions of:
4722
4747
  - Fullstack starter templates (e.g., T3 Stack, MEAN/MERN starters, Django + React templates)
4723
4748
  - Monorepo templates (e.g., Nx, Turborepo starters)
4724
4749
  - Platform-specific starters (e.g., Vercel templates, AWS Amplify starters)
4725
4750
  - Existing projects being extended or cloned
4726
-
4751
+
4727
4752
  2. If starter templates or existing projects are mentioned:
4728
4753
  - Ask the user to provide access (links, repos, or files)
4729
4754
  - Analyze to understand pre-configured choices and constraints
4730
4755
  - Note any architectural decisions already made
4731
4756
  - Identify what can be modified vs what must be retained
4732
-
4757
+
4733
4758
  3. If no starter is mentioned but this is greenfield:
4734
4759
  - Suggest appropriate fullstack starters based on tech preferences
4735
4760
  - Consider platform-specific options (Vercel, AWS, etc.)
4736
4761
  - Let user decide whether to use one
4737
-
4762
+
4738
4763
  4. Document the decision and any constraints it imposes
4739
-
4764
+
4740
4765
  If none, state "N/A - Greenfield project"
4741
4766
  - id: changelog
4742
4767
  title: Change Log
@@ -4762,17 +4787,17 @@ sections:
4762
4787
  title: Platform and Infrastructure Choice
4763
4788
  instruction: |
4764
4789
  Based on PRD requirements and technical assumptions, make a platform recommendation:
4765
-
4790
+
4766
4791
  1. Consider common patterns (not an exhaustive list, use your own best judgement and search the web as needed for emerging trends):
4767
4792
  - **Vercel + Supabase**: For rapid development with Next.js, built-in auth/storage
4768
4793
  - **AWS Full Stack**: For enterprise scale with Lambda, API Gateway, S3, Cognito
4769
4794
  - **Azure**: For .NET ecosystems or enterprise Microsoft environments
4770
4795
  - **Google Cloud**: For ML/AI heavy applications or Google ecosystem integration
4771
-
4796
+
4772
4797
  2. Present 2-3 viable options with clear pros/cons
4773
4798
  3. Make a recommendation with rationale
4774
4799
  4. Get explicit user confirmation
4775
-
4800
+
4776
4801
  Document the choice and key services that will be used.
4777
4802
  template: |
4778
4803
  **Platform:** {{selected_platform}}
@@ -4782,7 +4807,7 @@ sections:
4782
4807
  title: Repository Structure
4783
4808
  instruction: |
4784
4809
  Define the repository approach based on PRD requirements and platform choice, explain your rationale or ask questions to the user if unsure:
4785
-
4810
+
4786
4811
  1. For modern fullstack apps, monorepo is often preferred
4787
4812
  2. Consider tooling (Nx, Turborepo, Lerna, npm workspaces)
4788
4813
  3. Define package/app boundaries
@@ -4804,7 +4829,7 @@ sections:
4804
4829
  - Databases and storage
4805
4830
  - External integrations
4806
4831
  - CDN and caching layers
4807
-
4832
+
4808
4833
  Use appropriate diagram type for clarity.
4809
4834
  - id: architectural-patterns
4810
4835
  title: Architectural Patterns
@@ -4814,7 +4839,7 @@ sections:
4814
4839
  - Frontend patterns (e.g., Component-based, State management)
4815
4840
  - Backend patterns (e.g., Repository, CQRS, Event-driven)
4816
4841
  - Integration patterns (e.g., BFF, API Gateway)
4817
-
4842
+
4818
4843
  For each pattern, provide recommendation and rationale.
4819
4844
  repeatable: true
4820
4845
  template: "- **{{pattern_name}}:** {{pattern_description}} - _Rationale:_ {{rationale}}"
@@ -4828,7 +4853,7 @@ sections:
4828
4853
  title: Tech Stack
4829
4854
  instruction: |
4830
4855
  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.
4831
-
4856
+
4832
4857
  Key areas to cover:
4833
4858
  - Frontend and backend languages/frameworks
4834
4859
  - Databases and caching
@@ -4837,7 +4862,7 @@ sections:
4837
4862
  - Testing tools for both frontend and backend
4838
4863
  - Build and deployment tools
4839
4864
  - Monitoring and logging
4840
-
4865
+
4841
4866
  Upon render, elicit feedback immediately.
4842
4867
  elicit: true
4843
4868
  sections:
@@ -4847,11 +4872,29 @@ sections:
4847
4872
  columns: [Category, Technology, Version, Purpose, Rationale]
4848
4873
  rows:
4849
4874
  - ["Frontend Language", "{{fe_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4850
- - ["Frontend Framework", "{{fe_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4851
- - ["UI Component Library", "{{ui_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4875
+ - [
4876
+ "Frontend Framework",
4877
+ "{{fe_framework}}",
4878
+ "{{version}}",
4879
+ "{{purpose}}",
4880
+ "{{why_chosen}}",
4881
+ ]
4882
+ - [
4883
+ "UI Component Library",
4884
+ "{{ui_library}}",
4885
+ "{{version}}",
4886
+ "{{purpose}}",
4887
+ "{{why_chosen}}",
4888
+ ]
4852
4889
  - ["State Management", "{{state_mgmt}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4853
4890
  - ["Backend Language", "{{be_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4854
- - ["Backend Framework", "{{be_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4891
+ - [
4892
+ "Backend Framework",
4893
+ "{{be_framework}}",
4894
+ "{{version}}",
4895
+ "{{purpose}}",
4896
+ "{{why_chosen}}",
4897
+ ]
4855
4898
  - ["API Style", "{{api_style}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4856
4899
  - ["Database", "{{database}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
4857
4900
  - ["Cache", "{{cache}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
@@ -4872,14 +4915,14 @@ sections:
4872
4915
  title: Data Models
4873
4916
  instruction: |
4874
4917
  Define the core data models/entities that will be shared between frontend and backend:
4875
-
4918
+
4876
4919
  1. Review PRD requirements and identify key business entities
4877
4920
  2. For each model, explain its purpose and relationships
4878
4921
  3. Include key attributes and data types
4879
4922
  4. Show relationships between models
4880
4923
  5. Create TypeScript interfaces that can be shared
4881
4924
  6. Discuss design decisions with user
4882
-
4925
+
4883
4926
  Create a clear conceptual model before moving to database schema.
4884
4927
  elicit: true
4885
4928
  repeatable: true
@@ -4888,7 +4931,7 @@ sections:
4888
4931
  title: "{{model_name}}"
4889
4932
  template: |
4890
4933
  **Purpose:** {{model_purpose}}
4891
-
4934
+
4892
4935
  **Key Attributes:**
4893
4936
  - {{attribute_1}}: {{type_1}} - {{description_1}}
4894
4937
  - {{attribute_2}}: {{type_2}} - {{description_2}}
@@ -4907,7 +4950,7 @@ sections:
4907
4950
  title: API Specification
4908
4951
  instruction: |
4909
4952
  Based on the chosen API style from Tech Stack:
4910
-
4953
+
4911
4954
  1. If REST API, create an OpenAPI 3.0 specification
4912
4955
  2. If GraphQL, provide the GraphQL schema
4913
4956
  3. If tRPC, show router definitions
@@ -4915,7 +4958,7 @@ sections:
4915
4958
  5. Define request/response schemas based on data models
4916
4959
  6. Document authentication requirements
4917
4960
  7. Include example requests/responses
4918
-
4961
+
4919
4962
  Use appropriate format for the chosen API style. If no API (e.g., static site), skip this section.
4920
4963
  elicit: true
4921
4964
  sections:
@@ -4950,7 +4993,7 @@ sections:
4950
4993
  title: Components
4951
4994
  instruction: |
4952
4995
  Based on the architectural patterns, tech stack, and data models from above:
4953
-
4996
+
4954
4997
  1. Identify major logical components/services across the fullstack
4955
4998
  2. Consider both frontend and backend components
4956
4999
  3. Define clear boundaries and interfaces between components
@@ -4959,7 +5002,7 @@ sections:
4959
5002
  - Key interfaces/APIs exposed
4960
5003
  - Dependencies on other components
4961
5004
  - Technology specifics based on tech stack choices
4962
-
5005
+
4963
5006
  5. Create component diagrams where helpful
4964
5007
  elicit: true
4965
5008
  sections:
@@ -4968,13 +5011,13 @@ sections:
4968
5011
  title: "{{component_name}}"
4969
5012
  template: |
4970
5013
  **Responsibility:** {{component_description}}
4971
-
5014
+
4972
5015
  **Key Interfaces:**
4973
5016
  - {{interface_1}}
4974
5017
  - {{interface_2}}
4975
-
5018
+
4976
5019
  **Dependencies:** {{dependencies}}
4977
-
5020
+
4978
5021
  **Technology Stack:** {{component_tech_details}}
4979
5022
  - id: component-diagrams
4980
5023
  title: Component Diagrams
@@ -4991,13 +5034,13 @@ sections:
4991
5034
  condition: Project requires external API integrations
4992
5035
  instruction: |
4993
5036
  For each external service integration:
4994
-
5037
+
4995
5038
  1. Identify APIs needed based on PRD requirements and component design
4996
5039
  2. If documentation URLs are unknown, ask user for specifics
4997
5040
  3. Document authentication methods and security considerations
4998
5041
  4. List specific endpoints that will be used
4999
5042
  5. Note any rate limits or usage constraints
5000
-
5043
+
5001
5044
  If no external APIs are needed, state this explicitly and skip to next section.
5002
5045
  elicit: true
5003
5046
  repeatable: true
@@ -5010,10 +5053,10 @@ sections:
5010
5053
  - **Base URL(s):** {{api_base_url}}
5011
5054
  - **Authentication:** {{auth_method}}
5012
5055
  - **Rate Limits:** {{rate_limits}}
5013
-
5056
+
5014
5057
  **Key Endpoints Used:**
5015
5058
  - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
5016
-
5059
+
5017
5060
  **Integration Notes:** {{integration_considerations}}
5018
5061
 
5019
5062
  - id: core-workflows
@@ -5022,14 +5065,14 @@ sections:
5022
5065
  mermaid_type: sequence
5023
5066
  instruction: |
5024
5067
  Illustrate key system workflows using sequence diagrams:
5025
-
5068
+
5026
5069
  1. Identify critical user journeys from PRD
5027
5070
  2. Show component interactions including external APIs
5028
5071
  3. Include both frontend and backend flows
5029
5072
  4. Include error handling paths
5030
5073
  5. Document async operations
5031
5074
  6. Create both high-level and detailed diagrams as needed
5032
-
5075
+
5033
5076
  Focus on workflows that clarify architecture decisions or complex interactions.
5034
5077
  elicit: true
5035
5078
 
@@ -5037,13 +5080,13 @@ sections:
5037
5080
  title: Database Schema
5038
5081
  instruction: |
5039
5082
  Transform the conceptual data models into concrete database schemas:
5040
-
5083
+
5041
5084
  1. Use the database type(s) selected in Tech Stack
5042
5085
  2. Create schema definitions using appropriate notation
5043
5086
  3. Include indexes, constraints, and relationships
5044
5087
  4. Consider performance and scalability
5045
5088
  5. For NoSQL, show document structures
5046
-
5089
+
5047
5090
  Present schema in format appropriate to database type (SQL DDL, JSON schema, etc.)
5048
5091
  elicit: true
5049
5092
 
@@ -5179,60 +5222,60 @@ sections:
5179
5222
  type: code
5180
5223
  language: plaintext
5181
5224
  examples:
5182
- - |
5183
- {{project-name}}/
5184
- ├── .github/ # CI/CD workflows
5185
- │ └── workflows/
5186
- │ ├── ci.yaml
5187
- │ └── deploy.yaml
5188
- ├── apps/ # Application packages
5189
- │ ├── web/ # Frontend application
5190
- │ │ ├── src/
5191
- │ │ │ ├── components/ # UI components
5192
- │ │ │ ├── pages/ # Page components/routes
5193
- │ │ │ ├── hooks/ # Custom React hooks
5194
- │ │ │ ├── services/ # API client services
5195
- │ │ │ ├── stores/ # State management
5196
- │ │ │ ├── styles/ # Global styles/themes
5197
- │ │ │ └── utils/ # Frontend utilities
5198
- │ │ ├── public/ # Static assets
5199
- │ │ ├── tests/ # Frontend tests
5200
- │ │ └── package.json
5201
- │ └── api/ # Backend application
5202
- │ ├── src/
5203
- │ │ ├── routes/ # API routes/controllers
5204
- │ │ ├── services/ # Business logic
5205
- │ │ ├── models/ # Data models
5206
- │ │ ├── middleware/ # Express/API middleware
5207
- │ │ ├── utils/ # Backend utilities
5208
- │ │ └── {{serverless_or_server_entry}}
5209
- │ ├── tests/ # Backend tests
5210
- │ └── package.json
5211
- ├── packages/ # Shared packages
5212
- │ ├── shared/ # Shared types/utilities
5213
- │ │ ├── src/
5214
- │ │ │ ├── types/ # TypeScript interfaces
5215
- │ │ │ ├── constants/ # Shared constants
5216
- │ │ │ └── utils/ # Shared utilities
5217
- │ │ └── package.json
5218
- │ ├── ui/ # Shared UI components
5219
- │ │ ├── src/
5220
- │ │ └── package.json
5221
- │ └── config/ # Shared configuration
5222
- │ ├── eslint/
5223
- │ ├── typescript/
5224
- │ └── jest/
5225
- ├── infrastructure/ # IaC definitions
5226
- │ └── {{iac_structure}}
5227
- ├── scripts/ # Build/deploy scripts
5228
- ├── docs/ # Documentation
5229
- │ ├── prd.md
5230
- │ ├── front-end-spec.md
5231
- │ └── fullstack-architecture.md
5232
- ├── .env.example # Environment template
5233
- ├── package.json # Root package.json
5234
- ├── {{monorepo_config}} # Monorepo configuration
5235
- └── README.md
5225
+ - |
5226
+ {{project-name}}/
5227
+ ├── .github/ # CI/CD workflows
5228
+ │ └── workflows/
5229
+ │ ├── ci.yaml
5230
+ │ └── deploy.yaml
5231
+ ├── apps/ # Application packages
5232
+ │ ├── web/ # Frontend application
5233
+ │ │ ├── src/
5234
+ │ │ │ ├── components/ # UI components
5235
+ │ │ │ ├── pages/ # Page components/routes
5236
+ │ │ │ ├── hooks/ # Custom React hooks
5237
+ │ │ │ ├── services/ # API client services
5238
+ │ │ │ ├── stores/ # State management
5239
+ │ │ │ ├── styles/ # Global styles/themes
5240
+ │ │ │ └── utils/ # Frontend utilities
5241
+ │ │ ├── public/ # Static assets
5242
+ │ │ ├── tests/ # Frontend tests
5243
+ │ │ └── package.json
5244
+ │ └── api/ # Backend application
5245
+ │ ├── src/
5246
+ │ │ ├── routes/ # API routes/controllers
5247
+ │ │ ├── services/ # Business logic
5248
+ │ │ ├── models/ # Data models
5249
+ │ │ ├── middleware/ # Express/API middleware
5250
+ │ │ ├── utils/ # Backend utilities
5251
+ │ │ └── {{serverless_or_server_entry}}
5252
+ │ ├── tests/ # Backend tests
5253
+ │ └── package.json
5254
+ ├── packages/ # Shared packages
5255
+ │ ├── shared/ # Shared types/utilities
5256
+ │ │ ├── src/
5257
+ │ │ │ ├── types/ # TypeScript interfaces
5258
+ │ │ │ ├── constants/ # Shared constants
5259
+ │ │ │ └── utils/ # Shared utilities
5260
+ │ │ └── package.json
5261
+ │ ├── ui/ # Shared UI components
5262
+ │ │ ├── src/
5263
+ │ │ └── package.json
5264
+ │ └── config/ # Shared configuration
5265
+ │ ├── eslint/
5266
+ │ ├── typescript/
5267
+ │ └── jest/
5268
+ ├── infrastructure/ # IaC definitions
5269
+ │ └── {{iac_structure}}
5270
+ ├── scripts/ # Build/deploy scripts
5271
+ ├── docs/ # Documentation
5272
+ │ ├── prd.md
5273
+ │ ├── front-end-spec.md
5274
+ │ └── fullstack-architecture.md
5275
+ ├── .env.example # Environment template
5276
+ ├── package.json # Root package.json
5277
+ ├── {{monorepo_config}} # Monorepo configuration
5278
+ └── README.md
5236
5279
 
5237
5280
  - id: development-workflow
5238
5281
  title: Development Workflow
@@ -5259,13 +5302,13 @@ sections:
5259
5302
  template: |
5260
5303
  # Start all services
5261
5304
  {{start_all_command}}
5262
-
5305
+
5263
5306
  # Start frontend only
5264
5307
  {{start_frontend_command}}
5265
-
5308
+
5266
5309
  # Start backend only
5267
5310
  {{start_backend_command}}
5268
-
5311
+
5269
5312
  # Run tests
5270
5313
  {{test_commands}}
5271
5314
  - id: environment-config
@@ -5278,10 +5321,10 @@ sections:
5278
5321
  template: |
5279
5322
  # Frontend (.env.local)
5280
5323
  {{frontend_env_vars}}
5281
-
5324
+
5282
5325
  # Backend (.env)
5283
5326
  {{backend_env_vars}}
5284
-
5327
+
5285
5328
  # Shared
5286
5329
  {{shared_env_vars}}
5287
5330
 
@@ -5298,7 +5341,7 @@ sections:
5298
5341
  - **Build Command:** {{frontend_build_command}}
5299
5342
  - **Output Directory:** {{frontend_output_dir}}
5300
5343
  - **CDN/Edge:** {{cdn_strategy}}
5301
-
5344
+
5302
5345
  **Backend Deployment:**
5303
5346
  - **Platform:** {{backend_deploy_platform}}
5304
5347
  - **Build Command:** {{backend_build_command}}
@@ -5329,12 +5372,12 @@ sections:
5329
5372
  - CSP Headers: {{csp_policy}}
5330
5373
  - XSS Prevention: {{xss_strategy}}
5331
5374
  - Secure Storage: {{storage_strategy}}
5332
-
5375
+
5333
5376
  **Backend Security:**
5334
5377
  - Input Validation: {{validation_approach}}
5335
5378
  - Rate Limiting: {{rate_limit_config}}
5336
5379
  - CORS Policy: {{cors_config}}
5337
-
5380
+
5338
5381
  **Authentication Security:**
5339
5382
  - Token Storage: {{token_strategy}}
5340
5383
  - Session Management: {{session_approach}}
@@ -5346,7 +5389,7 @@ sections:
5346
5389
  - Bundle Size Target: {{bundle_size}}
5347
5390
  - Loading Strategy: {{loading_approach}}
5348
5391
  - Caching Strategy: {{fe_cache_strategy}}
5349
-
5392
+
5350
5393
  **Backend Performance:**
5351
5394
  - Response Time Target: {{response_target}}
5352
5395
  - Database Optimization: {{db_optimization}}
@@ -5362,10 +5405,10 @@ sections:
5362
5405
  type: code
5363
5406
  language: text
5364
5407
  template: |
5365
- E2E Tests
5366
- / \
5367
- Integration Tests
5368
- / \
5408
+ E2E Tests
5409
+ / \
5410
+ Integration Tests
5411
+ / \
5369
5412
  Frontend Unit Backend Unit
5370
5413
  - id: test-organization
5371
5414
  title: Test Organization
@@ -5484,7 +5527,7 @@ sections:
5484
5527
  - JavaScript errors
5485
5528
  - API response times
5486
5529
  - User interactions
5487
-
5530
+
5488
5531
  **Backend Metrics:**
5489
5532
  - Request rate
5490
5533
  - Error rate
@@ -5515,40 +5558,40 @@ sections:
5515
5558
  title: Introduction
5516
5559
  instruction: |
5517
5560
  IMPORTANT - SCOPE AND ASSESSMENT REQUIRED:
5518
-
5561
+
5519
5562
  This architecture document is for SIGNIFICANT enhancements to existing projects that require comprehensive architectural planning. Before proceeding:
5520
-
5563
+
5521
5564
  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."
5522
-
5565
+
5523
5566
  2. **REQUIRED INPUTS**:
5524
5567
  - Completed brownfield-prd.md
5525
5568
  - Existing project technical documentation (from docs folder or user-provided)
5526
5569
  - Access to existing project structure (IDE or uploaded files)
5527
-
5570
+
5528
5571
  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.
5529
-
5572
+
5530
5573
  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?"
5531
-
5574
+
5532
5575
  If any required inputs are missing, request them before proceeding.
5533
5576
  elicit: true
5534
5577
  sections:
5535
5578
  - id: intro-content
5536
5579
  content: |
5537
5580
  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.
5538
-
5581
+
5539
5582
  **Relationship to Existing Architecture:**
5540
5583
  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.
5541
5584
  - id: existing-project-analysis
5542
5585
  title: Existing Project Analysis
5543
5586
  instruction: |
5544
5587
  Analyze the existing project structure and architecture:
5545
-
5588
+
5546
5589
  1. Review existing documentation in docs folder
5547
5590
  2. Examine current technology stack and versions
5548
5591
  3. Identify existing architectural patterns and conventions
5549
5592
  4. Note current deployment and infrastructure setup
5550
5593
  5. Document any constraints or limitations
5551
-
5594
+
5552
5595
  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."
5553
5596
  elicit: true
5554
5597
  sections:
@@ -5577,12 +5620,12 @@ sections:
5577
5620
  title: Enhancement Scope and Integration Strategy
5578
5621
  instruction: |
5579
5622
  Define how the enhancement will integrate with the existing system:
5580
-
5623
+
5581
5624
  1. Review the brownfield PRD enhancement scope
5582
5625
  2. Identify integration points with existing code
5583
5626
  3. Define boundaries between new and existing functionality
5584
5627
  4. Establish compatibility requirements
5585
-
5628
+
5586
5629
  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?"
5587
5630
  elicit: true
5588
5631
  sections:
@@ -5611,7 +5654,7 @@ sections:
5611
5654
  title: Tech Stack Alignment
5612
5655
  instruction: |
5613
5656
  Ensure new components align with existing technology choices:
5614
-
5657
+
5615
5658
  1. Use existing technology stack as the foundation
5616
5659
  2. Only introduce new technologies if absolutely necessary
5617
5660
  3. Justify any new additions with clear rationale
@@ -5634,7 +5677,7 @@ sections:
5634
5677
  title: Data Models and Schema Changes
5635
5678
  instruction: |
5636
5679
  Define new data models and how they integrate with existing schema:
5637
-
5680
+
5638
5681
  1. Identify new entities required for the enhancement
5639
5682
  2. Define relationships with existing data models
5640
5683
  3. Plan database schema changes (additions, modifications)
@@ -5650,11 +5693,11 @@ sections:
5650
5693
  template: |
5651
5694
  **Purpose:** {{model_purpose}}
5652
5695
  **Integration:** {{integration_with_existing}}
5653
-
5696
+
5654
5697
  **Key Attributes:**
5655
5698
  - {{attribute_1}}: {{type_1}} - {{description_1}}
5656
5699
  - {{attribute_2}}: {{type_2}} - {{description_2}}
5657
-
5700
+
5658
5701
  **Relationships:**
5659
5702
  - **With Existing:** {{existing_relationships}}
5660
5703
  - **With New:** {{new_relationships}}
@@ -5666,7 +5709,7 @@ sections:
5666
5709
  - **Modified Tables:** {{modified_tables_list}}
5667
5710
  - **New Indexes:** {{new_indexes_list}}
5668
5711
  - **Migration Strategy:** {{migration_approach}}
5669
-
5712
+
5670
5713
  **Backward Compatibility:**
5671
5714
  - {{compatibility_measure_1}}
5672
5715
  - {{compatibility_measure_2}}
@@ -5675,12 +5718,12 @@ sections:
5675
5718
  title: Component Architecture
5676
5719
  instruction: |
5677
5720
  Define new components and their integration with existing architecture:
5678
-
5721
+
5679
5722
  1. Identify new components required for the enhancement
5680
5723
  2. Define interfaces with existing components
5681
5724
  3. Establish clear boundaries and responsibilities
5682
5725
  4. Plan integration points and data flow
5683
-
5726
+
5684
5727
  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?"
5685
5728
  elicit: true
5686
5729
  sections:
@@ -5693,15 +5736,15 @@ sections:
5693
5736
  template: |
5694
5737
  **Responsibility:** {{component_description}}
5695
5738
  **Integration Points:** {{integration_points}}
5696
-
5739
+
5697
5740
  **Key Interfaces:**
5698
5741
  - {{interface_1}}
5699
5742
  - {{interface_2}}
5700
-
5743
+
5701
5744
  **Dependencies:**
5702
5745
  - **Existing Components:** {{existing_dependencies}}
5703
5746
  - **New Components:** {{new_dependencies}}
5704
-
5747
+
5705
5748
  **Technology Stack:** {{component_tech_details}}
5706
5749
  - id: interaction-diagram
5707
5750
  title: Component Interaction Diagram
@@ -5714,7 +5757,7 @@ sections:
5714
5757
  condition: Enhancement requires API changes
5715
5758
  instruction: |
5716
5759
  Define new API endpoints and integration with existing APIs:
5717
-
5760
+
5718
5761
  1. Plan new API endpoints required for the enhancement
5719
5762
  2. Ensure consistency with existing API patterns
5720
5763
  3. Define authentication and authorization integration
@@ -5764,17 +5807,17 @@ sections:
5764
5807
  - **Base URL:** {{api_base_url}}
5765
5808
  - **Authentication:** {{auth_method}}
5766
5809
  - **Integration Method:** {{integration_approach}}
5767
-
5810
+
5768
5811
  **Key Endpoints Used:**
5769
5812
  - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
5770
-
5813
+
5771
5814
  **Error Handling:** {{error_handling_strategy}}
5772
5815
 
5773
5816
  - id: source-tree-integration
5774
5817
  title: Source Tree Integration
5775
5818
  instruction: |
5776
5819
  Define how new code will integrate with existing project structure:
5777
-
5820
+
5778
5821
  1. Follow existing project organization patterns
5779
5822
  2. Identify where new files/folders will be placed
5780
5823
  3. Ensure consistency with existing naming conventions
@@ -5813,7 +5856,7 @@ sections:
5813
5856
  title: Infrastructure and Deployment Integration
5814
5857
  instruction: |
5815
5858
  Define how the enhancement will be deployed alongside existing infrastructure:
5816
-
5859
+
5817
5860
  1. Use existing deployment pipeline and infrastructure
5818
5861
  2. Identify any infrastructure changes needed
5819
5862
  3. Plan deployment strategy to minimize risk
@@ -5843,7 +5886,7 @@ sections:
5843
5886
  title: Coding Standards and Conventions
5844
5887
  instruction: |
5845
5888
  Ensure new code follows existing project conventions:
5846
-
5889
+
5847
5890
  1. Document existing coding standards from project analysis
5848
5891
  2. Identify any enhancement-specific requirements
5849
5892
  3. Ensure consistency with existing codebase patterns
@@ -5874,7 +5917,7 @@ sections:
5874
5917
  title: Testing Strategy
5875
5918
  instruction: |
5876
5919
  Define testing approach for the enhancement:
5877
-
5920
+
5878
5921
  1. Integrate with existing test suite
5879
5922
  2. Ensure existing functionality remains intact
5880
5923
  3. Plan for testing new features
@@ -5914,7 +5957,7 @@ sections:
5914
5957
  title: Security Integration
5915
5958
  instruction: |
5916
5959
  Ensure security consistency with existing system:
5917
-
5960
+
5918
5961
  1. Follow existing security patterns and tools
5919
5962
  2. Ensure new features don't introduce vulnerabilities
5920
5963
  3. Maintain existing security posture
@@ -5949,7 +5992,7 @@ sections:
5949
5992
  title: Next Steps
5950
5993
  instruction: |
5951
5994
  After completing the brownfield architecture:
5952
-
5995
+
5953
5996
  1. Review integration points with existing system
5954
5997
  2. Begin story implementation with Dev agent
5955
5998
  3. Set up deployment pipeline integration
@@ -7289,7 +7332,7 @@ sections:
7289
7332
  condition: PRD has UX/UI requirements
7290
7333
  instruction: |
7291
7334
  Capture high-level UI/UX vision to guide Design Architect and to inform story creation. Steps:
7292
-
7335
+
7293
7336
  1. Pre-fill all subsections with educated guesses based on project context
7294
7337
  2. Present the complete rendered section to user
7295
7338
  3. Clearly let the user know where assumptions were made
@@ -7331,7 +7374,7 @@ sections:
7331
7374
  title: Technical Assumptions
7332
7375
  instruction: |
7333
7376
  Gather technical decisions that will guide the Architect. Steps:
7334
-
7377
+
7335
7378
  1. Check if .bmad-core/data/technical-preferences.yaml or an attached technical-preferences file exists - use it to pre-populate choices
7336
7379
  2. Ask user about: languages, frameworks, starter templates, libraries, APIs, deployment targets
7337
7380
  3. For unknowns, offer guidance based on project goals and MVP scope
@@ -7359,9 +7402,9 @@ sections:
7359
7402
  title: Epic List
7360
7403
  instruction: |
7361
7404
  Present a high-level list of all epics for user approval. Each epic should have a title and a short (1 sentence) goal statement. This allows the user to review the overall structure before diving into details.
7362
-
7405
+
7363
7406
  CRITICAL: Epics MUST be logically sequential following agile best practices:
7364
-
7407
+
7365
7408
  - Each epic should deliver a significant, end-to-end, fully deployable increment of testable functionality
7366
7409
  - Epic 1 must establish foundational project infrastructure (app setup, Git, CI/CD, core services) unless we are adding new functionality to an existing app, while also delivering an initial piece of functionality, even as simple as a health-check route or display of a simple canary page - remember this when we produce the stories for the first epic!
7367
7410
  - Each subsequent epic builds upon previous epics' functionality delivering major blocks of functionality that provide tangible value to users or business when deployed
@@ -7380,11 +7423,11 @@ sections:
7380
7423
  repeatable: true
7381
7424
  instruction: |
7382
7425
  After the epic list is approved, present each epic with all its stories and acceptance criteria as a complete review unit.
7383
-
7426
+
7384
7427
  For each epic provide expanded goal (2-3 sentences describing the objective and value all the stories will achieve).
7385
-
7428
+
7386
7429
  CRITICAL STORY SEQUENCING REQUIREMENTS:
7387
-
7430
+
7388
7431
  - Stories within each epic MUST be logically sequential
7389
7432
  - Each story should be a "vertical slice" delivering complete functionality aside from early enabler stories for project foundation
7390
7433
  - No story should depend on work from a later story or epic
@@ -7412,7 +7455,7 @@ sections:
7412
7455
  repeatable: true
7413
7456
  instruction: |
7414
7457
  Define clear, comprehensive, and testable acceptance criteria that:
7415
-
7458
+
7416
7459
  - Precisely define what "done" means from a functional perspective
7417
7460
  - Are unambiguous and serve as basis for verification
7418
7461
  - Include any critical non-functional requirements from the PRD
@@ -7454,19 +7497,19 @@ sections:
7454
7497
  title: Intro Project Analysis and Context
7455
7498
  instruction: |
7456
7499
  IMPORTANT - SCOPE ASSESSMENT REQUIRED:
7457
-
7500
+
7458
7501
  This PRD is for SIGNIFICANT enhancements to existing projects that require comprehensive planning and multiple stories. Before proceeding:
7459
-
7502
+
7460
7503
  1. **Assess Enhancement Complexity**: If this is a simple feature addition or bug fix that could be completed in 1-2 focused development sessions, STOP and recommend: "For simpler changes, consider using the brownfield-create-epic or brownfield-create-story task with the Product Owner instead. This full PRD process is designed for substantial enhancements that require architectural planning and multiple coordinated stories."
7461
-
7504
+
7462
7505
  2. **Project Context**: Determine if we're working in an IDE with the project already loaded or if the user needs to provide project information. If project files are available, analyze existing documentation in the docs folder. If insufficient documentation exists, recommend running the document-project task first.
7463
-
7506
+
7464
7507
  3. **Deep Assessment Requirement**: You MUST thoroughly analyze the existing project structure, patterns, and constraints before making ANY suggestions. Every recommendation must be grounded in actual project analysis, not assumptions.
7465
-
7508
+
7466
7509
  Gather comprehensive information about the existing project. This section must be completed before proceeding with requirements.
7467
-
7510
+
7468
7511
  CRITICAL: Throughout this analysis, explicitly confirm your understanding with the user. For every assumption you make about the existing project, ask: "Based on my analysis, I understand that [assumption]. Is this correct?"
7469
-
7512
+
7470
7513
  Do not proceed with any recommendations until the user has validated your understanding of the existing system.
7471
7514
  sections:
7472
7515
  - id: existing-project-overview
@@ -7492,7 +7535,7 @@ sections:
7492
7535
  - Note: "Document-project analysis available - using existing technical documentation"
7493
7536
  - List key documents created by document-project
7494
7537
  - Skip the missing documentation check below
7495
-
7538
+
7496
7539
  Otherwise, check for existing documentation:
7497
7540
  sections:
7498
7541
  - id: available-docs
@@ -7616,7 +7659,7 @@ sections:
7616
7659
  If document-project output available:
7617
7660
  - Extract from "Actual Tech Stack" table in High Level Architecture section
7618
7661
  - Include version numbers and any noted constraints
7619
-
7662
+
7620
7663
  Otherwise, document the current technology stack:
7621
7664
  template: |
7622
7665
  **Languages**: {{languages}}
@@ -7655,7 +7698,7 @@ sections:
7655
7698
  - Reference "Technical Debt and Known Issues" section
7656
7699
  - Include "Workarounds and Gotchas" that might impact enhancement
7657
7700
  - Note any identified constraints from "Critical Technical Debt"
7658
-
7701
+
7659
7702
  Build risk assessment incorporating existing known issues:
7660
7703
  template: |
7661
7704
  **Technical Risks**: {{technical_risks}}
@@ -7678,7 +7721,7 @@ sections:
7678
7721
  title: "Epic 1: {{enhancement_title}}"
7679
7722
  instruction: |
7680
7723
  Comprehensive epic that delivers the brownfield enhancement while maintaining existing functionality
7681
-
7724
+
7682
7725
  CRITICAL STORY SEQUENCING FOR BROWNFIELD:
7683
7726
  - Stories must ensure existing functionality remains intact
7684
7727
  - Each story should include verification that existing features still work
@@ -7691,7 +7734,7 @@ sections:
7691
7734
  - Each story must deliver value while maintaining system integrity
7692
7735
  template: |
7693
7736
  **Epic Goal**: {{epic_goal}}
7694
-
7737
+
7695
7738
  **Integration Requirements**: {{integration_requirements}}
7696
7739
  sections:
7697
7740
  - id: story
@@ -8291,7 +8334,7 @@ workflow:
8291
8334
  elicitation: advanced-elicitation
8292
8335
 
8293
8336
  agent_config:
8294
- editable_sections:
8337
+ editable_sections:
8295
8338
  - Status
8296
8339
  - Story
8297
8340
  - Acceptance Criteria
@@ -8308,7 +8351,7 @@ sections:
8308
8351
  instruction: Select the current status of the story
8309
8352
  owner: scrum-master
8310
8353
  editors: [scrum-master, dev-agent]
8311
-
8354
+
8312
8355
  - id: story
8313
8356
  title: Story
8314
8357
  type: template-text
@@ -8320,7 +8363,7 @@ sections:
8320
8363
  elicit: true
8321
8364
  owner: scrum-master
8322
8365
  editors: [scrum-master]
8323
-
8366
+
8324
8367
  - id: acceptance-criteria
8325
8368
  title: Acceptance Criteria
8326
8369
  type: numbered-list
@@ -8328,7 +8371,7 @@ sections:
8328
8371
  elicit: true
8329
8372
  owner: scrum-master
8330
8373
  editors: [scrum-master]
8331
-
8374
+
8332
8375
  - id: tasks-subtasks
8333
8376
  title: Tasks / Subtasks
8334
8377
  type: bullet-list
@@ -8345,7 +8388,7 @@ sections:
8345
8388
  elicit: true
8346
8389
  owner: scrum-master
8347
8390
  editors: [scrum-master, dev-agent]
8348
-
8391
+
8349
8392
  - id: dev-notes
8350
8393
  title: Dev Notes
8351
8394
  instruction: |
@@ -8369,7 +8412,7 @@ sections:
8369
8412
  elicit: true
8370
8413
  owner: scrum-master
8371
8414
  editors: [scrum-master]
8372
-
8415
+
8373
8416
  - id: change-log
8374
8417
  title: Change Log
8375
8418
  type: table
@@ -8377,7 +8420,7 @@ sections:
8377
8420
  instruction: Track changes made to this story document
8378
8421
  owner: scrum-master
8379
8422
  editors: [scrum-master, dev-agent, qa-agent]
8380
-
8423
+
8381
8424
  - id: dev-agent-record
8382
8425
  title: Dev Agent Record
8383
8426
  instruction: This section is populated by the development agent during implementation
@@ -8390,25 +8433,25 @@ sections:
8390
8433
  instruction: Record the specific AI agent model and version used for development
8391
8434
  owner: dev-agent
8392
8435
  editors: [dev-agent]
8393
-
8436
+
8394
8437
  - id: debug-log-references
8395
8438
  title: Debug Log References
8396
8439
  instruction: Reference any debug logs or traces generated during development
8397
8440
  owner: dev-agent
8398
8441
  editors: [dev-agent]
8399
-
8442
+
8400
8443
  - id: completion-notes
8401
8444
  title: Completion Notes List
8402
8445
  instruction: Notes about the completion of tasks and any issues encountered
8403
8446
  owner: dev-agent
8404
8447
  editors: [dev-agent]
8405
-
8448
+
8406
8449
  - id: file-list
8407
8450
  title: File List
8408
8451
  instruction: List all files created, modified, or affected during story implementation
8409
8452
  owner: dev-agent
8410
8453
  editors: [dev-agent]
8411
-
8454
+
8412
8455
  - id: qa-results
8413
8456
  title: QA Results
8414
8457
  instruction: Results from QA Agent QA review of the completed story implementation
@@ -8860,10 +8903,10 @@ Perform a comprehensive test architecture review with quality gate decision. Thi
8860
8903
 
8861
8904
  ```yaml
8862
8905
  required:
8863
- - story_id: "{epic}.{story}" # e.g., "1.3"
8864
- - story_path: "docs/stories/{epic}.{story}.*.md"
8865
- - story_title: "{title}" # If missing, derive from story file H1
8866
- - story_slug: "{slug}" # If missing, derive from title (lowercase, hyphenated)
8906
+ - story_id: '{epic}.{story}' # e.g., "1.3"
8907
+ - story_path: '{devStoryLocation}/{epic}.{story}.*.md' # Path from core-config.yaml
8908
+ - story_title: '{title}' # If missing, derive from story file H1
8909
+ - story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
8867
8910
  ```
8868
8911
 
8869
8912
  ## Prerequisites
@@ -9025,6 +9068,8 @@ Gate: {STATUS} → docs/qa/gates/{epic}.{story}-{slug}.yml
9025
9068
  Risk profile: docs/qa/assessments/{epic}.{story}-risk-{YYYYMMDD}.md
9026
9069
  NFR assessment: docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md
9027
9070
 
9071
+ # Note: Paths should reference core-config.yaml for custom configurations
9072
+
9028
9073
  ### Recommended Status
9029
9074
 
9030
9075
  [✓ Ready for Done] / [✗ Changes Required - See unchecked items above]
@@ -9036,26 +9081,26 @@ NFR assessment: docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md
9036
9081
  **Template and Directory:**
9037
9082
 
9038
9083
  - Render from `templates/qa-gate-tmpl.yaml`
9039
- - Create `docs/qa/gates/` directory if missing
9084
+ - Create `docs/qa/gates/` directory if missing (or configure in core-config.yaml)
9040
9085
  - Save to: `docs/qa/gates/{epic}.{story}-{slug}.yml`
9041
9086
 
9042
9087
  Gate file structure:
9043
9088
 
9044
9089
  ```yaml
9045
9090
  schema: 1
9046
- story: "{epic}.{story}"
9047
- story_title: "{story title}"
9091
+ story: '{epic}.{story}'
9092
+ story_title: '{story title}'
9048
9093
  gate: PASS|CONCERNS|FAIL|WAIVED
9049
- status_reason: "1-2 sentence explanation of gate decision"
9050
- reviewer: "Quinn (Test Architect)"
9051
- updated: "{ISO-8601 timestamp}"
9094
+ status_reason: '1-2 sentence explanation of gate decision'
9095
+ reviewer: 'Quinn (Test Architect)'
9096
+ updated: '{ISO-8601 timestamp}'
9052
9097
 
9053
9098
  top_issues: [] # Empty if no issues
9054
9099
  waiver: { active: false } # Set active: true only if WAIVED
9055
9100
 
9056
9101
  # Extended fields (optional but recommended):
9057
9102
  quality_score: 0-100 # 100 - (20*FAILs) - (10*CONCERNS) or use technical-preferences.md weights
9058
- expires: "{ISO-8601 timestamp}" # Typically 2 weeks from review
9103
+ expires: '{ISO-8601 timestamp}' # Typically 2 weeks from review
9059
9104
 
9060
9105
  evidence:
9061
9106
  tests_reviewed: { count }
@@ -9067,24 +9112,24 @@ evidence:
9067
9112
  nfr_validation:
9068
9113
  security:
9069
9114
  status: PASS|CONCERNS|FAIL
9070
- notes: "Specific findings"
9115
+ notes: 'Specific findings'
9071
9116
  performance:
9072
9117
  status: PASS|CONCERNS|FAIL
9073
- notes: "Specific findings"
9118
+ notes: 'Specific findings'
9074
9119
  reliability:
9075
9120
  status: PASS|CONCERNS|FAIL
9076
- notes: "Specific findings"
9121
+ notes: 'Specific findings'
9077
9122
  maintainability:
9078
9123
  status: PASS|CONCERNS|FAIL
9079
- notes: "Specific findings"
9124
+ notes: 'Specific findings'
9080
9125
 
9081
9126
  recommendations:
9082
9127
  immediate: # Must fix before production
9083
- - action: "Add rate limiting"
9084
- refs: ["api/auth/login.ts"]
9128
+ - action: 'Add rate limiting'
9129
+ refs: ['api/auth/login.ts']
9085
9130
  future: # Can be addressed later
9086
- - action: "Consider caching"
9087
- refs: ["services/data.ts"]
9131
+ - action: 'Consider caching'
9132
+ refs: ['services/data.ts']
9088
9133
  ```
9089
9134
 
9090
9135
  ### Gate Decision Criteria
@@ -9196,11 +9241,11 @@ Slug rules:
9196
9241
 
9197
9242
  ```yaml
9198
9243
  schema: 1
9199
- story: "{epic}.{story}"
9244
+ story: '{epic}.{story}'
9200
9245
  gate: PASS|CONCERNS|FAIL|WAIVED
9201
- status_reason: "1-2 sentence explanation of gate decision"
9202
- reviewer: "Quinn"
9203
- updated: "{ISO-8601 timestamp}"
9246
+ status_reason: '1-2 sentence explanation of gate decision'
9247
+ reviewer: 'Quinn'
9248
+ updated: '{ISO-8601 timestamp}'
9204
9249
  top_issues: [] # Empty array if no issues
9205
9250
  waiver: { active: false } # Only set active: true if WAIVED
9206
9251
  ```
@@ -9209,20 +9254,20 @@ waiver: { active: false } # Only set active: true if WAIVED
9209
9254
 
9210
9255
  ```yaml
9211
9256
  schema: 1
9212
- story: "1.3"
9257
+ story: '1.3'
9213
9258
  gate: CONCERNS
9214
- status_reason: "Missing rate limiting on auth endpoints poses security risk."
9215
- reviewer: "Quinn"
9216
- updated: "2025-01-12T10:15:00Z"
9259
+ status_reason: 'Missing rate limiting on auth endpoints poses security risk.'
9260
+ reviewer: 'Quinn'
9261
+ updated: '2025-01-12T10:15:00Z'
9217
9262
  top_issues:
9218
- - id: "SEC-001"
9263
+ - id: 'SEC-001'
9219
9264
  severity: high # ONLY: low|medium|high
9220
- finding: "No rate limiting on login endpoint"
9221
- suggested_action: "Add rate limiting middleware before production"
9222
- - id: "TEST-001"
9265
+ finding: 'No rate limiting on login endpoint'
9266
+ suggested_action: 'Add rate limiting middleware before production'
9267
+ - id: 'TEST-001'
9223
9268
  severity: medium
9224
- finding: "No integration tests for auth flow"
9225
- suggested_action: "Add integration test coverage"
9269
+ finding: 'No integration tests for auth flow'
9270
+ suggested_action: 'Add integration test coverage'
9226
9271
  waiver: { active: false }
9227
9272
  ```
9228
9273
 
@@ -9230,20 +9275,20 @@ waiver: { active: false }
9230
9275
 
9231
9276
  ```yaml
9232
9277
  schema: 1
9233
- story: "1.3"
9278
+ story: '1.3'
9234
9279
  gate: WAIVED
9235
- status_reason: "Known issues accepted for MVP release."
9236
- reviewer: "Quinn"
9237
- updated: "2025-01-12T10:15:00Z"
9280
+ status_reason: 'Known issues accepted for MVP release.'
9281
+ reviewer: 'Quinn'
9282
+ updated: '2025-01-12T10:15:00Z'
9238
9283
  top_issues:
9239
- - id: "PERF-001"
9284
+ - id: 'PERF-001'
9240
9285
  severity: low
9241
- finding: "Dashboard loads slowly with 1000+ items"
9242
- suggested_action: "Implement pagination in next sprint"
9286
+ finding: 'Dashboard loads slowly with 1000+ items'
9287
+ suggested_action: 'Implement pagination in next sprint'
9243
9288
  waiver:
9244
9289
  active: true
9245
- reason: "MVP release - performance optimization deferred"
9246
- approved_by: "Product Owner"
9290
+ reason: 'MVP release - performance optimization deferred'
9291
+ approved_by: 'Product Owner'
9247
9292
  ```
9248
9293
 
9249
9294
  ## Gate Decision Criteria
@@ -9362,21 +9407,21 @@ Identify all testable requirements from:
9362
9407
  For each requirement, document which tests validate it. Use Given-When-Then to describe what the test validates (not how it's written):
9363
9408
 
9364
9409
  ```yaml
9365
- requirement: "AC1: User can login with valid credentials"
9410
+ requirement: 'AC1: User can login with valid credentials'
9366
9411
  test_mappings:
9367
- - test_file: "auth/login.test.ts"
9368
- test_case: "should successfully login with valid email and password"
9412
+ - test_file: 'auth/login.test.ts'
9413
+ test_case: 'should successfully login with valid email and password'
9369
9414
  # Given-When-Then describes WHAT the test validates, not HOW it's coded
9370
- given: "A registered user with valid credentials"
9371
- when: "They submit the login form"
9372
- then: "They are redirected to dashboard and session is created"
9415
+ given: 'A registered user with valid credentials'
9416
+ when: 'They submit the login form'
9417
+ then: 'They are redirected to dashboard and session is created'
9373
9418
  coverage: full
9374
9419
 
9375
- - test_file: "e2e/auth-flow.test.ts"
9376
- test_case: "complete login flow"
9377
- given: "User on login page"
9378
- when: "Entering valid credentials and submitting"
9379
- then: "Dashboard loads with user data"
9420
+ - test_file: 'e2e/auth-flow.test.ts'
9421
+ test_case: 'complete login flow'
9422
+ given: 'User on login page'
9423
+ when: 'Entering valid credentials and submitting'
9424
+ then: 'Dashboard loads with user data'
9380
9425
  coverage: integration
9381
9426
  ```
9382
9427
 
@@ -9398,19 +9443,19 @@ Document any gaps found:
9398
9443
 
9399
9444
  ```yaml
9400
9445
  coverage_gaps:
9401
- - requirement: "AC3: Password reset email sent within 60 seconds"
9402
- gap: "No test for email delivery timing"
9446
+ - requirement: 'AC3: Password reset email sent within 60 seconds'
9447
+ gap: 'No test for email delivery timing'
9403
9448
  severity: medium
9404
9449
  suggested_test:
9405
9450
  type: integration
9406
- description: "Test email service SLA compliance"
9451
+ description: 'Test email service SLA compliance'
9407
9452
 
9408
- - requirement: "AC5: Support 1000 concurrent users"
9409
- gap: "No load testing implemented"
9453
+ - requirement: 'AC5: Support 1000 concurrent users'
9454
+ gap: 'No load testing implemented'
9410
9455
  severity: high
9411
9456
  suggested_test:
9412
9457
  type: performance
9413
- description: "Load test with 1000 concurrent connections"
9458
+ description: 'Load test with 1000 concurrent connections'
9414
9459
  ```
9415
9460
 
9416
9461
  ## Outputs
@@ -9426,11 +9471,11 @@ trace:
9426
9471
  full: Y
9427
9472
  partial: Z
9428
9473
  none: W
9429
- planning_ref: "docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md"
9474
+ planning_ref: 'docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md'
9430
9475
  uncovered:
9431
- - ac: "AC3"
9432
- reason: "No test found for password reset timing"
9433
- notes: "See docs/qa/assessments/{epic}.{story}-trace-{YYYYMMDD}.md"
9476
+ - ac: 'AC3'
9477
+ reason: 'No test found for password reset timing'
9478
+ notes: 'See docs/qa/assessments/{epic}.{story}-trace-{YYYYMMDD}.md'
9434
9479
  ```
9435
9480
 
9436
9481
  ### Output 2: Traceability Report
@@ -9604,10 +9649,10 @@ Generate a comprehensive risk assessment matrix for a story implementation using
9604
9649
 
9605
9650
  ```yaml
9606
9651
  required:
9607
- - story_id: "{epic}.{story}" # e.g., "1.3"
9608
- - story_path: "docs/stories/{epic}.{story}.*.md"
9609
- - story_title: "{title}" # If missing, derive from story file H1
9610
- - story_slug: "{slug}" # If missing, derive from title (lowercase, hyphenated)
9652
+ - story_id: '{epic}.{story}' # e.g., "1.3"
9653
+ - story_path: 'docs/stories/{epic}.{story}.*.md'
9654
+ - story_title: '{title}' # If missing, derive from story file H1
9655
+ - story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
9611
9656
  ```
9612
9657
 
9613
9658
  ## Purpose
@@ -9677,14 +9722,14 @@ For each category, identify specific risks:
9677
9722
 
9678
9723
  ```yaml
9679
9724
  risk:
9680
- id: "SEC-001" # Use prefixes: SEC, PERF, DATA, BUS, OPS, TECH
9725
+ id: 'SEC-001' # Use prefixes: SEC, PERF, DATA, BUS, OPS, TECH
9681
9726
  category: security
9682
- title: "Insufficient input validation on user forms"
9683
- description: "Form inputs not properly sanitized could lead to XSS attacks"
9727
+ title: 'Insufficient input validation on user forms'
9728
+ description: 'Form inputs not properly sanitized could lead to XSS attacks'
9684
9729
  affected_components:
9685
- - "UserRegistrationForm"
9686
- - "ProfileUpdateForm"
9687
- detection_method: "Code review revealed missing validation"
9730
+ - 'UserRegistrationForm'
9731
+ - 'ProfileUpdateForm'
9732
+ detection_method: 'Code review revealed missing validation'
9688
9733
  ```
9689
9734
 
9690
9735
  ### 2. Risk Assessment
@@ -9731,20 +9776,20 @@ For each identified risk, provide mitigation:
9731
9776
 
9732
9777
  ```yaml
9733
9778
  mitigation:
9734
- risk_id: "SEC-001"
9735
- strategy: "preventive" # preventive|detective|corrective
9779
+ risk_id: 'SEC-001'
9780
+ strategy: 'preventive' # preventive|detective|corrective
9736
9781
  actions:
9737
- - "Implement input validation library (e.g., validator.js)"
9738
- - "Add CSP headers to prevent XSS execution"
9739
- - "Sanitize all user inputs before storage"
9740
- - "Escape all outputs in templates"
9782
+ - 'Implement input validation library (e.g., validator.js)'
9783
+ - 'Add CSP headers to prevent XSS execution'
9784
+ - 'Sanitize all user inputs before storage'
9785
+ - 'Escape all outputs in templates'
9741
9786
  testing_requirements:
9742
- - "Security testing with OWASP ZAP"
9743
- - "Manual penetration testing of forms"
9744
- - "Unit tests for validation functions"
9745
- residual_risk: "Low - Some zero-day vulnerabilities may remain"
9746
- owner: "dev"
9747
- timeline: "Before deployment"
9787
+ - 'Security testing with OWASP ZAP'
9788
+ - 'Manual penetration testing of forms'
9789
+ - 'Unit tests for validation functions'
9790
+ residual_risk: 'Low - Some zero-day vulnerabilities may remain'
9791
+ owner: 'dev'
9792
+ timeline: 'Before deployment'
9748
9793
  ```
9749
9794
 
9750
9795
  ## Outputs
@@ -9770,12 +9815,12 @@ risk_summary:
9770
9815
  highest:
9771
9816
  id: SEC-001
9772
9817
  score: 9
9773
- title: "XSS on profile form"
9818
+ title: 'XSS on profile form'
9774
9819
  recommendations:
9775
9820
  must_fix:
9776
- - "Add input sanitization & CSP"
9821
+ - 'Add input sanitization & CSP'
9777
9822
  monitor:
9778
- - "Add security alerts for auth endpoints"
9823
+ - 'Add security alerts for auth endpoints'
9779
9824
  ```
9780
9825
 
9781
9826
  ### Output 2: Markdown Report
@@ -9960,299 +10005,79 @@ Create comprehensive test scenarios with appropriate test level recommendations
9960
10005
 
9961
10006
  ```yaml
9962
10007
  required:
9963
- - story_id: "{epic}.{story}" # e.g., "1.3"
9964
- - story_path: "docs/stories/{epic}.{story}.*.md"
9965
- - story_title: "{title}" # If missing, derive from story file H1
9966
- - story_slug: "{slug}" # If missing, derive from title (lowercase, hyphenated)
10008
+ - story_id: '{epic}.{story}' # e.g., "1.3"
10009
+ - story_path: '{devStoryLocation}/{epic}.{story}.*.md' # Path from core-config.yaml
10010
+ - story_title: '{title}' # If missing, derive from story file H1
10011
+ - story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
9967
10012
  ```
9968
10013
 
9969
10014
  ## Purpose
9970
10015
 
9971
10016
  Design a complete test strategy that identifies what to test, at which level (unit/integration/e2e), and why. This ensures efficient test coverage without redundancy while maintaining appropriate test boundaries.
9972
10017
 
9973
- ## Test Level Decision Framework
9974
-
9975
- ### Unit Tests
9976
-
9977
- **When to use:**
9978
-
9979
- - Testing pure functions and business logic
9980
- - Algorithm correctness
9981
- - Input validation and data transformation
9982
- - Error handling in isolated components
9983
- - Complex calculations or state machines
9984
-
9985
- **Characteristics:**
9986
-
9987
- - Fast execution (immediate feedback)
9988
- - No external dependencies (DB, API, file system)
9989
- - Highly maintainable and stable
9990
- - Easy to debug failures
9991
-
9992
- **Example scenarios:**
9993
-
9994
- ```yaml
9995
- unit_test:
9996
- component: "PriceCalculator"
9997
- scenario: "Calculate discount with multiple rules"
9998
- justification: "Complex business logic with multiple branches"
9999
- mock_requirements: "None - pure function"
10000
- ```
10001
-
10002
- ### Integration Tests
10003
-
10004
- **When to use:**
10005
-
10006
- - Testing component interactions
10007
- - Database operations and queries
10008
- - API endpoint behavior
10009
- - Service layer orchestration
10010
- - External service integration (with test doubles)
10011
-
10012
- **Characteristics:**
10013
-
10014
- - Moderate execution time
10015
- - May use test databases or containers
10016
- - Tests multiple components together
10017
- - Validates contracts between components
10018
-
10019
- **Example scenarios:**
10018
+ ## Dependencies
10020
10019
 
10021
10020
  ```yaml
10022
- integration_test:
10023
- components: ["UserService", "UserRepository", "Database"]
10024
- scenario: "Create user with duplicate email check"
10025
- justification: "Tests transaction boundaries and constraint handling"
10026
- test_doubles: "Mock email service, real test database"
10021
+ data:
10022
+ - test-levels-framework.md # Unit/Integration/E2E decision criteria
10023
+ - test-priorities-matrix.md # P0/P1/P2/P3 classification system
10027
10024
  ```
10028
10025
 
10029
- ### End-to-End Tests
10030
-
10031
- **When to use:**
10032
-
10033
- - Critical user journeys
10034
- - Cross-system workflows
10035
- - UI interaction flows
10036
- - Full stack validation
10037
- - Production-like scenario testing
10038
-
10039
- **Characteristics:**
10040
-
10041
- - Keep under 90 seconds per test
10042
- - Tests complete user scenarios
10043
- - Uses real or production-like environment
10044
- - Higher maintenance cost
10045
- - More prone to flakiness
10046
-
10047
- **Example scenarios:**
10048
-
10049
- ```yaml
10050
- e2e_test:
10051
- flow: "Complete purchase flow"
10052
- scenario: "User browses, adds to cart, and completes checkout"
10053
- justification: "Critical business flow requiring full stack validation"
10054
- environment: "Staging with test payment gateway"
10055
- ```
10056
-
10057
- ## Test Design Process
10026
+ ## Process
10058
10027
 
10059
10028
  ### 1. Analyze Story Requirements
10060
10029
 
10061
- Break down each acceptance criterion into testable scenarios:
10030
+ Break down each acceptance criterion into testable scenarios. For each AC:
10062
10031
 
10063
- ```yaml
10064
- acceptance_criterion: "User can reset password via email"
10065
- test_scenarios:
10066
- - level: unit
10067
- what: "Password validation rules"
10068
- why: "Complex regex and business rules"
10069
-
10070
- - level: integration
10071
- what: "Password reset token generation and storage"
10072
- why: "Database interaction with expiry logic"
10073
-
10074
- - level: integration
10075
- what: "Email service integration"
10076
- why: "External service with retry logic"
10077
-
10078
- - level: e2e
10079
- what: "Complete password reset flow"
10080
- why: "Critical security flow needing full validation"
10081
- ```
10032
+ - Identify the core functionality to test
10033
+ - Determine data variations needed
10034
+ - Consider error conditions
10035
+ - Note edge cases
10082
10036
 
10083
- ### 2. Apply Test Level Heuristics
10037
+ ### 2. Apply Test Level Framework
10084
10038
 
10085
- Use these rules to determine appropriate test levels:
10039
+ **Reference:** Load `test-levels-framework.md` for detailed criteria
10086
10040
 
10087
- ```markdown
10088
- ## Test Level Selection Rules
10089
-
10090
- ### Favor Unit Tests When:
10091
-
10092
- - Logic can be isolated
10093
- - No side effects involved
10094
- - Fast feedback needed
10095
- - High cyclomatic complexity
10096
-
10097
- ### Favor Integration Tests When:
10098
-
10099
- - Testing persistence layer
10100
- - Validating service contracts
10101
- - Testing middleware/interceptors
10102
- - Component boundaries critical
10103
-
10104
- ### Favor E2E Tests When:
10105
-
10106
- - User-facing critical paths
10107
- - Multi-system interactions
10108
- - Regulatory compliance scenarios
10109
- - Visual regression important
10110
-
10111
- ### Anti-patterns to Avoid:
10112
-
10113
- - E2E testing for business logic validation
10114
- - Unit testing framework behavior
10115
- - Integration testing third-party libraries
10116
- - Duplicate coverage across levels
10117
-
10118
- ### Duplicate Coverage Guard
10119
-
10120
- **Before adding any test, check:**
10041
+ Quick rules:
10121
10042
 
10122
- 1. Is this already tested at a lower level?
10123
- 2. Can a unit test cover this instead of integration?
10124
- 3. Can an integration test cover this instead of E2E?
10043
+ - **Unit**: Pure logic, algorithms, calculations
10044
+ - **Integration**: Component interactions, DB operations
10045
+ - **E2E**: Critical user journeys, compliance
10125
10046
 
10126
- **Coverage overlap is only acceptable when:**
10047
+ ### 3. Assign Priorities
10127
10048
 
10128
- - Testing different aspects (unit: logic, integration: interaction, e2e: user experience)
10129
- - Critical paths requiring defense in depth
10130
- - Regression prevention for previously broken functionality
10131
- ```
10132
-
10133
- ### 3. Design Test Scenarios
10134
-
10135
- **Test ID Format:** `{EPIC}.{STORY}-{LEVEL}-{SEQ}`
10049
+ **Reference:** Load `test-priorities-matrix.md` for classification
10136
10050
 
10137
- - Example: `1.3-UNIT-001`, `1.3-INT-002`, `1.3-E2E-001`
10138
- - Ensures traceability across all artifacts
10051
+ Quick priority assignment:
10139
10052
 
10140
- **Naming Convention:**
10053
+ - **P0**: Revenue-critical, security, compliance
10054
+ - **P1**: Core user journeys, frequently used
10055
+ - **P2**: Secondary features, admin functions
10056
+ - **P3**: Nice-to-have, rarely used
10141
10057
 
10142
- - Unit: `test_{component}_{scenario}`
10143
- - Integration: `test_{flow}_{interaction}`
10144
- - E2E: `test_{journey}_{outcome}`
10058
+ ### 4. Design Test Scenarios
10145
10059
 
10146
- **Risk Linkage:**
10147
-
10148
- - Tag tests with risk IDs they mitigate
10149
- - Prioritize tests for high-risk areas (P0)
10150
- - Link to risk profile when available
10151
-
10152
- For each identified test need:
10060
+ For each identified test need, create:
10153
10061
 
10154
10062
  ```yaml
10155
10063
  test_scenario:
10156
- id: "1.3-INT-002"
10157
- requirement: "AC2: Rate limiting on login attempts"
10158
- mitigates_risks: ["SEC-001", "PERF-003"] # Links to risk profile
10159
- priority: P0 # Based on risk score
10160
-
10161
- unit_tests:
10162
- - name: "RateLimiter calculates window correctly"
10163
- input: "Timestamp array"
10164
- expected: "Correct window calculation"
10165
-
10166
- integration_tests:
10167
- - name: "Login endpoint enforces rate limit"
10168
- setup: "5 failed attempts"
10169
- action: "6th attempt"
10170
- expected: "429 response with retry-after header"
10171
-
10172
- e2e_tests:
10173
- - name: "User sees rate limit message"
10174
- setup: "Trigger rate limit"
10175
- validation: "Error message displayed, retry timer shown"
10064
+ id: '{epic}.{story}-{LEVEL}-{SEQ}'
10065
+ requirement: 'AC reference'
10066
+ priority: P0|P1|P2|P3
10067
+ level: unit|integration|e2e
10068
+ description: 'What is being tested'
10069
+ justification: 'Why this level was chosen'
10070
+ mitigates_risks: ['RISK-001'] # If risk profile exists
10176
10071
  ```
10177
10072
 
10178
- ## Deterministic Test Level Minimums
10179
-
10180
- **Per Acceptance Criterion:**
10181
-
10182
- - At least 1 unit test for business logic
10183
- - At least 1 integration test if multiple components interact
10184
- - At least 1 E2E test if it's a user-facing feature
10185
-
10186
- **Exceptions:**
10187
-
10188
- - Pure UI changes: May skip unit tests
10189
- - Pure logic changes: May skip E2E tests
10190
- - Infrastructure changes: May focus on integration tests
10191
-
10192
- **When in doubt:** Start with unit tests, add integration for interactions, E2E for critical paths only.
10193
-
10194
- ## Test Quality Standards
10073
+ ### 5. Validate Coverage
10195
10074
 
10196
- ### Core Testing Principles
10075
+ Ensure:
10197
10076
 
10198
- **No Flaky Tests:** Ensure reliability through proper async handling, explicit waits, and atomic test design.
10199
-
10200
- **No Hard Waits/Sleeps:** Use dynamic waiting strategies (e.g., polling, event-based triggers).
10201
-
10202
- **Stateless & Parallel-Safe:** Tests run independently; use cron jobs or semaphores only if unavoidable.
10203
-
10204
- **No Order Dependency:** Every it/describe/context block works in isolation (supports .only execution).
10205
-
10206
- **Self-Cleaning Tests:** Test sets up its own data and automatically deletes/deactivates entities created during testing.
10207
-
10208
- **Tests Live Near Source Code:** Co-locate test files with the code they validate (e.g., `*.spec.js` alongside components).
10209
-
10210
- ### Execution Strategy
10211
-
10212
- **Shifted Left:**
10213
-
10214
- - Start with local environments or ephemeral stacks
10215
- - Validate functionality across all deployment stages (local → dev → stage)
10216
-
10217
- **Low Maintenance:** Minimize manual upkeep (avoid brittle selectors, do not repeat UI actions, leverage APIs).
10218
-
10219
- **CI Execution Evidence:** Integrate into pipelines with clear logs/artifacts.
10220
-
10221
- **Visibility:** Generate test reports (e.g., JUnit XML, HTML) for failures and trends.
10222
-
10223
- ### Coverage Requirements
10224
-
10225
- **Release Confidence:**
10226
-
10227
- - Happy Path: Core user journeys are prioritized
10228
- - Edge Cases: Critical error/validation scenarios are covered
10229
- - Feature Flags: Test both enabled and disabled states where applicable
10230
-
10231
- ### Test Design Rules
10232
-
10233
- **Assertions:** Keep them explicit in tests; avoid abstraction into helpers. Use parametrized tests for soft assertions.
10234
-
10235
- **Naming:** Follow conventions (e.g., `describe('Component')`, `it('should do X when Y')`).
10236
-
10237
- **Size:** Aim for files ≤200 lines; split/chunk large tests logically.
10238
-
10239
- **Speed:** Target individual tests ≤90 seconds; optimize slow setups (e.g., shared fixtures).
10240
-
10241
- **Careful Abstractions:** Favor readability over DRY when balancing helper reuse (page objects are okay, assertion logic is not).
10242
-
10243
- **Test Cleanup:** Ensure tests clean up resources they create (e.g., closing browser, deleting test data).
10244
-
10245
- **Deterministic Flow:** Tests should refrain from using conditionals (e.g., if/else) to control flow or try/catch blocks where possible.
10246
-
10247
- ### API Testing Standards
10248
-
10249
- - Tests must not depend on hardcoded data → use factories and per-test setup
10250
- - Always test both happy path and negative/error cases
10251
- - API tests should run parallel safely (no global state shared)
10252
- - Test idempotency where applicable (e.g., duplicate requests)
10253
- - Tests should clean up their data
10254
- - Response logs should only be printed in case of failure
10255
- - Auth tests must validate token expiration and renewal
10077
+ - Every AC has at least one test
10078
+ - No duplicate coverage across levels
10079
+ - Critical paths have multiple levels
10080
+ - Risk mitigations are addressed
10256
10081
 
10257
10082
  ## Outputs
10258
10083
 
@@ -10260,13 +10085,11 @@ test_scenario:
10260
10085
 
10261
10086
  **Save to:** `docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md`
10262
10087
 
10263
- Generate a comprehensive test design document:
10264
-
10265
10088
  ```markdown
10266
10089
  # Test Design: Story {epic}.{story}
10267
10090
 
10268
10091
  Date: {date}
10269
- Reviewer: Quinn (Test Architect)
10092
+ Designer: Quinn (Test Architect)
10270
10093
 
10271
10094
  ## Test Strategy Overview
10272
10095
 
@@ -10274,212 +10097,80 @@ Reviewer: Quinn (Test Architect)
10274
10097
  - Unit tests: Y (A%)
10275
10098
  - Integration tests: Z (B%)
10276
10099
  - E2E tests: W (C%)
10100
+ - Priority distribution: P0: X, P1: Y, P2: Z
10277
10101
 
10278
- ## Test Level Rationale
10279
-
10280
- [Explain why this distribution was chosen]
10281
-
10282
- ## Detailed Test Scenarios
10283
-
10284
- ### Requirement: AC1 - {description}
10285
-
10286
- #### Unit Tests (3 scenarios)
10287
-
10288
- 1. **ID**: 1.3-UNIT-001
10289
- **Test**: Validate input format
10290
- - **Why Unit**: Pure validation logic
10291
- - **Coverage**: Input edge cases
10292
- - **Mocks**: None needed
10293
- - **Mitigates**: DATA-001 (if applicable)
10294
-
10295
- #### Integration Tests (2 scenarios)
10296
-
10297
- 1. **ID**: 1.3-INT-001
10298
- **Test**: Service processes valid request
10299
- - **Why Integration**: Multiple components involved
10300
- - **Coverage**: Happy path + error handling
10301
- - **Test Doubles**: Mock external API
10302
- - **Mitigates**: TECH-002
10303
-
10304
- #### E2E Tests (1 scenario)
10305
-
10306
- 1. **ID**: 1.3-E2E-001
10307
- **Test**: Complete user workflow
10308
- - **Why E2E**: Critical user journey
10309
- - **Coverage**: Full stack validation
10310
- - **Environment**: Staging
10311
- - **Max Duration**: 90 seconds
10312
- - **Mitigates**: BUS-001
10313
-
10314
- [Continue for all requirements...]
10315
-
10316
- ## Test Data Requirements
10317
-
10318
- ### Unit Test Data
10319
-
10320
- - Static fixtures for calculations
10321
- - Edge case values arrays
10322
-
10323
- ### Integration Test Data
10324
-
10325
- - Test database seeds
10326
- - API response fixtures
10327
-
10328
- ### E2E Test Data
10329
-
10330
- - Test user accounts
10331
- - Sandbox environment data
10332
-
10333
- ## Mock/Stub Strategy
10102
+ ## Test Scenarios by Acceptance Criteria
10334
10103
 
10335
- ### What to Mock
10104
+ ### AC1: {description}
10336
10105
 
10337
- - External services (payment, email)
10338
- - Time-dependent functions
10339
- - Random number generators
10106
+ #### Scenarios
10340
10107
 
10341
- ### What NOT to Mock
10108
+ | ID | Level | Priority | Test | Justification |
10109
+ | ------------ | ----------- | -------- | ------------------------- | ------------------------ |
10110
+ | 1.3-UNIT-001 | Unit | P0 | Validate input format | Pure validation logic |
10111
+ | 1.3-INT-001 | Integration | P0 | Service processes request | Multi-component flow |
10112
+ | 1.3-E2E-001 | E2E | P1 | User completes journey | Critical path validation |
10342
10113
 
10343
- - Core business logic
10344
- - Database in integration tests
10345
- - Critical security functions
10346
-
10347
- ## Test Execution Implementation
10348
-
10349
- ### Parallel Execution
10350
-
10351
- - All unit tests: Fully parallel (stateless requirement)
10352
- - Integration tests: Parallel with isolated databases
10353
- - E2E tests: Sequential or limited parallelism
10354
-
10355
- ### Execution Order
10356
-
10357
- 1. Unit tests first (fail fast)
10358
- 2. Integration tests second
10359
- 3. E2E tests last (expensive, max 90 seconds each)
10360
-
10361
- ## Risk-Based Test Priority
10362
-
10363
- ### P0 - Must Have (Linked to Critical/High Risks)
10364
-
10365
- - Security-related tests (SEC-\* risks)
10366
- - Data integrity tests (DATA-\* risks)
10367
- - Critical business flow tests (BUS-\* risks)
10368
- - Tests for risks scored ≥6 in risk profile
10369
-
10370
- ### P1 - Should Have (Medium Risks)
10371
-
10372
- - Edge case coverage
10373
- - Performance tests (PERF-\* risks)
10374
- - Error recovery tests
10375
- - Tests for risks scored 4-5
10376
-
10377
- ### P2 - Nice to Have (Low Risks)
10378
-
10379
- - UI polish tests
10380
- - Minor validation tests
10381
- - Tests for risks scored ≤3
10382
-
10383
- ## Test Maintenance Considerations
10384
-
10385
- ### High Maintenance Tests
10386
-
10387
- [List tests that may need frequent updates]
10388
-
10389
- ### Stability Measures
10390
-
10391
- - No retry strategies (tests must be deterministic)
10392
- - Dynamic waits only (no hard sleeps)
10393
- - Environment isolation
10394
- - Self-cleaning test data
10395
-
10396
- ## Coverage Goals
10397
-
10398
- ### Unit Test Coverage
10399
-
10400
- - Target: 80% line coverage
10401
- - Focus: Business logic, calculations
10114
+ [Continue for all ACs...]
10402
10115
 
10403
- ### Integration Coverage
10116
+ ## Risk Coverage
10404
10117
 
10405
- - Target: All API endpoints
10406
- - Focus: Contract validation
10118
+ [Map test scenarios to identified risks if risk profile exists]
10407
10119
 
10408
- ### E2E Coverage
10120
+ ## Recommended Execution Order
10409
10121
 
10410
- - Target: Critical paths only
10411
- - Focus: User value delivery
10122
+ 1. P0 Unit tests (fail fast)
10123
+ 2. P0 Integration tests
10124
+ 3. P0 E2E tests
10125
+ 4. P1 tests in order
10126
+ 5. P2+ as time permits
10412
10127
  ```
10413
10128
 
10414
- ## Test Level Smells to Flag
10415
-
10416
- ### Over-testing Smells
10129
+ ### Output 2: Gate YAML Block
10417
10130
 
10418
- - Same logic tested at multiple levels
10419
- - E2E tests for calculations
10420
- - Integration tests for framework features
10131
+ Generate for inclusion in quality gate:
10421
10132
 
10422
- ### Under-testing Smells
10423
-
10424
- - No unit tests for complex logic
10425
- - Missing integration tests for data operations
10426
- - No E2E tests for critical user paths
10427
-
10428
- ### Wrong Level Smells
10429
-
10430
- - Unit tests with real database
10431
- - E2E tests checking calculation results
10432
- - Integration tests mocking everything
10433
-
10434
- ## Quality Indicators
10435
-
10436
- Good test design shows:
10437
-
10438
- - Clear level separation
10439
- - No redundant coverage
10440
- - Fast feedback from unit tests
10441
- - Reliable integration tests
10442
- - Focused e2e tests
10443
-
10444
- ## Key Principles
10445
-
10446
- - Test at the lowest appropriate level
10447
- - One clear owner per test
10448
- - Fast tests run first
10449
- - Mock at boundaries, not internals
10450
- - E2E for user value, not implementation
10451
- - Maintain test/production parity where critical
10452
- - Tests must be atomic and self-contained
10453
- - No shared state between tests
10454
- - Explicit assertions in test files (not helpers)
10133
+ ```yaml
10134
+ test_design:
10135
+ scenarios_total: X
10136
+ by_level:
10137
+ unit: Y
10138
+ integration: Z
10139
+ e2e: W
10140
+ by_priority:
10141
+ p0: A
10142
+ p1: B
10143
+ p2: C
10144
+ coverage_gaps: [] # List any ACs without tests
10145
+ ```
10455
10146
 
10456
- ### Output 2: Story Hook Line
10147
+ ### Output 3: Trace References
10457
10148
 
10458
- **Print this line for review task to quote:**
10149
+ Print for use by trace-requirements task:
10459
10150
 
10460
10151
  ```text
10461
- Test design: docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md
10152
+ Test design matrix: docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md
10153
+ P0 tests identified: {count}
10462
10154
  ```
10463
10155
 
10464
- **For traceability:** This planning document will be referenced by trace-requirements task.
10156
+ ## Quality Checklist
10465
10157
 
10466
- ### Output 3: Test Count Summary
10158
+ Before finalizing, verify:
10467
10159
 
10468
- **Print summary for quick reference:**
10160
+ - [ ] Every AC has test coverage
10161
+ - [ ] Test levels are appropriate (not over-testing)
10162
+ - [ ] No duplicate coverage across levels
10163
+ - [ ] Priorities align with business risk
10164
+ - [ ] Test IDs follow naming convention
10165
+ - [ ] Scenarios are atomic and independent
10469
10166
 
10470
- ```yaml
10471
- test_summary:
10472
- total: { total_count }
10473
- by_level:
10474
- unit: { unit_count }
10475
- integration: { int_count }
10476
- e2e: { e2e_count }
10477
- by_priority:
10478
- P0: { p0_count }
10479
- P1: { p1_count }
10480
- P2: { p2_count }
10481
- coverage_gaps: [] # List any ACs without tests
10482
- ```
10167
+ ## Key Principles
10168
+
10169
+ - **Shift left**: Prefer unit over integration, integration over E2E
10170
+ - **Risk-based**: Focus on what could go wrong
10171
+ - **Efficient coverage**: Test once at the right level
10172
+ - **Maintainability**: Consider long-term test maintenance
10173
+ - **Fast feedback**: Quick tests run first
10483
10174
  ==================== END: .bmad-core/tasks/test-design.md ====================
10484
10175
 
10485
10176
  ==================== START: .bmad-core/tasks/nfr-assess.md ====================
@@ -10491,12 +10182,12 @@ Quick NFR validation focused on the core four: security, performance, reliabilit
10491
10182
 
10492
10183
  ```yaml
10493
10184
  required:
10494
- - story_id: "{epic}.{story}" # e.g., "1.3"
10495
- - story_path: "docs/stories/{epic}.{story}.*.md"
10185
+ - story_id: '{epic}.{story}' # e.g., "1.3"
10186
+ - story_path: 'docs/stories/{epic}.{story}.*.md'
10496
10187
 
10497
10188
  optional:
10498
- - architecture_refs: "docs/architecture/*.md"
10499
- - technical_preferences: "docs/technical-preferences.md"
10189
+ - architecture_refs: 'docs/architecture/*.md'
10190
+ - technical_preferences: 'docs/technical-preferences.md'
10500
10191
  - acceptance_criteria: From story file
10501
10192
  ```
10502
10193
 
@@ -10577,16 +10268,16 @@ nfr_validation:
10577
10268
  _assessed: [security, performance, reliability, maintainability]
10578
10269
  security:
10579
10270
  status: CONCERNS
10580
- notes: "No rate limiting on auth endpoints"
10271
+ notes: 'No rate limiting on auth endpoints'
10581
10272
  performance:
10582
10273
  status: PASS
10583
- notes: "Response times < 200ms verified"
10274
+ notes: 'Response times < 200ms verified'
10584
10275
  reliability:
10585
10276
  status: PASS
10586
- notes: "Error handling and retries implemented"
10277
+ notes: 'Error handling and retries implemented'
10587
10278
  maintainability:
10588
10279
  status: CONCERNS
10589
- notes: "Test coverage at 65%, target is 80%"
10280
+ notes: 'Test coverage at 65%, target is 80%'
10590
10281
  ```
10591
10282
 
10592
10283
  ## Deterministic Status Rules
@@ -10816,10 +10507,10 @@ performance_deep_dive:
10816
10507
  p99: 350ms
10817
10508
  database:
10818
10509
  slow_queries: 2
10819
- missing_indexes: ["users.email", "orders.user_id"]
10510
+ missing_indexes: ['users.email', 'orders.user_id']
10820
10511
  caching:
10821
10512
  hit_rate: 0%
10822
- recommendation: "Add Redis for session data"
10513
+ recommendation: 'Add Redis for session data'
10823
10514
  load_test:
10824
10515
  max_rps: 150
10825
10516
  breaking_point: 200 rps
@@ -10842,8 +10533,8 @@ template:
10842
10533
  schema: 1
10843
10534
  story: "{{epic_num}}.{{story_num}}"
10844
10535
  story_title: "{{story_title}}"
10845
- gate: "{{gate_status}}" # PASS|CONCERNS|FAIL|WAIVED
10846
- status_reason: "{{status_reason}}" # 1-2 sentence summary of why this gate decision
10536
+ gate: "{{gate_status}}" # PASS|CONCERNS|FAIL|WAIVED
10537
+ status_reason: "{{status_reason}}" # 1-2 sentence summary of why this gate decision
10847
10538
  reviewer: "Quinn (Test Architect)"
10848
10539
  updated: "{{iso_timestamp}}"
10849
10540
 
@@ -10860,68 +10551,77 @@ risk_summary:
10860
10551
  must_fix: []
10861
10552
  monitor: []
10862
10553
 
10863
- # Example with issues:
10864
- # top_issues:
10865
- # - id: "SEC-001"
10866
- # severity: high # ONLY: low|medium|high
10867
- # finding: "No rate limiting on login endpoint"
10868
- # suggested_action: "Add rate limiting middleware before production"
10869
- # - id: "TEST-001"
10870
- # severity: medium
10871
- # finding: "Missing integration tests for auth flow"
10872
- # suggested_action: "Add test coverage for critical paths"
10873
-
10874
- # Example when waived:
10875
- # waiver:
10876
- # active: true
10877
- # reason: "Accepted for MVP release - will address in next sprint"
10878
- # approved_by: "Product Owner"
10554
+ # Examples section using block scalars for clarity
10555
+ examples:
10556
+ with_issues: |
10557
+ top_issues:
10558
+ - id: "SEC-001"
10559
+ severity: high # ONLY: low|medium|high
10560
+ finding: "No rate limiting on login endpoint"
10561
+ suggested_action: "Add rate limiting middleware before production"
10562
+ - id: "TEST-001"
10563
+ severity: medium
10564
+ finding: "Missing integration tests for auth flow"
10565
+ suggested_action: "Add test coverage for critical paths"
10566
+
10567
+ when_waived: |
10568
+ waiver:
10569
+ active: true
10570
+ reason: "Accepted for MVP release - will address in next sprint"
10571
+ approved_by: "Product Owner"
10879
10572
 
10880
10573
  # ============ Optional Extended Fields ============
10881
10574
  # Uncomment and use if your team wants more detail
10882
10575
 
10883
- # quality_score: 75 # 0-100 (optional scoring)
10884
- # expires: "2025-01-26T00:00:00Z" # Optional gate freshness window
10885
-
10886
- # evidence:
10887
- # tests_reviewed: 15
10888
- # risks_identified: 3
10889
- # trace:
10890
- # ac_covered: [1, 2, 3] # AC numbers with test coverage
10891
- # ac_gaps: [4] # AC numbers lacking coverage
10892
-
10893
- # nfr_validation:
10894
- # security: { status: CONCERNS, notes: "Rate limiting missing" }
10895
- # performance: { status: PASS, notes: "" }
10896
- # reliability: { status: PASS, notes: "" }
10897
- # maintainability: { status: PASS, notes: "" }
10898
-
10899
- # history: # Append-only audit trail
10900
- # - at: "2025-01-12T10:00:00Z"
10901
- # gate: FAIL
10902
- # note: "Initial review - missing tests"
10903
- # - at: "2025-01-12T15:00:00Z"
10904
- # gate: CONCERNS
10905
- # note: "Tests added but rate limiting still missing"
10906
-
10907
- # risk_summary: # From risk-profile task
10908
- # totals:
10909
- # critical: 0
10910
- # high: 0
10911
- # medium: 0
10912
- # low: 0
10913
- # # 'highest' is emitted only when risks exist
10914
- # recommendations:
10915
- # must_fix: []
10916
- # monitor: []
10917
-
10918
- # recommendations:
10919
- # immediate: # Must fix before production
10920
- # - action: "Add rate limiting to auth endpoints"
10921
- # refs: ["api/auth/login.ts:42-68"]
10922
- # future: # Can be addressed later
10923
- # - action: "Consider caching for better performance"
10924
- # refs: ["services/data.service.ts"]
10576
+ optional_fields_examples:
10577
+ quality_and_expiry: |
10578
+ quality_score: 75 # 0-100 (optional scoring)
10579
+ expires: "2025-01-26T00:00:00Z" # Optional gate freshness window
10580
+
10581
+ evidence: |
10582
+ evidence:
10583
+ tests_reviewed: 15
10584
+ risks_identified: 3
10585
+ trace:
10586
+ ac_covered: [1, 2, 3] # AC numbers with test coverage
10587
+ ac_gaps: [4] # AC numbers lacking coverage
10588
+
10589
+ nfr_validation: |
10590
+ nfr_validation:
10591
+ security: { status: CONCERNS, notes: "Rate limiting missing" }
10592
+ performance: { status: PASS, notes: "" }
10593
+ reliability: { status: PASS, notes: "" }
10594
+ maintainability: { status: PASS, notes: "" }
10595
+
10596
+ history: |
10597
+ history: # Append-only audit trail
10598
+ - at: "2025-01-12T10:00:00Z"
10599
+ gate: FAIL
10600
+ note: "Initial review - missing tests"
10601
+ - at: "2025-01-12T15:00:00Z"
10602
+ gate: CONCERNS
10603
+ note: "Tests added but rate limiting still missing"
10604
+
10605
+ risk_summary: |
10606
+ risk_summary: # From risk-profile task
10607
+ totals:
10608
+ critical: 0
10609
+ high: 0
10610
+ medium: 0
10611
+ low: 0
10612
+ # 'highest' is emitted only when risks exist
10613
+ recommendations:
10614
+ must_fix: []
10615
+ monitor: []
10616
+
10617
+ recommendations: |
10618
+ recommendations:
10619
+ immediate: # Must fix before production
10620
+ - action: "Add rate limiting to auth endpoints"
10621
+ refs: ["api/auth/login.ts:42-68"]
10622
+ future: # Can be addressed later
10623
+ - action: "Consider caching for better performance"
10624
+ refs: ["services/data.service.ts"]
10925
10625
  ==================== END: .bmad-core/templates/qa-gate-tmpl.yaml ====================
10926
10626
 
10927
10627
  ==================== START: .bmad-core/tasks/create-next-story.md ====================
@@ -11268,7 +10968,7 @@ sections:
11268
10968
  title: Introduction
11269
10969
  instruction: |
11270
10970
  Review provided documents including Project Brief, PRD, and any user research to gather context. Focus on understanding user needs, pain points, and desired outcomes before beginning the specification.
11271
-
10971
+
11272
10972
  Establish the document's purpose and scope. Keep the content below but ensure project name is properly substituted.
11273
10973
  content: |
11274
10974
  This document defines the user experience goals, information architecture, user flows, and visual design specifications for {{project_name}}'s user interface. It serves as the foundation for visual design and frontend development, ensuring a cohesive and user-centered experience.
@@ -11277,7 +10977,7 @@ sections:
11277
10977
  title: Overall UX Goals & Principles
11278
10978
  instruction: |
11279
10979
  Work with the user to establish and document the following. If not already defined, facilitate a discussion to determine:
11280
-
10980
+
11281
10981
  1. Target User Personas - elicit details or confirm existing ones from PRD
11282
10982
  2. Key Usability Goals - understand what success looks like for users
11283
10983
  3. Core Design Principles - establish 3-5 guiding principles
@@ -11318,7 +11018,7 @@ sections:
11318
11018
  title: Information Architecture (IA)
11319
11019
  instruction: |
11320
11020
  Collaborate with the user to create a comprehensive information architecture:
11321
-
11021
+
11322
11022
  1. Build a Site Map or Screen Inventory showing all major areas
11323
11023
  2. Define the Navigation Structure (primary, secondary, breadcrumbs)
11324
11024
  3. Use Mermaid diagrams for visual representation
@@ -11348,22 +11048,22 @@ sections:
11348
11048
  title: Navigation Structure
11349
11049
  template: |
11350
11050
  **Primary Navigation:** {{primary_nav_description}}
11351
-
11051
+
11352
11052
  **Secondary Navigation:** {{secondary_nav_description}}
11353
-
11053
+
11354
11054
  **Breadcrumb Strategy:** {{breadcrumb_strategy}}
11355
11055
 
11356
11056
  - id: user-flows
11357
11057
  title: User Flows
11358
11058
  instruction: |
11359
11059
  For each critical user task identified in the PRD:
11360
-
11060
+
11361
11061
  1. Define the user's goal clearly
11362
11062
  2. Map out all steps including decision points
11363
11063
  3. Consider edge cases and error states
11364
11064
  4. Use Mermaid flow diagrams for clarity
11365
11065
  5. Link to external tools (Figma/Miro) if detailed flows exist there
11366
-
11066
+
11367
11067
  Create subsections for each major flow.
11368
11068
  elicit: true
11369
11069
  repeatable: true
@@ -11372,9 +11072,9 @@ sections:
11372
11072
  title: "{{flow_name}}"
11373
11073
  template: |
11374
11074
  **User Goal:** {{flow_goal}}
11375
-
11075
+
11376
11076
  **Entry Points:** {{entry_points}}
11377
-
11077
+
11378
11078
  **Success Criteria:** {{success_criteria}}
11379
11079
  sections:
11380
11080
  - id: flow-diagram
@@ -11405,14 +11105,14 @@ sections:
11405
11105
  title: "{{screen_name}}"
11406
11106
  template: |
11407
11107
  **Purpose:** {{screen_purpose}}
11408
-
11108
+
11409
11109
  **Key Elements:**
11410
11110
  - {{element_1}}
11411
11111
  - {{element_2}}
11412
11112
  - {{element_3}}
11413
-
11113
+
11414
11114
  **Interaction Notes:** {{interaction_notes}}
11415
-
11115
+
11416
11116
  **Design File Reference:** {{specific_frame_link}}
11417
11117
 
11418
11118
  - id: component-library
@@ -11431,11 +11131,11 @@ sections:
11431
11131
  title: "{{component_name}}"
11432
11132
  template: |
11433
11133
  **Purpose:** {{component_purpose}}
11434
-
11134
+
11435
11135
  **Variants:** {{component_variants}}
11436
-
11136
+
11437
11137
  **States:** {{component_states}}
11438
-
11138
+
11439
11139
  **Usage Guidelines:** {{usage_guidelines}}
11440
11140
 
11441
11141
  - id: branding-style
@@ -11481,13 +11181,13 @@ sections:
11481
11181
  title: Iconography
11482
11182
  template: |
11483
11183
  **Icon Library:** {{icon_library}}
11484
-
11184
+
11485
11185
  **Usage Guidelines:** {{icon_guidelines}}
11486
11186
  - id: spacing-layout
11487
11187
  title: Spacing & Layout
11488
11188
  template: |
11489
11189
  **Grid System:** {{grid_system}}
11490
-
11190
+
11491
11191
  **Spacing Scale:** {{spacing_scale}}
11492
11192
 
11493
11193
  - id: accessibility
@@ -11505,12 +11205,12 @@ sections:
11505
11205
  - Color contrast ratios: {{contrast_requirements}}
11506
11206
  - Focus indicators: {{focus_requirements}}
11507
11207
  - Text sizing: {{text_requirements}}
11508
-
11208
+
11509
11209
  **Interaction:**
11510
11210
  - Keyboard navigation: {{keyboard_requirements}}
11511
11211
  - Screen reader support: {{screen_reader_requirements}}
11512
11212
  - Touch targets: {{touch_requirements}}
11513
-
11213
+
11514
11214
  **Content:**
11515
11215
  - Alternative text: {{alt_text_requirements}}
11516
11216
  - Heading structure: {{heading_requirements}}
@@ -11537,11 +11237,11 @@ sections:
11537
11237
  title: Adaptation Patterns
11538
11238
  template: |
11539
11239
  **Layout Changes:** {{layout_adaptations}}
11540
-
11240
+
11541
11241
  **Navigation Changes:** {{nav_adaptations}}
11542
-
11242
+
11543
11243
  **Content Priority:** {{content_adaptations}}
11544
-
11244
+
11545
11245
  **Interaction Changes:** {{interaction_adaptations}}
11546
11246
 
11547
11247
  - id: animation
@@ -11575,7 +11275,7 @@ sections:
11575
11275
  title: Next Steps
11576
11276
  instruction: |
11577
11277
  After completing the UI/UX specification:
11578
-
11278
+
11579
11279
  1. Recommend review with stakeholders
11580
11280
  2. Suggest creating/updating visual designs in design tool
11581
11281
  3. Prepare for handoff to Design Architect for frontend architecture
@@ -11624,7 +11324,7 @@ workflow:
11624
11324
  - Single story (< 4 hours) → Use brownfield-create-story task
11625
11325
  - Small feature (1-3 stories) → Use brownfield-create-epic task
11626
11326
  - Major enhancement (multiple epics) → Continue with full workflow
11627
-
11327
+
11628
11328
  Ask user: "Can you describe the enhancement scope? Is this a small fix, a feature addition, or a major enhancement requiring architectural changes?"
11629
11329
 
11630
11330
  - step: routing_decision
@@ -11785,7 +11485,7 @@ workflow:
11785
11485
  notes: |
11786
11486
  All stories implemented and reviewed!
11787
11487
  Project development phase complete.
11788
-
11488
+
11789
11489
  Reference: .bmad-core/data/bmad-kb.md#IDE Development Workflow
11790
11490
 
11791
11491
  flow_diagram: |
@@ -11869,35 +11569,35 @@ workflow:
11869
11569
  {{if single_story}}: Proceeding with brownfield-create-story task for immediate implementation.
11870
11570
  {{if small_feature}}: Creating focused epic with brownfield-create-epic task.
11871
11571
  {{if major_enhancement}}: Continuing with comprehensive planning workflow.
11872
-
11572
+
11873
11573
  documentation_assessment: |
11874
11574
  Documentation assessment complete:
11875
11575
  {{if adequate}}: Existing documentation is sufficient. Proceeding directly to PRD creation.
11876
11576
  {{if inadequate}}: Running document-project to capture current system state before PRD.
11877
-
11577
+
11878
11578
  document_project_to_pm: |
11879
11579
  Project analysis complete. Key findings documented in:
11880
11580
  - {{document_list}}
11881
11581
  Use these findings to inform PRD creation and avoid re-analyzing the same aspects.
11882
-
11582
+
11883
11583
  pm_to_architect_decision: |
11884
11584
  PRD complete and saved as docs/prd.md.
11885
11585
  Architectural changes identified: {{yes/no}}
11886
11586
  {{if yes}}: Proceeding to create architecture document for: {{specific_changes}}
11887
11587
  {{if no}}: No architectural changes needed. Proceeding to validation.
11888
-
11588
+
11889
11589
  architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for integration safety."
11890
-
11590
+
11891
11591
  po_to_sm: |
11892
11592
  All artifacts validated.
11893
11593
  Documentation type available: {{sharded_prd / brownfield_docs}}
11894
11594
  {{if sharded}}: Use standard create-next-story task.
11895
11595
  {{if brownfield}}: Use create-brownfield-story task to handle varied documentation formats.
11896
-
11596
+
11897
11597
  sm_story_creation: |
11898
11598
  Creating story from {{documentation_type}}.
11899
11599
  {{if missing_context}}: May need to gather additional context from user during story creation.
11900
-
11600
+
11901
11601
  complete: "All planning artifacts validated and development can begin. Stories will be created based on available documentation format."
11902
11602
  ==================== END: .bmad-core/workflows/brownfield-fullstack.yaml ====================
11903
11603
 
@@ -12031,7 +11731,7 @@ workflow:
12031
11731
  notes: |
12032
11732
  All stories implemented and reviewed!
12033
11733
  Project development phase complete.
12034
-
11734
+
12035
11735
  Reference: .bmad-core/data/bmad-kb.md#IDE Development Workflow
12036
11736
 
12037
11737
  flow_diagram: |
@@ -12228,7 +11928,7 @@ workflow:
12228
11928
  notes: |
12229
11929
  All stories implemented and reviewed!
12230
11930
  Project development phase complete.
12231
-
11931
+
12232
11932
  Reference: .bmad-core/data/bmad-kb.md#IDE Development Workflow
12233
11933
 
12234
11934
  flow_diagram: |
@@ -12453,7 +12153,7 @@ workflow:
12453
12153
  notes: |
12454
12154
  All stories implemented and reviewed!
12455
12155
  Project development phase complete.
12456
-
12156
+
12457
12157
  Reference: .bmad-core/data/bmad-kb.md#IDE Development Workflow
12458
12158
 
12459
12159
  flow_diagram: |
@@ -12672,7 +12372,7 @@ workflow:
12672
12372
  notes: |
12673
12373
  All stories implemented and reviewed!
12674
12374
  Service development phase complete.
12675
-
12375
+
12676
12376
  Reference: .bmad-core/data/bmad-kb.md#IDE Development Workflow
12677
12377
 
12678
12378
  flow_diagram: |
@@ -12900,7 +12600,7 @@ workflow:
12900
12600
  notes: |
12901
12601
  All stories implemented and reviewed!
12902
12602
  Project development phase complete.
12903
-
12603
+
12904
12604
  Reference: .bmad-core/data/bmad-kb.md#IDE Development Workflow
12905
12605
 
12906
12606
  flow_diagram: |