codingbuddy-rules 2.4.2 → 3.0.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.
- package/.ai-rules/CHANGELOG.md +122 -0
- package/.ai-rules/agents/README.md +527 -11
- package/.ai-rules/agents/accessibility-specialist.json +0 -1
- package/.ai-rules/agents/act-mode.json +0 -1
- package/.ai-rules/agents/agent-architect.json +0 -1
- package/.ai-rules/agents/ai-ml-engineer.json +0 -1
- package/.ai-rules/agents/architecture-specialist.json +14 -2
- package/.ai-rules/agents/backend-developer.json +14 -2
- package/.ai-rules/agents/code-quality-specialist.json +0 -1
- package/.ai-rules/agents/data-engineer.json +0 -1
- package/.ai-rules/agents/devops-engineer.json +24 -2
- package/.ai-rules/agents/documentation-specialist.json +0 -1
- package/.ai-rules/agents/eval-mode.json +0 -1
- package/.ai-rules/agents/event-architecture-specialist.json +719 -0
- package/.ai-rules/agents/frontend-developer.json +14 -2
- package/.ai-rules/agents/i18n-specialist.json +0 -1
- package/.ai-rules/agents/integration-specialist.json +11 -1
- package/.ai-rules/agents/migration-specialist.json +676 -0
- package/.ai-rules/agents/mobile-developer.json +0 -1
- package/.ai-rules/agents/observability-specialist.json +747 -0
- package/.ai-rules/agents/performance-specialist.json +24 -2
- package/.ai-rules/agents/plan-mode.json +0 -1
- package/.ai-rules/agents/platform-engineer.json +0 -1
- package/.ai-rules/agents/security-specialist.json +27 -16
- package/.ai-rules/agents/seo-specialist.json +0 -1
- package/.ai-rules/agents/solution-architect.json +0 -1
- package/.ai-rules/agents/technical-planner.json +0 -1
- package/.ai-rules/agents/test-strategy-specialist.json +14 -2
- package/.ai-rules/agents/ui-ux-designer.json +0 -1
- package/.ai-rules/rules/core.md +25 -0
- package/.ai-rules/skills/README.md +35 -0
- package/.ai-rules/skills/database-migration/SKILL.md +531 -0
- package/.ai-rules/skills/database-migration/expand-contract-patterns.md +314 -0
- package/.ai-rules/skills/database-migration/large-scale-migration.md +414 -0
- package/.ai-rules/skills/database-migration/rollback-strategies.md +359 -0
- package/.ai-rules/skills/database-migration/validation-procedures.md +428 -0
- package/.ai-rules/skills/dependency-management/SKILL.md +381 -0
- package/.ai-rules/skills/dependency-management/license-compliance.md +282 -0
- package/.ai-rules/skills/dependency-management/lock-file-management.md +437 -0
- package/.ai-rules/skills/dependency-management/major-upgrade-guide.md +292 -0
- package/.ai-rules/skills/dependency-management/security-vulnerability-response.md +230 -0
- package/.ai-rules/skills/incident-response/SKILL.md +373 -0
- package/.ai-rules/skills/incident-response/communication-templates.md +322 -0
- package/.ai-rules/skills/incident-response/escalation-matrix.md +347 -0
- package/.ai-rules/skills/incident-response/postmortem-template.md +351 -0
- package/.ai-rules/skills/incident-response/severity-classification.md +256 -0
- package/.ai-rules/skills/performance-optimization/CREATION-LOG.md +87 -0
- package/.ai-rules/skills/performance-optimization/SKILL.md +76 -0
- package/.ai-rules/skills/performance-optimization/documentation-template.md +70 -0
- package/.ai-rules/skills/pr-review/SKILL.md +768 -0
- package/.ai-rules/skills/refactoring/SKILL.md +192 -0
- package/.ai-rules/skills/refactoring/refactoring-catalog.md +1377 -0
- package/package.json +1 -1
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
# Postmortem Template
|
|
2
|
+
|
|
3
|
+
Blameless Root Cause Analysis (RCA) framework for organizational learning.
|
|
4
|
+
|
|
5
|
+
## The Documentation Rule
|
|
6
|
+
|
|
7
|
+
**The incident is NOT resolved until the postmortem is scheduled.** Postmortems:
|
|
8
|
+
- Capture learning while memory is fresh
|
|
9
|
+
- Prevent repeat incidents
|
|
10
|
+
- Build organizational knowledge
|
|
11
|
+
- Improve detection and response
|
|
12
|
+
|
|
13
|
+
## Postmortem Timeline
|
|
14
|
+
|
|
15
|
+
| Severity | Schedule Within | Complete Within | Review Meeting |
|
|
16
|
+
|----------|----------------|-----------------|----------------|
|
|
17
|
+
| P1 | 24 hours | 5 business days | Required |
|
|
18
|
+
| P2 | 48 hours | 7 business days | Required |
|
|
19
|
+
| P3 | 1 week | 2 weeks | Optional |
|
|
20
|
+
| P4 | 2 weeks | 1 month | Not required |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Blameless Postmortem Principles
|
|
25
|
+
|
|
26
|
+
### The Core Philosophy
|
|
27
|
+
|
|
28
|
+
**Incidents are system failures, not people failures.**
|
|
29
|
+
|
|
30
|
+
- Focus on what happened, not who to blame
|
|
31
|
+
- Assume everyone acted with best intentions
|
|
32
|
+
- Look for systemic causes, not individual mistakes
|
|
33
|
+
- Identify process gaps, not performance gaps
|
|
34
|
+
|
|
35
|
+
### Language Guidelines
|
|
36
|
+
|
|
37
|
+
❌ **Avoid:**
|
|
38
|
+
- "Engineer X caused the outage by..."
|
|
39
|
+
- "If only Y had checked..."
|
|
40
|
+
- "Z failed to follow procedure"
|
|
41
|
+
- "The mistake was..."
|
|
42
|
+
|
|
43
|
+
✅ **Use:**
|
|
44
|
+
- "The deployment process allowed..."
|
|
45
|
+
- "The monitoring gap meant..."
|
|
46
|
+
- "The system permitted..."
|
|
47
|
+
- "The contributing factor was..."
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Postmortem Document Structure
|
|
52
|
+
|
|
53
|
+
### Header Information
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
# Postmortem: [Incident Title]
|
|
57
|
+
|
|
58
|
+
**Incident ID:** [ID]
|
|
59
|
+
**Date:** [YYYY-MM-DD]
|
|
60
|
+
**Duration:** [X hours Y minutes]
|
|
61
|
+
**Severity:** P[X]
|
|
62
|
+
**Author:** [Name]
|
|
63
|
+
**Review Status:** [Draft/Reviewed/Approved]
|
|
64
|
+
|
|
65
|
+
**Attendees:** [List of people involved in postmortem]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### Executive Summary
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
## Executive Summary
|
|
74
|
+
|
|
75
|
+
[2-3 sentences describing what happened, the impact, and the resolution]
|
|
76
|
+
|
|
77
|
+
**Key Metrics:**
|
|
78
|
+
- Time to Detect (TTD): [X minutes]
|
|
79
|
+
- Time to Mitigate (TTM): [X minutes]
|
|
80
|
+
- Time to Resolve (TTR): [X minutes]
|
|
81
|
+
- Users Affected: [Count/percentage]
|
|
82
|
+
- SLO Budget Consumed: [Percentage]
|
|
83
|
+
- Revenue Impact: [If applicable]
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### Timeline
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
## Timeline
|
|
92
|
+
|
|
93
|
+
All times in UTC.
|
|
94
|
+
|
|
95
|
+
| Time | Event | Actor |
|
|
96
|
+
|------|-------|-------|
|
|
97
|
+
| HH:MM | [What happened] | [System/Team] |
|
|
98
|
+
| HH:MM | [Alert fired] | [Monitoring] |
|
|
99
|
+
| HH:MM | [Alert acknowledged] | [Responder] |
|
|
100
|
+
| HH:MM | [Investigation started] | [Team] |
|
|
101
|
+
| HH:MM | [Root cause identified] | [Team] |
|
|
102
|
+
| HH:MM | [Mitigation applied] | [Responder] |
|
|
103
|
+
| HH:MM | [Service restored] | [System] |
|
|
104
|
+
| HH:MM | [Incident closed] | [IC] |
|
|
105
|
+
|
|
106
|
+
**trace_id:** [ID for log/trace correlation]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### Impact Assessment
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
## Impact Assessment
|
|
115
|
+
|
|
116
|
+
### User Impact
|
|
117
|
+
- [X] users experienced [symptom] for [duration]
|
|
118
|
+
- [Affected user segments]
|
|
119
|
+
- [Geographic regions affected]
|
|
120
|
+
|
|
121
|
+
### Business Impact
|
|
122
|
+
- Revenue: [Lost/at-risk amount if applicable]
|
|
123
|
+
- SLA: [Any SLA breaches]
|
|
124
|
+
- Compliance: [Any compliance implications]
|
|
125
|
+
|
|
126
|
+
### Service Impact
|
|
127
|
+
- Primary: [Service(s) directly affected]
|
|
128
|
+
- Secondary: [Downstream services affected]
|
|
129
|
+
- Cascade: [Any cascade effects]
|
|
130
|
+
|
|
131
|
+
### SLO Impact
|
|
132
|
+
| SLO | Target | Actual During Incident | Budget Consumed |
|
|
133
|
+
|-----|--------|----------------------|-----------------|
|
|
134
|
+
| [Name] | [X]% | [Y]% | [Z]% |
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### Contributing Factors
|
|
140
|
+
|
|
141
|
+
**Note:** We use "contributing factors" not "root cause" because incidents are complex and multi-causal.
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
## Contributing Factors
|
|
145
|
+
|
|
146
|
+
### Technical Factors
|
|
147
|
+
1. **[Factor]**
|
|
148
|
+
- What: [Description]
|
|
149
|
+
- Why it mattered: [How it contributed]
|
|
150
|
+
- Evidence: [Logs/traces/metrics reference]
|
|
151
|
+
|
|
152
|
+
2. **[Factor]**
|
|
153
|
+
- What: [Description]
|
|
154
|
+
- Why it mattered: [How it contributed]
|
|
155
|
+
- Evidence: [Reference]
|
|
156
|
+
|
|
157
|
+
### Process Factors
|
|
158
|
+
1. **[Factor]**
|
|
159
|
+
- What: [Description]
|
|
160
|
+
- Why it mattered: [How it contributed]
|
|
161
|
+
|
|
162
|
+
### Detection Factors
|
|
163
|
+
1. **[Factor]**
|
|
164
|
+
- What monitoring gap existed?
|
|
165
|
+
- How could earlier detection have helped?
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
### 5 Whys Analysis
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
## 5 Whys Analysis
|
|
174
|
+
|
|
175
|
+
**Symptom:** [What was observed]
|
|
176
|
+
|
|
177
|
+
1. **Why did [symptom] occur?**
|
|
178
|
+
Because [reason 1]
|
|
179
|
+
|
|
180
|
+
2. **Why did [reason 1] happen?**
|
|
181
|
+
Because [reason 2]
|
|
182
|
+
|
|
183
|
+
3. **Why did [reason 2] happen?**
|
|
184
|
+
Because [reason 3]
|
|
185
|
+
|
|
186
|
+
4. **Why did [reason 3] happen?**
|
|
187
|
+
Because [reason 4]
|
|
188
|
+
|
|
189
|
+
5. **Why did [reason 4] happen?**
|
|
190
|
+
Because [reason 5 - usually systemic/process]
|
|
191
|
+
|
|
192
|
+
**Contributing Factor Identified:** [Summary]
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### Observability Gap Analysis
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
## Observability Gap Analysis
|
|
201
|
+
|
|
202
|
+
### Detection Effectiveness
|
|
203
|
+
- Was the issue detected by monitoring? [Yes/No]
|
|
204
|
+
- If no, how was it detected? [Customer report/Manual check/etc.]
|
|
205
|
+
- Time between incident start and detection: [X minutes]
|
|
206
|
+
|
|
207
|
+
### Dashboard Effectiveness
|
|
208
|
+
- Did dashboards show the problem clearly? [Yes/No]
|
|
209
|
+
- What was missing from dashboards?
|
|
210
|
+
- What additional views would have helped?
|
|
211
|
+
|
|
212
|
+
### Log/Trace Effectiveness
|
|
213
|
+
- Could logs identify the root cause? [Yes/No]
|
|
214
|
+
- Was trace_id correlation helpful? [Yes/No]
|
|
215
|
+
- What additional logging would help?
|
|
216
|
+
|
|
217
|
+
### Alerting Effectiveness
|
|
218
|
+
- Did alerts fire appropriately? [Yes/No]
|
|
219
|
+
- Were there false negatives? [Alerts that should have fired]
|
|
220
|
+
- Were there false positives? [Alert noise during incident]
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
### Action Items
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
## Action Items
|
|
229
|
+
|
|
230
|
+
### Immediate (Within 1 Week)
|
|
231
|
+
| ID | Action | Owner | Due Date | Status |
|
|
232
|
+
|----|--------|-------|----------|--------|
|
|
233
|
+
| AI-1 | [Action] | [Name] | [Date] | [Open/Done] |
|
|
234
|
+
|
|
235
|
+
### Short-term (Within 1 Month)
|
|
236
|
+
| ID | Action | Owner | Due Date | Status |
|
|
237
|
+
|----|--------|-------|----------|--------|
|
|
238
|
+
| AI-2 | [Action] | [Name] | [Date] | [Open/Done] |
|
|
239
|
+
|
|
240
|
+
### Long-term (Within Quarter)
|
|
241
|
+
| ID | Action | Owner | Due Date | Status |
|
|
242
|
+
|----|--------|-------|----------|--------|
|
|
243
|
+
| AI-3 | [Action] | [Name] | [Date] | [Open/Done] |
|
|
244
|
+
|
|
245
|
+
### Observability Improvements
|
|
246
|
+
| ID | Action | Owner | Due Date | Status |
|
|
247
|
+
|----|--------|-------|----------|--------|
|
|
248
|
+
| OBS-1 | Add alert for [condition] | [Name] | [Date] | [Status] |
|
|
249
|
+
| OBS-2 | Add dashboard for [metric] | [Name] | [Date] | [Status] |
|
|
250
|
+
| OBS-3 | Add logging for [event] | [Name] | [Date] | [Status] |
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
### What Went Well
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
## What Went Well
|
|
259
|
+
|
|
260
|
+
- [Positive observation about response]
|
|
261
|
+
- [Effective tool/process that helped]
|
|
262
|
+
- [Good decision that was made]
|
|
263
|
+
- [Communication that worked well]
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
### Lessons Learned
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
## Lessons Learned
|
|
272
|
+
|
|
273
|
+
### Process Improvements
|
|
274
|
+
- [Learning about incident response process]
|
|
275
|
+
|
|
276
|
+
### Technical Insights
|
|
277
|
+
- [Technical learning from this incident]
|
|
278
|
+
|
|
279
|
+
### Communication Insights
|
|
280
|
+
- [Learning about communication effectiveness]
|
|
281
|
+
|
|
282
|
+
### Prevention Strategies
|
|
283
|
+
- [How similar incidents can be prevented]
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Postmortem Review Meeting
|
|
289
|
+
|
|
290
|
+
### Agenda (60 minutes)
|
|
291
|
+
|
|
292
|
+
1. **Timeline walkthrough** (10 min)
|
|
293
|
+
- What happened, when
|
|
294
|
+
- Key decision points
|
|
295
|
+
|
|
296
|
+
2. **Contributing factors discussion** (20 min)
|
|
297
|
+
- Technical factors
|
|
298
|
+
- Process factors
|
|
299
|
+
- Detection gaps
|
|
300
|
+
|
|
301
|
+
3. **Action item review** (20 min)
|
|
302
|
+
- Prioritize actions
|
|
303
|
+
- Assign owners
|
|
304
|
+
- Set due dates
|
|
305
|
+
|
|
306
|
+
4. **Lessons learned** (10 min)
|
|
307
|
+
- What went well
|
|
308
|
+
- What to improve
|
|
309
|
+
- Share with broader team
|
|
310
|
+
|
|
311
|
+
### Meeting Rules
|
|
312
|
+
|
|
313
|
+
- No blame, no defensiveness
|
|
314
|
+
- Focus on systems and processes
|
|
315
|
+
- Everyone's perspective is valuable
|
|
316
|
+
- Actions must have owners and dates
|
|
317
|
+
- Follow up on action completion
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Action Item Categories
|
|
322
|
+
|
|
323
|
+
Ensure actions cover:
|
|
324
|
+
|
|
325
|
+
| Category | Example Actions |
|
|
326
|
+
|----------|----------------|
|
|
327
|
+
| **Prevention** | Code review requirement, input validation |
|
|
328
|
+
| **Detection** | New alerts, improved dashboards |
|
|
329
|
+
| **Mitigation** | Runbook updates, failover automation |
|
|
330
|
+
| **Response** | Training, process documentation |
|
|
331
|
+
| **Recovery** | Backup improvements, rollback procedures |
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Postmortem Anti-Patterns
|
|
336
|
+
|
|
337
|
+
❌ **Avoid:**
|
|
338
|
+
- Assigning blame to individuals
|
|
339
|
+
- Concluding "human error" (dig deeper)
|
|
340
|
+
- Action items without owners
|
|
341
|
+
- Actions without deadlines
|
|
342
|
+
- Publishing without review
|
|
343
|
+
- Skipping the meeting
|
|
344
|
+
|
|
345
|
+
✅ **Do:**
|
|
346
|
+
- Focus on system failures
|
|
347
|
+
- Find multiple contributing factors
|
|
348
|
+
- Assign clear ownership
|
|
349
|
+
- Set realistic deadlines
|
|
350
|
+
- Review with stakeholders
|
|
351
|
+
- Track action completion
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# Severity Classification
|
|
2
|
+
|
|
3
|
+
Objective severity classification based on SLO burn rates and business impact.
|
|
4
|
+
|
|
5
|
+
## The Classification Rule
|
|
6
|
+
|
|
7
|
+
**Classify severity BEFORE taking any action.** Severity determines:
|
|
8
|
+
- Response time expectations
|
|
9
|
+
- Who gets notified
|
|
10
|
+
- Resource allocation priority
|
|
11
|
+
- Communication cadence
|
|
12
|
+
|
|
13
|
+
## Severity Matrix
|
|
14
|
+
|
|
15
|
+
### P1 - Critical
|
|
16
|
+
|
|
17
|
+
**SLO Burn Rate:** >14.4x (consuming >2% error budget per hour)
|
|
18
|
+
|
|
19
|
+
**Impact Criteria (ANY of these):**
|
|
20
|
+
- Complete service outage
|
|
21
|
+
- >50% of users affected
|
|
22
|
+
- Critical business function unavailable
|
|
23
|
+
- Data loss or corruption risk
|
|
24
|
+
- Active security breach
|
|
25
|
+
- Revenue-generating flow completely blocked
|
|
26
|
+
- Compliance/regulatory violation in progress
|
|
27
|
+
|
|
28
|
+
**Response Expectations:**
|
|
29
|
+
|
|
30
|
+
| Metric | Target |
|
|
31
|
+
|--------|--------|
|
|
32
|
+
| Acknowledge | Within 5 minutes |
|
|
33
|
+
| First update | Within 15 minutes |
|
|
34
|
+
| War room formed | Within 15 minutes |
|
|
35
|
+
| Executive notification | Within 30 minutes |
|
|
36
|
+
| Customer communication | Within 1 hour |
|
|
37
|
+
| Update cadence | Every 15 minutes |
|
|
38
|
+
|
|
39
|
+
**Escalation:** Immediate page to on-call, all hands if needed
|
|
40
|
+
|
|
41
|
+
**Example Incidents:**
|
|
42
|
+
- Production database unreachable
|
|
43
|
+
- Authentication service down
|
|
44
|
+
- Payment processing 100% failure
|
|
45
|
+
- Major cloud region outage affecting services
|
|
46
|
+
- Data breach detected
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
### P2 - High
|
|
51
|
+
|
|
52
|
+
**SLO Burn Rate:** >6x (consuming >5% error budget per 6 hours)
|
|
53
|
+
|
|
54
|
+
**Impact Criteria (ANY of these):**
|
|
55
|
+
- Major feature unavailable
|
|
56
|
+
- 10-50% of users affected
|
|
57
|
+
- Significant performance degradation (>5x latency)
|
|
58
|
+
- Secondary business function blocked
|
|
59
|
+
- Partial data integrity issues
|
|
60
|
+
- Key integration failing
|
|
61
|
+
|
|
62
|
+
**Response Expectations:**
|
|
63
|
+
|
|
64
|
+
| Metric | Target |
|
|
65
|
+
|--------|--------|
|
|
66
|
+
| Acknowledge | Within 15 minutes |
|
|
67
|
+
| First update | Within 30 minutes |
|
|
68
|
+
| Status page update | Within 30 minutes |
|
|
69
|
+
| Stakeholder notification | Within 1 hour |
|
|
70
|
+
| Update cadence | Every 30 minutes |
|
|
71
|
+
|
|
72
|
+
**Escalation:** Page on-call during business hours, notify team lead
|
|
73
|
+
|
|
74
|
+
**Example Incidents:**
|
|
75
|
+
- Search functionality completely broken
|
|
76
|
+
- 30% of API requests failing
|
|
77
|
+
- Email notifications not sending
|
|
78
|
+
- Third-party payment provider degraded
|
|
79
|
+
- Mobile app login issues for subset of users
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### P3 - Medium
|
|
84
|
+
|
|
85
|
+
**SLO Burn Rate:** >3x (consuming >10% error budget per 24 hours)
|
|
86
|
+
|
|
87
|
+
**Impact Criteria (ANY of these):**
|
|
88
|
+
- Minor feature impacted
|
|
89
|
+
- <10% of users affected
|
|
90
|
+
- Workaround available
|
|
91
|
+
- Non-critical function degraded
|
|
92
|
+
- Cosmetic issues affecting usability
|
|
93
|
+
- Performance slightly degraded
|
|
94
|
+
|
|
95
|
+
**Response Expectations:**
|
|
96
|
+
|
|
97
|
+
| Metric | Target |
|
|
98
|
+
|--------|--------|
|
|
99
|
+
| Acknowledge | Within 1 hour |
|
|
100
|
+
| First update | Within 2 hours |
|
|
101
|
+
| Resolution target | Within 8 business hours |
|
|
102
|
+
| Update cadence | At milestones |
|
|
103
|
+
|
|
104
|
+
**Escalation:** Create ticket, notify team channel
|
|
105
|
+
|
|
106
|
+
**Example Incidents:**
|
|
107
|
+
- Report generation slow but working
|
|
108
|
+
- Specific browser experiencing issues
|
|
109
|
+
- Non-critical API endpoint intermittent
|
|
110
|
+
- Email formatting broken
|
|
111
|
+
- Search results slightly inaccurate
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### P4 - Low
|
|
116
|
+
|
|
117
|
+
**SLO Burn Rate:** >1x (projected budget exhaustion within SLO window)
|
|
118
|
+
|
|
119
|
+
**Impact Criteria (ALL of these):**
|
|
120
|
+
- Minimal or no user impact
|
|
121
|
+
- Edge case or rare scenario
|
|
122
|
+
- Cosmetic only
|
|
123
|
+
- Performance within acceptable range
|
|
124
|
+
- Workaround trivial
|
|
125
|
+
|
|
126
|
+
**Response Expectations:**
|
|
127
|
+
|
|
128
|
+
| Metric | Target |
|
|
129
|
+
|--------|--------|
|
|
130
|
+
| Acknowledge | Within 1 business day |
|
|
131
|
+
| Resolution target | Next sprint/release |
|
|
132
|
+
| Update cadence | On resolution |
|
|
133
|
+
|
|
134
|
+
**Escalation:** Backlog item, routine prioritization
|
|
135
|
+
|
|
136
|
+
**Example Incidents:**
|
|
137
|
+
- Minor UI misalignment
|
|
138
|
+
- Rare edge case error
|
|
139
|
+
- Documentation inconsistency
|
|
140
|
+
- Non-user-facing optimization opportunity
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Error Budget Integration
|
|
145
|
+
|
|
146
|
+
### Understanding Burn Rate
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
Burn Rate = (Error Rate) / (Allowed Error Rate)
|
|
150
|
+
|
|
151
|
+
Example: 99.9% SLO = 0.1% allowed errors
|
|
152
|
+
If current error rate = 1.44%
|
|
153
|
+
Burn Rate = 1.44 / 0.1 = 14.4x (P1!)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Budget Consumption Thresholds
|
|
157
|
+
|
|
158
|
+
| Severity | Burn Rate | Budget Impact | Alert Type |
|
|
159
|
+
|----------|-----------|--------------|------------|
|
|
160
|
+
| P1 | >14.4x | >2% in 1 hour | Page immediately |
|
|
161
|
+
| P2 | >6x | >5% in 6 hours | Page business hours |
|
|
162
|
+
| P3 | >3x | >10% in 24 hours | Create ticket |
|
|
163
|
+
| P4 | >1x | Projected exhaustion | Add to backlog |
|
|
164
|
+
|
|
165
|
+
### SLO Tier Mapping
|
|
166
|
+
|
|
167
|
+
| Service Tier | SLO Target | Monthly Budget | Equivalent Downtime |
|
|
168
|
+
|--------------|-----------|----------------|---------------------|
|
|
169
|
+
| Tier 1 (Critical) | 99.99% | 0.01% | 4.38 minutes |
|
|
170
|
+
| Tier 2 (Important) | 99.9% | 0.1% | 43.8 minutes |
|
|
171
|
+
| Tier 3 (Standard) | 99.5% | 0.5% | 3.65 hours |
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Classification Decision Tree
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
Is the service completely unavailable?
|
|
179
|
+
├── Yes → P1
|
|
180
|
+
└── No → Continue
|
|
181
|
+
|
|
182
|
+
Are >50% of users affected?
|
|
183
|
+
├── Yes → P1
|
|
184
|
+
└── No → Continue
|
|
185
|
+
|
|
186
|
+
Is a critical business function blocked?
|
|
187
|
+
├── Yes → P1
|
|
188
|
+
└── No → Continue
|
|
189
|
+
|
|
190
|
+
Are 10-50% of users affected?
|
|
191
|
+
├── Yes → P2
|
|
192
|
+
└── No → Continue
|
|
193
|
+
|
|
194
|
+
Is a major feature unavailable?
|
|
195
|
+
├── Yes → P2
|
|
196
|
+
└── No → Continue
|
|
197
|
+
|
|
198
|
+
Is the burn rate >6x?
|
|
199
|
+
├── Yes → P2
|
|
200
|
+
└── No → Continue
|
|
201
|
+
|
|
202
|
+
Are <10% of users affected with workaround?
|
|
203
|
+
├── Yes → P3
|
|
204
|
+
└── No → Continue
|
|
205
|
+
|
|
206
|
+
Is impact minimal/cosmetic only?
|
|
207
|
+
├── Yes → P4
|
|
208
|
+
└── No → Default to P3 (when uncertain)
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## When Uncertain, Classify Higher
|
|
214
|
+
|
|
215
|
+
**Rule:** If you're unsure between two severity levels, classify higher.
|
|
216
|
+
|
|
217
|
+
- Unsure between P1 and P2? → Classify as P1
|
|
218
|
+
- Unsure between P2 and P3? → Classify as P2
|
|
219
|
+
- Unsure between P3 and P4? → Classify as P3
|
|
220
|
+
|
|
221
|
+
**Rationale:** Over-response is better than under-response. You can always downgrade.
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Severity Changes During Incident
|
|
226
|
+
|
|
227
|
+
Severity can change as you learn more:
|
|
228
|
+
|
|
229
|
+
**Upgrade when:**
|
|
230
|
+
- Impact wider than initially assessed
|
|
231
|
+
- More users affected than thought
|
|
232
|
+
- Business impact greater than estimated
|
|
233
|
+
- Mitigation not working
|
|
234
|
+
|
|
235
|
+
**Downgrade when:**
|
|
236
|
+
- Successful mitigation reduced impact
|
|
237
|
+
- Fewer users affected than thought
|
|
238
|
+
- Workaround discovered
|
|
239
|
+
- Root cause isolated to non-critical path
|
|
240
|
+
|
|
241
|
+
**Always communicate severity changes** to all stakeholders immediately.
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Include in Incident Reports
|
|
246
|
+
|
|
247
|
+
When documenting severity, always include:
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
Severity: P[1-4]
|
|
251
|
+
Burn Rate: [X]x SLO budget
|
|
252
|
+
Users Affected: [Count/Percentage]
|
|
253
|
+
Impact: [Brief description]
|
|
254
|
+
SLO Status: [Which SLO breaching]
|
|
255
|
+
Error Budget Remaining: [Percentage]
|
|
256
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Performance Optimization Skill Creation Log
|
|
2
|
+
|
|
3
|
+
## RED Phase: Pressure Scenarios & Expected Baseline Failures
|
|
4
|
+
|
|
5
|
+
### Scenario 1: "Make it faster" pressure
|
|
6
|
+
**Prompt:** "The API endpoint is slow, make it faster"
|
|
7
|
+
**Expected baseline behavior WITHOUT skill:**
|
|
8
|
+
- Jump to implementation without profiling
|
|
9
|
+
- Guess at bottlenecks based on assumptions
|
|
10
|
+
- Apply random optimizations (add caching, parallelize)
|
|
11
|
+
- No measurement before/after
|
|
12
|
+
|
|
13
|
+
### Scenario 2: "Quick benchmark" pressure
|
|
14
|
+
**Prompt:** "Run a quick benchmark to see the improvement"
|
|
15
|
+
**Expected baseline behavior WITHOUT skill:**
|
|
16
|
+
- Run once, report single number
|
|
17
|
+
- No warm-up runs
|
|
18
|
+
- No statistical analysis (variance, outliers)
|
|
19
|
+
- Inconsistent environment (background processes)
|
|
20
|
+
|
|
21
|
+
### Scenario 3: "Optimize everything" pressure
|
|
22
|
+
**Prompt:** "The app feels slow, optimize the performance"
|
|
23
|
+
**Expected baseline behavior WITHOUT skill:**
|
|
24
|
+
- Optimize in arbitrary order
|
|
25
|
+
- Spend time on low-impact areas
|
|
26
|
+
- No ROI calculation (Amdahl's Law)
|
|
27
|
+
- No prioritization by bottleneck severity
|
|
28
|
+
|
|
29
|
+
### Scenario 4: "Ship it" time pressure
|
|
30
|
+
**Prompt:** "We need to deploy this fix today, skip the detailed analysis"
|
|
31
|
+
**Expected baseline behavior WITHOUT skill:**
|
|
32
|
+
- Skip regression test setup
|
|
33
|
+
- No performance budget definition
|
|
34
|
+
- No CI integration for performance monitoring
|
|
35
|
+
- "We'll add tests later" (never happens)
|
|
36
|
+
|
|
37
|
+
### Scenario 5: "We improved it" documentation pressure
|
|
38
|
+
**Prompt:** "Document the performance improvements we made"
|
|
39
|
+
**Expected baseline behavior WITHOUT skill:**
|
|
40
|
+
- Vague claims ("improved performance")
|
|
41
|
+
- No before/after numbers
|
|
42
|
+
- No reproducible methodology
|
|
43
|
+
- No context (environment, load, data size)
|
|
44
|
+
|
|
45
|
+
## Common Rationalizations Identified
|
|
46
|
+
|
|
47
|
+
| Excuse | Reality |
|
|
48
|
+
|--------|---------|
|
|
49
|
+
| "I know where the bottleneck is" | Profiling reveals surprises 90% of the time |
|
|
50
|
+
| "One run is enough" | Single measurements have high variance |
|
|
51
|
+
| "Micro-optimizations add up" | Amdahl's Law: 5% of code = 95% of time |
|
|
52
|
+
| "Benchmarks are expensive" | Guessing costs more in wasted optimization |
|
|
53
|
+
| "We'll monitor in production" | Production has confounding variables |
|
|
54
|
+
|
|
55
|
+
## GREEN Phase Requirements
|
|
56
|
+
|
|
57
|
+
The skill must address each baseline failure:
|
|
58
|
+
1. **Require profiling before optimization** (addresses Scenario 1)
|
|
59
|
+
2. **Define benchmark methodology** (addresses Scenario 2)
|
|
60
|
+
3. **Include ROI prioritization framework** (addresses Scenario 3)
|
|
61
|
+
4. **Integrate regression prevention** (addresses Scenario 4)
|
|
62
|
+
5. **Provide documentation templates** (addresses Scenario 5)
|
|
63
|
+
|
|
64
|
+
## REFACTOR Phase: Gaps Identified & Addressed
|
|
65
|
+
|
|
66
|
+
| Gap | Fix Applied |
|
|
67
|
+
|-----|-------------|
|
|
68
|
+
| No guidance on vague measurements | Added step 1: "Clarify metrics" |
|
|
69
|
+
| Missing distributed profiling | Added: OpenTelemetry, Jaeger, Datadog |
|
|
70
|
+
| Missing serverless profiling | Added: AWS X-Ray, CloudWatch |
|
|
71
|
+
| Missing mobile profiling | Added: Android Profiler, Xcode Instruments |
|
|
72
|
+
| Cache state ambiguity | Added: "Profile cold AND warm cache" |
|
|
73
|
+
| No time-boxing guidance | Added: "Max 2 hours → Escalate" |
|
|
74
|
+
| No rollback plan | Added: "Separate commit, feature flags" |
|
|
75
|
+
| Word count exceeded (1350 → 574 → 395) | Compressed while maintaining core guidance |
|
|
76
|
+
| MCP discovery not configured | Registered in keywords.ts with priority 23 |
|
|
77
|
+
|
|
78
|
+
## Verification Status
|
|
79
|
+
|
|
80
|
+
- [x] Skill addresses all baseline failures from RED phase
|
|
81
|
+
- [x] Loopholes closed with specific guidance
|
|
82
|
+
- [x] Rationalizations table included
|
|
83
|
+
- [x] Red flags list for self-checking
|
|
84
|
+
- [x] Documentation template provided
|
|
85
|
+
- [x] Word count < 500 (395 words)
|
|
86
|
+
- [x] MCP skill discovery registered (priority 23)
|
|
87
|
+
- [x] All tests passing (2555 tests)
|