AGENT SKILL

triage-incident

Production incident triage — from "something is broken for users" to fixed, verified, and learned-from. Pulls the error signal (Sentry/logs/user report), reproduces before touching code, routes the fix through /fix-bug's prod fast path, and closes with a postmortem entry. Use when something is broken for users in production — an outage, data corruption, a Sentry spike, or a crash-rate alert. NOT FOR bugs found in development (use /fix-bug directly) or CI failures (use /diagnose-ci).

License 许可
MIT
最近更新
2026-10-23
Stars
★ 0
Forks
0

01 前言 Front Matter

name
triage-incident
description
Production incident triage — from "something is broken for users" to fixed, verified, and learned-from. Pulls the error signal (Sentry/logs/user report), reproduces before touching code, routes the fix through /fix-bug's prod fast path, and closes with a postmortem entry. Use when something is broken for users in production — an outage, data corruption, a Sentry spike, or a crash-rate alert. NOT FOR bugs found in development (use /fix-bug directly) or CI failures (use /diagnose-ci).

03 SKILL.md 正文

Triage Incident

Structured path from a production incident to a verified fix and recorded learning. Input is an error signal (Sentry issue, log excerpt, user report, crash-rate alert); output is a fix shipped via the prod fast path, a postmortem entry, and filed follow-up tasks. Flow: Assess → Stabilize → Reproduce → Fix → Verify in prod → Postmortem.

Index

File or section Read when…
Steps 1–2 Assessing severity and mitigating before root-causing
Step 3: Reproduce Always — no fix until the failure is captured
Steps 4–5 Handing off to /fix-bug's prod fast path; verifying in production
Step 6: Postmortem Writing the postmortem, filing prevention work, adding an eval
_shared/task-triage.md Step 6 — filing prevention follow-ups
Key Rules Always

Step 1: Assess — how bad, how many, since when

Pull the actual signal before theorizing:

  • Sentry available: issue frequency, first-seen, affected-user count, release tag, stack trace. First-seen aligned with a release/flag flip is your prime suspect.
  • No Sentry: platform logs (Supabase logs, store vitals/ANR dashboard, server logs) — get ONE concrete failing event with a timestamp.
  • Severity call: data loss or security exposure → stop, stabilize first (Step 2 now); degraded-but-safe → normal flow.

Step 2: Stabilize — stop the bleeding before root-causing

Fastest reversible mitigation FIRST when users are actively harmed:

  • Last release suspect → roll back (rules/release-engineering.md — the rollback command you verified at release time)
  • Flag-flip suspect → flip it back
  • Runaway job / abusive traffic → pause the job / rate-limit

Record what you did and when — it's the first postmortem timeline entry. If mitigation isn't possible, say so and continue; do not silently skip.

Step 3: Reproduce — Gate A applies, prod edition

No fix until the failure is captured (ALGORITHM REPRODUCE-FIRST): the failing request as curl -i, the SELECT showing bad state, the crash reproduced on a local build pointed at staging. If truly unreproducible, capture the full evidence chain (trace + logs + affected rows) and treat the hypothesis as unconfirmed — the fix must then include instrumentation that would confirm it.

Step 4: Fix — hand off to /fix-bug prod fast path

Minimal-diff hotfix shipped via /create-pr — regression test in the same PR when it can be written quickly, otherwise filed as a forge task before merge and named in the PR body (the fast path's one permitted deferral shape). Schema involved → Gate E (rules/migrations.md). Security involved → /security-review on the fix before shipping.

Step 5: Verify in production

The incident is not over when the fix merges — probe the live surface: the failing request now succeeds (curl -i), Sentry issue stops accruing new events on the fixed release, crash-free rate recovers. Name the number you watched and what it showed.

Step 6: Postmortem — small, honest, filed

Write docs/debug/incident-YYYY-MM-DD-<slug>.md (≤1 page): timeline, impact (users × duration), root cause, why it wasn't caught earlier, what prevents the class (not just the instance). Then:

  • /remember bug "<one-line root cause>" → project memory
  • File prevention follow-ups as real tasks: python3 .claude/scripts/forge/forge.py task add ... Before filing, apply skills/_shared/task-triage.md — answer "what breaks if this ships later?" Deferred is the default (--epic E99 parks it out of the ready queue); hard floors (schema/auth/money/security) are never deferred. Prevention items are usually Deferred; a live, recurring failure class is not.
  • If the root cause implicates doctrine (a gate that should have fired), surface it — that's a doctrine learning per ALGORITHM LEARN.
  • If the root cause traces to agent behaviour — a gate that should have fired and did not, a skill that let something through — add an eval: a case in tests/evals/cases/ whose prompt is the situation that failed and whose check names the gate that was missed. tests/evals/README.md has the format. This is the only mechanism that catches the same config regression next time; a postmortem paragraph does not.
  • A follow-up larger than a bounded fix (architectural, a repeated pattern, anything needing a product decision) is not a task: write it as /intent "<problem>" with the postmortem as its evidence, so it re-enters through acceptance instead of jumping the queue.

Key Rules

  • Mitigate before root-causing when users are actively harmed — but never call mitigation the fix.
  • No fix without reproduction or an explicitly-marked unconfirmed hypothesis + instrumentation.
  • Production verification is a probe, not a deploy log.
  • Every incident produces exactly one postmortem file and ≥0 prevention tasks — an incident with zero learnings is a claim, not an outcome.

Project-specific overrides: if SKILL.local.md exists in this directory, read it — it is consumer-owned, survives framework refresh, and wins on conflict. A sidecar that relaxes a gate defined above must state how to prove the gate is wrong in that case. Doctrine: rules/framework-vs-project-root.md.

04 同仓库更多 Skills

rynhardt81
rynhardt81/forgeFlow

wizard

Generates an interactive bash wizard that walks a human through steps only they can perform — opens each URL, says what to click and copy, captures values (hidden entry for secrets), writes .env and GitHub secrets, confirms before irreversible actions. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.

★ 0
rynhardt81
rynhardt81/forgeFlow

vet-idea

Vets an idea, decision, or plan BEFORE it is built. Runs a single model through five fixed adversarial advisor roles, a peer-review pass, and a chairman synthesis that emits a halt-capable GO / NO-GO / RECONSIDER verdict. Advisory and non-mutating — outputs a report, never writes task state. Use when an idea, feature, or costly hard-to-reverse decision is of uncertain worth and the question is whether to build it at all. NOT FOR settled work (bug fixes, approved features) or for shaping how to build it (the ISA Interview workflow).

★ 0
rynhardt81
rynhardt81/forgeFlow

setup-review-bot

Configures a repo's AI code reviewers — the post-PR mention bot and the pre-push local reviewer — and writes the AGENTS.md the reviewers read. Interviews the user for what the reviewer should weight, then sets git config forge.reviewBot / forge.localReview and populates AGENTS.md at the project root. Use when a repo has no reviewer configured, when review findings are consistently off-target, or when onboarding a new project.

★ 0
rynhardt81
rynhardt81/forgeFlow

security-review

Portable security review for a feature, endpoint, or change before it ships. Orchestrates the existing OWASP review (@security-boss) and secrets scan (security_secrets validator), then adds the pass they miss — an explicit business-logic-flaw walkthrough (IDOR, race/TOCTOU, state-machine bypass, privilege escalation, price/quantity tampering). Advisory and non-mutating — produces a findings report; real findings are filed as tasks. Use when a change touching money, access control, or multi-step state is about to ship, or when the auth looks fine but the flow could be abused. NOT FOR SAST or dependency-CVE scanning (consumer CI owns those).

★ 0
rynhardt81
rynhardt81/forgeFlow

run-epic

Autonomously drains every open task in a single epic. Pulls ready tasks via the forge CLI, executes the work in-context using the matching discipline (fix-bug / new-feature / refactor), files newly-discovered work as follow-up tasks without stopping to ask, opens a PR per completed task via /create-pr, and repeats until the epic has zero ready/in-progress/pending tasks. Use when the user says `/run-epic E##`, "run epic autonomously", "finish all remaining tasks for epic X", or "drive epic X to completion".

★ 0
rynhardt81
rynhardt81/forgeFlow

remember

Saves and retrieves project knowledge that persists across sessions — bug patterns, technical decisions, key facts, and code patterns. Use whenever the user wants to record a lesson learned, save a debugging insight, document a technical choice, note a convention, or search past memories.

★ 0