incident
Live incident response — intake a Sentry issue, stack trace, or symptom; gate mitigate-first vs root-cause-first; keep a UTC timeline
- License 许可
- MIT
- 所属仓库
- HigorAlves/orc
- 最近更新
- 2026-11-07
- Stars
- ★ 7
- Forks
- 0
01 前言 Front Matter
- name
- incident
- description
- Live incident response — intake a Sentry issue, stack trace, or symptom; gate mitigate-first vs root-cause-first; keep a UTC timeline
- when_to_use
- Use when production is broken RIGHT NOW; for the after-action write-up alone, use $orc-postmortem.
- allowed-tools
- [ "Bash(orc-state:*)", "Read", "Write", "Edit", "Glob", "Grep", "Skill", "Task", "the available user-question tool (or ask in chat)", "Bash(sentry:*)", "Bash(jq:*)", "Bash(date:*)", "Bash(git log:*)", "Bash(git branch --show-current:*)", "Bash(git diff:*)", "Bash(orc-workspace-detect:*)" ]
- argument-hint
- [<sentry-issue-id-or-url> | <pasted stack trace> | <symptom>] [--severity sev-1|sev-2|sev-3]
02 资源文件 5
- 参考文档references/PHASE-1-INTAKE.md2.2 KB
- 参考文档references/PHASE-2-ASSESS.md2.1 KB
- 参考文档references/PHASE-3-MITIGATE.md2.1 KB
- 参考文档references/PHASE-4-ROOT-CAUSE.md1.5 KB
- 参考文档references/PHASE-5-STABILIZE.md1.7 KB
03 SKILL.md 正文
$orc-incident
Run an incident while it happens: triage the evidence, size the blast radius, choose mitigate-first or root-cause-first, and keep a UTC timeline that becomes the postmortem's spine. Stop the bleeding before you study the wound; $orc-postmortem learns from the incident afterwards.
Arguments
- First argument (free-form) — a Sentry issue short ID or URL, a pasted stack trace, or a described symptom.
--severity sev-1|sev-2|sev-3— optional. Skips the severity proposal in P2; P2 still assesses the blast radius.
NOTE: a Sentry short ID looks like PROJ-123; orc-sentry-cli pulls it live. A symptom reads like "checkout is 500ing since the 14:00 deploy".
Preconditions
🛑 No production mutations
P3 previews rollbacks, flag flips and scaling calls; the user executes them. orc records; the human acts.
- A
loosecontext stops the run in Phase 0: there is no state dir to write. - Every action or finding in any phase appends a UTC row to
timeline.mdin the same turn. - Timestamps come from
date -u +%Y-%m-%dT%H:%M:%SZ.
Phases
Modules live beside this file under references/ (ADR 0008 pilot). Entering a phase, Read exactly its module, per the orc-phases protocol.
| Phase | Module | Skipped when |
|---|---|---|
| 0 Detect context | resident, below | never |
| 1 Intake and timeline start | orc-incident/P1 |
never |
| 2 Assess, then the strategy gate | orc-incident/P2 |
never |
| 3 Mitigate-first path | orc-incident/P3 |
the gate picks root-cause-first |
| 4 Root-cause path | orc-incident/P4 |
the user parks the root cause after P3 |
| 5 Stabilize and hand off | orc-incident/P5 |
never |
Phase 0 — Detect context
Run orc-workspace-detect --banner in the working repository and read its output before continuing.
- Read the banner above; it exports
ORC_*vars. Do not re-run detection. - If the context is
loose, print that and stop.
NOTE: the gate in P2 routes "Mitigate first" to P3, "Root-cause first" to P4, and "Both in parallel" to P4 while the user's manual mitigation steps land in the timeline as reported.
Iron rules
- Timeline or it did not happen: every pull, finding, mitigation and verification appends a UTC row in the same turn.
- Never batch timeline rows at the end from memory.
- No production mutations, ever, even when every binary is available.
- Deploys, flag flips and scaling get a 🛑 preview; the user executes them. orc records.
- No "stable" claim without evidence: a fresh Sentry read or an explicit user confirmation, recorded in the timeline.
- Mitigation is not resolution. After mitigate-first, always offer the root-cause path before closing.
Output
.orc/<branch>/files/incident/timeline.md— append-only UTC timeline, the postmortem seed..orc/<branch>/files/incident/evidence.md— Sentry data, stack trace, blast radius..orc/<branch>/files/incident/diagnosis.md— when the root-cause path ran..orc/<branch>/files/checkpoint.mdplus the session entry in.orc/orc.json.- Regression test and fix commits, when fixing during the incident.
- Echoes: severity, blast radius, mitigation status, and the
$orc-postmortemhandoff line.
NOTE: on interruption, $orc-resume reads the checkpoint and continues from the next pending phase. A resumed session re-reads timeline.md before acting; the file carries the full history.
04 同仓库更多 Skills
writing-plans
Write a comprehensive implementation plan of bite-sized TDD tasks that an engineer with zero codebase context could execute — exact files, code, tests, and verification steps
writing-for-agents
orc's doctrine layer for writing any document an agent consumes — skills, AGENTS.md/CLAUDE.md, reference docs
workspace-mode
Use when cwd is a parent dir holding multiple sibling git repos — defines repo auto-detection, --repos/--repo/--all-repos/--this-repo precedence, per-repo dispatch, and linked-PR mechanics.
wizard
Generate an interactive bash wizard walking a human through work only they can perform — credentials, secrets, one-off migrations
wait-what
Stop and re-pitch — the last message did not land; say it again simply, in the project's own vocabulary.
vitest
Vitest fast unit testing framework powered by Vite with Jest-compatible API