bmad-method 4.37.0 → 5.0.0-beta.2

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 (52) hide show
  1. package/.github/workflows/promote-to-stable.yml +144 -0
  2. package/CHANGELOG.md +4 -14
  3. package/bmad-core/agents/qa.md +37 -18
  4. package/bmad-core/data/test-levels-framework.md +146 -0
  5. package/bmad-core/data/test-priorities-matrix.md +172 -0
  6. package/bmad-core/tasks/nfr-assess.md +343 -0
  7. package/bmad-core/tasks/qa-gate.md +159 -0
  8. package/bmad-core/tasks/review-story.md +234 -74
  9. package/bmad-core/tasks/risk-profile.md +353 -0
  10. package/bmad-core/tasks/test-design.md +174 -0
  11. package/bmad-core/tasks/trace-requirements.md +264 -0
  12. package/bmad-core/templates/qa-gate-tmpl.yaml +102 -0
  13. package/dist/agents/analyst.txt +20 -26
  14. package/dist/agents/architect.txt +14 -35
  15. package/dist/agents/bmad-master.txt +40 -70
  16. package/dist/agents/bmad-orchestrator.txt +28 -5
  17. package/dist/agents/dev.txt +0 -14
  18. package/dist/agents/pm.txt +0 -25
  19. package/dist/agents/po.txt +0 -18
  20. package/dist/agents/qa.txt +2079 -135
  21. package/dist/agents/sm.txt +0 -10
  22. package/dist/agents/ux-expert.txt +0 -7
  23. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +0 -37
  24. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +3 -12
  25. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +0 -7
  26. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +44 -90
  27. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +14 -49
  28. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +0 -46
  29. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.txt +0 -15
  30. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.txt +0 -17
  31. package/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +38 -142
  32. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +0 -2
  33. package/dist/teams/team-all.txt +2181 -261
  34. package/dist/teams/team-fullstack.txt +43 -57
  35. package/dist/teams/team-ide-minimal.txt +2064 -125
  36. package/dist/teams/team-no-ui.txt +43 -57
  37. package/docs/enhanced-ide-development-workflow.md +220 -15
  38. package/docs/user-guide.md +271 -18
  39. package/docs/working-in-the-brownfield.md +264 -31
  40. package/package.json +1 -1
  41. package/tools/flattener/main.js +474 -15
  42. package/tools/flattener/projectRoot.js +182 -23
  43. package/tools/flattener/stats.helpers.js +331 -0
  44. package/tools/flattener/stats.js +64 -14
  45. package/tools/flattener/test-matrix.js +405 -0
  46. package/tools/installer/bin/bmad.js +33 -32
  47. package/tools/installer/config/install.config.yaml +11 -1
  48. package/tools/installer/lib/file-manager.js +1 -1
  49. package/tools/installer/lib/ide-base-setup.js +1 -1
  50. package/tools/installer/lib/ide-setup.js +197 -83
  51. package/tools/installer/lib/installer.js +3 -3
  52. package/tools/installer/package.json +1 -1
@@ -0,0 +1,144 @@
1
+ name: Promote to Stable
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version_bump:
7
+ description: 'Version bump type'
8
+ required: true
9
+ default: 'minor'
10
+ type: choice
11
+ options:
12
+ - patch
13
+ - minor
14
+ - major
15
+
16
+ jobs:
17
+ promote:
18
+ runs-on: ubuntu-latest
19
+ permissions:
20
+ contents: write
21
+ pull-requests: write
22
+
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v4
26
+ with:
27
+ fetch-depth: 0
28
+ token: ${{ secrets.GITHUB_TOKEN }}
29
+
30
+ - name: Setup Node.js
31
+ uses: actions/setup-node@v4
32
+ with:
33
+ node-version: '20'
34
+ registry-url: 'https://registry.npmjs.org'
35
+
36
+ - name: Configure Git
37
+ run: |
38
+ git config --global user.name "github-actions[bot]"
39
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
40
+ git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
41
+
42
+ - name: Switch to stable branch
43
+ run: |
44
+ git checkout stable
45
+ git pull origin stable
46
+
47
+ - name: Merge main into stable
48
+ run: |
49
+ git merge origin/main --no-edit
50
+
51
+ - name: Install dependencies
52
+ run: npm ci
53
+
54
+ - name: Get current version and calculate new version
55
+ id: version
56
+ run: |
57
+ # Get current version from package.json
58
+ CURRENT_VERSION=$(node -p "require('./package.json').version")
59
+ echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
60
+
61
+ # Remove beta suffix if present
62
+ BASE_VERSION=$(echo $CURRENT_VERSION | sed 's/-beta\.[0-9]\+//')
63
+ echo "base_version=$BASE_VERSION" >> $GITHUB_OUTPUT
64
+
65
+ # Calculate new version based on bump type
66
+ IFS='.' read -ra VERSION_PARTS <<< "$BASE_VERSION"
67
+ MAJOR=${VERSION_PARTS[0]}
68
+ MINOR=${VERSION_PARTS[1]}
69
+ PATCH=${VERSION_PARTS[2]}
70
+
71
+ case "${{ github.event.inputs.version_bump }}" in
72
+ "major")
73
+ NEW_VERSION="$((MAJOR + 1)).0.0"
74
+ ;;
75
+ "minor")
76
+ NEW_VERSION="$MAJOR.$((MINOR + 1)).0"
77
+ ;;
78
+ "patch")
79
+ NEW_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
80
+ ;;
81
+ *)
82
+ NEW_VERSION="$BASE_VERSION"
83
+ ;;
84
+ esac
85
+
86
+ # Check if calculated version already exists on NPM and increment if necessary
87
+ while npm view bmad-method@$NEW_VERSION version >/dev/null 2>&1; do
88
+ echo "Version $NEW_VERSION already exists, incrementing..."
89
+ IFS='.' read -ra NEW_VERSION_PARTS <<< "$NEW_VERSION"
90
+ NEW_MAJOR=${NEW_VERSION_PARTS[0]}
91
+ NEW_MINOR=${NEW_VERSION_PARTS[1]}
92
+ NEW_PATCH=${NEW_VERSION_PARTS[2]}
93
+
94
+ case "${{ github.event.inputs.version_bump }}" in
95
+ "major")
96
+ NEW_VERSION="$((NEW_MAJOR + 1)).0.0"
97
+ ;;
98
+ "minor")
99
+ NEW_VERSION="$NEW_MAJOR.$((NEW_MINOR + 1)).0"
100
+ ;;
101
+ "patch")
102
+ NEW_VERSION="$NEW_MAJOR.$NEW_MINOR.$((NEW_PATCH + 1))"
103
+ ;;
104
+ esac
105
+ done
106
+
107
+ echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
108
+ echo "Promoting from $CURRENT_VERSION to $NEW_VERSION"
109
+
110
+ - name: Update package.json versions
111
+ run: |
112
+ # Update main package.json
113
+ npm version ${{ steps.version.outputs.new_version }} --no-git-tag-version
114
+
115
+ # Update installer package.json
116
+ sed -i 's/"version": ".*"/"version": "${{ steps.version.outputs.new_version }}"/' tools/installer/package.json
117
+
118
+ - name: Update package-lock.json
119
+ run: npm install --package-lock-only
120
+
121
+ - name: Commit stable release
122
+ run: |
123
+ git add .
124
+ git commit -m "feat: promote to stable ${{ steps.version.outputs.new_version }}
125
+
126
+ BREAKING CHANGE: Promote beta features to stable release
127
+
128
+ - Update version from ${{ steps.version.outputs.current_version }} to ${{ steps.version.outputs.new_version }}
129
+ - Automated promotion via GitHub Actions"
130
+
131
+ - name: Push stable release
132
+ run: |
133
+ git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
134
+ git push origin stable
135
+
136
+ - name: Switch back to main
137
+ run: git checkout main
138
+
139
+ - name: Summary
140
+ run: |
141
+ echo "🎉 Successfully promoted to stable!"
142
+ echo "📦 Version: ${{ steps.version.outputs.new_version }}"
143
+ echo "🚀 The stable release will be automatically published to NPM via semantic-release"
144
+ echo "✅ Users running 'npx bmad-method install' will now get version ${{ steps.version.outputs.new_version }}"
package/CHANGELOG.md CHANGED
@@ -1,21 +1,9 @@
1
- # [4.37.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.36.2...v4.37.0) (2025-08-16)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * add semver dependency and correct NPM dist-tag configuration ([5ceca3a](https://github.com/bmadcode/BMAD-METHOD/commit/5ceca3aeb9390706b0f0233322e197c9533e8426))
7
- * **docs:** fix broken link in GUIDING-PRINCIPLES.md ([#428](https://github.com/bmadcode/BMAD-METHOD/issues/428)) ([3efcfd5](https://github.com/bmadcode/BMAD-METHOD/commit/3efcfd54d47f4c3cdc6527a438f86fc615a8700c))
8
- * remove git plugin to resolve branch protection conflicts ([8e324f6](https://github.com/bmadcode/BMAD-METHOD/commit/8e324f60b0dad2f385ff62bd63615afc73c575f8))
9
- * update package-lock.json for semver dependency ([faff4e0](https://github.com/bmadcode/BMAD-METHOD/commit/faff4e06a16563c6d2f7fd4c1ed4046a2ee56289))
10
- * update versions for dual publishing beta releases ([e0dcbcf](https://github.com/bmadcode/BMAD-METHOD/commit/e0dcbcf5277ac33a824b445060177fd3e71f13d4))
1
+ # [5.0.0-beta.2](https://github.com/bmadcode/BMAD-METHOD/compare/v5.0.0-beta.1...v5.0.0-beta.2) (2025-08-16)
11
2
 
12
3
 
13
4
  ### Features
14
5
 
15
- * implement dual NPM publishing strategy ([d92ba83](https://github.com/bmadcode/BMAD-METHOD/commit/d92ba835fa6e720059b943e352a03435f2a704c9))
16
- * install Cursor rules to subdirectory ([#438](https://github.com/bmadcode/BMAD-METHOD/issues/438)) ([d563266](https://github.com/bmadcode/BMAD-METHOD/commit/d563266b9738b5d3c5ec1e31ab683aad517e2604)), closes [#376](https://github.com/bmadcode/BMAD-METHOD/issues/376) [#376](https://github.com/bmadcode/BMAD-METHOD/issues/376)
17
- * republish beta with corrected dependencies and tags ([75ba8d8](https://github.com/bmadcode/BMAD-METHOD/commit/75ba8d82e1a678c16bb5ef05a0a3f1356b99668b))
18
- * trigger new beta release with fixed dependencies ([f3e429d](https://github.com/bmadcode/BMAD-METHOD/commit/f3e429d746b8e95d5b3da522ac18d68e3054bb36))
6
+ * **flattener:** prompt for detailed stats; polish .stats.md with emojis ([#422](https://github.com/bmadcode/BMAD-METHOD/issues/422)) ([fab9d5e](https://github.com/bmadcode/BMAD-METHOD/commit/fab9d5e1f55d7876b6909002415af89508cc41a7))
19
7
 
20
8
  ## [4.36.2](https://github.com/bmadcode/BMAD-METHOD/compare/v4.36.1...v4.36.2) (2025-08-10)
21
9
 
@@ -705,3 +693,5 @@ Co-Authored-By: Claude <noreply@anthropic.com>
705
693
  ### Features
706
694
 
707
695
  - add versioning and release automation ([0ea5e50](https://github.com/bmadcode/BMAD-METHOD/commit/0ea5e50aa7ace5946d0100c180dd4c0da3e2fd8c))
696
+
697
+ # Promote to stable release 5.0.0
@@ -30,26 +30,30 @@ activation-instructions:
30
30
  agent:
31
31
  name: Quinn
32
32
  id: qa
33
- title: Senior Developer & QA Architect
33
+ title: Test Architect & Quality Advisor
34
34
  icon: 🧪
35
- whenToUse: Use for senior code review, refactoring, test planning, quality assurance, and mentoring through code improvements
35
+ whenToUse: |
36
+ Use for comprehensive test architecture review, quality gate decisions,
37
+ and code improvement. Provides thorough analysis including requirements
38
+ traceability, risk assessment, and test strategy.
39
+ Advisory only - teams choose their quality bar.
36
40
  customization: null
37
41
  persona:
38
- role: Senior Developer & Test Architect
39
- style: Methodical, detail-oriented, quality-focused, mentoring, strategic
40
- identity: Senior developer with deep expertise in code quality, architecture, and test automation
41
- focus: Code excellence through review, refactoring, and comprehensive testing strategies
42
+ role: Test Architect with Quality Advisory Authority
43
+ style: Comprehensive, systematic, advisory, educational, pragmatic
44
+ identity: Test architect who provides thorough quality assessment and actionable recommendations without blocking progress
45
+ focus: Comprehensive quality analysis through test architecture, risk assessment, and advisory gates
42
46
  core_principles:
43
- - Senior Developer Mindset - Review and improve code as a senior mentoring juniors
44
- - Active Refactoring - Don't just identify issues, fix them with clear explanations
45
- - Test Strategy & Architecture - Design holistic testing strategies across all levels
46
- - Code Quality Excellence - Enforce best practices, patterns, and clean code principles
47
- - Shift-Left Testing - Integrate testing early in development lifecycle
48
- - Performance & Security - Proactively identify and fix performance/security issues
49
- - Mentorship Through Action - Explain WHY and HOW when making improvements
50
- - Risk-Based Testing - Prioritize testing based on risk and critical areas
51
- - Continuous Improvement - Balance perfection with pragmatism
52
- - Architecture & Design Patterns - Ensure proper patterns and maintainable code structure
47
+ - Depth As Needed - Go deep based on risk signals, stay concise when low risk
48
+ - Requirements Traceability - Map all stories to tests using Given-When-Then patterns
49
+ - Risk-Based Testing - Assess and prioritize by probability × impact
50
+ - Quality Attributes - Validate NFRs (security, performance, reliability) via scenarios
51
+ - Testability Assessment - Evaluate controllability, observability, debuggability
52
+ - Gate Governance - Provide clear PASS/CONCERNS/FAIL/WAIVED decisions with rationale
53
+ - Advisory Excellence - Educate through documentation, never block arbitrarily
54
+ - Technical Debt Awareness - Identify and quantify debt with improvement suggestions
55
+ - LLM Acceleration - Use LLMs to accelerate thorough yet focused analysis
56
+ - Pragmatic Balance - Distinguish must-fix from nice-to-have improvements
53
57
  story-file-permissions:
54
58
  - CRITICAL: When reviewing stories, you are ONLY authorized to update the "QA Results" section of story files
55
59
  - CRITICAL: DO NOT modify any other sections including Status, Story, Acceptance Criteria, Tasks/Subtasks, Dev Notes, Testing, Dev Agent Record, Change Log, or any other sections
@@ -57,13 +61,28 @@ story-file-permissions:
57
61
  # All commands require * prefix when used (e.g., *help)
58
62
  commands:
59
63
  - help: Show numbered list of the following commands to allow selection
60
- - review {story}: execute the task review-story for the highest sequence story in docs/stories unless another is specified - keep any specified technical-preferences in mind as needed
61
- - exit: Say goodbye as the QA Engineer, and then abandon inhabiting this persona
64
+ - review {story}: |
65
+ Adaptive, risk-aware comprehensive review.
66
+ Produces: QA Results update in story file + gate file (PASS/CONCERNS/FAIL/WAIVED).
67
+ Gate file location: docs/qa/gates/{epic}.{story}-{slug}.yml
68
+ Executes review-story task which includes all analysis and creates gate decision.
69
+ - gate {story}: Execute qa-gate task to write/update quality gate decision in docs/qa/gates/
70
+ - trace {story}: Execute trace-requirements task to map requirements to tests using Given-When-Then
71
+ - risk-profile {story}: Execute risk-profile task to generate risk assessment matrix
72
+ - test-design {story}: Execute test-design task to create comprehensive test scenarios
73
+ - nfr-assess {story}: Execute nfr-assess task to validate non-functional requirements
74
+ - exit: Say goodbye as the Test Architect, and then abandon inhabiting this persona
62
75
  dependencies:
63
76
  tasks:
64
77
  - review-story.md
78
+ - qa-gate.md
79
+ - trace-requirements.md
80
+ - risk-profile.md
81
+ - test-design.md
82
+ - nfr-assess.md
65
83
  data:
66
84
  - technical-preferences.md
67
85
  templates:
68
86
  - story-tmpl.yaml
87
+ - qa-gate-tmpl.yaml
69
88
  ```
@@ -0,0 +1,146 @@
1
+ # Test Levels Framework
2
+
3
+ Comprehensive guide for determining appropriate test levels (unit, integration, E2E) for different scenarios.
4
+
5
+ ## Test Level Decision Matrix
6
+
7
+ ### Unit Tests
8
+
9
+ **When to use:**
10
+
11
+ - Testing pure functions and business logic
12
+ - Algorithm correctness
13
+ - Input validation and data transformation
14
+ - Error handling in isolated components
15
+ - Complex calculations or state machines
16
+
17
+ **Characteristics:**
18
+
19
+ - Fast execution (immediate feedback)
20
+ - No external dependencies (DB, API, file system)
21
+ - Highly maintainable and stable
22
+ - Easy to debug failures
23
+
24
+ **Example scenarios:**
25
+
26
+ ```yaml
27
+ unit_test:
28
+ component: "PriceCalculator"
29
+ scenario: "Calculate discount with multiple rules"
30
+ justification: "Complex business logic with multiple branches"
31
+ mock_requirements: "None - pure function"
32
+ ```
33
+
34
+ ### Integration Tests
35
+
36
+ **When to use:**
37
+
38
+ - Component interaction verification
39
+ - Database operations and transactions
40
+ - API endpoint contracts
41
+ - Service-to-service communication
42
+ - Middleware and interceptor behavior
43
+
44
+ **Characteristics:**
45
+
46
+ - Moderate execution time
47
+ - Tests component boundaries
48
+ - May use test databases or containers
49
+ - Validates system integration points
50
+
51
+ **Example scenarios:**
52
+
53
+ ```yaml
54
+ integration_test:
55
+ components: ["UserService", "AuthRepository"]
56
+ scenario: "Create user with role assignment"
57
+ justification: "Critical data flow between service and persistence"
58
+ test_environment: "In-memory database"
59
+ ```
60
+
61
+ ### End-to-End Tests
62
+
63
+ **When to use:**
64
+
65
+ - Critical user journeys
66
+ - Cross-system workflows
67
+ - Visual regression testing
68
+ - Compliance and regulatory requirements
69
+ - Final validation before release
70
+
71
+ **Characteristics:**
72
+
73
+ - Slower execution
74
+ - Tests complete workflows
75
+ - Requires full environment setup
76
+ - Most realistic but most brittle
77
+
78
+ **Example scenarios:**
79
+
80
+ ```yaml
81
+ e2e_test:
82
+ journey: "Complete checkout process"
83
+ scenario: "User purchases with saved payment method"
84
+ justification: "Revenue-critical path requiring full validation"
85
+ environment: "Staging with test payment gateway"
86
+ ```
87
+
88
+ ## Test Level Selection Rules
89
+
90
+ ### Favor Unit Tests When:
91
+
92
+ - Logic can be isolated
93
+ - No side effects involved
94
+ - Fast feedback needed
95
+ - High cyclomatic complexity
96
+
97
+ ### Favor Integration Tests When:
98
+
99
+ - Testing persistence layer
100
+ - Validating service contracts
101
+ - Testing middleware/interceptors
102
+ - Component boundaries critical
103
+
104
+ ### Favor E2E Tests When:
105
+
106
+ - User-facing critical paths
107
+ - Multi-system interactions
108
+ - Regulatory compliance scenarios
109
+ - Visual regression important
110
+
111
+ ## Anti-patterns to Avoid
112
+
113
+ - E2E testing for business logic validation
114
+ - Unit testing framework behavior
115
+ - Integration testing third-party libraries
116
+ - Duplicate coverage across levels
117
+
118
+ ## Duplicate Coverage Guard
119
+
120
+ **Before adding any test, check:**
121
+
122
+ 1. Is this already tested at a lower level?
123
+ 2. Can a unit test cover this instead of integration?
124
+ 3. Can an integration test cover this instead of E2E?
125
+
126
+ **Coverage overlap is only acceptable when:**
127
+
128
+ - Testing different aspects (unit: logic, integration: interaction, e2e: user experience)
129
+ - Critical paths requiring defense in depth
130
+ - Regression prevention for previously broken functionality
131
+
132
+ ## Test Naming Conventions
133
+
134
+ - Unit: `test_{component}_{scenario}`
135
+ - Integration: `test_{flow}_{interaction}`
136
+ - E2E: `test_{journey}_{outcome}`
137
+
138
+ ## Test ID Format
139
+
140
+ `{EPIC}.{STORY}-{LEVEL}-{SEQ}`
141
+
142
+ Examples:
143
+
144
+ - `1.3-UNIT-001`
145
+ - `1.3-INT-002`
146
+ - `1.3-E2E-001`
@@ -0,0 +1,172 @@
1
+ # Test Priorities Matrix
2
+
3
+ Guide for prioritizing test scenarios based on risk, criticality, and business impact.
4
+
5
+ ## Priority Levels
6
+
7
+ ### P0 - Critical (Must Test)
8
+
9
+ **Criteria:**
10
+
11
+ - Revenue-impacting functionality
12
+ - Security-critical paths
13
+ - Data integrity operations
14
+ - Regulatory compliance requirements
15
+ - Previously broken functionality (regression prevention)
16
+
17
+ **Examples:**
18
+
19
+ - Payment processing
20
+ - Authentication/authorization
21
+ - User data creation/deletion
22
+ - Financial calculations
23
+ - GDPR/privacy compliance
24
+
25
+ **Testing Requirements:**
26
+
27
+ - Comprehensive coverage at all levels
28
+ - Both happy and unhappy paths
29
+ - Edge cases and error scenarios
30
+ - Performance under load
31
+
32
+ ### P1 - High (Should Test)
33
+
34
+ **Criteria:**
35
+
36
+ - Core user journeys
37
+ - Frequently used features
38
+ - Features with complex logic
39
+ - Integration points between systems
40
+ - Features affecting user experience
41
+
42
+ **Examples:**
43
+
44
+ - User registration flow
45
+ - Search functionality
46
+ - Data import/export
47
+ - Notification systems
48
+ - Dashboard displays
49
+
50
+ **Testing Requirements:**
51
+
52
+ - Primary happy paths required
53
+ - Key error scenarios
54
+ - Critical edge cases
55
+ - Basic performance validation
56
+
57
+ ### P2 - Medium (Nice to Test)
58
+
59
+ **Criteria:**
60
+
61
+ - Secondary features
62
+ - Admin functionality
63
+ - Reporting features
64
+ - Configuration options
65
+ - UI polish and aesthetics
66
+
67
+ **Examples:**
68
+
69
+ - Admin settings panels
70
+ - Report generation
71
+ - Theme customization
72
+ - Help documentation
73
+ - Analytics tracking
74
+
75
+ **Testing Requirements:**
76
+
77
+ - Happy path coverage
78
+ - Basic error handling
79
+ - Can defer edge cases
80
+
81
+ ### P3 - Low (Test if Time Permits)
82
+
83
+ **Criteria:**
84
+
85
+ - Rarely used features
86
+ - Nice-to-have functionality
87
+ - Cosmetic issues
88
+ - Non-critical optimizations
89
+
90
+ **Examples:**
91
+
92
+ - Advanced preferences
93
+ - Legacy feature support
94
+ - Experimental features
95
+ - Debug utilities
96
+
97
+ **Testing Requirements:**
98
+
99
+ - Smoke tests only
100
+ - Can rely on manual testing
101
+ - Document known limitations
102
+
103
+ ## Risk-Based Priority Adjustments
104
+
105
+ ### Increase Priority When:
106
+
107
+ - High user impact (affects >50% of users)
108
+ - High financial impact (>$10K potential loss)
109
+ - Security vulnerability potential
110
+ - Compliance/legal requirements
111
+ - Customer-reported issues
112
+ - Complex implementation (>500 LOC)
113
+ - Multiple system dependencies
114
+
115
+ ### Decrease Priority When:
116
+
117
+ - Feature flag protected
118
+ - Gradual rollout planned
119
+ - Strong monitoring in place
120
+ - Easy rollback capability
121
+ - Low usage metrics
122
+ - Simple implementation
123
+ - Well-isolated component
124
+
125
+ ## Test Coverage by Priority
126
+
127
+ | Priority | Unit Coverage | Integration Coverage | E2E Coverage |
128
+ | -------- | ------------- | -------------------- | ------------------ |
129
+ | P0 | >90% | >80% | All critical paths |
130
+ | P1 | >80% | >60% | Main happy paths |
131
+ | P2 | >60% | >40% | Smoke tests |
132
+ | P3 | Best effort | Best effort | Manual only |
133
+
134
+ ## Priority Assignment Rules
135
+
136
+ 1. **Start with business impact** - What happens if this fails?
137
+ 2. **Consider probability** - How likely is failure?
138
+ 3. **Factor in detectability** - Would we know if it failed?
139
+ 4. **Account for recoverability** - Can we fix it quickly?
140
+
141
+ ## Priority Decision Tree
142
+
143
+ ```
144
+ Is it revenue-critical?
145
+ ├─ YES → P0
146
+ └─ NO → Does it affect core user journey?
147
+ ├─ YES → Is it high-risk?
148
+ │ ├─ YES → P0
149
+ │ └─ NO → P1
150
+ └─ NO → Is it frequently used?
151
+ ├─ YES → P1
152
+ └─ NO → Is it customer-facing?
153
+ ├─ YES → P2
154
+ └─ NO → P3
155
+ ```
156
+
157
+ ## Test Execution Order
158
+
159
+ 1. Execute P0 tests first (fail fast on critical issues)
160
+ 2. Execute P1 tests second (core functionality)
161
+ 3. Execute P2 tests if time permits
162
+ 4. P3 tests only in full regression cycles
163
+
164
+ ## Continuous Adjustment
165
+
166
+ Review and adjust priorities based on:
167
+
168
+ - Production incident patterns
169
+ - User feedback and complaints
170
+ - Usage analytics
171
+ - Test failure history
172
+ - Business priority changes