@rdmind/rdmind 0.0.9-alpha.1 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.knowledge/.ext/.bmad-core/agent-teams/team-all.yaml +15 -0
- package/.knowledge/.ext/.bmad-core/agent-teams/team-fullstack.yaml +19 -0
- package/.knowledge/.ext/.bmad-core/agent-teams/team-ide-minimal.yaml +11 -0
- package/.knowledge/.ext/.bmad-core/agent-teams/team-no-ui.yaml +14 -0
- package/.knowledge/.ext/.bmad-core/agents/analyst.md +84 -0
- package/.knowledge/.ext/.bmad-core/agents/architect.md +85 -0
- package/.knowledge/.ext/.bmad-core/agents/bmad-master.md +110 -0
- package/.knowledge/.ext/.bmad-core/agents/bmad-orchestrator.md +147 -0
- package/.knowledge/.ext/.bmad-core/agents/dev.md +81 -0
- package/.knowledge/.ext/.bmad-core/agents/pm.md +84 -0
- package/.knowledge/.ext/.bmad-core/agents/po.md +79 -0
- package/.knowledge/.ext/.bmad-core/agents/qa.md +90 -0
- package/.knowledge/.ext/.bmad-core/agents/ra.md +74 -0
- package/.knowledge/.ext/.bmad-core/agents/sm.md +65 -0
- package/.knowledge/.ext/.bmad-core/agents/ux-expert.md +69 -0
- package/.knowledge/.ext/.bmad-core/checklists/architect-checklist.md +440 -0
- package/.knowledge/.ext/.bmad-core/checklists/change-checklist.md +184 -0
- package/.knowledge/.ext/.bmad-core/checklists/pm-checklist.md +372 -0
- package/.knowledge/.ext/.bmad-core/checklists/po-master-checklist.md +434 -0
- package/.knowledge/.ext/.bmad-core/checklists/story-dod-checklist.md +96 -0
- package/.knowledge/.ext/.bmad-core/checklists/story-draft-checklist.md +155 -0
- package/.knowledge/.ext/.bmad-core/checklists/trd-checklist.md +226 -0
- package/.knowledge/.ext/.bmad-core/core-config.yaml +22 -0
- package/.knowledge/.ext/.bmad-core/data/bmad-kb.md +809 -0
- package/.knowledge/.ext/.bmad-core/data/brainstorming-techniques.md +38 -0
- package/.knowledge/.ext/.bmad-core/data/elicitation-methods.md +156 -0
- package/.knowledge/.ext/.bmad-core/data/technical-preferences.md +5 -0
- package/.knowledge/.ext/.bmad-core/data/test-levels-framework.md +148 -0
- package/.knowledge/.ext/.bmad-core/data/test-priorities-matrix.md +174 -0
- package/.knowledge/.ext/.bmad-core/enhanced-ide-development-workflow.md +248 -0
- package/.knowledge/.ext/.bmad-core/install-manifest.yaml +512 -0
- package/.knowledge/.ext/.bmad-core/tasks/advanced-elicitation.md +119 -0
- package/.knowledge/.ext/.bmad-core/tasks/analyze-prd.md +123 -0
- package/.knowledge/.ext/.bmad-core/tasks/apply-qa-fixes.md +150 -0
- package/.knowledge/.ext/.bmad-core/tasks/brownfield-create-epic.md +162 -0
- package/.knowledge/.ext/.bmad-core/tasks/brownfield-create-story.md +149 -0
- package/.knowledge/.ext/.bmad-core/tasks/correct-course.md +72 -0
- package/.knowledge/.ext/.bmad-core/tasks/create-brownfield-story.md +314 -0
- package/.knowledge/.ext/.bmad-core/tasks/create-deep-research-prompt.md +280 -0
- package/.knowledge/.ext/.bmad-core/tasks/create-doc.md +103 -0
- package/.knowledge/.ext/.bmad-core/tasks/create-next-story.md +114 -0
- package/.knowledge/.ext/.bmad-core/tasks/document-project.md +345 -0
- package/.knowledge/.ext/.bmad-core/tasks/execute-checklist.md +88 -0
- package/.knowledge/.ext/.bmad-core/tasks/facilitate-brainstorming-session.md +138 -0
- package/.knowledge/.ext/.bmad-core/tasks/generate-ai-frontend-prompt.md +53 -0
- package/.knowledge/.ext/.bmad-core/tasks/index-docs.md +175 -0
- package/.knowledge/.ext/.bmad-core/tasks/kb-mode-interaction.md +77 -0
- package/.knowledge/.ext/.bmad-core/tasks/nfr-assess.md +345 -0
- package/.knowledge/.ext/.bmad-core/tasks/qa-gate.md +163 -0
- package/.knowledge/.ext/.bmad-core/tasks/review-story.md +316 -0
- package/.knowledge/.ext/.bmad-core/tasks/risk-profile.md +355 -0
- package/.knowledge/.ext/.bmad-core/tasks/shard-doc.md +187 -0
- package/.knowledge/.ext/.bmad-core/tasks/test-design.md +176 -0
- package/.knowledge/.ext/.bmad-core/tasks/trace-requirements.md +266 -0
- package/.knowledge/.ext/.bmad-core/tasks/validate-next-story.md +136 -0
- package/.knowledge/.ext/.bmad-core/tasks/validate-trd.md +158 -0
- package/.knowledge/.ext/.bmad-core/templates/architecture-tmpl.yaml +651 -0
- package/.knowledge/.ext/.bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
- package/.knowledge/.ext/.bmad-core/templates/brownfield-architecture-tmpl.yaml +478 -0
- package/.knowledge/.ext/.bmad-core/templates/brownfield-prd-tmpl.yaml +281 -0
- package/.knowledge/.ext/.bmad-core/templates/competitor-analysis-tmpl.yaml +349 -0
- package/.knowledge/.ext/.bmad-core/templates/front-end-architecture-tmpl.yaml +273 -0
- package/.knowledge/.ext/.bmad-core/templates/front-end-spec-tmpl.yaml +360 -0
- package/.knowledge/.ext/.bmad-core/templates/fullstack-architecture-tmpl.yaml +947 -0
- package/.knowledge/.ext/.bmad-core/templates/market-research-tmpl.yaml +253 -0
- package/.knowledge/.ext/.bmad-core/templates/prd-tmpl.yaml +203 -0
- package/.knowledge/.ext/.bmad-core/templates/project-brief-tmpl.yaml +222 -0
- package/.knowledge/.ext/.bmad-core/templates/qa-gate-tmpl.yaml +103 -0
- package/.knowledge/.ext/.bmad-core/templates/story-tmpl.yaml +138 -0
- package/.knowledge/.ext/.bmad-core/templates/trd-tmpl.yaml +198 -0
- package/.knowledge/.ext/.bmad-core/user-guide.md +530 -0
- package/.knowledge/.ext/.bmad-core/utils/bmad-doc-template.md +327 -0
- package/.knowledge/.ext/.bmad-core/utils/workflow-management.md +71 -0
- package/.knowledge/.ext/.bmad-core/workflows/brownfield-fullstack.yaml +298 -0
- package/.knowledge/.ext/.bmad-core/workflows/brownfield-service.yaml +188 -0
- package/.knowledge/.ext/.bmad-core/workflows/brownfield-ui.yaml +198 -0
- package/.knowledge/.ext/.bmad-core/workflows/greenfield-fullstack.yaml +241 -0
- package/.knowledge/.ext/.bmad-core/workflows/greenfield-service.yaml +207 -0
- package/.knowledge/.ext/.bmad-core/workflows/greenfield-ui.yaml +236 -0
- package/.knowledge/.ext/.bmad-core/working-in-the-brownfield.md +606 -0
- package/.knowledge/.ext/coding/ddd-architecture.md +223 -0
- package/.knowledge/.ext/coding/java-standards.md +308 -0
- package/.knowledge/.ext/coding/mybatis-standards.md +407 -0
- package/.knowledge/.ext/coding/sql-standards.md +263 -0
- package/.knowledge/.ext/coding/thrift-service.md +292 -0
- package/.knowledge/BMAD.md +255 -0
- package/.knowledge/coding.md +135 -0
- package/dist/package.json +4 -3
- package/dist/src/config/extension.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/services/McpPromptLoader.js +1 -1
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/services/prompt-processors/atFileProcessor.js +1 -1
- package/dist/src/services/prompt-processors/atFileProcessor.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/Tips.js +1 -1
- package/dist/src/ui/components/Tips.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
- package/dist/src/ui/components/subagents/create/CreationSummary.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.js +2 -2
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
- package/dist/src/utils/installationInfo.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
|
@@ -0,0 +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
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
<!-- Powered by BMAD™ Core -->
|
|
2
|
+
|
|
3
|
+
# 文档分片任务
|
|
4
|
+
|
|
5
|
+
## 目标
|
|
6
|
+
|
|
7
|
+
- 按二级标题把大文档拆成多个小文档
|
|
8
|
+
- 建个文件夹结构来整理分片后的文档
|
|
9
|
+
- 保持所有内容完整,包括代码块、图表和markdown格式
|
|
10
|
+
|
|
11
|
+
## 主要方法:用markdown-tree自动分片
|
|
12
|
+
|
|
13
|
+
[[LLM: 先检查.bmad-core/core-config.yaml里markdownExploder是不是设为true。如果是,试试运行命令:`md-tree explode {input file} {output path}`。
|
|
14
|
+
|
|
15
|
+
如果命令成功了,告诉用户文档已经分片完成并停止 - 别继续了。
|
|
16
|
+
|
|
17
|
+
如果命令失败了(特别是提示命令找不到或不可用的错误),告诉用户:"markdownExploder已经启用了但md-tree命令用不了。请选一个:
|
|
18
|
+
|
|
19
|
+
1. 全局装一下@kayvan/markdown-tree-parser:`npm install -g @kayvan/markdown-tree-parser`
|
|
20
|
+
2. 或者在.bmad-core/core-config.yaml里把markdownExploder设为false
|
|
21
|
+
|
|
22
|
+
**重要:先停一下 - 做完上面任一个操作再手动分片。**"
|
|
23
|
+
|
|
24
|
+
如果markdownExploder设为false,告诉用户:"markdownExploder现在是false。为了更好的性能和稳定性,建议:
|
|
25
|
+
|
|
26
|
+
1. 在.bmad-core/core-config.yaml里把markdownExploder设为true
|
|
27
|
+
2. 全局装一下@kayvan/markdown-tree-parser:`npm install -g @kayvan/markdown-tree-parser`
|
|
28
|
+
|
|
29
|
+
我现在开始手动分片流程。"
|
|
30
|
+
|
|
31
|
+
然后只有markdownExploder是false的时候才继续下面的手动方法。]]
|
|
32
|
+
|
|
33
|
+
### 安装和使用
|
|
34
|
+
|
|
35
|
+
1. **全局装一下**:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install -g @kayvan/markdown-tree-parser
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
2. **用explode命令**:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# PRD文档
|
|
45
|
+
md-tree explode docs/prd.md docs/prd
|
|
46
|
+
|
|
47
|
+
# 架构文档
|
|
48
|
+
md-tree explode docs/architecture.md docs/architecture
|
|
49
|
+
|
|
50
|
+
# 任意文档
|
|
51
|
+
md-tree explode [源文档] [目标文件夹]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
3. **功能说明**:
|
|
55
|
+
- 自动按二级标题拆文档
|
|
56
|
+
- 创建正确命名的文件
|
|
57
|
+
- 适当调整标题级别
|
|
58
|
+
- 处理代码块和特殊markdown的所有边界情况
|
|
59
|
+
|
|
60
|
+
如果用户已经装了@kayvan/markdown-tree-parser,直接用并跳过下面的手动流程。
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 手动方法(如果@kayvan/markdown-tree-parser用不了或用户要手动)
|
|
65
|
+
|
|
66
|
+
### 任务说明
|
|
67
|
+
|
|
68
|
+
1. 识别文档和目标位置
|
|
69
|
+
|
|
70
|
+
- 确定要分片的文档(用户提供的路径)
|
|
71
|
+
- 在`docs/`下建个和文档同名的文件夹(不要扩展名)
|
|
72
|
+
- 示例:`docs/prd.md` → 建文件夹`docs/prd/`
|
|
73
|
+
|
|
74
|
+
2. 解析和提取章节
|
|
75
|
+
|
|
76
|
+
关键分片规则:
|
|
77
|
+
|
|
78
|
+
1. 读整个文档内容
|
|
79
|
+
2. 识别所有二级标题(## 标题)
|
|
80
|
+
3. 对每个二级标题:
|
|
81
|
+
- 提取标题和到下一个二级标题的所有内容
|
|
82
|
+
- 包括所有子章节、代码块、图表、列表、表格等
|
|
83
|
+
- 特别注意:
|
|
84
|
+
- 代码块(```)- 确保捕获完整块包括结束反引号,注意代码块中可能误导的##符号
|
|
85
|
+
- Mermaid图表 - 保持完整的图表语法
|
|
86
|
+
- 嵌套markdown元素
|
|
87
|
+
- 可能包含##的多行内容
|
|
88
|
+
|
|
89
|
+
关键:用理解markdown上下文的正确解析。代码块中的##不是章节标题。]]
|
|
90
|
+
|
|
91
|
+
### 3. 创建单独文件
|
|
92
|
+
|
|
93
|
+
对每个提取的章节:
|
|
94
|
+
|
|
95
|
+
1. **生成文件名**:把章节标题转成小写连字符格式
|
|
96
|
+
- 去掉特殊字符
|
|
97
|
+
- 空格换成连字符
|
|
98
|
+
- 示例:"## Tech Stack" → `tech-stack.md`
|
|
99
|
+
|
|
100
|
+
2. **调整标题级别**:
|
|
101
|
+
- 二级标题在新文档里变成一级标题(# 而不是 ##)
|
|
102
|
+
- 所有子标题级别减1:
|
|
103
|
+
|
|
104
|
+
```txt
|
|
105
|
+
- ### → ##
|
|
106
|
+
- #### → ###
|
|
107
|
+
- ##### → ####
|
|
108
|
+
- 等等
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
3. **写入内容**:把调整后的内容存到新文件
|
|
112
|
+
|
|
113
|
+
### 4. 创建索引文件
|
|
114
|
+
|
|
115
|
+
在分片文件夹里建个`index.md`文件:
|
|
116
|
+
|
|
117
|
+
1. 包含原始一级标题和第一个二级标题之前的任何内容
|
|
118
|
+
2. 列出所有分片文件的链接:
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
# 原始文档标题
|
|
122
|
+
|
|
123
|
+
[原始介绍内容(如有)]
|
|
124
|
+
|
|
125
|
+
## 章节
|
|
126
|
+
|
|
127
|
+
- [章节名称 1](./section-name-1.md)
|
|
128
|
+
- [章节名称 2](./section-name-2.md)
|
|
129
|
+
- [章节名称 3](./section-name-3.md)
|
|
130
|
+
...
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### 5. 保持特殊内容
|
|
134
|
+
|
|
135
|
+
1. **代码块**:必须捕获完整块包括:
|
|
136
|
+
|
|
137
|
+
```language
|
|
138
|
+
content
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
2. **Mermaid图表**:保持完整语法:
|
|
142
|
+
|
|
143
|
+
```mermaid
|
|
144
|
+
graph TD
|
|
145
|
+
...
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
3. **表格**:保持正确的markdown表格格式
|
|
149
|
+
|
|
150
|
+
4. **列表**:保持缩进和嵌套
|
|
151
|
+
|
|
152
|
+
5. **行内代码**:保持反引号
|
|
153
|
+
|
|
154
|
+
6. **链接和引用**:保持所有markdown链接完整
|
|
155
|
+
|
|
156
|
+
7. **模板标记**:如果文档包含{{占位符}},完全保持
|
|
157
|
+
|
|
158
|
+
### 6. 验证
|
|
159
|
+
|
|
160
|
+
分片后:
|
|
161
|
+
|
|
162
|
+
1. 验证所有章节都被提取
|
|
163
|
+
2. 检查没有内容丢失
|
|
164
|
+
3. 确保标题级别正确调整
|
|
165
|
+
4. 确认所有文件都成功创建
|
|
166
|
+
|
|
167
|
+
### 7. 报告结果
|
|
168
|
+
|
|
169
|
+
给个摘要:
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
文档分片成功:
|
|
173
|
+
- 源文件:[原始文档路径]
|
|
174
|
+
- 目标位置:docs/[文件夹名]/
|
|
175
|
+
- 创建文件数:[数量]
|
|
176
|
+
- 章节:
|
|
177
|
+
- section-name-1.md: "章节标题 1"
|
|
178
|
+
- section-name-2.md: "章节标题 2"
|
|
179
|
+
...
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## 重要说明
|
|
183
|
+
|
|
184
|
+
- 永远不要修改实际内容,只调整标题级别
|
|
185
|
+
- 保持所有格式,包括重要的空白字符
|
|
186
|
+
- 处理边界情况,如包含##符号的代码块章节
|
|
187
|
+
- 确保分片可逆(可以从分片重构原始文档)
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
<!-- Powered by BMAD™ Core -->
|
|
2
|
+
|
|
3
|
+
# test-design
|
|
4
|
+
|
|
5
|
+
给用户故事设计完整的测试方案,告诉你该在哪个层面做测试。
|
|
6
|
+
|
|
7
|
+
## 需要什么
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
required:
|
|
11
|
+
- story_id: '{epic}.{story}' # 比如:"1.3"
|
|
12
|
+
- story_path: '{devStoryLocation}/{epic}.{story}.*.md' # 从core-config.yaml来的路径
|
|
13
|
+
- story_title: '{title}' # 没有的话,从故事文件的标题里拿
|
|
14
|
+
- story_slug: '{slug}' # 没有的话,从标题生成(小写,用连字符)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 要干啥
|
|
18
|
+
|
|
19
|
+
设计一套完整的测试策略,搞清楚测什么、在哪一层测(单元/集成/端到端),还有为啥这么测。这样既能保证测试覆盖到位,又不会重复测试,还能把测试边界划清楚。
|
|
20
|
+
|
|
21
|
+
## 要用到的文件
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
data:
|
|
25
|
+
- test-levels-framework.md # 单元/集成/端到端测试怎么选的标准
|
|
26
|
+
- test-priorities-matrix.md # P0/P1/P2/P3优先级怎么分的
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 怎么做
|
|
30
|
+
|
|
31
|
+
### 1. 把需求拆开看
|
|
32
|
+
|
|
33
|
+
把每个验收标准掰开揉碎,看看能测什么。对每个AC:
|
|
34
|
+
|
|
35
|
+
- 找出核心功能要测啥
|
|
36
|
+
- 看看需要哪些数据变化
|
|
37
|
+
- 想想出错的情况
|
|
38
|
+
- 注意边界条件
|
|
39
|
+
|
|
40
|
+
### 2. 选测试级别
|
|
41
|
+
|
|
42
|
+
**参考:** 看看 `test-levels-framework.md` 里的详细标准
|
|
43
|
+
|
|
44
|
+
简单来说:
|
|
45
|
+
|
|
46
|
+
- **单元测试**:纯逻辑、算法、计算这些
|
|
47
|
+
- **集成测试**:组件之间怎么交互、数据库操作
|
|
48
|
+
- **端到端测试**:用户走完整个流程、合规性检查
|
|
49
|
+
|
|
50
|
+
### 3. 排优先级
|
|
51
|
+
|
|
52
|
+
**参考:** 看看 `test-priorities-matrix.md` 怎么分类的
|
|
53
|
+
|
|
54
|
+
优先级简单分法:
|
|
55
|
+
|
|
56
|
+
- **P0**:赚钱的、安全的、合规的
|
|
57
|
+
- **P1**:用户主要用的、高频功能
|
|
58
|
+
- **P2**:次要功能、管理后台
|
|
59
|
+
- **P3**:有就更好、基本用不到
|
|
60
|
+
|
|
61
|
+
### 4. 写测试场景
|
|
62
|
+
|
|
63
|
+
把每个要测的地方都写出来:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
test_scenario:
|
|
67
|
+
id: '{epic}.{story}-{LEVEL}-{SEQ}'
|
|
68
|
+
requirement: 'AC reference'
|
|
69
|
+
priority: P0|P1|P2|P3
|
|
70
|
+
level: unit|integration|e2e
|
|
71
|
+
description: 'What is being tested'
|
|
72
|
+
justification: 'Why this level was chosen'
|
|
73
|
+
mitigates_risks: ['RISK-001'] # If risk profile exists
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 5. 检查覆盖全不全
|
|
77
|
+
|
|
78
|
+
确保:
|
|
79
|
+
|
|
80
|
+
- 每个AC都有测试
|
|
81
|
+
- 不同级别别重复测
|
|
82
|
+
- 重要流程多测几层
|
|
83
|
+
- 风险点都覆盖到
|
|
84
|
+
|
|
85
|
+
## 最后输出啥
|
|
86
|
+
|
|
87
|
+
### 输出1:测试设计文档
|
|
88
|
+
|
|
89
|
+
**存到:** `qa.qaLocation/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md`
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
# 测试设计:故事 {epic}.{story}
|
|
93
|
+
|
|
94
|
+
日期:{date}
|
|
95
|
+
设计者:Quinn(测试架构师)
|
|
96
|
+
|
|
97
|
+
## 测试策略概览
|
|
98
|
+
|
|
99
|
+
- 测试场景总数:X
|
|
100
|
+
- 单元测试:Y(A%)
|
|
101
|
+
- 集成测试:Z(B%)
|
|
102
|
+
- 端到端测试:W(C%)
|
|
103
|
+
- 优先级分布:P0: X, P1: Y, P2: Z
|
|
104
|
+
|
|
105
|
+
## 按验收标准的测试场景
|
|
106
|
+
|
|
107
|
+
### AC1:{description}
|
|
108
|
+
|
|
109
|
+
#### 场景
|
|
110
|
+
|
|
111
|
+
| ID | 级别 | 优先级 | 测试内容 | 选择理由 |
|
|
112
|
+
| ------------ | ------ | ------ | ------------ | ------------ |
|
|
113
|
+
| 1.3-UNIT-001 | 单元 | P0 | 验证输入格式 | 纯验证逻辑 |
|
|
114
|
+
| 1.3-INT-001 | 集成 | P0 | 服务处理请求 | 多组件流程 |
|
|
115
|
+
| 1.3-E2E-001 | 端到端 | P1 | 用户完成流程 | 关键路径验证 |
|
|
116
|
+
|
|
117
|
+
[继续所有AC...]
|
|
118
|
+
|
|
119
|
+
## 风险覆盖
|
|
120
|
+
|
|
121
|
+
[如果有风险档案,把测试场景和风险对应上]
|
|
122
|
+
|
|
123
|
+
## 推荐执行顺序
|
|
124
|
+
|
|
125
|
+
1. P0单元测试(快速失败)
|
|
126
|
+
2. P0集成测试
|
|
127
|
+
3. P0端到端测试
|
|
128
|
+
4. 按顺序执行P1测试
|
|
129
|
+
5. 时间允许时执行P2+测试
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### 输出2:质量门禁YAML块
|
|
133
|
+
|
|
134
|
+
给质量门禁用的:
|
|
135
|
+
|
|
136
|
+
```yaml
|
|
137
|
+
test_design:
|
|
138
|
+
scenarios_total: X
|
|
139
|
+
by_level:
|
|
140
|
+
unit: Y
|
|
141
|
+
integration: Z
|
|
142
|
+
e2e: W
|
|
143
|
+
by_priority:
|
|
144
|
+
p0: A
|
|
145
|
+
p1: B
|
|
146
|
+
p2: C
|
|
147
|
+
coverage_gaps: [] # 哪些AC没测试
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### 输出3:追踪引用
|
|
151
|
+
|
|
152
|
+
给trace-requirements任务用的:
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
测试设计矩阵:qa.qaLocation/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md
|
|
156
|
+
找到的P0测试:{count}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Quality Checklist
|
|
160
|
+
|
|
161
|
+
最后检查一下:
|
|
162
|
+
|
|
163
|
+
- [ ] 每个AC都有测试覆盖
|
|
164
|
+
- [ ] 测试级别选得合适(别过度测试)
|
|
165
|
+
- [ ] 不同级别别重复测
|
|
166
|
+
- [ ] 优先级和业务风险对得上
|
|
167
|
+
- [ ] 测试ID按规范命名
|
|
168
|
+
- [ ] 场景都是独立的,不互相影响
|
|
169
|
+
|
|
170
|
+
## 核心原则
|
|
171
|
+
|
|
172
|
+
- **左移测试**:能单元测试就别集成测试,能集成测试就别端到端测试
|
|
173
|
+
- **基于风险**:重点测容易出问题的地方
|
|
174
|
+
- **高效覆盖**:在合适的级别测一次就够了
|
|
175
|
+
- **可维护性**:考虑长期维护成本
|
|
176
|
+
- **快速反馈**:快的测试先跑
|