/polymath-sre:slo-designfrom polymath-sre
Design an SLO — pick the right SLI per critical user journey, set the threshold by the 28-day error-budget arithmetic, document the measurement.
Ships in polymath-sre. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Design one SLO per critical user journey. Output is the SLI, threshold, measurement window, and the burn-rate alert structure.
Mode: analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked [TBD] or [VERIFY], never filled in.
[VERIFY].[VERIFY: baseline], never presented as measured.Identify the critical user journey (CUJ). Not the service — the journey. "User opens checkout, sees totals within 1s" is a CUJ; "API responds with 200" is not.
Pick the SLI for that journey. Two flavors usually suffice:
successful_requests / total_requests within the journey.requests_under_X_ms / total_requests within the journey.
"Success" must be defined precisely — does 5xx count as failure? Does 429? Does a 200 with empty body count as success? Document.Pick the threshold:
Measurement window — 28 days rolling is the default. Long enough to absorb a bad day; short enough to be actionable.
Error budget arithmetic — run the bundled script, never compute by hand. It prints the budget and the burn-rate table for any SLO and window:
python3 "${POLYMATH_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/skills/slo-design/scripts/error-budget.py" --slo 99.5 --window-days 28
Reference values it reproduces (28 days = 40,320 minutes; budget = (1 − SLO) × window):
Burn-rate alerts — Google SRE workbook's multi-window, multi-burn-rate shape. Each alert fires only when both its long and short window exceed the rate (the short window makes it reset quickly once the burn stops):
| Long window | Short window | Budget consumed | Burn rate (30d / 28d) | Severity |
|---|---|---|---|---|
| 1h | 5m | 2% | 14.4× / 13.44× | page |
| 6h | 30m | 5% | 6× / 5.6× | page |
| 3d | 6h | 10% | 1× / 0.93× | ticket |
burn rate = budget fraction × window hours ÷ long-window hours (the script computes it for your window). Using the workbook's 30-day numbers on a 28-day SLO is fine if you say so; don't invent thresholds.
SLO: refund-creation latency
Critical user journey:
User triggers a refund from order details; refund record created in our DB.
SLI:
fraction of POST /v1/orders/{id}/refunds requests returning 201 within 500ms,
excluding 4xx (counted as success) and 5xx (counted as failure).
SLO:
99.5% of refund-creation requests succeed within 500ms over a 28-day
rolling window.
Error budget:
0.5% × 40,320 min = 201.6 min = 3h 21m 36s per 28d.
Burn-rate alerts (28d rates):
- 1h & 5m windows @ 13.44× burn → page payments oncall
- 6h & 30m windows @ 5.6× burn → page payments oncall
- 3d & 6h windows @ 0.93× burn → ticket to payments team
Where measured:
Prometheus rule `slo_refund_latency_success_rate` (defined in
monitoring/refund-slo.yaml).
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
6 skills in this plugin
/capacity-planTurn a demand projection into a capacity plan — constrained resource, headroom date, scaling triggers, and cost; not forecasting the demand itself (demand-forecast)./chaos-experimentDesign a chaos experiment — hypothesis, blast radius, abort criteria, observation, rollback; small-radius first./demand-forecastModel capacity demand — growth (linear/compound/seasonal), translate to resource needs + headroom, and flag the lead time before a saturation breach.npx claudepluginhub mohammadbafkar/polymath --plugin polymath-sre