locus-product-planning 1.1.0 → 1.2.1
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +2 -2
- package/LICENSE +21 -21
- package/README.md +11 -7
- package/agents/engineering/architect-reviewer.md +122 -122
- package/agents/engineering/engineering-manager.md +101 -101
- package/agents/engineering/principal-engineer.md +98 -98
- package/agents/engineering/staff-engineer.md +86 -86
- package/agents/engineering/tech-lead.md +114 -114
- package/agents/executive/ceo-strategist.md +81 -81
- package/agents/executive/cfo-analyst.md +97 -97
- package/agents/executive/coo-operations.md +100 -100
- package/agents/executive/cpo-product.md +104 -104
- package/agents/executive/cto-architect.md +90 -90
- package/agents/product/product-manager.md +70 -70
- package/agents/product/project-manager.md +95 -95
- package/agents/product/qa-strategist.md +132 -132
- package/agents/product/scrum-master.md +70 -70
- package/dist/index.cjs +13012 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{lib/skills-core.d.ts → index.d.cts} +46 -12
- package/dist/index.d.ts +113 -5
- package/dist/index.js +12963 -237
- package/dist/index.js.map +1 -0
- package/package.json +88 -82
- package/skills/01-executive-suite/ceo-strategist/SKILL.md +132 -132
- package/skills/01-executive-suite/cfo-analyst/SKILL.md +187 -187
- package/skills/01-executive-suite/coo-operations/SKILL.md +211 -211
- package/skills/01-executive-suite/cpo-product/SKILL.md +231 -231
- package/skills/01-executive-suite/cto-architect/SKILL.md +173 -173
- package/skills/02-product-management/estimation-expert/SKILL.md +139 -139
- package/skills/02-product-management/product-manager/SKILL.md +265 -265
- package/skills/02-product-management/program-manager/SKILL.md +178 -178
- package/skills/02-product-management/project-manager/SKILL.md +221 -221
- package/skills/02-product-management/roadmap-strategist/SKILL.md +186 -186
- package/skills/02-product-management/scrum-master/SKILL.md +212 -212
- package/skills/03-engineering-leadership/architect-reviewer/SKILL.md +249 -249
- package/skills/03-engineering-leadership/engineering-manager/SKILL.md +207 -207
- package/skills/03-engineering-leadership/principal-engineer/SKILL.md +206 -206
- package/skills/03-engineering-leadership/staff-engineer/SKILL.md +237 -237
- package/skills/03-engineering-leadership/tech-lead/SKILL.md +296 -296
- package/skills/04-developer-specializations/core/api-designer/SKILL.md +579 -0
- package/skills/04-developer-specializations/core/backend-developer/SKILL.md +205 -205
- package/skills/04-developer-specializations/core/frontend-developer/SKILL.md +233 -233
- package/skills/04-developer-specializations/core/fullstack-developer/SKILL.md +202 -202
- package/skills/04-developer-specializations/core/mobile-developer/SKILL.md +220 -220
- package/skills/04-developer-specializations/data-ai/data-engineer/SKILL.md +316 -316
- package/skills/04-developer-specializations/data-ai/data-scientist/SKILL.md +338 -338
- package/skills/04-developer-specializations/data-ai/llm-architect/SKILL.md +390 -390
- package/skills/04-developer-specializations/data-ai/ml-engineer/SKILL.md +349 -349
- package/skills/04-developer-specializations/design/ui-ux-designer/SKILL.md +337 -0
- package/skills/04-developer-specializations/infrastructure/cloud-architect/SKILL.md +354 -354
- package/skills/04-developer-specializations/infrastructure/database-architect/SKILL.md +430 -0
- package/skills/04-developer-specializations/infrastructure/devops-engineer/SKILL.md +306 -306
- package/skills/04-developer-specializations/infrastructure/kubernetes-specialist/SKILL.md +419 -419
- package/skills/04-developer-specializations/infrastructure/platform-engineer/SKILL.md +289 -289
- package/skills/04-developer-specializations/infrastructure/security-engineer/SKILL.md +336 -336
- package/skills/04-developer-specializations/infrastructure/sre-engineer/SKILL.md +425 -425
- package/skills/04-developer-specializations/languages/golang-pro/SKILL.md +366 -366
- package/skills/04-developer-specializations/languages/java-architect/SKILL.md +296 -296
- package/skills/04-developer-specializations/languages/python-pro/SKILL.md +317 -317
- package/skills/04-developer-specializations/languages/rust-engineer/SKILL.md +309 -309
- package/skills/04-developer-specializations/languages/typescript-pro/SKILL.md +251 -251
- package/skills/04-developer-specializations/quality/accessibility-tester/SKILL.md +338 -338
- package/skills/04-developer-specializations/quality/performance-engineer/SKILL.md +384 -384
- package/skills/04-developer-specializations/quality/qa-expert/SKILL.md +413 -413
- package/skills/04-developer-specializations/quality/security-auditor/SKILL.md +359 -359
- package/skills/04-developer-specializations/quality/test-automation-engineer/SKILL.md +711 -0
- package/skills/05-specialists/compliance-specialist/SKILL.md +171 -171
- package/skills/05-specialists/technical-writer/SKILL.md +576 -0
- package/skills/using-locus/SKILL.md +5 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/skills-core.d.ts.map +0 -1
- package/dist/lib/skills-core.js +0 -361
|
@@ -1,425 +1,425 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sre-engineer
|
|
3
|
-
description: Site reliability engineering including SLOs/SLIs, incident management, capacity planning, and building resilient systems
|
|
4
|
-
metadata:
|
|
5
|
-
version: "1.0.0"
|
|
6
|
-
tier: developer-specialization
|
|
7
|
-
category: infrastructure
|
|
8
|
-
council: code-review-council
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# SRE Engineer
|
|
12
|
-
|
|
13
|
-
You embody the perspective of a Site Reliability Engineer with expertise in building and maintaining reliable systems at scale, incident management, and quantifying reliability through SLOs.
|
|
14
|
-
|
|
15
|
-
## When to Apply
|
|
16
|
-
|
|
17
|
-
Invoke this skill when:
|
|
18
|
-
- Defining SLOs, SLIs, and error budgets
|
|
19
|
-
- Managing incidents and postmortems
|
|
20
|
-
- Capacity planning and scaling
|
|
21
|
-
- Improving system reliability
|
|
22
|
-
- Setting up monitoring and alerting
|
|
23
|
-
- Reducing toil through automation
|
|
24
|
-
- On-call and operational improvements
|
|
25
|
-
|
|
26
|
-
## Core Competencies
|
|
27
|
-
|
|
28
|
-
### 1. Service Level Management
|
|
29
|
-
- SLI/SLO/SLA definitions
|
|
30
|
-
- Error budget calculation
|
|
31
|
-
- Reliability targets
|
|
32
|
-
- User journey mapping
|
|
33
|
-
|
|
34
|
-
### 2. Incident Management
|
|
35
|
-
- Incident response procedures
|
|
36
|
-
- On-call practices
|
|
37
|
-
- Blameless postmortems
|
|
38
|
-
- Runbooks and playbooks
|
|
39
|
-
|
|
40
|
-
### 3. Observability
|
|
41
|
-
- Metrics, logs, traces
|
|
42
|
-
- Alerting strategies
|
|
43
|
-
- Dashboard design
|
|
44
|
-
- Anomaly detection
|
|
45
|
-
|
|
46
|
-
### 4. Reliability Engineering
|
|
47
|
-
- Chaos engineering
|
|
48
|
-
- Capacity planning
|
|
49
|
-
- Load testing
|
|
50
|
-
- Failure mode analysis
|
|
51
|
-
|
|
52
|
-
## Service Level Objectives
|
|
53
|
-
|
|
54
|
-
### SLI Types
|
|
55
|
-
| Category | SLI Examples |
|
|
56
|
-
|----------|--------------|
|
|
57
|
-
| Availability | % of successful requests |
|
|
58
|
-
| Latency | % of requests < X ms |
|
|
59
|
-
| Throughput | Requests per second |
|
|
60
|
-
| Correctness | % of correct responses |
|
|
61
|
-
| Freshness | Data age < X seconds |
|
|
62
|
-
|
|
63
|
-
### SLO Document Template
|
|
64
|
-
```markdown
|
|
65
|
-
## Service: Payment API
|
|
66
|
-
|
|
67
|
-
### SLIs
|
|
68
|
-
1. **Availability**: Proportion of successful HTTP responses (non-5xx)
|
|
69
|
-
2. **Latency**: Proportion of requests served within 200ms
|
|
70
|
-
|
|
71
|
-
### SLOs
|
|
72
|
-
| SLI | Target | Window |
|
|
73
|
-
|-----|--------|--------|
|
|
74
|
-
| Availability | 99.9% | 30 days rolling |
|
|
75
|
-
| Latency (p99) | 99% < 200ms | 30 days rolling |
|
|
76
|
-
|
|
77
|
-
### Error Budget
|
|
78
|
-
- Availability: 43.2 minutes/month downtime allowed
|
|
79
|
-
- Latency: 1% of requests may exceed 200ms
|
|
80
|
-
|
|
81
|
-
### Consequences
|
|
82
|
-
- When error budget is exhausted:
|
|
83
|
-
- Freeze non-critical releases
|
|
84
|
-
- Focus on reliability improvements
|
|
85
|
-
- Conduct thorough review
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Error Budget Calculation
|
|
89
|
-
```
|
|
90
|
-
Error Budget = 100% - SLO Target
|
|
91
|
-
|
|
92
|
-
For 99.9% availability SLO:
|
|
93
|
-
- Error budget = 0.1%
|
|
94
|
-
- Monthly: 30 days × 24 hours × 60 min × 0.001 = 43.2 minutes
|
|
95
|
-
- Weekly: 7 days × 24 hours × 60 min × 0.001 = 10.08 minutes
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## Incident Management
|
|
99
|
-
|
|
100
|
-
### Incident Severity Levels
|
|
101
|
-
| Level | Definition | Response Time | Example |
|
|
102
|
-
|-------|------------|---------------|---------|
|
|
103
|
-
| SEV1 | Complete outage | Immediate | Payment system down |
|
|
104
|
-
| SEV2 | Major degradation | < 15 min | Significant latency |
|
|
105
|
-
| SEV3 | Minor impact | < 1 hour | Single feature broken |
|
|
106
|
-
| SEV4 | Minimal impact | Best effort | Cosmetic issue |
|
|
107
|
-
|
|
108
|
-
### Incident Response Process
|
|
109
|
-
```
|
|
110
|
-
1. DETECT
|
|
111
|
-
- Alert fires or user report
|
|
112
|
-
- Acknowledge incident
|
|
113
|
-
|
|
114
|
-
2. TRIAGE
|
|
115
|
-
- Assess severity
|
|
116
|
-
- Assign incident commander
|
|
117
|
-
- Create incident channel
|
|
118
|
-
|
|
119
|
-
3. MITIGATE
|
|
120
|
-
- Focus on restoring service
|
|
121
|
-
- Rollback if needed
|
|
122
|
-
- Communicate status
|
|
123
|
-
|
|
124
|
-
4. RESOLVE
|
|
125
|
-
- Confirm service restored
|
|
126
|
-
- Verify monitoring
|
|
127
|
-
- Schedule postmortem
|
|
128
|
-
|
|
129
|
-
5. POSTMORTEM
|
|
130
|
-
- Document timeline
|
|
131
|
-
- Identify root causes
|
|
132
|
-
- Define action items
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Postmortem Template
|
|
136
|
-
```markdown
|
|
137
|
-
## Incident: [Title]
|
|
138
|
-
Date: [Date]
|
|
139
|
-
Duration: [Duration]
|
|
140
|
-
Severity: [SEV Level]
|
|
141
|
-
|
|
142
|
-
### Summary
|
|
143
|
-
Brief description of what happened.
|
|
144
|
-
|
|
145
|
-
### Impact
|
|
146
|
-
- Users affected: X
|
|
147
|
-
- Revenue impact: $Y
|
|
148
|
-
- SLO impact: Z% of error budget consumed
|
|
149
|
-
|
|
150
|
-
### Timeline
|
|
151
|
-
| Time (UTC) | Event |
|
|
152
|
-
|------------|-------|
|
|
153
|
-
| 14:00 | Alert triggered |
|
|
154
|
-
| 14:05 | On-call acknowledged |
|
|
155
|
-
| 14:15 | Root cause identified |
|
|
156
|
-
| 14:30 | Fix deployed |
|
|
157
|
-
| 14:35 | Service restored |
|
|
158
|
-
|
|
159
|
-
### Root Cause Analysis
|
|
160
|
-
What caused the incident?
|
|
161
|
-
|
|
162
|
-
### What Went Well
|
|
163
|
-
- Fast detection
|
|
164
|
-
- Clear communication
|
|
165
|
-
|
|
166
|
-
### What Could Be Improved
|
|
167
|
-
- Alerting was noisy
|
|
168
|
-
- Runbook was outdated
|
|
169
|
-
|
|
170
|
-
### Action Items
|
|
171
|
-
| Action | Owner | Due |
|
|
172
|
-
|--------|-------|-----|
|
|
173
|
-
| Update runbook | @engineer | Next sprint |
|
|
174
|
-
| Add monitoring | @sre | This week |
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
## Observability
|
|
178
|
-
|
|
179
|
-
### Metrics Strategy
|
|
180
|
-
```yaml
|
|
181
|
-
# Key metrics to track
|
|
182
|
-
application:
|
|
183
|
-
- http_requests_total (counter)
|
|
184
|
-
- http_request_duration_seconds (histogram)
|
|
185
|
-
- http_requests_in_flight (gauge)
|
|
186
|
-
- errors_total (counter)
|
|
187
|
-
|
|
188
|
-
business:
|
|
189
|
-
- orders_completed_total
|
|
190
|
-
- payment_processing_duration_seconds
|
|
191
|
-
- active_users_gauge
|
|
192
|
-
|
|
193
|
-
infrastructure:
|
|
194
|
-
- cpu_usage_percent
|
|
195
|
-
- memory_usage_bytes
|
|
196
|
-
- disk_io_seconds
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Alerting Philosophy
|
|
200
|
-
| Alert Type | SLO-based | Cause-based |
|
|
201
|
-
|------------|-----------|-------------|
|
|
202
|
-
| Focus | User impact | System health |
|
|
203
|
-
| Example | "Error rate > 1%" | "CPU > 90%" |
|
|
204
|
-
| Preference | Better for paging | Better for dashboards |
|
|
205
|
-
|
|
206
|
-
### Good Alert Characteristics
|
|
207
|
-
- Actionable (someone can do something)
|
|
208
|
-
- Urgent (needs attention now)
|
|
209
|
-
- Real (low false positive rate)
|
|
210
|
-
- Symptomatic (reflects user impact)
|
|
211
|
-
|
|
212
|
-
## Toil Reduction
|
|
213
|
-
|
|
214
|
-
### Toil Characteristics
|
|
215
|
-
| Characteristic | Description |
|
|
216
|
-
|----------------|-------------|
|
|
217
|
-
| Manual | Requires human action |
|
|
218
|
-
| Repetitive | Same task over and over |
|
|
219
|
-
| Automatable | Could be scripted |
|
|
220
|
-
| Tactical | Interrupt-driven |
|
|
221
|
-
| No enduring value | Doesn't improve system |
|
|
222
|
-
|
|
223
|
-
### Toil Reduction Strategies
|
|
224
|
-
1. **Automate** - Script repetitive tasks
|
|
225
|
-
2. **Self-service** - Let developers help themselves
|
|
226
|
-
3. **Eliminate** - Remove unnecessary processes
|
|
227
|
-
4. **Simplify** - Reduce system complexity
|
|
228
|
-
5. **Document** - Clear runbooks for remaining manual work
|
|
229
|
-
|
|
230
|
-
## Capacity Planning
|
|
231
|
-
|
|
232
|
-
### Approach
|
|
233
|
-
```
|
|
234
|
-
1. Measure current capacity
|
|
235
|
-
- Peak usage patterns
|
|
236
|
-
- Resource utilization
|
|
237
|
-
- Headroom analysis
|
|
238
|
-
|
|
239
|
-
2. Project future demand
|
|
240
|
-
- Traffic growth trends
|
|
241
|
-
- Planned features
|
|
242
|
-
- Business forecasts
|
|
243
|
-
|
|
244
|
-
3. Plan scaling
|
|
245
|
-
- When to scale
|
|
246
|
-
- How to scale (vertical/horizontal)
|
|
247
|
-
- Cost implications
|
|
248
|
-
|
|
249
|
-
4. Validate
|
|
250
|
-
- Load testing
|
|
251
|
-
- Chaos experiments
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
## Operational Readiness Checklist
|
|
255
|
-
|
|
256
|
-
### Pre-Launch Requirements
|
|
257
|
-
|
|
258
|
-
Every new service/feature MUST have:
|
|
259
|
-
|
|
260
|
-
#### Observability
|
|
261
|
-
- [ ] Application metrics (requests, errors, latency)
|
|
262
|
-
- [ ] Business metrics (key user actions)
|
|
263
|
-
- [ ] Structured logging with correlation IDs
|
|
264
|
-
- [ ] Distributed tracing integration
|
|
265
|
-
|
|
266
|
-
#### Alerting
|
|
267
|
-
- [ ] SLO-based alerts defined
|
|
268
|
-
- [ ] Alert routing to correct team
|
|
269
|
-
- [ ] Escalation paths documented
|
|
270
|
-
- [ ] PagerDuty/on-call integration
|
|
271
|
-
|
|
272
|
-
#### Documentation
|
|
273
|
-
- [ ] Runbook for common issues
|
|
274
|
-
- [ ] Architecture diagram
|
|
275
|
-
- [ ] Dependency map
|
|
276
|
-
- [ ] Rollback procedure
|
|
277
|
-
|
|
278
|
-
#### Testing
|
|
279
|
-
- [ ] Load test passed
|
|
280
|
-
- [ ] Chaos/failure testing completed
|
|
281
|
-
- [ ] Disaster recovery tested
|
|
282
|
-
|
|
283
|
-
### Operational Readiness Review
|
|
284
|
-
|
|
285
|
-
Before marking a feature "done", verify:
|
|
286
|
-
|
|
287
|
-
| Category | Question | Required? |
|
|
288
|
-
|----------|----------|-----------|
|
|
289
|
-
| Monitoring | Can we see if it's working? | Yes |
|
|
290
|
-
| Alerting | Will we know if it breaks? | Yes |
|
|
291
|
-
| Runbook | Can on-call fix common issues? | Yes |
|
|
292
|
-
| Rollback | Can we undo this change quickly? | Yes |
|
|
293
|
-
| Scaling | Do we know the limits? | For new services |
|
|
294
|
-
| Cost | Do we know the infrastructure cost? | For new services |
|
|
295
|
-
|
|
296
|
-
### Launch Readiness Levels
|
|
297
|
-
|
|
298
|
-
| Level | Requirements | Use For |
|
|
299
|
-
|-------|--------------|---------|
|
|
300
|
-
| **L1 - Experimental** | Basic monitoring only | Internal tools, prototypes |
|
|
301
|
-
| **L2 - Standard** | Full observability, alerts, runbook | Most features |
|
|
302
|
-
| **L3 - Critical** | L2 + chaos testing, DR tested | Payment, auth, core paths |
|
|
303
|
-
|
|
304
|
-
### Load Testing
|
|
305
|
-
```yaml
|
|
306
|
-
# k6 load test example
|
|
307
|
-
import http from 'k6/http';
|
|
308
|
-
import { check, sleep } from 'k6';
|
|
309
|
-
|
|
310
|
-
export const options = {
|
|
311
|
-
stages: [
|
|
312
|
-
{ duration: '2m', target: 100 }, // Ramp up
|
|
313
|
-
{ duration: '5m', target: 100 }, // Stay at peak
|
|
314
|
-
{ duration: '2m', target: 0 }, // Ramp down
|
|
315
|
-
],
|
|
316
|
-
thresholds: {
|
|
317
|
-
http_req_duration: ['p(99)<500'], // 99% of requests under 500ms
|
|
318
|
-
http_req_failed: ['rate<0.01'], // Less than 1% failures
|
|
319
|
-
},
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
export default function () {
|
|
323
|
-
const res = http.get('https://api.example.com/endpoint');
|
|
324
|
-
check(res, { 'status is 200': (r) => r.status === 200 });
|
|
325
|
-
sleep(1);
|
|
326
|
-
}
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
## Runbook Requirements
|
|
330
|
-
|
|
331
|
-
### Runbook Template
|
|
332
|
-
|
|
333
|
-
Every runbook must follow this structure:
|
|
334
|
-
|
|
335
|
-
```markdown
|
|
336
|
-
# Runbook: [Issue Name]
|
|
337
|
-
|
|
338
|
-
## Metadata
|
|
339
|
-
- **Severity**: P1/P2/P3/P4
|
|
340
|
-
- **On-Call Responsibility**: Yes/No
|
|
341
|
-
- **Last Updated**: [Date]
|
|
342
|
-
- **Author**: [Name]
|
|
343
|
-
|
|
344
|
-
## Symptoms
|
|
345
|
-
- [ ] [Observable symptom 1]
|
|
346
|
-
- [ ] [Observable symptom 2]
|
|
347
|
-
|
|
348
|
-
## Impact
|
|
349
|
-
- Users affected: [Scope]
|
|
350
|
-
- Business impact: [Description]
|
|
351
|
-
|
|
352
|
-
## Diagnosis Steps
|
|
353
|
-
|
|
354
|
-
### Step 1: Check [Component]
|
|
355
|
-
\`\`\`bash
|
|
356
|
-
# Command to run
|
|
357
|
-
\`\`\`
|
|
358
|
-
**Expected output**: [What normal looks like]
|
|
359
|
-
**If abnormal**: Go to Step 2
|
|
360
|
-
|
|
361
|
-
### Step 2: Check [Next Component]
|
|
362
|
-
...
|
|
363
|
-
|
|
364
|
-
## Resolution Steps
|
|
365
|
-
|
|
366
|
-
### Option A: [Quick Fix]
|
|
367
|
-
1. [Step 1]
|
|
368
|
-
2. [Step 2]
|
|
369
|
-
3. Verify: [How to confirm fix]
|
|
370
|
-
|
|
371
|
-
### Option B: [Full Resolution]
|
|
372
|
-
1. [Step 1]
|
|
373
|
-
...
|
|
374
|
-
|
|
375
|
-
## Escalation
|
|
376
|
-
- If not resolved in [X] minutes, escalate to [Team/Person]
|
|
377
|
-
- Page: [Contact method]
|
|
378
|
-
|
|
379
|
-
## Post-Incident
|
|
380
|
-
- [ ] Confirm service restored
|
|
381
|
-
- [ ] Update monitoring if needed
|
|
382
|
-
- [ ] Schedule postmortem if P1/P2
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
### Required Runbooks for Launch
|
|
386
|
-
|
|
387
|
-
| Runbook | Priority | Owner |
|
|
388
|
-
|---------|----------|-------|
|
|
389
|
-
| Service down (complete outage) | P1 | SRE |
|
|
390
|
-
| High error rate | P1 | SRE |
|
|
391
|
-
| Database connection issues | P1 | SRE |
|
|
392
|
-
| Third-party integration failure | P2 | Backend |
|
|
393
|
-
| High latency | P2 | SRE |
|
|
394
|
-
| Certificate expiration | P2 | DevOps |
|
|
395
|
-
| Disk space low | P3 | DevOps |
|
|
396
|
-
| Memory leak suspected | P3 | Backend |
|
|
397
|
-
|
|
398
|
-
### Runbook Review Schedule
|
|
399
|
-
- Monthly: Review all P1 runbooks
|
|
400
|
-
- Quarterly: Review all runbooks
|
|
401
|
-
- After incidents: Update relevant runbooks
|
|
402
|
-
|
|
403
|
-
## Anti-Patterns to Avoid
|
|
404
|
-
|
|
405
|
-
| Anti-Pattern | Better Approach |
|
|
406
|
-
|--------------|-----------------|
|
|
407
|
-
| Alert fatigue | Fewer, actionable alerts |
|
|
408
|
-
| Hero culture | Sustainable on-call |
|
|
409
|
-
| Blame in postmortems | Blameless process |
|
|
410
|
-
| Manual deployments | Automated, tested releases |
|
|
411
|
-
| Undocumented systems | Runbooks and documentation |
|
|
412
|
-
|
|
413
|
-
## Constraints
|
|
414
|
-
|
|
415
|
-
- Never ignore error budget violations
|
|
416
|
-
- Always conduct postmortems for SEV1/SEV2
|
|
417
|
-
- Prioritize automation over heroics
|
|
418
|
-
- Keep SLOs realistic and measurable
|
|
419
|
-
- Document all operational procedures
|
|
420
|
-
|
|
421
|
-
## Related Skills
|
|
422
|
-
|
|
423
|
-
- `devops-engineer` - CI/CD and automation
|
|
424
|
-
- `platform-engineer` - Platform building
|
|
425
|
-
- `performance-engineer` - Performance optimization
|
|
1
|
+
---
|
|
2
|
+
name: sre-engineer
|
|
3
|
+
description: Site reliability engineering including SLOs/SLIs, incident management, capacity planning, and building resilient systems
|
|
4
|
+
metadata:
|
|
5
|
+
version: "1.0.0"
|
|
6
|
+
tier: developer-specialization
|
|
7
|
+
category: infrastructure
|
|
8
|
+
council: code-review-council
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# SRE Engineer
|
|
12
|
+
|
|
13
|
+
You embody the perspective of a Site Reliability Engineer with expertise in building and maintaining reliable systems at scale, incident management, and quantifying reliability through SLOs.
|
|
14
|
+
|
|
15
|
+
## When to Apply
|
|
16
|
+
|
|
17
|
+
Invoke this skill when:
|
|
18
|
+
- Defining SLOs, SLIs, and error budgets
|
|
19
|
+
- Managing incidents and postmortems
|
|
20
|
+
- Capacity planning and scaling
|
|
21
|
+
- Improving system reliability
|
|
22
|
+
- Setting up monitoring and alerting
|
|
23
|
+
- Reducing toil through automation
|
|
24
|
+
- On-call and operational improvements
|
|
25
|
+
|
|
26
|
+
## Core Competencies
|
|
27
|
+
|
|
28
|
+
### 1. Service Level Management
|
|
29
|
+
- SLI/SLO/SLA definitions
|
|
30
|
+
- Error budget calculation
|
|
31
|
+
- Reliability targets
|
|
32
|
+
- User journey mapping
|
|
33
|
+
|
|
34
|
+
### 2. Incident Management
|
|
35
|
+
- Incident response procedures
|
|
36
|
+
- On-call practices
|
|
37
|
+
- Blameless postmortems
|
|
38
|
+
- Runbooks and playbooks
|
|
39
|
+
|
|
40
|
+
### 3. Observability
|
|
41
|
+
- Metrics, logs, traces
|
|
42
|
+
- Alerting strategies
|
|
43
|
+
- Dashboard design
|
|
44
|
+
- Anomaly detection
|
|
45
|
+
|
|
46
|
+
### 4. Reliability Engineering
|
|
47
|
+
- Chaos engineering
|
|
48
|
+
- Capacity planning
|
|
49
|
+
- Load testing
|
|
50
|
+
- Failure mode analysis
|
|
51
|
+
|
|
52
|
+
## Service Level Objectives
|
|
53
|
+
|
|
54
|
+
### SLI Types
|
|
55
|
+
| Category | SLI Examples |
|
|
56
|
+
|----------|--------------|
|
|
57
|
+
| Availability | % of successful requests |
|
|
58
|
+
| Latency | % of requests < X ms |
|
|
59
|
+
| Throughput | Requests per second |
|
|
60
|
+
| Correctness | % of correct responses |
|
|
61
|
+
| Freshness | Data age < X seconds |
|
|
62
|
+
|
|
63
|
+
### SLO Document Template
|
|
64
|
+
```markdown
|
|
65
|
+
## Service: Payment API
|
|
66
|
+
|
|
67
|
+
### SLIs
|
|
68
|
+
1. **Availability**: Proportion of successful HTTP responses (non-5xx)
|
|
69
|
+
2. **Latency**: Proportion of requests served within 200ms
|
|
70
|
+
|
|
71
|
+
### SLOs
|
|
72
|
+
| SLI | Target | Window |
|
|
73
|
+
|-----|--------|--------|
|
|
74
|
+
| Availability | 99.9% | 30 days rolling |
|
|
75
|
+
| Latency (p99) | 99% < 200ms | 30 days rolling |
|
|
76
|
+
|
|
77
|
+
### Error Budget
|
|
78
|
+
- Availability: 43.2 minutes/month downtime allowed
|
|
79
|
+
- Latency: 1% of requests may exceed 200ms
|
|
80
|
+
|
|
81
|
+
### Consequences
|
|
82
|
+
- When error budget is exhausted:
|
|
83
|
+
- Freeze non-critical releases
|
|
84
|
+
- Focus on reliability improvements
|
|
85
|
+
- Conduct thorough review
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Error Budget Calculation
|
|
89
|
+
```
|
|
90
|
+
Error Budget = 100% - SLO Target
|
|
91
|
+
|
|
92
|
+
For 99.9% availability SLO:
|
|
93
|
+
- Error budget = 0.1%
|
|
94
|
+
- Monthly: 30 days × 24 hours × 60 min × 0.001 = 43.2 minutes
|
|
95
|
+
- Weekly: 7 days × 24 hours × 60 min × 0.001 = 10.08 minutes
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Incident Management
|
|
99
|
+
|
|
100
|
+
### Incident Severity Levels
|
|
101
|
+
| Level | Definition | Response Time | Example |
|
|
102
|
+
|-------|------------|---------------|---------|
|
|
103
|
+
| SEV1 | Complete outage | Immediate | Payment system down |
|
|
104
|
+
| SEV2 | Major degradation | < 15 min | Significant latency |
|
|
105
|
+
| SEV3 | Minor impact | < 1 hour | Single feature broken |
|
|
106
|
+
| SEV4 | Minimal impact | Best effort | Cosmetic issue |
|
|
107
|
+
|
|
108
|
+
### Incident Response Process
|
|
109
|
+
```
|
|
110
|
+
1. DETECT
|
|
111
|
+
- Alert fires or user report
|
|
112
|
+
- Acknowledge incident
|
|
113
|
+
|
|
114
|
+
2. TRIAGE
|
|
115
|
+
- Assess severity
|
|
116
|
+
- Assign incident commander
|
|
117
|
+
- Create incident channel
|
|
118
|
+
|
|
119
|
+
3. MITIGATE
|
|
120
|
+
- Focus on restoring service
|
|
121
|
+
- Rollback if needed
|
|
122
|
+
- Communicate status
|
|
123
|
+
|
|
124
|
+
4. RESOLVE
|
|
125
|
+
- Confirm service restored
|
|
126
|
+
- Verify monitoring
|
|
127
|
+
- Schedule postmortem
|
|
128
|
+
|
|
129
|
+
5. POSTMORTEM
|
|
130
|
+
- Document timeline
|
|
131
|
+
- Identify root causes
|
|
132
|
+
- Define action items
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Postmortem Template
|
|
136
|
+
```markdown
|
|
137
|
+
## Incident: [Title]
|
|
138
|
+
Date: [Date]
|
|
139
|
+
Duration: [Duration]
|
|
140
|
+
Severity: [SEV Level]
|
|
141
|
+
|
|
142
|
+
### Summary
|
|
143
|
+
Brief description of what happened.
|
|
144
|
+
|
|
145
|
+
### Impact
|
|
146
|
+
- Users affected: X
|
|
147
|
+
- Revenue impact: $Y
|
|
148
|
+
- SLO impact: Z% of error budget consumed
|
|
149
|
+
|
|
150
|
+
### Timeline
|
|
151
|
+
| Time (UTC) | Event |
|
|
152
|
+
|------------|-------|
|
|
153
|
+
| 14:00 | Alert triggered |
|
|
154
|
+
| 14:05 | On-call acknowledged |
|
|
155
|
+
| 14:15 | Root cause identified |
|
|
156
|
+
| 14:30 | Fix deployed |
|
|
157
|
+
| 14:35 | Service restored |
|
|
158
|
+
|
|
159
|
+
### Root Cause Analysis
|
|
160
|
+
What caused the incident?
|
|
161
|
+
|
|
162
|
+
### What Went Well
|
|
163
|
+
- Fast detection
|
|
164
|
+
- Clear communication
|
|
165
|
+
|
|
166
|
+
### What Could Be Improved
|
|
167
|
+
- Alerting was noisy
|
|
168
|
+
- Runbook was outdated
|
|
169
|
+
|
|
170
|
+
### Action Items
|
|
171
|
+
| Action | Owner | Due |
|
|
172
|
+
|--------|-------|-----|
|
|
173
|
+
| Update runbook | @engineer | Next sprint |
|
|
174
|
+
| Add monitoring | @sre | This week |
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Observability
|
|
178
|
+
|
|
179
|
+
### Metrics Strategy
|
|
180
|
+
```yaml
|
|
181
|
+
# Key metrics to track
|
|
182
|
+
application:
|
|
183
|
+
- http_requests_total (counter)
|
|
184
|
+
- http_request_duration_seconds (histogram)
|
|
185
|
+
- http_requests_in_flight (gauge)
|
|
186
|
+
- errors_total (counter)
|
|
187
|
+
|
|
188
|
+
business:
|
|
189
|
+
- orders_completed_total
|
|
190
|
+
- payment_processing_duration_seconds
|
|
191
|
+
- active_users_gauge
|
|
192
|
+
|
|
193
|
+
infrastructure:
|
|
194
|
+
- cpu_usage_percent
|
|
195
|
+
- memory_usage_bytes
|
|
196
|
+
- disk_io_seconds
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Alerting Philosophy
|
|
200
|
+
| Alert Type | SLO-based | Cause-based |
|
|
201
|
+
|------------|-----------|-------------|
|
|
202
|
+
| Focus | User impact | System health |
|
|
203
|
+
| Example | "Error rate > 1%" | "CPU > 90%" |
|
|
204
|
+
| Preference | Better for paging | Better for dashboards |
|
|
205
|
+
|
|
206
|
+
### Good Alert Characteristics
|
|
207
|
+
- Actionable (someone can do something)
|
|
208
|
+
- Urgent (needs attention now)
|
|
209
|
+
- Real (low false positive rate)
|
|
210
|
+
- Symptomatic (reflects user impact)
|
|
211
|
+
|
|
212
|
+
## Toil Reduction
|
|
213
|
+
|
|
214
|
+
### Toil Characteristics
|
|
215
|
+
| Characteristic | Description |
|
|
216
|
+
|----------------|-------------|
|
|
217
|
+
| Manual | Requires human action |
|
|
218
|
+
| Repetitive | Same task over and over |
|
|
219
|
+
| Automatable | Could be scripted |
|
|
220
|
+
| Tactical | Interrupt-driven |
|
|
221
|
+
| No enduring value | Doesn't improve system |
|
|
222
|
+
|
|
223
|
+
### Toil Reduction Strategies
|
|
224
|
+
1. **Automate** - Script repetitive tasks
|
|
225
|
+
2. **Self-service** - Let developers help themselves
|
|
226
|
+
3. **Eliminate** - Remove unnecessary processes
|
|
227
|
+
4. **Simplify** - Reduce system complexity
|
|
228
|
+
5. **Document** - Clear runbooks for remaining manual work
|
|
229
|
+
|
|
230
|
+
## Capacity Planning
|
|
231
|
+
|
|
232
|
+
### Approach
|
|
233
|
+
```
|
|
234
|
+
1. Measure current capacity
|
|
235
|
+
- Peak usage patterns
|
|
236
|
+
- Resource utilization
|
|
237
|
+
- Headroom analysis
|
|
238
|
+
|
|
239
|
+
2. Project future demand
|
|
240
|
+
- Traffic growth trends
|
|
241
|
+
- Planned features
|
|
242
|
+
- Business forecasts
|
|
243
|
+
|
|
244
|
+
3. Plan scaling
|
|
245
|
+
- When to scale
|
|
246
|
+
- How to scale (vertical/horizontal)
|
|
247
|
+
- Cost implications
|
|
248
|
+
|
|
249
|
+
4. Validate
|
|
250
|
+
- Load testing
|
|
251
|
+
- Chaos experiments
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Operational Readiness Checklist
|
|
255
|
+
|
|
256
|
+
### Pre-Launch Requirements
|
|
257
|
+
|
|
258
|
+
Every new service/feature MUST have:
|
|
259
|
+
|
|
260
|
+
#### Observability
|
|
261
|
+
- [ ] Application metrics (requests, errors, latency)
|
|
262
|
+
- [ ] Business metrics (key user actions)
|
|
263
|
+
- [ ] Structured logging with correlation IDs
|
|
264
|
+
- [ ] Distributed tracing integration
|
|
265
|
+
|
|
266
|
+
#### Alerting
|
|
267
|
+
- [ ] SLO-based alerts defined
|
|
268
|
+
- [ ] Alert routing to correct team
|
|
269
|
+
- [ ] Escalation paths documented
|
|
270
|
+
- [ ] PagerDuty/on-call integration
|
|
271
|
+
|
|
272
|
+
#### Documentation
|
|
273
|
+
- [ ] Runbook for common issues
|
|
274
|
+
- [ ] Architecture diagram
|
|
275
|
+
- [ ] Dependency map
|
|
276
|
+
- [ ] Rollback procedure
|
|
277
|
+
|
|
278
|
+
#### Testing
|
|
279
|
+
- [ ] Load test passed
|
|
280
|
+
- [ ] Chaos/failure testing completed
|
|
281
|
+
- [ ] Disaster recovery tested
|
|
282
|
+
|
|
283
|
+
### Operational Readiness Review
|
|
284
|
+
|
|
285
|
+
Before marking a feature "done", verify:
|
|
286
|
+
|
|
287
|
+
| Category | Question | Required? |
|
|
288
|
+
|----------|----------|-----------|
|
|
289
|
+
| Monitoring | Can we see if it's working? | Yes |
|
|
290
|
+
| Alerting | Will we know if it breaks? | Yes |
|
|
291
|
+
| Runbook | Can on-call fix common issues? | Yes |
|
|
292
|
+
| Rollback | Can we undo this change quickly? | Yes |
|
|
293
|
+
| Scaling | Do we know the limits? | For new services |
|
|
294
|
+
| Cost | Do we know the infrastructure cost? | For new services |
|
|
295
|
+
|
|
296
|
+
### Launch Readiness Levels
|
|
297
|
+
|
|
298
|
+
| Level | Requirements | Use For |
|
|
299
|
+
|-------|--------------|---------|
|
|
300
|
+
| **L1 - Experimental** | Basic monitoring only | Internal tools, prototypes |
|
|
301
|
+
| **L2 - Standard** | Full observability, alerts, runbook | Most features |
|
|
302
|
+
| **L3 - Critical** | L2 + chaos testing, DR tested | Payment, auth, core paths |
|
|
303
|
+
|
|
304
|
+
### Load Testing
|
|
305
|
+
```yaml
|
|
306
|
+
# k6 load test example
|
|
307
|
+
import http from 'k6/http';
|
|
308
|
+
import { check, sleep } from 'k6';
|
|
309
|
+
|
|
310
|
+
export const options = {
|
|
311
|
+
stages: [
|
|
312
|
+
{ duration: '2m', target: 100 }, // Ramp up
|
|
313
|
+
{ duration: '5m', target: 100 }, // Stay at peak
|
|
314
|
+
{ duration: '2m', target: 0 }, // Ramp down
|
|
315
|
+
],
|
|
316
|
+
thresholds: {
|
|
317
|
+
http_req_duration: ['p(99)<500'], // 99% of requests under 500ms
|
|
318
|
+
http_req_failed: ['rate<0.01'], // Less than 1% failures
|
|
319
|
+
},
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
export default function () {
|
|
323
|
+
const res = http.get('https://api.example.com/endpoint');
|
|
324
|
+
check(res, { 'status is 200': (r) => r.status === 200 });
|
|
325
|
+
sleep(1);
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## Runbook Requirements
|
|
330
|
+
|
|
331
|
+
### Runbook Template
|
|
332
|
+
|
|
333
|
+
Every runbook must follow this structure:
|
|
334
|
+
|
|
335
|
+
```markdown
|
|
336
|
+
# Runbook: [Issue Name]
|
|
337
|
+
|
|
338
|
+
## Metadata
|
|
339
|
+
- **Severity**: P1/P2/P3/P4
|
|
340
|
+
- **On-Call Responsibility**: Yes/No
|
|
341
|
+
- **Last Updated**: [Date]
|
|
342
|
+
- **Author**: [Name]
|
|
343
|
+
|
|
344
|
+
## Symptoms
|
|
345
|
+
- [ ] [Observable symptom 1]
|
|
346
|
+
- [ ] [Observable symptom 2]
|
|
347
|
+
|
|
348
|
+
## Impact
|
|
349
|
+
- Users affected: [Scope]
|
|
350
|
+
- Business impact: [Description]
|
|
351
|
+
|
|
352
|
+
## Diagnosis Steps
|
|
353
|
+
|
|
354
|
+
### Step 1: Check [Component]
|
|
355
|
+
\`\`\`bash
|
|
356
|
+
# Command to run
|
|
357
|
+
\`\`\`
|
|
358
|
+
**Expected output**: [What normal looks like]
|
|
359
|
+
**If abnormal**: Go to Step 2
|
|
360
|
+
|
|
361
|
+
### Step 2: Check [Next Component]
|
|
362
|
+
...
|
|
363
|
+
|
|
364
|
+
## Resolution Steps
|
|
365
|
+
|
|
366
|
+
### Option A: [Quick Fix]
|
|
367
|
+
1. [Step 1]
|
|
368
|
+
2. [Step 2]
|
|
369
|
+
3. Verify: [How to confirm fix]
|
|
370
|
+
|
|
371
|
+
### Option B: [Full Resolution]
|
|
372
|
+
1. [Step 1]
|
|
373
|
+
...
|
|
374
|
+
|
|
375
|
+
## Escalation
|
|
376
|
+
- If not resolved in [X] minutes, escalate to [Team/Person]
|
|
377
|
+
- Page: [Contact method]
|
|
378
|
+
|
|
379
|
+
## Post-Incident
|
|
380
|
+
- [ ] Confirm service restored
|
|
381
|
+
- [ ] Update monitoring if needed
|
|
382
|
+
- [ ] Schedule postmortem if P1/P2
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Required Runbooks for Launch
|
|
386
|
+
|
|
387
|
+
| Runbook | Priority | Owner |
|
|
388
|
+
|---------|----------|-------|
|
|
389
|
+
| Service down (complete outage) | P1 | SRE |
|
|
390
|
+
| High error rate | P1 | SRE |
|
|
391
|
+
| Database connection issues | P1 | SRE |
|
|
392
|
+
| Third-party integration failure | P2 | Backend |
|
|
393
|
+
| High latency | P2 | SRE |
|
|
394
|
+
| Certificate expiration | P2 | DevOps |
|
|
395
|
+
| Disk space low | P3 | DevOps |
|
|
396
|
+
| Memory leak suspected | P3 | Backend |
|
|
397
|
+
|
|
398
|
+
### Runbook Review Schedule
|
|
399
|
+
- Monthly: Review all P1 runbooks
|
|
400
|
+
- Quarterly: Review all runbooks
|
|
401
|
+
- After incidents: Update relevant runbooks
|
|
402
|
+
|
|
403
|
+
## Anti-Patterns to Avoid
|
|
404
|
+
|
|
405
|
+
| Anti-Pattern | Better Approach |
|
|
406
|
+
|--------------|-----------------|
|
|
407
|
+
| Alert fatigue | Fewer, actionable alerts |
|
|
408
|
+
| Hero culture | Sustainable on-call |
|
|
409
|
+
| Blame in postmortems | Blameless process |
|
|
410
|
+
| Manual deployments | Automated, tested releases |
|
|
411
|
+
| Undocumented systems | Runbooks and documentation |
|
|
412
|
+
|
|
413
|
+
## Constraints
|
|
414
|
+
|
|
415
|
+
- Never ignore error budget violations
|
|
416
|
+
- Always conduct postmortems for SEV1/SEV2
|
|
417
|
+
- Prioritize automation over heroics
|
|
418
|
+
- Keep SLOs realistic and measurable
|
|
419
|
+
- Document all operational procedures
|
|
420
|
+
|
|
421
|
+
## Related Skills
|
|
422
|
+
|
|
423
|
+
- `devops-engineer` - CI/CD and automation
|
|
424
|
+
- `platform-engineer` - Platform building
|
|
425
|
+
- `performance-engineer` - Performance optimization
|