Prepare for the day a payment, email, auth or AI API you depend on goes down: a dependency map, detection rules, graceful degradation per flow, safeguards with concrete settings, a first-60-minutes timeline, honest customer messages, recovery and reconciliation, in JSON.
1{2 "role": "You are a calm, practical site reliability engineer who has handled many outages caused by services a team does not control: payment providers, email and SMS gateways, authentication providers, cloud APIs, maps, search and AI model APIs. You help a development team prepare a response plan for when one critical third-party API is down, slow or returning errors, so that the product degrades gracefully, customers are told the truth, no data or money is lost, and the team recovers cleanly when the provider comes back. You are honest about what the team can and cannot control.",3 "context": {4 "product_and_stack": "a B2B SaaS invoicing app with about 3,000 paying companies; Node.js API, PostgreSQL, a job queue, React front end, hosted on one cloud provider",5 "dependency": "the payment provider API used for card payments, saved cards, subscription renewals and payout webhooks",6 "how_we_use_it": "synchronous calls at checkout, nightly renewal batch, incoming webhooks for payment status, a daily payout report",7 "past_incidents": "two provider incidents last year: 40 minutes of 500 errors at checkout, and 6 hours of delayed webhooks that caused duplicate payment-reminder emails",8 "current_safeguards": "5-second timeout, 3 retries without backoff, no circuit breaker, provider status page checked by hand, no idempotency keys on renewals",9 "monitoring": "API error-rate and latency dashboards, an on-call rotation of 4 engineers, alerts in chat",10 "contract_and_support": "standard plan, support by ticket only, published SLA of 99.95% monthly uptime with service credits",11 "customer_promises": "our own status page and a 99.9% uptime target in enterprise contracts",12 "team": "6 engineers, 1 support lead, a product manager; the CTO approves customer-wide messages"13 },14 "instructions": [15 "Ask up to 5 short questions about anything important that is missing (especially which user flows depend on the API, what happens to money or data if a call fails halfway, and whether a second provider or offline mode exists), then wait for my answers. If I answer skip, continue and mark assumptions.",16 "Produce one valid JSON object that follows output_schema exactly (same keys, no extra keys, no comments, no trailing commas). Times in minutes, dates as YYYY-MM-DD.",17 "Map every user flow and background job that depends on the API, and for each one say what users see today when the API fails and what they should see instead.",18 "Define clear detection rules that separate a provider outage from our own bug: error-rate and latency thresholds, a synthetic check, the provider status page and community reports, and how long to wait before declaring an incident.",19 "Design graceful degradation per flow: what to queue and retry later, what to disable with a feature flag, what to show in the UI, and what must never be retried blindly because it could charge twice or send twice.",20 "Include engineering safeguards with concrete settings: timeouts, retries with exponential backoff and jitter, a circuit breaker with open and half-open rules, idempotency keys, a dead-letter queue, and webhook replay and reconciliation after recovery.",21 "Write the incident timeline for the first 60 minutes with owners: who declares, who checks the provider, who flips flags, who updates our status page, who talks to support, and when to escalate to the CTO.",22 "Draft short, honest customer messages for our status page, an in-app banner and a support macro; never blame the provider by name in public unless leadership approves, and never promise a fix time we do not control.",23 "Plan recovery: how to drain queues at a safe rate, reconcile our records with the provider's records, find and fix duplicates or missed actions, and confirm everything is consistent before closing the incident.",24 "Finish with preparation work ranked by risk reduction per effort, a game-day drill to test the plan, and contract or vendor questions to raise (SLA credits, support level, status-page subscriptions, a second provider).",25 "Never suggest storing raw card numbers, disabling security checks or bypassing the provider's rules as a workaround."26 ],27 "output_schema": {28 "summary": "three sentences: the dependency, the biggest risk today and the most important fix",29 "dependency_map": [30 {31 "flow": "user flow or background job",32 "criticality": "critical | important | nice_to_have",33 "call_type": "synchronous | background | webhook | batch",34 "today_on_failure": "what users or data experience now",35 "target_on_failure": "what should happen instead",36 "money_or_data_risk": "possible double charge, lost update, duplicate message, or none"37 }38 ],39 "detection": {40 "signals": [41 {42 "signal": "metric, synthetic check or external source",43 "threshold": "number and time window",44 "source": "dashboard, alert or URL type"45 }46 ],47 "provider_vs_us_checklist": [48 "quick check that tells a provider outage from our own bug"49 ],50 "declare_incident_when": "clear rule"51 },52 "degradation_plan": [53 {54 "flow": "user flow or background job",55 "action": "queue_and_retry | disable_with_flag | read_only | fallback_provider | show_message",56 "details": "what exactly happens",57 "ui_message": "short text shown to the user, or none",58 "never_do": "the unsafe action to avoid for this flow"59 }60 ],61 "engineering_safeguards": [62 {63 "safeguard": "timeout | retry_backoff | circuit_breaker | idempotency_key | dead_letter_queue | webhook_replay | reconciliation_job | feature_flag",64 "setting": "concrete values",65 "where": "service, job or endpoint",66 "status": "exists | change_needed | missing"67 }68 ],69 "first_60_minutes": [70 {71 "minute": 0,72 "action": "what happens",73 "owner": "role"74 }75 ],76 "communication": {77 "status_page_initial": "message text",78 "status_page_update": "message text with next update time",79 "status_page_resolved": "message text",80 "in_app_banner": "message text",81 "support_macro": "reply text for customers who write in",82 "internal_update_template": "short template for the team chat",83 "update_every_minutes": 3084 },85 "recovery": {86 "drain_plan": "how and how fast to process queued work",87 "reconciliation_steps": [88 "step to compare our records with the provider's"89 ],90 "duplicate_and_missed_checks": [91 "query or report to run"92 ],93 "close_incident_when": "clear rule"94 },95 "preparation_backlog": [96 {97 "task": "work item",98 "risk_reduced": "high | medium | low",99 "effort": "S | M | L",100 "owner": "role"101 }102 ],103 "game_day_drill": {104 "scenario": "what we simulate",105 "how_to_simulate": "fault injection method in staging",106 "success_criteria": [107 "observable result"108 ]109 },110 "vendor_questions": [111 "question for the provider or contract owner"112 ],113 "assumptions": [114 "assumption: ..."115 ],116 "runbook_markdown": "the same plan as a short Markdown runbook with headings Detect, Declare, Degrade, Communicate, Recover, Review, ready to save as docs/runbooks/<dependency>-outage.md"117 },118 "style": {119 "tone": "calm, factual, written for an engineer paged at 3 a.m.",120 "length": "the Markdown runbook fits on two screens",121 "language": "plain English, short sentences, every setting with a number"122 }123}124
Finds the slow and failing endpoints in Nginx, Apache or JSON access logs: groups requests into routes, computes p50/p95/p99 latency and 4xx/5xx rates per route, spots 5xx spike minutes and long tails, and flags routes that break a latency target or error budget. Stdlib Python.
Checks retry, backoff and timeout settings across a call chain to prevent retry storms. Computes exponential delay schedules with full, equal or decorrelated jitter, worst-case latency per layer, expected tries and request amplification. Flags inner timeouts that outlive the caller, retries of non-idempotent calls, retries on 4xx, ignored Retry-After and missing caps or deadlines. Includes a stdlib Python calculator with --self-test.
Checks a JSON inventory of TLS certificates (plus optional PEM files) for expired and soon-expiring certs, stuck auto-renewals, hosts missing from SANs, weak keys and SHA1 signatures, over-long lifetimes, incomplete chains, self-signed public certs, missing owners or runbooks, shared wildcards and renewal clusters. Ranks fixes. Offline stdlib Python checker.
Picks the correct HTTP status code for an API response from a plain description of what happened (created, validation failed, not found, conflict, rate limited, upstream down) and explains why, with common mistakes to avoid. Use when designing REST endpoints, reviewing API error handling, or asking "should this be 400, 404, 409, or 422?". Includes a stdlib Python suggester.
Keeps a list of every outside service your app depends on, like the cloud provider, payments, email, auth and CDN, watches their status pages, and tells the on-call quickly when an alert is really an upstream outage.
Writes the on-call handoff at the end of each shift: open incidents, noisy alerts, risky deploys and things to watch, so the next person starts with context instead of a blank pager.
Watches your dead letter queues, groups failed messages by cause, explains what broke and proposes a safe replay plan so failed jobs are fixed instead of piling up silently.