incident-response
Creates incident runbooks, post-mortem templates and incident records. Use when preparing for incidents, handling a live one or reviewing one afterward.
- License 许可
- MIT
- 所属仓库
- vibbs/company-os
- 最近更新
- 2026-10-21
- Stars
- ★ 6
- Forks
- 2
01 前言 Front Matter
- name
- incident-response
- runtimes
- { "claude": { "user-invocable": true } }
- description
- Creates incident runbooks, post-mortem templates and incident records. Use when preparing for incidents, handling a live one or reviewing one afterward.
02 资源文件 23
- 参考文档AgentPersonalities.md44.8 KB
- 参考文档AgentProfileSystem.md7.4 KB
- 参考文档ArchitectContext.md2.1 KB
- 参考文档ArtistContext.md2.2 KB
- 参考文档ClaudeResearcherContext.md2.6 KB
- 参考文档CodexResearcherContext.md3.3 KB
- 参考文档Data/Traits.yaml30.2 KB
- 参考文档DesignerContext.md2.3 KB
- 参考文档EngineerContext.md2.0 KB
- 参考文档GeminiResearcherContext.md3.1 KB
- 参考文档GrokResearcherContext.md2.9 KB
- 参考文档QATesterContext.md2.7 KB
- 参考文档REDESIGN-SUMMARY.md4.1 KB
- 参考文档Scratchpad/sparkline-color-analysis.md12.4 KB
- 其他Templates/DynamicAgent.hbs1.7 KB
- 脚本Tools/AgentFactory.ts13.3 KB
- 其他Tools/bun.lock1.5 KB
- 脚本Tools/LoadAgentContext.ts3.4 KB
- 参考文档Tools/package.json216 B
- 脚本Tools/SpawnAgentWithProfile.ts2.4 KB
- 参考文档Workflows/CreateCustomAgent.md8.2 KB
- 参考文档Workflows/ListTraits.md5.9 KB
- 参考文档Workflows/SpawnParallelAgents.md9.2 KB
03 SKILL.md 正文
Incident Response
Reference
- ID: S-OPS-02
- Category: Ops & Risk
- Inputs: company.config.yaml, existing RFCs, running service URLs
- Outputs: incident runbook (standards/ops/), post-mortem template (standards/ops/), incident records (artifacts/decision-memos/)
- Used by: Ops & Risk Agent
- Tool scripts: ./tools/ops/status-check.sh, ./tools/artifact/validate.sh
Purpose
Establish a repeatable incident response process that minimizes downtime and data loss. This skill produces runbooks, post-mortem templates, and per-incident records so that every outage is handled consistently and every failure becomes a learning opportunity.
Procedure
Step 1: Load Context
Before generating any incident response artifacts:
- Read
company.config.yaml-- understand hosting provider, observability stack, error_tracking configuration - Read existing RFCs in
artifacts/rfcs/-- understand the system architecture, dependencies, and failure domains - Identify critical services -- which components, if down, cause user-facing impact
- Check existing standards in
standards/ops/-- avoid duplicating or contradicting existing operational procedures
Step 2: Generate Incident Runbook
Produce standards/ops/incident-runbook.md with the following sections:
Severity Classification
| Severity | Description | Examples | Response Time | Resolution Target |
|---|---|---|---|---|
| P0 (Critical) | Complete service outage, data loss, security breach | Production database down, authentication broken for all users, confirmed data exfiltration | Immediate, all hands | 1 hour |
| P1 (High) | Major feature broken, significant performance degradation, data integrity risk | Payment processing failing, API response times >10s, primary replica out of sync | Within 30 minutes | 4 hours |
| P2 (Medium) | Minor feature broken, workaround exists, non-critical performance issue | Export feature timing out (manual workaround available), dashboard loading slowly, non-critical background job stalled | Next business day | 24 hours |
| P3 (Low) | Cosmetic issue, minor inconvenience, improvement opportunity | UI alignment off on one browser, tooltip text incorrect, non-blocking deprecation warning in logs | Next sprint | 1 week |
Triage Procedure Per Severity
P0 Triage:
- Acknowledge the incident within 5 minutes of detection
- Open a dedicated incident channel or document
- Run
./tools/ops/status-check.shagainst all critical service URLs - Determine blast radius: which users/features are affected
- Decide: rollback immediately or apply hotfix
- Execute rollback checklist (below) if rolling back
- Communicate status within 15 minutes of detection
- Continue updates every 30 minutes until resolved
P1 Triage:
- Acknowledge within 30 minutes
- Run
./tools/ops/status-check.shto assess scope - Identify the failing component from logs/error tracking
- Determine if rollback is needed or if a targeted fix is faster
- Communicate initial assessment within 1 hour
- Update every 2 hours until resolved
P2 Triage:
- Acknowledge within 4 hours (business hours)
- Document the issue and known workaround
- Schedule investigation for next available work session
- Communicate workaround to affected users if applicable
P3 Triage:
- Log the issue in the backlog
- Prioritize during next sprint planning
- No immediate action required
Rollback Checklist
Deployment Rollback (per hosting provider from config):
- Identify the last known good deployment
- Execute platform-specific rollback command (Vercel: redeploy previous, AWS: roll back CloudFormation/ECS task, Railway: redeploy previous, Fly.io:
fly releases rollback) - Verify the rollback deployed successfully via status check
- Confirm user-facing functionality restored
Database Rollback (per ORM from config):
- Identify the migration that caused the issue
- Run the corresponding down/rollback migration (Prisma:
prisma migrate resolve, Drizzle: rollback script, Django:python manage.py migrate <app> <previous_migration>) - Verify data integrity after rollback
- Confirm application still functions with the rolled-back schema
Feature Flag Disable:
- Identify the feature flag associated with the change
- Disable the flag in the feature flag management system
- Verify the feature is no longer active for users
- Monitor for side effects from the flag change
DNS Failover:
- Switch DNS to the failover/maintenance page if primary is unrecoverable
- Set a low TTL before planned risky deployments
- Revert DNS after primary is restored
Cache Invalidation:
- Identify if stale cache is contributing to the issue
- Flush the relevant cache keys or entire cache
- Verify fresh data is being served
Communication Templates
Status Page Update Template:
Title: [Service Name] - [Investigating/Identified/Monitoring/Resolved]
Impact: [Brief description of user impact]
Current Status: We are aware of [description]. [Action being taken].
Next Update: We will provide an update by [time].
User Notification Email Template:
Subject: [Service Name] Service Disruption - [Date]
We experienced [brief description of the issue] starting at [time UTC].
Impact: [What users experienced]
Duration: [Start time] to [End time / ongoing]
Current Status: [Resolved / Under investigation]
What we are doing: [Actions taken or in progress]
We apologize for the inconvenience. If you have questions, contact [support channel].
Post-Mortem Invite Template:
Subject: Post-Mortem: [Incident ID] - [Brief Description]
Incident: [ID and title]
Severity: [P0-P3]
Duration: [X hours/minutes]
We will review this incident to understand root causes and prevent recurrence.
Please review the incident timeline before the session.
Agenda:
1. Timeline review
2. Root cause analysis (5 Whys)
3. Contributing factors
4. Remediation actions
Solopreneur-Specific Guidance
- You are always on-call. Set up alerting through your configured error_tracking tool (Sentry, Bugsnag, or equivalent from config) so you get notified immediately for P0/P1 issues.
- Mobile notifications are critical. Configure push alerts for production errors so you can respond even when away from your desk.
- Escalation path: Your hosting provider's support channel is your first escalation. Community forums (Stack Overflow, Discord communities for your framework) are your second. For security incidents, consider a security-focused consultancy on retainer.
- Pre-write your status page updates. Having templates ready means you spend less time writing and more time fixing.
- Automate what you can. Health checks, automatic rollbacks on error rate spikes, and uptime monitoring reduce the burden of solo operations.
Step 3: Generate Post-Mortem Template
Produce standards/ops/post-mortem-template.md with the following structure:
# Post-Mortem: [INC-XXX] [Incident Title]
## Incident Metadata
- **Incident ID**: INC-XXX
- **Severity**: P0 / P1 / P2 / P3
- **Date**: YYYY-MM-DD
- **Duration**: X hours Y minutes
- **Impact Summary**: [One sentence describing user-facing impact]
- **Author**: [Name]
- **Status**: Draft / Reviewed / Final
## Timeline (all times UTC)
| Time | Event |
|------|-------|
| HH:MM | Issue first detected by [monitoring/user report/manual check] |
| HH:MM | Incident acknowledged, investigation started |
| HH:MM | Root cause identified |
| HH:MM | Mitigation applied (rollback/hotfix/flag disable) |
| HH:MM | Service confirmed restored |
| HH:MM | Incident marked resolved |
## Root Cause Analysis: 5 Whys
1. **Why** did the service go down? [Answer]
2. **Why** did [answer 1] happen? [Answer]
3. **Why** did [answer 2] happen? [Answer]
4. **Why** did [answer 3] happen? [Answer]
5. **Why** did [answer 4] happen? [Root cause]
## Contributing Factors
- [Factor 1: e.g., missing test coverage for edge case]
- [Factor 2: e.g., no alerting on the affected metric]
- [Factor 3: e.g., deployment happened without staging verification]
## Impact Assessment
- **Users affected**: [Number or percentage]
- **Revenue impact**: [Estimated lost revenue or "none"]
- **Data impact**: [Data lost, corrupted, or "none"]
- **Reputation impact**: [Public visibility, social media mentions, or "minimal"]
## Remediation Actions
### Immediate (completed during incident)
- [ ] [Action taken to restore service]
### Short-term (within 1 week)
- [ ] [Action] -- Owner: [name] -- Due: [date]
### Long-term (within 1 month)
- [ ] [Action] -- Owner: [name] -- Due: [date]
## Follow-Up Items
| Item | Owner | Due Date | Status |
|------|-------|----------|--------|
| [Description] | [Name] | YYYY-MM-DD | Open |
## Lessons Learned
- **What went well**: [e.g., fast detection, clear rollback procedure]
- **What went poorly**: [e.g., slow communication, missing runbook step]
- **Where we got lucky**: [e.g., low traffic period, no data loss despite risk]
Step 4: Per-Incident Response
When an actual incident occurs:
- Assess current state -- run
./tools/ops/status-check.shagainst the affected service URLs - Classify severity -- use the severity table from the runbook to assign P0-P3
- Follow triage procedure -- execute the severity-specific steps from the runbook
- Create incident record -- produce an artifact in
artifacts/decision-memos/with:- Frontmatter:
id: INC-XXX,type: decision-memo,status: draft - Content: populated from the post-mortem template
- Link to any related RFCs or PRDs via
depends_on
- Frontmatter:
- Execute rollback if needed -- follow the rollback checklist
- Communicate -- use the communication templates
- Fill in post-mortem after resolution -- complete the 5 Whys, impact assessment, and remediation actions
- Promote artifact -- move from draft to review after post-mortem is complete
Step 5: Verify
- [ ] Runbook covers all severity levels P0 through P3
- [ ] Each severity has specific examples, response times, and resolution targets
- [ ] Rollback steps are specific to the configured hosting provider and database/ORM
- [ ] Communication templates are copy-paste ready with clear placeholders
- [ ] Post-mortem template includes the 5 Whys technique
- [ ] Solopreneur context is acknowledged throughout (no "escalate to team lead" language)
- [ ] If an incident record was produced, it passes
./tools/artifact/validate.sh
Quality Checklist
- [ ] All severities P0-P3 defined with examples, response times, and resolution targets
- [ ] Rollback steps are specific to configured hosting/database/ORM
- [ ] Communication templates are copy-paste ready (not vague)
- [ ] Post-mortem template includes 5 Whys
- [ ] Solopreneur context acknowledged (no "escalate to team lead" language)
- [ ] Artifact passes validation if incident record produced
04 同仓库更多 Skills
typo-field
Fixture skill with a misspelled top-level field.
spaced-comments
Fixture skill with comments and spaces after block keys.
crlf-comments
Fixture skill with Windows line endings.
claude-fields
Fixture skill using top-level fields Claude Code documents.
workflow-router
Maps an objective to the artifacts, stages and agents it needs. Use when deciding what happens next or which agents to involve.
weekly-review
Summarizes your week: what shipped, AI spend, support themes, security health and next priorities. Use at the end of each week.