brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
twinmind-incident-runbookIncident response procedures for TwinMind integration failures. Use when experiencing outages, debugging production issues, or responding to alerts related to TwinMind. Trigger with phrases like "twinmind incident", "twinmind outage", "twinmind down", "twinmind emergency", "twinmind runbook".
Independent GitHub snapshot · Automated classification · Original documentation governs
Procedures for diagnosing and resolving TwinMind integration incidents.
| Severity | Description | Response Time | Examples |
|---|---|---|---|
| P1 - Critical | Complete service outage | 15 minutes | All transcriptions failing |
| P2 - High | Major feature degraded | 1 hour | Summaries not generating |
| P3 - Medium | Minor functionality impacted | 4 hours | Slow transcription |
| P4 - Low | Cosmetic or edge case | 24 hours | Occasional timeout |
## Incident Response - First 5 Minutes
### 1. Acknowledge Alert
- [ ] Acknowledge in PagerDuty/Opsgenie
- [ ] Join incident Slack channel
- [ ] Note start time: __________
### 2. Quick Health Check
- [ ] Check TwinMind status page: https://status.twinmind.com
- [ ] Check our service health endpoint
- [ ] Check recent deployments
- [ ] Check infrastructure status
### 3. Initial Assessment
- [ ] Identify affected functionality
- [ ] Estimate user impact
- [ ] Classify severity (P1/P2/P3/P4)
### 4. Communication
- [ ] Update status page (if P1/P2)
- [ ] Notify stakeholders
- [ ] Create incident ticket
# Quick health check
curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: Bearer $TWINMIND_API_KEY" \
https://api.twinmind.com/v1/health
# Detailed health check
curl -s -H "Authorization: Bearer $TWINMIND_API_KEY" \
https://api.twinmind.com/v1/health | jq
# Check status page API
curl -s https://status.twinmind.com/api/v2/status.json | jq '.status'
# Application health
curl -s http://localhost:8080/health | jq
# TwinMind-specific health
curl -s http://localhost:8080/health/twinmind | jq
# Check recent errors in logs
kubectl logs -l app=twinmind-service --tail=100 | grep -i error
# Check metrics endpoint
curl -s http://localhost:8080/metrics | grep twinmind_errors
# Get current rate limit status
curl -I -H "Authorization: Bearer $TWINMIND_API_KEY" \
https://api.twinmind.com/v1/health 2>/dev/null | grep -i ratelimit
# Check our rate limit tracking
curl -s http://localhost:8080/metrics | grep rate_limit
Symptoms:
twinmind_transcriptions_total{status="error"} spikingDiagnosis Steps:
# 1. Check TwinMind API availability
curl -v -H "Authorization: Bearer $TWINMIND_API_KEY" \
https://api.twinmind.com/v1/health
# 2. Check error types in logs
kubectl logs -l app=twinmind-service --tail=200 | \
grep -E "(error|Error|ERROR)" | \
awk '{print $NF}' | sort | uniq -c | sort -rn
# 3. Test a simple transcription
curl -X POST \
-H "Authorization: Bearer $TWINMIND_API_KEY" \
-H "Content-Type: application/json" \
-d '{"audio_url":"https://example.com/test.mp3"}' \
https://api.twinmind.com/v1/transcribe
# 4. Check if specific to our API key
# Try with a different key if available
Resolution Steps:
If TwinMind API is down:
If our API key is invalid:
If network issue:
Symptoms:
twinmind_api_latency_seconds histogram showing high valuesDiagnosis Steps:
# 1. Check latency metrics
curl -s http://localhost:8080/metrics | \
grep twinmind_api_latency
# 2. Check for queuing
curl -s http://localhost:8080/metrics | \
grep queue
# 3. Check TwinMind processing times
# Look at recent transcription durations
curl -s http://localhost:8080/metrics | \
grep twinmind_transcription_duration
# 4. Check resource usage
kubectl top pods -l app=twinmind-service
Resolution Steps:
If TwinMind is slow:
If our service is overloaded:
If network latency:
Symptoms:
twinmind_errors_total{error_type="RATE_LIMITED"} > 0Diagnosis Steps:
# 1. Check current rate limit status
curl -I -H "Authorization: Bearer $TWINMIND_API_KEY" \
https://api.twinmind.com/v1/health 2>/dev/null | grep -i ratelimit
# 2. Check request volume
curl -s http://localhost:8080/metrics | \
grep twinmind_api_requests_total
# 3. Identify heavy consumers
kubectl logs -l app=twinmind-service --tail=1000 | \
grep -i "transcribe" | \
awk '{print $4}' | sort | uniq -c | sort -rn | head -20
Resolution Steps:
Immediate:
Short-term:
Long-term:
Symptoms:
Diagnosis Steps:
# 1. Verify API key is set
echo $TWINMIND_API_KEY | head -c 20
# 2. Test API key directly
curl -H "Authorization: Bearer $TWINMIND_API_KEY" \
https://api.twinmind.com/v1/me
# 3. Check if key was rotated
# Check TwinMind dashboard for key history
# 4. Verify secrets manager
aws secretsmanager get-secret-value --secret-id twinmind-api-key | jq
Resolution Steps:
If key expired/revoked:
If key leaked:
Level 1: On-Call Engineer (0-15 min)
↓
Level 2: Team Lead (15-30 min)
↓
Level 3: Engineering Manager (30-60 min)
↓
Level 4: VP Engineering (60+ min)
## Post-Incident Review
### Immediate (Within 24 hours)
- [ ] Confirm issue fully resolved
- [ ] Update status page to resolved
- [ ] Notify stakeholders of resolution
- [ ] Document timeline in incident ticket
### Follow-up (Within 1 week)
- [ ] Schedule post-mortem meeting
- [ ] Write incident report
- [ ] Identify root cause
- [ ] Create action items
- [ ] Update runbook if needed
### Long-term
- [ ] Implement preventive measures
- [ ] Update monitoring/alerting
- [ ] Share learnings with team
- [ ] Update documentation
# Incident Report: [TITLE]
**Date:** YYYY-MM-DD
**Duration:** HH:MM - HH:MM (X hours Y minutes)
**Severity:** P1/P2/P3/P4
**Impact:** [Number of affected users/requests]
## Summary
[Brief description of what happened]
## Timeline
- HH:MM - Alert triggered
- HH:MM - On-call acknowledged
- HH:MM - [Key actions taken]
- HH:MM - Issue resolved
## Root Cause
[Detailed explanation of why the incident occurred]
## Resolution
[How the issue was fixed]
## Action Items
- [ ] [Preventive measure 1]
- [ ] [Monitoring improvement]
- [ ] [Documentation update]
## Lessons Learned
[Key takeaways for the team]
For data handling procedures, see twinmind-data-handling.