| name | incident |
| description | Analyze production incidents and generate prioritized triage checklists |
Incident Triage & Response
Current Time: !date
K8s Context: !kubectl config current-context
Analyze a production incident and generate a prioritized triage checklist. Writes findings to Obsidian incident log.
Input
- Problem statement: symptoms, error messages, affected systems
- Optional: logs, metrics, alerts, or stack traces
Investigation Strategy
Launch three parallel investigation tracks:
Track 1: External Research (librarian agent)
- Search for known issues matching error signatures
- Check dependency changelogs for recent breaking changes
- Look for CVEs or security advisories in affected components
- Find similar incidents/solutions in public issue trackers
Track 2: Codebase Exploration (explore agent)
- Identify code paths related to error messages/symptoms
- Find recent commits touching affected areas
- Locate error handling and logging for affected services
- Map service dependencies and failure modes
Track 3: Code Analysis (inferred agent: go/frontend/postgres/etc.)
- Infer appropriate agent from problem statement context
- Deep analysis of suspect code paths
- Identify potential failure modes
- Review error handling completeness
- Assess rollback safety of recent changes
Output
Write to Obsidian via obsidian_append_content at:
$OBSIDIAN_PATH/Incidents/YYYY-MM-DD-HHMM-brief-title.md
Note:
$OBSIDIAN_PATHmust be a vault-relative path (e.g.,Projects/myapp), set per-project via direnv. Theobsidian_append_contenttool expects paths relative to the vault root.
Document Structure
Use this template for the Obsidian document:
@~/.config/opencode/templates/incident-triage.md
Behavior
- Parse problem statement to extract symptoms, errors, affected systems
- Infer appropriate code agent from context (go, frontend, postgres, etc.)
- Launch librarian, explore, and inferred code agent in parallel
- Synthesize findings from all three tracks
- Generate customized checklist with specific file:line references
- Rank mitigation options by speed-to-recovery
- Write incident document to Obsidian via
obsidian_append_contentwith auto-generated filename:YYYY-MM-DD-HHMM-brief-title.md
$ARGUMENTS