@rdmind/rdmind 0.0.9-alpha.1 → 0.0.9-alpha.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 (96) hide show
  1. package/.knowledge/.ext/.bmad-core/agent-teams/team-all.yaml +15 -0
  2. package/.knowledge/.ext/.bmad-core/agent-teams/team-fullstack.yaml +19 -0
  3. package/.knowledge/.ext/.bmad-core/agent-teams/team-ide-minimal.yaml +11 -0
  4. package/.knowledge/.ext/.bmad-core/agent-teams/team-no-ui.yaml +14 -0
  5. package/.knowledge/.ext/.bmad-core/agents/analyst.md +84 -0
  6. package/.knowledge/.ext/.bmad-core/agents/architect.md +85 -0
  7. package/.knowledge/.ext/.bmad-core/agents/bmad-master.md +110 -0
  8. package/.knowledge/.ext/.bmad-core/agents/bmad-orchestrator.md +147 -0
  9. package/.knowledge/.ext/.bmad-core/agents/dev.md +81 -0
  10. package/.knowledge/.ext/.bmad-core/agents/pm.md +84 -0
  11. package/.knowledge/.ext/.bmad-core/agents/po.md +79 -0
  12. package/.knowledge/.ext/.bmad-core/agents/qa.md +90 -0
  13. package/.knowledge/.ext/.bmad-core/agents/ra.md +74 -0
  14. package/.knowledge/.ext/.bmad-core/agents/sm.md +65 -0
  15. package/.knowledge/.ext/.bmad-core/agents/ux-expert.md +69 -0
  16. package/.knowledge/.ext/.bmad-core/checklists/architect-checklist.md +440 -0
  17. package/.knowledge/.ext/.bmad-core/checklists/change-checklist.md +184 -0
  18. package/.knowledge/.ext/.bmad-core/checklists/pm-checklist.md +372 -0
  19. package/.knowledge/.ext/.bmad-core/checklists/po-master-checklist.md +434 -0
  20. package/.knowledge/.ext/.bmad-core/checklists/story-dod-checklist.md +96 -0
  21. package/.knowledge/.ext/.bmad-core/checklists/story-draft-checklist.md +155 -0
  22. package/.knowledge/.ext/.bmad-core/checklists/trd-checklist.md +226 -0
  23. package/.knowledge/.ext/.bmad-core/core-config.yaml +22 -0
  24. package/.knowledge/.ext/.bmad-core/data/bmad-kb.md +809 -0
  25. package/.knowledge/.ext/.bmad-core/data/brainstorming-techniques.md +38 -0
  26. package/.knowledge/.ext/.bmad-core/data/elicitation-methods.md +156 -0
  27. package/.knowledge/.ext/.bmad-core/data/technical-preferences.md +5 -0
  28. package/.knowledge/.ext/.bmad-core/data/test-levels-framework.md +148 -0
  29. package/.knowledge/.ext/.bmad-core/data/test-priorities-matrix.md +174 -0
  30. package/.knowledge/.ext/.bmad-core/enhanced-ide-development-workflow.md +248 -0
  31. package/.knowledge/.ext/.bmad-core/install-manifest.yaml +512 -0
  32. package/.knowledge/.ext/.bmad-core/tasks/advanced-elicitation.md +119 -0
  33. package/.knowledge/.ext/.bmad-core/tasks/analyze-prd.md +123 -0
  34. package/.knowledge/.ext/.bmad-core/tasks/apply-qa-fixes.md +150 -0
  35. package/.knowledge/.ext/.bmad-core/tasks/brownfield-create-epic.md +162 -0
  36. package/.knowledge/.ext/.bmad-core/tasks/brownfield-create-story.md +149 -0
  37. package/.knowledge/.ext/.bmad-core/tasks/correct-course.md +72 -0
  38. package/.knowledge/.ext/.bmad-core/tasks/create-brownfield-story.md +314 -0
  39. package/.knowledge/.ext/.bmad-core/tasks/create-deep-research-prompt.md +280 -0
  40. package/.knowledge/.ext/.bmad-core/tasks/create-doc.md +103 -0
  41. package/.knowledge/.ext/.bmad-core/tasks/create-next-story.md +114 -0
  42. package/.knowledge/.ext/.bmad-core/tasks/document-project.md +345 -0
  43. package/.knowledge/.ext/.bmad-core/tasks/execute-checklist.md +88 -0
  44. package/.knowledge/.ext/.bmad-core/tasks/facilitate-brainstorming-session.md +138 -0
  45. package/.knowledge/.ext/.bmad-core/tasks/generate-ai-frontend-prompt.md +53 -0
  46. package/.knowledge/.ext/.bmad-core/tasks/index-docs.md +175 -0
  47. package/.knowledge/.ext/.bmad-core/tasks/kb-mode-interaction.md +77 -0
  48. package/.knowledge/.ext/.bmad-core/tasks/nfr-assess.md +345 -0
  49. package/.knowledge/.ext/.bmad-core/tasks/qa-gate.md +163 -0
  50. package/.knowledge/.ext/.bmad-core/tasks/review-story.md +316 -0
  51. package/.knowledge/.ext/.bmad-core/tasks/risk-profile.md +355 -0
  52. package/.knowledge/.ext/.bmad-core/tasks/shard-doc.md +187 -0
  53. package/.knowledge/.ext/.bmad-core/tasks/test-design.md +176 -0
  54. package/.knowledge/.ext/.bmad-core/tasks/trace-requirements.md +266 -0
  55. package/.knowledge/.ext/.bmad-core/tasks/validate-next-story.md +136 -0
  56. package/.knowledge/.ext/.bmad-core/tasks/validate-trd.md +158 -0
  57. package/.knowledge/.ext/.bmad-core/templates/architecture-tmpl.yaml +651 -0
  58. package/.knowledge/.ext/.bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
  59. package/.knowledge/.ext/.bmad-core/templates/brownfield-architecture-tmpl.yaml +478 -0
  60. package/.knowledge/.ext/.bmad-core/templates/brownfield-prd-tmpl.yaml +281 -0
  61. package/.knowledge/.ext/.bmad-core/templates/competitor-analysis-tmpl.yaml +349 -0
  62. package/.knowledge/.ext/.bmad-core/templates/front-end-architecture-tmpl.yaml +273 -0
  63. package/.knowledge/.ext/.bmad-core/templates/front-end-spec-tmpl.yaml +360 -0
  64. package/.knowledge/.ext/.bmad-core/templates/fullstack-architecture-tmpl.yaml +947 -0
  65. package/.knowledge/.ext/.bmad-core/templates/market-research-tmpl.yaml +253 -0
  66. package/.knowledge/.ext/.bmad-core/templates/prd-tmpl.yaml +203 -0
  67. package/.knowledge/.ext/.bmad-core/templates/project-brief-tmpl.yaml +222 -0
  68. package/.knowledge/.ext/.bmad-core/templates/qa-gate-tmpl.yaml +103 -0
  69. package/.knowledge/.ext/.bmad-core/templates/story-tmpl.yaml +138 -0
  70. package/.knowledge/.ext/.bmad-core/templates/trd-tmpl.yaml +198 -0
  71. package/.knowledge/.ext/.bmad-core/user-guide.md +530 -0
  72. package/.knowledge/.ext/.bmad-core/utils/bmad-doc-template.md +327 -0
  73. package/.knowledge/.ext/.bmad-core/utils/workflow-management.md +71 -0
  74. package/.knowledge/.ext/.bmad-core/workflows/brownfield-fullstack.yaml +298 -0
  75. package/.knowledge/.ext/.bmad-core/workflows/brownfield-service.yaml +188 -0
  76. package/.knowledge/.ext/.bmad-core/workflows/brownfield-ui.yaml +198 -0
  77. package/.knowledge/.ext/.bmad-core/workflows/greenfield-fullstack.yaml +241 -0
  78. package/.knowledge/.ext/.bmad-core/workflows/greenfield-service.yaml +207 -0
  79. package/.knowledge/.ext/.bmad-core/workflows/greenfield-ui.yaml +236 -0
  80. package/.knowledge/.ext/.bmad-core/working-in-the-brownfield.md +606 -0
  81. package/.knowledge/.ext/coding/ddd-architecture.md +223 -0
  82. package/.knowledge/.ext/coding/java-standards.md +308 -0
  83. package/.knowledge/.ext/coding/mybatis-standards.md +407 -0
  84. package/.knowledge/.ext/coding/sql-standards.md +263 -0
  85. package/.knowledge/.ext/coding/thrift-service.md +292 -0
  86. package/.knowledge/BMAD.md +255 -0
  87. package/.knowledge/coding.md +135 -0
  88. package/dist/package.json +4 -3
  89. package/dist/src/generated/git-commit.d.ts +2 -2
  90. package/dist/src/generated/git-commit.js +2 -2
  91. package/dist/src/ui/components/Tips.js +1 -1
  92. package/dist/src/ui/components/Tips.js.map +1 -1
  93. package/dist/src/ui/hooks/usePhraseCycler.js +2 -2
  94. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
  95. package/dist/tsconfig.tsbuildinfo +1 -1
  96. package/package.json +4 -3
@@ -0,0 +1,163 @@
1
+ <!-- Powered by BMAD™ Core -->
2
+
3
+ # qa-gate
4
+
5
+ Create or update a quality gate decision file for a story based on review findings.
6
+
7
+ ## Purpose
8
+
9
+ Generate a standalone quality gate file that provides a clear pass/fail decision with actionable feedback. This gate serves as an advisory checkpoint for teams to understand quality status.
10
+
11
+ ## Prerequisites
12
+
13
+ - Story has been reviewed (manually or via review-story task)
14
+ - Review findings are available
15
+ - Understanding of story requirements and implementation
16
+
17
+ ## Gate File Location
18
+
19
+ **ALWAYS** check the `bmad-core/core-config.yaml` for the `qa.qaLocation/gates`
20
+
21
+ Slug rules:
22
+
23
+ - Convert to lowercase
24
+ - Replace spaces with hyphens
25
+ - Strip punctuation
26
+ - Example: "User Auth - Login!" becomes "user-auth-login"
27
+
28
+ ## Minimal Required Schema
29
+
30
+ ```yaml
31
+ schema: 1
32
+ story: '{epic}.{story}'
33
+ gate: PASS|CONCERNS|FAIL|WAIVED
34
+ status_reason: '1-2 sentence explanation of gate decision'
35
+ reviewer: 'Quinn'
36
+ updated: '{ISO-8601 timestamp}'
37
+ top_issues: [] # Empty array if no issues
38
+ waiver: { active: false } # Only set active: true if WAIVED
39
+ ```
40
+
41
+ ## Schema with Issues
42
+
43
+ ```yaml
44
+ schema: 1
45
+ story: '1.3'
46
+ gate: CONCERNS
47
+ status_reason: 'Missing rate limiting on auth endpoints poses security risk.'
48
+ reviewer: 'Quinn'
49
+ updated: '2025-01-12T10:15:00Z'
50
+ top_issues:
51
+ - id: 'SEC-001'
52
+ severity: high # ONLY: low|medium|high
53
+ finding: 'No rate limiting on login endpoint'
54
+ suggested_action: 'Add rate limiting middleware before production'
55
+ - id: 'TEST-001'
56
+ severity: medium
57
+ finding: 'No integration tests for auth flow'
58
+ suggested_action: 'Add integration test coverage'
59
+ waiver: { active: false }
60
+ ```
61
+
62
+ ## Schema when Waived
63
+
64
+ ```yaml
65
+ schema: 1
66
+ story: '1.3'
67
+ gate: WAIVED
68
+ status_reason: 'Known issues accepted for MVP release.'
69
+ reviewer: 'Quinn'
70
+ updated: '2025-01-12T10:15:00Z'
71
+ top_issues:
72
+ - id: 'PERF-001'
73
+ severity: low
74
+ finding: 'Dashboard loads slowly with 1000+ items'
75
+ suggested_action: 'Implement pagination in next sprint'
76
+ waiver:
77
+ active: true
78
+ reason: 'MVP release - performance optimization deferred'
79
+ approved_by: 'Product Owner'
80
+ ```
81
+
82
+ ## Gate Decision Criteria
83
+
84
+ ### PASS
85
+
86
+ - All acceptance criteria met
87
+ - No high-severity issues
88
+ - Test coverage meets project standards
89
+
90
+ ### CONCERNS
91
+
92
+ - Non-blocking issues present
93
+ - Should be tracked and scheduled
94
+ - Can proceed with awareness
95
+
96
+ ### FAIL
97
+
98
+ - Acceptance criteria not met
99
+ - High-severity issues present
100
+ - Recommend return to InProgress
101
+
102
+ ### WAIVED
103
+
104
+ - Issues explicitly accepted
105
+ - Requires approval and reason
106
+ - Proceed despite known issues
107
+
108
+ ## Severity Scale
109
+
110
+ **FIXED VALUES - NO VARIATIONS:**
111
+
112
+ - `low`: Minor issues, cosmetic problems
113
+ - `medium`: Should fix soon, not blocking
114
+ - `high`: Critical issues, should block release
115
+
116
+ ## Issue ID Prefixes
117
+
118
+ - `SEC-`: Security issues
119
+ - `PERF-`: Performance issues
120
+ - `REL-`: Reliability issues
121
+ - `TEST-`: Testing gaps
122
+ - `MNT-`: Maintainability concerns
123
+ - `ARCH-`: Architecture issues
124
+ - `DOC-`: Documentation gaps
125
+ - `REQ-`: Requirements issues
126
+
127
+ ## Output Requirements
128
+
129
+ 1. **ALWAYS** create gate file at: `qa.qaLocation/gates` from `bmad-core/core-config.yaml`
130
+ 2. **ALWAYS** append this exact format to story's QA Results section:
131
+
132
+ ```text
133
+ Gate: {STATUS} → qa.qaLocation/gates/{epic}.{story}-{slug}.yml
134
+ ```
135
+
136
+ 3. Keep status_reason to 1-2 sentences maximum
137
+ 4. Use severity values exactly: `low`, `medium`, or `high`
138
+
139
+ ## Example Story Update
140
+
141
+ After creating gate file, append to story's QA Results section:
142
+
143
+ ```markdown
144
+ ## QA Results
145
+
146
+ ### Review Date: 2025-01-12
147
+
148
+ ### Reviewed By: Quinn (Test Architect)
149
+
150
+ [... existing review content ...]
151
+
152
+ ### Gate Status
153
+
154
+ Gate: CONCERNS → qa.qaLocation/gates/{epic}.{story}-{slug}.yml
155
+ ```
156
+
157
+ ## Key Principles
158
+
159
+ - Keep it minimal and predictable
160
+ - Fixed severity scale (low/medium/high)
161
+ - Always write to standard path
162
+ - Always update story with gate reference
163
+ - Clear, actionable findings
@@ -0,0 +1,316 @@
1
+ <!-- Powered by BMAD™ Core -->
2
+
3
+ # review-story
4
+
5
+ Perform a comprehensive test architecture review with quality gate decision. This adaptive, risk-aware review creates both a story update and a detailed gate file.
6
+
7
+ ## Inputs
8
+
9
+ ```yaml
10
+ required:
11
+ - story_id: '{epic}.{story}' # e.g., "1.3"
12
+ - story_path: '{devStoryLocation}/{epic}.{story}.*.md' # Path from core-config.yaml
13
+ - story_title: '{title}' # If missing, derive from story file H1
14
+ - story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
15
+ ```
16
+
17
+ ## Prerequisites
18
+
19
+ - Story status must be "Review"
20
+ - Developer has completed all tasks and updated the File List
21
+ - All automated tests are passing
22
+
23
+ ## Review Process - Adaptive Test Architecture
24
+
25
+ ### 1. Risk Assessment (Determines Review Depth)
26
+
27
+ **Auto-escalate to deep review when:**
28
+
29
+ - Auth/payment/security files touched
30
+ - No tests added to story
31
+ - Diff > 500 lines
32
+ - Previous gate was FAIL/CONCERNS
33
+ - Story has > 5 acceptance criteria
34
+
35
+ ### 2. Comprehensive Analysis
36
+
37
+ **A. Requirements Traceability**
38
+
39
+ - Map each acceptance criteria to its validating tests (document mapping with Given-When-Then, not test code)
40
+ - Identify coverage gaps
41
+ - Verify all requirements have corresponding test cases
42
+
43
+ **B. Code Quality Review**
44
+
45
+ - Architecture and design patterns
46
+ - Refactoring opportunities (and perform them)
47
+ - Code duplication or inefficiencies
48
+ - Performance optimizations
49
+ - Security vulnerabilities
50
+ - Best practices adherence
51
+
52
+ **C. Test Architecture Assessment**
53
+
54
+ - Test coverage adequacy at appropriate levels
55
+ - Test level appropriateness (what should be unit vs integration vs e2e)
56
+ - Test design quality and maintainability
57
+ - Test data management strategy
58
+ - Mock/stub usage appropriateness
59
+ - Edge case and error scenario coverage
60
+ - Test execution time and reliability
61
+
62
+ **D. Non-Functional Requirements (NFRs)**
63
+
64
+ - Security: Authentication, authorization, data protection
65
+ - Performance: Response times, resource usage
66
+ - Reliability: Error handling, recovery mechanisms
67
+ - Maintainability: Code clarity, documentation
68
+
69
+ **E. Testability Evaluation**
70
+
71
+ - Controllability: Can we control the inputs?
72
+ - Observability: Can we observe the outputs?
73
+ - Debuggability: Can we debug failures easily?
74
+
75
+ **F. Technical Debt Identification**
76
+
77
+ - Accumulated shortcuts
78
+ - Missing tests
79
+ - Outdated dependencies
80
+ - Architecture violations
81
+
82
+ ### 3. Active Refactoring
83
+
84
+ - Refactor code where safe and appropriate
85
+ - Run tests to ensure changes don't break functionality
86
+ - Document all changes in QA Results section with clear WHY and HOW
87
+ - Do NOT alter story content beyond QA Results section
88
+ - Do NOT change story Status or File List; recommend next status only
89
+
90
+ ### 4. Standards Compliance Check
91
+
92
+ - Verify adherence to `docs/coding-standards.md`
93
+ - Check compliance with `docs/unified-project-structure.md`
94
+ - Validate testing approach against `docs/testing-strategy.md`
95
+ - Ensure all guidelines mentioned in the story are followed
96
+
97
+ ### 5. Acceptance Criteria Validation
98
+
99
+ - Verify each AC is fully implemented
100
+ - Check for any missing functionality
101
+ - Validate edge cases are handled
102
+
103
+ ### 6. Documentation and Comments
104
+
105
+ - Verify code is self-documenting where possible
106
+ - Add comments for complex logic if missing
107
+ - Ensure any API changes are documented
108
+
109
+ ## Output 1: Update Story File - QA Results Section ONLY
110
+
111
+ **CRITICAL**: You are ONLY authorized to update the "QA Results" section of the story file. DO NOT modify any other sections.
112
+
113
+ **QA Results Anchor Rule:**
114
+
115
+ - If `## QA Results` doesn't exist, append it at end of file
116
+ - If it exists, append a new dated entry below existing entries
117
+ - Never edit other sections
118
+
119
+ After review and any refactoring, append your results to the story file in the QA Results section:
120
+
121
+ ```markdown
122
+ ## QA Results
123
+
124
+ ### Review Date: [Date]
125
+
126
+ ### Reviewed By: Quinn (Test Architect)
127
+
128
+ ### Code Quality Assessment
129
+
130
+ [Overall assessment of implementation quality]
131
+
132
+ ### Refactoring Performed
133
+
134
+ [List any refactoring you performed with explanations]
135
+
136
+ - **File**: [filename]
137
+ - **Change**: [what was changed]
138
+ - **Why**: [reason for change]
139
+ - **How**: [how it improves the code]
140
+
141
+ ### Compliance Check
142
+
143
+ - Coding Standards: [✓/✗] [notes if any]
144
+ - Project Structure: [✓/✗] [notes if any]
145
+ - Testing Strategy: [✓/✗] [notes if any]
146
+ - All ACs Met: [✓/✗] [notes if any]
147
+
148
+ ### Improvements Checklist
149
+
150
+ [Check off items you handled yourself, leave unchecked for dev to address]
151
+
152
+ - [x] Refactored user service for better error handling (services/user.service.ts)
153
+ - [x] Added missing edge case tests (services/user.service.test.ts)
154
+ - [ ] Consider extracting validation logic to separate validator class
155
+ - [ ] Add integration test for error scenarios
156
+ - [ ] Update API documentation for new error codes
157
+
158
+ ### Security Review
159
+
160
+ [Any security concerns found and whether addressed]
161
+
162
+ ### Performance Considerations
163
+
164
+ [Any performance issues found and whether addressed]
165
+
166
+ ### Files Modified During Review
167
+
168
+ [If you modified files, list them here - ask Dev to update File List]
169
+
170
+ ### Gate Status
171
+
172
+ Gate: {STATUS} → qa.qaLocation/gates/{epic}.{story}-{slug}.yml
173
+ Risk profile: qa.qaLocation/assessments/{epic}.{story}-risk-{YYYYMMDD}.md
174
+ NFR assessment: qa.qaLocation/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md
175
+
176
+ # Note: Paths should reference core-config.yaml for custom configurations
177
+
178
+ ### Recommended Status
179
+
180
+ [✓ Ready for Done] / [✗ Changes Required - See unchecked items above]
181
+ (Story owner decides final status)
182
+ ```
183
+
184
+ ## Output 2: Create Quality Gate File
185
+
186
+ **Template and Directory:**
187
+
188
+ - Render from `../templates/qa-gate-tmpl.yaml`
189
+ - Create directory defined in `qa.qaLocation/gates` (see `bmad-core/core-config.yaml`) if missing
190
+ - Save to: `qa.qaLocation/gates/{epic}.{story}-{slug}.yml`
191
+
192
+ Gate file structure:
193
+
194
+ ```yaml
195
+ schema: 1
196
+ story: '{epic}.{story}'
197
+ story_title: '{story title}'
198
+ gate: PASS|CONCERNS|FAIL|WAIVED
199
+ status_reason: '1-2 sentence explanation of gate decision'
200
+ reviewer: 'Quinn (Test Architect)'
201
+ updated: '{ISO-8601 timestamp}'
202
+
203
+ top_issues: [] # Empty if no issues
204
+ waiver: { active: false } # Set active: true only if WAIVED
205
+
206
+ # Extended fields (optional but recommended):
207
+ quality_score: 0-100 # 100 - (20*FAILs) - (10*CONCERNS) or use technical-preferences.md weights
208
+ expires: '{ISO-8601 timestamp}' # Typically 2 weeks from review
209
+
210
+ evidence:
211
+ tests_reviewed: { count }
212
+ risks_identified: { count }
213
+ trace:
214
+ ac_covered: [1, 2, 3] # AC numbers with test coverage
215
+ ac_gaps: [4] # AC numbers lacking coverage
216
+
217
+ nfr_validation:
218
+ security:
219
+ status: PASS|CONCERNS|FAIL
220
+ notes: 'Specific findings'
221
+ performance:
222
+ status: PASS|CONCERNS|FAIL
223
+ notes: 'Specific findings'
224
+ reliability:
225
+ status: PASS|CONCERNS|FAIL
226
+ notes: 'Specific findings'
227
+ maintainability:
228
+ status: PASS|CONCERNS|FAIL
229
+ notes: 'Specific findings'
230
+
231
+ recommendations:
232
+ immediate: # Must fix before production
233
+ - action: 'Add rate limiting'
234
+ refs: ['api/auth/login.ts']
235
+ future: # Can be addressed later
236
+ - action: 'Consider caching'
237
+ refs: ['services/data.ts']
238
+ ```
239
+
240
+ ### Gate Decision Criteria
241
+
242
+ **Deterministic rule (apply in order):**
243
+
244
+ If risk_summary exists, apply its thresholds first (≥9 → FAIL, ≥6 → CONCERNS), then NFR statuses, then top_issues severity.
245
+
246
+ 1. **Risk thresholds (if risk_summary present):**
247
+ - If any risk score ≥ 9 → Gate = FAIL (unless waived)
248
+ - Else if any score ≥ 6 → Gate = CONCERNS
249
+
250
+ 2. **Test coverage gaps (if trace available):**
251
+ - If any P0 test from test-design is missing → Gate = CONCERNS
252
+ - If security/data-loss P0 test missing → Gate = FAIL
253
+
254
+ 3. **Issue severity:**
255
+ - If any `top_issues.severity == high` → Gate = FAIL (unless waived)
256
+ - Else if any `severity == medium` → Gate = CONCERNS
257
+
258
+ 4. **NFR statuses:**
259
+ - If any NFR status is FAIL → Gate = FAIL
260
+ - Else if any NFR status is CONCERNS → Gate = CONCERNS
261
+ - Else → Gate = PASS
262
+
263
+ - WAIVED only when waiver.active: true with reason/approver
264
+
265
+ Detailed criteria:
266
+
267
+ - **PASS**: All critical requirements met, no blocking issues
268
+ - **CONCERNS**: Non-critical issues found, team should review
269
+ - **FAIL**: Critical issues that should be addressed
270
+ - **WAIVED**: Issues acknowledged but explicitly waived by team
271
+
272
+ ### Quality Score Calculation
273
+
274
+ ```text
275
+ quality_score = 100 - (20 × number of FAILs) - (10 × number of CONCERNS)
276
+ Bounded between 0 and 100
277
+ ```
278
+
279
+ If `technical-preferences.md` defines custom weights, use those instead.
280
+
281
+ ### Suggested Owner Convention
282
+
283
+ For each issue in `top_issues`, include a `suggested_owner`:
284
+
285
+ - `dev`: Code changes needed
286
+ - `sm`: Requirements clarification needed
287
+ - `po`: Business decision needed
288
+
289
+ ## Key Principles
290
+
291
+ - You are a Test Architect providing comprehensive quality assessment
292
+ - You have the authority to improve code directly when appropriate
293
+ - Always explain your changes for learning purposes
294
+ - Balance between perfection and pragmatism
295
+ - Focus on risk-based prioritization
296
+ - Provide actionable recommendations with clear ownership
297
+
298
+ ## Blocking Conditions
299
+
300
+ Stop the review and request clarification if:
301
+
302
+ - Story file is incomplete or missing critical sections
303
+ - File List is empty or clearly incomplete
304
+ - No tests exist when they were required
305
+ - Code changes don't align with story requirements
306
+ - Critical architectural issues that require discussion
307
+
308
+ ## Completion
309
+
310
+ After review:
311
+
312
+ 1. Update the QA Results section in the story file
313
+ 2. Create the gate file in directory from `qa.qaLocation/gates`
314
+ 3. Recommend status: "Ready for Done" or "Changes Required" (owner decides)
315
+ 4. If files were modified, list them in QA Results and ask Dev to update File List
316
+ 5. Always provide constructive feedback and actionable recommendations