siesa-agents 2.1.1 → 2.1.3-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/README.md +83 -83
  2. package/bin/install.js +400 -399
  3. package/bin/prepare-publish.js +26 -26
  4. package/bin/restore-folders.js +26 -26
  5. package/bmad-core/agent-teams/team-all.yaml +15 -15
  6. package/bmad-core/agent-teams/team-fullstack.yaml +19 -19
  7. package/bmad-core/agent-teams/team-ide-minimal.yaml +11 -11
  8. package/bmad-core/agent-teams/team-no-ui.yaml +14 -14
  9. package/bmad-core/agents/analyst.md +84 -84
  10. package/bmad-core/agents/architect.md +94 -94
  11. package/bmad-core/agents/backend-agent.md +189 -189
  12. package/bmad-core/agents/bmad-master.md +110 -110
  13. package/bmad-core/agents/bmad-orchestrator.md +147 -147
  14. package/bmad-core/agents/dev.md +81 -81
  15. package/bmad-core/agents/frontend-agent.md +168 -168
  16. package/bmad-core/agents/pm.md +84 -84
  17. package/bmad-core/agents/po.md +79 -79
  18. package/bmad-core/agents/qa.md +91 -91
  19. package/bmad-core/agents/sm.md +65 -65
  20. package/bmad-core/agents/ux-expert.md +69 -69
  21. package/bmad-core/checklists/architect-checklist.md +440 -440
  22. package/bmad-core/checklists/backend-checklist.md +142 -142
  23. package/bmad-core/checklists/change-checklist.md +184 -184
  24. package/bmad-core/checklists/frontend-checklist.md +105 -105
  25. package/bmad-core/checklists/pm-checklist.md +372 -372
  26. package/bmad-core/checklists/po-master-checklist.md +434 -434
  27. package/bmad-core/checklists/story-dod-checklist.md +96 -96
  28. package/bmad-core/checklists/story-draft-checklist.md +155 -155
  29. package/bmad-core/core-config.yaml +22 -22
  30. package/bmad-core/data/backend-standards.md +439 -439
  31. package/bmad-core/data/bmad-kb.md +809 -809
  32. package/bmad-core/data/brainstorming-techniques.md +38 -38
  33. package/bmad-core/data/elicitation-methods.md +156 -156
  34. package/bmad-core/data/frontend-standards.md +323 -323
  35. package/bmad-core/data/technical-preferences.md +5 -5
  36. package/bmad-core/data/test-levels-framework.md +148 -148
  37. package/bmad-core/data/test-priorities-matrix.md +174 -174
  38. package/bmad-core/enhanced-ide-development-workflow.md +248 -248
  39. package/bmad-core/install-manifest.yaml +230 -230
  40. package/bmad-core/tasks/advanced-elicitation.md +119 -119
  41. package/bmad-core/tasks/apply-qa-fixes.md +150 -150
  42. package/bmad-core/tasks/brownfield-create-epic.md +162 -162
  43. package/bmad-core/tasks/brownfield-create-story.md +149 -149
  44. package/bmad-core/tasks/correct-course.md +72 -72
  45. package/bmad-core/tasks/create-brownfield-story.md +314 -314
  46. package/bmad-core/tasks/create-component.md +102 -102
  47. package/bmad-core/tasks/create-deep-research-prompt.md +280 -280
  48. package/bmad-core/tasks/create-doc.md +103 -103
  49. package/bmad-core/tasks/create-entity.md +132 -132
  50. package/bmad-core/tasks/create-feature.md +90 -90
  51. package/bmad-core/tasks/create-next-story.md +114 -114
  52. package/bmad-core/tasks/create-service.md +117 -117
  53. package/bmad-core/tasks/create-use-case.md +140 -140
  54. package/bmad-core/tasks/document-project.md +345 -345
  55. package/bmad-core/tasks/execute-checklist.md +88 -88
  56. package/bmad-core/tasks/facilitate-brainstorming-session.md +138 -138
  57. package/bmad-core/tasks/generate-ai-frontend-prompt.md +53 -53
  58. package/bmad-core/tasks/index-docs.md +175 -175
  59. package/bmad-core/tasks/kb-mode-interaction.md +77 -77
  60. package/bmad-core/tasks/nfr-assess.md +345 -345
  61. package/bmad-core/tasks/qa-gate.md +163 -163
  62. package/bmad-core/tasks/review-story.md +316 -316
  63. package/bmad-core/tasks/risk-profile.md +355 -355
  64. package/bmad-core/tasks/scaffold-backend.md +110 -110
  65. package/bmad-core/tasks/scaffold-frontend.md +78 -78
  66. package/bmad-core/tasks/shard-doc.md +187 -187
  67. package/bmad-core/tasks/test-design.md +176 -176
  68. package/bmad-core/tasks/trace-requirements.md +266 -266
  69. package/bmad-core/tasks/validate-next-story.md +136 -136
  70. package/bmad-core/templates/architecture-tmpl.yaml +662 -662
  71. package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -156
  72. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +477 -477
  73. package/bmad-core/templates/brownfield-prd-tmpl.yaml +281 -281
  74. package/bmad-core/templates/competitor-analysis-tmpl.yaml +307 -307
  75. package/bmad-core/templates/front-end-architecture-tmpl.yaml +258 -258
  76. package/bmad-core/templates/front-end-spec-tmpl.yaml +350 -350
  77. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +824 -824
  78. package/bmad-core/templates/market-research-tmpl.yaml +253 -253
  79. package/bmad-core/templates/prd-tmpl.yaml +203 -203
  80. package/bmad-core/templates/project-brief-tmpl.yaml +222 -222
  81. package/bmad-core/templates/qa-gate-tmpl.yaml +103 -103
  82. package/bmad-core/templates/story-tmpl.yaml +138 -138
  83. package/bmad-core/user-guide.md +530 -530
  84. package/bmad-core/utils/bmad-doc-template.md +327 -327
  85. package/bmad-core/utils/workflow-management.md +71 -71
  86. package/bmad-core/workflows/brownfield-fullstack.yaml +298 -298
  87. package/bmad-core/workflows/brownfield-service.yaml +188 -188
  88. package/bmad-core/workflows/brownfield-ui.yaml +198 -198
  89. package/bmad-core/workflows/greenfield-fullstack.yaml +241 -241
  90. package/bmad-core/workflows/greenfield-service.yaml +207 -207
  91. package/bmad-core/workflows/greenfield-ui.yaml +236 -236
  92. package/bmad-core/working-in-the-brownfield.md +606 -606
  93. package/claude/commands/BMad/agents/analyst.md +88 -0
  94. package/claude/commands/BMad/agents/architect.md +89 -0
  95. package/claude/commands/BMad/agents/backend.md +188 -0
  96. package/claude/commands/BMad/agents/bmad-master.md +114 -0
  97. package/claude/commands/BMad/agents/bmad-orchestrator.md +151 -0
  98. package/claude/commands/BMad/agents/dev.md +85 -0
  99. package/claude/commands/BMad/agents/frontend.md +151 -0
  100. package/claude/commands/BMad/agents/pm.md +88 -0
  101. package/claude/commands/BMad/agents/po.md +83 -0
  102. package/claude/commands/BMad/agents/qa.md +95 -0
  103. package/claude/commands/BMad/agents/sm.md +69 -0
  104. package/claude/commands/BMad/agents/ux-expert.md +73 -0
  105. package/claude/commands/BMad/tasks/advanced-elicitation.md +123 -0
  106. package/claude/commands/BMad/tasks/apply-qa-fixes.md +154 -0
  107. package/claude/commands/BMad/tasks/brownfield-create-epic.md +166 -0
  108. package/claude/commands/BMad/tasks/brownfield-create-story.md +153 -0
  109. package/claude/commands/BMad/tasks/correct-course.md +76 -0
  110. package/claude/commands/BMad/tasks/create-brownfield-story.md +318 -0
  111. package/claude/commands/BMad/tasks/create-deep-research-prompt.md +284 -0
  112. package/claude/commands/BMad/tasks/create-doc.md +107 -0
  113. package/claude/commands/BMad/tasks/create-next-story.md +118 -0
  114. package/claude/commands/BMad/tasks/document-project.md +349 -0
  115. package/claude/commands/BMad/tasks/execute-checklist.md +92 -0
  116. package/claude/commands/BMad/tasks/facilitate-brainstorming-session.md +142 -0
  117. package/claude/commands/BMad/tasks/generate-ai-frontend-prompt.md +57 -0
  118. package/claude/commands/BMad/tasks/index-docs.md +179 -0
  119. package/claude/commands/BMad/tasks/kb-mode-interaction.md +81 -0
  120. package/claude/commands/BMad/tasks/nfr-assess.md +349 -0
  121. package/claude/commands/BMad/tasks/qa-gate.md +167 -0
  122. package/claude/commands/BMad/tasks/review-story.md +320 -0
  123. package/claude/commands/BMad/tasks/risk-profile.md +359 -0
  124. package/claude/commands/BMad/tasks/shard-doc.md +191 -0
  125. package/claude/commands/BMad/tasks/test-design.md +180 -0
  126. package/claude/commands/BMad/tasks/trace-requirements.md +270 -0
  127. package/claude/commands/BMad/tasks/validate-next-story.md +140 -0
  128. package/claude/hooks/file-restriction-hook.py +51 -0
  129. package/claude/hooks/track-agent.py +67 -0
  130. package/claude/settings.local.json +56 -0
  131. package/github/b-mad-expert.md +742 -742
  132. package/github/chatmodes/analyst.chatmode.md +89 -89
  133. package/github/chatmodes/architect.chatmode.md +97 -97
  134. package/github/chatmodes/backend.chatmode.md +194 -194
  135. package/github/chatmodes/bmad-master.chatmode.md +115 -115
  136. package/github/chatmodes/bmad-orchestrator.chatmode.md +152 -152
  137. package/github/chatmodes/dev.chatmode.md +86 -86
  138. package/github/chatmodes/frontend.chatmode.md +157 -157
  139. package/github/chatmodes/pm.chatmode.md +89 -89
  140. package/github/chatmodes/po.chatmode.md +84 -84
  141. package/github/chatmodes/qa.chatmode.md +96 -96
  142. package/github/chatmodes/sm.chatmode.md +70 -70
  143. package/github/chatmodes/ux-expert.chatmode.md +74 -74
  144. package/index.js +9 -9
  145. package/package.json +37 -36
  146. package/vscode/mcp.json +11 -11
  147. package/vscode/settings.json +12 -12
@@ -1,355 +1,355 @@
1
- <!-- Powered by BMAD™ Core -->
2
-
3
- # risk-profile
4
-
5
- Generate a comprehensive risk assessment matrix for a story implementation using probability × impact analysis.
6
-
7
- ## Inputs
8
-
9
- ```yaml
10
- required:
11
- - story_id: '{epic}.{story}' # e.g., "1.3"
12
- - story_path: 'docs/stories/{epic}.{story}.*.md'
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
- ## Purpose
18
-
19
- Identify, assess, and prioritize risks in the story implementation. Provide risk mitigation strategies and testing focus areas based on risk levels.
20
-
21
- ## Risk Assessment Framework
22
-
23
- ### Risk Categories
24
-
25
- **Category Prefixes:**
26
-
27
- - `TECH`: Technical Risks
28
- - `SEC`: Security Risks
29
- - `PERF`: Performance Risks
30
- - `DATA`: Data Risks
31
- - `BUS`: Business Risks
32
- - `OPS`: Operational Risks
33
-
34
- 1. **Technical Risks (TECH)**
35
- - Architecture complexity
36
- - Integration challenges
37
- - Technical debt
38
- - Scalability concerns
39
- - System dependencies
40
-
41
- 2. **Security Risks (SEC)**
42
- - Authentication/authorization flaws
43
- - Data exposure vulnerabilities
44
- - Injection attacks
45
- - Session management issues
46
- - Cryptographic weaknesses
47
-
48
- 3. **Performance Risks (PERF)**
49
- - Response time degradation
50
- - Throughput bottlenecks
51
- - Resource exhaustion
52
- - Database query optimization
53
- - Caching failures
54
-
55
- 4. **Data Risks (DATA)**
56
- - Data loss potential
57
- - Data corruption
58
- - Privacy violations
59
- - Compliance issues
60
- - Backup/recovery gaps
61
-
62
- 5. **Business Risks (BUS)**
63
- - Feature doesn't meet user needs
64
- - Revenue impact
65
- - Reputation damage
66
- - Regulatory non-compliance
67
- - Market timing
68
-
69
- 6. **Operational Risks (OPS)**
70
- - Deployment failures
71
- - Monitoring gaps
72
- - Incident response readiness
73
- - Documentation inadequacy
74
- - Knowledge transfer issues
75
-
76
- ## Risk Analysis Process
77
-
78
- ### 1. Risk Identification
79
-
80
- For each category, identify specific risks:
81
-
82
- ```yaml
83
- risk:
84
- id: 'SEC-001' # Use prefixes: SEC, PERF, DATA, BUS, OPS, TECH
85
- category: security
86
- title: 'Insufficient input validation on user forms'
87
- description: 'Form inputs not properly sanitized could lead to XSS attacks'
88
- affected_components:
89
- - 'UserRegistrationForm'
90
- - 'ProfileUpdateForm'
91
- detection_method: 'Code review revealed missing validation'
92
- ```
93
-
94
- ### 2. Risk Assessment
95
-
96
- Evaluate each risk using probability × impact:
97
-
98
- **Probability Levels:**
99
-
100
- - `High (3)`: Likely to occur (>70% chance)
101
- - `Medium (2)`: Possible occurrence (30-70% chance)
102
- - `Low (1)`: Unlikely to occur (<30% chance)
103
-
104
- **Impact Levels:**
105
-
106
- - `High (3)`: Severe consequences (data breach, system down, major financial loss)
107
- - `Medium (2)`: Moderate consequences (degraded performance, minor data issues)
108
- - `Low (1)`: Minor consequences (cosmetic issues, slight inconvenience)
109
-
110
- ### Risk Score = Probability × Impact
111
-
112
- - 9: Critical Risk (Red)
113
- - 6: High Risk (Orange)
114
- - 4: Medium Risk (Yellow)
115
- - 2-3: Low Risk (Green)
116
- - 1: Minimal Risk (Blue)
117
-
118
- ### 3. Risk Prioritization
119
-
120
- Create risk matrix:
121
-
122
- ```markdown
123
- ## Risk Matrix
124
-
125
- | Risk ID | Description | Probability | Impact | Score | Priority |
126
- | -------- | ----------------------- | ----------- | ---------- | ----- | -------- |
127
- | SEC-001 | XSS vulnerability | High (3) | High (3) | 9 | Critical |
128
- | PERF-001 | Slow query on dashboard | Medium (2) | Medium (2) | 4 | Medium |
129
- | DATA-001 | Backup failure | Low (1) | High (3) | 3 | Low |
130
- ```
131
-
132
- ### 4. Risk Mitigation Strategies
133
-
134
- For each identified risk, provide mitigation:
135
-
136
- ```yaml
137
- mitigation:
138
- risk_id: 'SEC-001'
139
- strategy: 'preventive' # preventive|detective|corrective
140
- actions:
141
- - 'Implement input validation library (e.g., validator.js)'
142
- - 'Add CSP headers to prevent XSS execution'
143
- - 'Sanitize all user inputs before storage'
144
- - 'Escape all outputs in templates'
145
- testing_requirements:
146
- - 'Security testing with OWASP ZAP'
147
- - 'Manual penetration testing of forms'
148
- - 'Unit tests for validation functions'
149
- residual_risk: 'Low - Some zero-day vulnerabilities may remain'
150
- owner: 'dev'
151
- timeline: 'Before deployment'
152
- ```
153
-
154
- ## Outputs
155
-
156
- ### Output 1: Gate YAML Block
157
-
158
- Generate for pasting into gate file under `risk_summary`:
159
-
160
- **Output rules:**
161
-
162
- - Only include assessed risks; do not emit placeholders
163
- - Sort risks by score (desc) when emitting highest and any tabular lists
164
- - If no risks: totals all zeros, omit highest, keep recommendations arrays empty
165
-
166
- ```yaml
167
- # risk_summary (paste into gate file):
168
- risk_summary:
169
- totals:
170
- critical: X # score 9
171
- high: Y # score 6
172
- medium: Z # score 4
173
- low: W # score 2-3
174
- highest:
175
- id: SEC-001
176
- score: 9
177
- title: 'XSS on profile form'
178
- recommendations:
179
- must_fix:
180
- - 'Add input sanitization & CSP'
181
- monitor:
182
- - 'Add security alerts for auth endpoints'
183
- ```
184
-
185
- ### Output 2: Markdown Report
186
-
187
- **Save to:** `qa.qaLocation/assessments/{epic}.{story}-risk-{YYYYMMDD}.md`
188
-
189
- ```markdown
190
- # Risk Profile: Story {epic}.{story}
191
-
192
- Date: {date}
193
- Reviewer: Quinn (Test Architect)
194
-
195
- ## Executive Summary
196
-
197
- - Total Risks Identified: X
198
- - Critical Risks: Y
199
- - High Risks: Z
200
- - Risk Score: XX/100 (calculated)
201
-
202
- ## Critical Risks Requiring Immediate Attention
203
-
204
- ### 1. [ID]: Risk Title
205
-
206
- **Score: 9 (Critical)**
207
- **Probability**: High - Detailed reasoning
208
- **Impact**: High - Potential consequences
209
- **Mitigation**:
210
-
211
- - Immediate action required
212
- - Specific steps to take
213
- **Testing Focus**: Specific test scenarios needed
214
-
215
- ## Risk Distribution
216
-
217
- ### By Category
218
-
219
- - Security: X risks (Y critical)
220
- - Performance: X risks (Y critical)
221
- - Data: X risks (Y critical)
222
- - Business: X risks (Y critical)
223
- - Operational: X risks (Y critical)
224
-
225
- ### By Component
226
-
227
- - Frontend: X risks
228
- - Backend: X risks
229
- - Database: X risks
230
- - Infrastructure: X risks
231
-
232
- ## Detailed Risk Register
233
-
234
- [Full table of all risks with scores and mitigations]
235
-
236
- ## Risk-Based Testing Strategy
237
-
238
- ### Priority 1: Critical Risk Tests
239
-
240
- - Test scenarios for critical risks
241
- - Required test types (security, load, chaos)
242
- - Test data requirements
243
-
244
- ### Priority 2: High Risk Tests
245
-
246
- - Integration test scenarios
247
- - Edge case coverage
248
-
249
- ### Priority 3: Medium/Low Risk Tests
250
-
251
- - Standard functional tests
252
- - Regression test suite
253
-
254
- ## Risk Acceptance Criteria
255
-
256
- ### Must Fix Before Production
257
-
258
- - All critical risks (score 9)
259
- - High risks affecting security/data
260
-
261
- ### Can Deploy with Mitigation
262
-
263
- - Medium risks with compensating controls
264
- - Low risks with monitoring in place
265
-
266
- ### Accepted Risks
267
-
268
- - Document any risks team accepts
269
- - Include sign-off from appropriate authority
270
-
271
- ## Monitoring Requirements
272
-
273
- Post-deployment monitoring for:
274
-
275
- - Performance metrics for PERF risks
276
- - Security alerts for SEC risks
277
- - Error rates for operational risks
278
- - Business KPIs for business risks
279
-
280
- ## Risk Review Triggers
281
-
282
- Review and update risk profile when:
283
-
284
- - Architecture changes significantly
285
- - New integrations added
286
- - Security vulnerabilities discovered
287
- - Performance issues reported
288
- - Regulatory requirements change
289
- ```
290
-
291
- ## Risk Scoring Algorithm
292
-
293
- Calculate overall story risk score:
294
-
295
- ```text
296
- Base Score = 100
297
- For each risk:
298
- - Critical (9): Deduct 20 points
299
- - High (6): Deduct 10 points
300
- - Medium (4): Deduct 5 points
301
- - Low (2-3): Deduct 2 points
302
-
303
- Minimum score = 0 (extremely risky)
304
- Maximum score = 100 (minimal risk)
305
- ```
306
-
307
- ## Risk-Based Recommendations
308
-
309
- Based on risk profile, recommend:
310
-
311
- 1. **Testing Priority**
312
- - Which tests to run first
313
- - Additional test types needed
314
- - Test environment requirements
315
-
316
- 2. **Development Focus**
317
- - Code review emphasis areas
318
- - Additional validation needed
319
- - Security controls to implement
320
-
321
- 3. **Deployment Strategy**
322
- - Phased rollout for high-risk changes
323
- - Feature flags for risky features
324
- - Rollback procedures
325
-
326
- 4. **Monitoring Setup**
327
- - Metrics to track
328
- - Alerts to configure
329
- - Dashboard requirements
330
-
331
- ## Integration with Quality Gates
332
-
333
- **Deterministic gate mapping:**
334
-
335
- - Any risk with score ≥ 9 → Gate = FAIL (unless waived)
336
- - Else if any score ≥ 6 → Gate = CONCERNS
337
- - Else → Gate = PASS
338
- - Unmitigated risks → Document in gate
339
-
340
- ### Output 3: Story Hook Line
341
-
342
- **Print this line for review task to quote:**
343
-
344
- ```text
345
- Risk profile: qa.qaLocation/assessments/{epic}.{story}-risk-{YYYYMMDD}.md
346
- ```
347
-
348
- ## Key Principles
349
-
350
- - Identify risks early and systematically
351
- - Use consistent probability × impact scoring
352
- - Provide actionable mitigation strategies
353
- - Link risks to specific test requirements
354
- - Track residual risk after mitigation
355
- - Update risk profile as story evolves
1
+ <!-- Powered by BMAD™ Core -->
2
+
3
+ # risk-profile
4
+
5
+ Generate a comprehensive risk assessment matrix for a story implementation using probability × impact analysis.
6
+
7
+ ## Inputs
8
+
9
+ ```yaml
10
+ required:
11
+ - story_id: '{epic}.{story}' # e.g., "1.3"
12
+ - story_path: 'docs/stories/{epic}.{story}.*.md'
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
+ ## Purpose
18
+
19
+ Identify, assess, and prioritize risks in the story implementation. Provide risk mitigation strategies and testing focus areas based on risk levels.
20
+
21
+ ## Risk Assessment Framework
22
+
23
+ ### Risk Categories
24
+
25
+ **Category Prefixes:**
26
+
27
+ - `TECH`: Technical Risks
28
+ - `SEC`: Security Risks
29
+ - `PERF`: Performance Risks
30
+ - `DATA`: Data Risks
31
+ - `BUS`: Business Risks
32
+ - `OPS`: Operational Risks
33
+
34
+ 1. **Technical Risks (TECH)**
35
+ - Architecture complexity
36
+ - Integration challenges
37
+ - Technical debt
38
+ - Scalability concerns
39
+ - System dependencies
40
+
41
+ 2. **Security Risks (SEC)**
42
+ - Authentication/authorization flaws
43
+ - Data exposure vulnerabilities
44
+ - Injection attacks
45
+ - Session management issues
46
+ - Cryptographic weaknesses
47
+
48
+ 3. **Performance Risks (PERF)**
49
+ - Response time degradation
50
+ - Throughput bottlenecks
51
+ - Resource exhaustion
52
+ - Database query optimization
53
+ - Caching failures
54
+
55
+ 4. **Data Risks (DATA)**
56
+ - Data loss potential
57
+ - Data corruption
58
+ - Privacy violations
59
+ - Compliance issues
60
+ - Backup/recovery gaps
61
+
62
+ 5. **Business Risks (BUS)**
63
+ - Feature doesn't meet user needs
64
+ - Revenue impact
65
+ - Reputation damage
66
+ - Regulatory non-compliance
67
+ - Market timing
68
+
69
+ 6. **Operational Risks (OPS)**
70
+ - Deployment failures
71
+ - Monitoring gaps
72
+ - Incident response readiness
73
+ - Documentation inadequacy
74
+ - Knowledge transfer issues
75
+
76
+ ## Risk Analysis Process
77
+
78
+ ### 1. Risk Identification
79
+
80
+ For each category, identify specific risks:
81
+
82
+ ```yaml
83
+ risk:
84
+ id: 'SEC-001' # Use prefixes: SEC, PERF, DATA, BUS, OPS, TECH
85
+ category: security
86
+ title: 'Insufficient input validation on user forms'
87
+ description: 'Form inputs not properly sanitized could lead to XSS attacks'
88
+ affected_components:
89
+ - 'UserRegistrationForm'
90
+ - 'ProfileUpdateForm'
91
+ detection_method: 'Code review revealed missing validation'
92
+ ```
93
+
94
+ ### 2. Risk Assessment
95
+
96
+ Evaluate each risk using probability × impact:
97
+
98
+ **Probability Levels:**
99
+
100
+ - `High (3)`: Likely to occur (>70% chance)
101
+ - `Medium (2)`: Possible occurrence (30-70% chance)
102
+ - `Low (1)`: Unlikely to occur (<30% chance)
103
+
104
+ **Impact Levels:**
105
+
106
+ - `High (3)`: Severe consequences (data breach, system down, major financial loss)
107
+ - `Medium (2)`: Moderate consequences (degraded performance, minor data issues)
108
+ - `Low (1)`: Minor consequences (cosmetic issues, slight inconvenience)
109
+
110
+ ### Risk Score = Probability × Impact
111
+
112
+ - 9: Critical Risk (Red)
113
+ - 6: High Risk (Orange)
114
+ - 4: Medium Risk (Yellow)
115
+ - 2-3: Low Risk (Green)
116
+ - 1: Minimal Risk (Blue)
117
+
118
+ ### 3. Risk Prioritization
119
+
120
+ Create risk matrix:
121
+
122
+ ```markdown
123
+ ## Risk Matrix
124
+
125
+ | Risk ID | Description | Probability | Impact | Score | Priority |
126
+ | -------- | ----------------------- | ----------- | ---------- | ----- | -------- |
127
+ | SEC-001 | XSS vulnerability | High (3) | High (3) | 9 | Critical |
128
+ | PERF-001 | Slow query on dashboard | Medium (2) | Medium (2) | 4 | Medium |
129
+ | DATA-001 | Backup failure | Low (1) | High (3) | 3 | Low |
130
+ ```
131
+
132
+ ### 4. Risk Mitigation Strategies
133
+
134
+ For each identified risk, provide mitigation:
135
+
136
+ ```yaml
137
+ mitigation:
138
+ risk_id: 'SEC-001'
139
+ strategy: 'preventive' # preventive|detective|corrective
140
+ actions:
141
+ - 'Implement input validation library (e.g., validator.js)'
142
+ - 'Add CSP headers to prevent XSS execution'
143
+ - 'Sanitize all user inputs before storage'
144
+ - 'Escape all outputs in templates'
145
+ testing_requirements:
146
+ - 'Security testing with OWASP ZAP'
147
+ - 'Manual penetration testing of forms'
148
+ - 'Unit tests for validation functions'
149
+ residual_risk: 'Low - Some zero-day vulnerabilities may remain'
150
+ owner: 'dev'
151
+ timeline: 'Before deployment'
152
+ ```
153
+
154
+ ## Outputs
155
+
156
+ ### Output 1: Gate YAML Block
157
+
158
+ Generate for pasting into gate file under `risk_summary`:
159
+
160
+ **Output rules:**
161
+
162
+ - Only include assessed risks; do not emit placeholders
163
+ - Sort risks by score (desc) when emitting highest and any tabular lists
164
+ - If no risks: totals all zeros, omit highest, keep recommendations arrays empty
165
+
166
+ ```yaml
167
+ # risk_summary (paste into gate file):
168
+ risk_summary:
169
+ totals:
170
+ critical: X # score 9
171
+ high: Y # score 6
172
+ medium: Z # score 4
173
+ low: W # score 2-3
174
+ highest:
175
+ id: SEC-001
176
+ score: 9
177
+ title: 'XSS on profile form'
178
+ recommendations:
179
+ must_fix:
180
+ - 'Add input sanitization & CSP'
181
+ monitor:
182
+ - 'Add security alerts for auth endpoints'
183
+ ```
184
+
185
+ ### Output 2: Markdown Report
186
+
187
+ **Save to:** `qa.qaLocation/assessments/{epic}.{story}-risk-{YYYYMMDD}.md`
188
+
189
+ ```markdown
190
+ # Risk Profile: Story {epic}.{story}
191
+
192
+ Date: {date}
193
+ Reviewer: Quinn (Test Architect)
194
+
195
+ ## Executive Summary
196
+
197
+ - Total Risks Identified: X
198
+ - Critical Risks: Y
199
+ - High Risks: Z
200
+ - Risk Score: XX/100 (calculated)
201
+
202
+ ## Critical Risks Requiring Immediate Attention
203
+
204
+ ### 1. [ID]: Risk Title
205
+
206
+ **Score: 9 (Critical)**
207
+ **Probability**: High - Detailed reasoning
208
+ **Impact**: High - Potential consequences
209
+ **Mitigation**:
210
+
211
+ - Immediate action required
212
+ - Specific steps to take
213
+ **Testing Focus**: Specific test scenarios needed
214
+
215
+ ## Risk Distribution
216
+
217
+ ### By Category
218
+
219
+ - Security: X risks (Y critical)
220
+ - Performance: X risks (Y critical)
221
+ - Data: X risks (Y critical)
222
+ - Business: X risks (Y critical)
223
+ - Operational: X risks (Y critical)
224
+
225
+ ### By Component
226
+
227
+ - Frontend: X risks
228
+ - Backend: X risks
229
+ - Database: X risks
230
+ - Infrastructure: X risks
231
+
232
+ ## Detailed Risk Register
233
+
234
+ [Full table of all risks with scores and mitigations]
235
+
236
+ ## Risk-Based Testing Strategy
237
+
238
+ ### Priority 1: Critical Risk Tests
239
+
240
+ - Test scenarios for critical risks
241
+ - Required test types (security, load, chaos)
242
+ - Test data requirements
243
+
244
+ ### Priority 2: High Risk Tests
245
+
246
+ - Integration test scenarios
247
+ - Edge case coverage
248
+
249
+ ### Priority 3: Medium/Low Risk Tests
250
+
251
+ - Standard functional tests
252
+ - Regression test suite
253
+
254
+ ## Risk Acceptance Criteria
255
+
256
+ ### Must Fix Before Production
257
+
258
+ - All critical risks (score 9)
259
+ - High risks affecting security/data
260
+
261
+ ### Can Deploy with Mitigation
262
+
263
+ - Medium risks with compensating controls
264
+ - Low risks with monitoring in place
265
+
266
+ ### Accepted Risks
267
+
268
+ - Document any risks team accepts
269
+ - Include sign-off from appropriate authority
270
+
271
+ ## Monitoring Requirements
272
+
273
+ Post-deployment monitoring for:
274
+
275
+ - Performance metrics for PERF risks
276
+ - Security alerts for SEC risks
277
+ - Error rates for operational risks
278
+ - Business KPIs for business risks
279
+
280
+ ## Risk Review Triggers
281
+
282
+ Review and update risk profile when:
283
+
284
+ - Architecture changes significantly
285
+ - New integrations added
286
+ - Security vulnerabilities discovered
287
+ - Performance issues reported
288
+ - Regulatory requirements change
289
+ ```
290
+
291
+ ## Risk Scoring Algorithm
292
+
293
+ Calculate overall story risk score:
294
+
295
+ ```text
296
+ Base Score = 100
297
+ For each risk:
298
+ - Critical (9): Deduct 20 points
299
+ - High (6): Deduct 10 points
300
+ - Medium (4): Deduct 5 points
301
+ - Low (2-3): Deduct 2 points
302
+
303
+ Minimum score = 0 (extremely risky)
304
+ Maximum score = 100 (minimal risk)
305
+ ```
306
+
307
+ ## Risk-Based Recommendations
308
+
309
+ Based on risk profile, recommend:
310
+
311
+ 1. **Testing Priority**
312
+ - Which tests to run first
313
+ - Additional test types needed
314
+ - Test environment requirements
315
+
316
+ 2. **Development Focus**
317
+ - Code review emphasis areas
318
+ - Additional validation needed
319
+ - Security controls to implement
320
+
321
+ 3. **Deployment Strategy**
322
+ - Phased rollout for high-risk changes
323
+ - Feature flags for risky features
324
+ - Rollback procedures
325
+
326
+ 4. **Monitoring Setup**
327
+ - Metrics to track
328
+ - Alerts to configure
329
+ - Dashboard requirements
330
+
331
+ ## Integration with Quality Gates
332
+
333
+ **Deterministic gate mapping:**
334
+
335
+ - Any risk with score ≥ 9 → Gate = FAIL (unless waived)
336
+ - Else if any score ≥ 6 → Gate = CONCERNS
337
+ - Else → Gate = PASS
338
+ - Unmitigated risks → Document in gate
339
+
340
+ ### Output 3: Story Hook Line
341
+
342
+ **Print this line for review task to quote:**
343
+
344
+ ```text
345
+ Risk profile: qa.qaLocation/assessments/{epic}.{story}-risk-{YYYYMMDD}.md
346
+ ```
347
+
348
+ ## Key Principles
349
+
350
+ - Identify risks early and systematically
351
+ - Use consistent probability × impact scoring
352
+ - Provide actionable mitigation strategies
353
+ - Link risks to specific test requirements
354
+ - Track residual risk after mitigation
355
+ - Update risk profile as story evolves