adopt
Bootstrap an existing repo for ForgeDock — triage open issues, apply labels, suggest a starter milestone, and identify first…
Coordinate P0 incident response — hotfix validation, timeline reconstruction, and post-incident analysis
> /plugin marketplace add RapierCraftStudios/ForgeDock > /plugin install forgedock@forgedock
How it fires
How this command gets triggered: by you, by Claude, or both.
/incident-responseContext preview
What this command does when you run it.
Coordinate P0 incident response — hotfix validation, timeline reconstruction, and post-incident analysis
description: Coordinate P0 incident response — hotfix validation, timeline reconstruction, and post-incident analysis
argument-hint: "[issue number | \"active\" | \"postmortem {issue}\"]"
install: extras<!-- SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios --> <!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
> **Skill names**: `{FORGE_SKILL_PREFIX}` is `forgedock:` (plugin install) or empty (`install.sh`), resolved once per run by `commands/work-on.md` § Skill Name Resolution. If the skill is not found under either name, STOP and report "skill not found" — never run the phase inline.
**Input**: $ARGUMENTS
**Config variables used by this command** (set in `forge.yaml`):
You are the pipeline's incident response coordinator. When production goes down or a critical bug surfaces, this command orchestrates the response: validates the hotfix before deploy, reconstructs the incident timeline, and produces a post-incident analysis.
**Agent model policy**: `model: "{DEFAULT_MODEL}"` — resolved from forge.yaml `agents.default_model`, else "sonnet" (standard tier). Fallback: `model: "opus"` if rate-limited. User can override with `--model <name>`. Feature gate: pass `effort` in Task/Skill spawns only on Claude Code >= 2.1.154.
**NEVER use plan mode (EnterPlanMode)** — it breaks execution context.
---
| Input | Mode | Description | |-------|------|-------------| | Issue number (e.g., `55`) | **Active Response** | Coordinate hotfix for this P0 issue | | `active` or empty | **Active Response** | Find the most recent P0 issue and coordinate | | `postmortem {issue}` | **Post-Incident** | Generate postmortem for a resolved incident |
---
# If issue number provided
gh issue view {NUMBER} --json number,title,body,labels,state,comments,assignees,createdAt
# If "active" — find most recent open P0
gh issue list --state open --label "priority:P0" --limit 5 --json number,title,createdAt,labels \
--jq 'sort_by(.createdAt) | reverse | .[0]'Parse the issue to understand:
# Check recent deploys (merges to main in last 24h)
gh pr list --state merged --base main --json number,title,mergedAt \
--jq '[.[] | select(.mergedAt > (now - 86400 | todate))] | .[] | "\(.number) | \(.title) | \(.mergedAt)"'
# Check recent hotfix deploys (requires deploy.workflow set in forge.yaml)
# Skip this check if deploy.workflow is not configured.
gh run list --workflow={deploy.workflow} --limit 5 --json databaseId,status,conclusion,createdAt,displayTitlegh issue comment {NUMBER} --body "$(cat <<'EOF'
## 🚨 Incident Response Activated
**Coordinator**: Forge pipeline (automated)
**Time**: $(date -u +%Y-%m-%dT%H:%M:%SZ)
**Status**: Investigating
**Next action**: Validating fix approach and preparing hotfix deploy
---
### Timeline
| Time | Event |
|------|-------|
| {issue_created} | Incident reported |
| $(date -u +%H:%M) UTC | Response activated |
EOF
)"---
If a fix branch already exists (check issue comments for PR references):
# Check if there's already a PR or branch
FIX_PR=$(gh pr list --state open --search "#{NUMBER}" --json number,headRefName --jq '.[0]')
FIX_BRANCH=$(echo $FIX_PR | jq -r '.headRefName // empty')
# Or check if issue comments mention a branch
gh api repos/{owner}/{repo}/issues/{NUMBER}/comments \
--jq '.[].body | select(contains("fix/") or contains("hotfix/"))' | grep -oP '(fix|hotfix)/[\w-]+'Spawn a validation agent to check the proposed fix:
Agent(model="{SUBAGENT_MODEL}", prompt="
You are validating a hotfix for a P0 production incident.
Issue: #{NUMBER} — {TITLE}
Fix branch: {FIX_BRANCH}
Repo: {REPO_PATH}
Your job:
1. Read the fix diff: git diff origin/main..origin/{FIX_BRANCH}
2. Verify it addresses the reported problem (read the issue body)
3. Check for obvious regressions:
- Does it break any imports?
- Does it remove functionality other code depends on?
- Are there syntax errors?
- Does it change DB schema without a migration?
4. Run compile checks (read forge.yaml → verification.commands for tool commands):
- Python: always run python -m py_compile on changed .py files (no config needed)
- Python format/lint: run verification.commands.python.format and .lint if configured; log "SKIPPED — not configured in verification.commands" if absent
- TypeScript: run verification.commands.typescript.typecheck if configured; log "SKIPPED — not configured in verification.commands" if absent
5. Check if the fix is scoped tightly (minimal changes for the incident)
Output:
- SAFE TO DEPLOY: {yes/no}
- Concerns: {list any non-blocking concerns}
- Confidence: {high/medium/low}
- Recommendation: {deploy immediately / needs adjustment / needs more investigation}
")gh issue comment {NUMBER} --body "$(cat <<'EOF'
### Hotfix Validation
**Branch**: `{FIX_BRANCH}`
**Validation**: {SAFE TO DEPLOY / NEEDS ADJUSTMENT}
**Confidence**: {level}
{If safe}:
**Ready for deploy.** Run (requires `deploy.workflow` set in `forge.yaml`):gh workflow run {deploy.workflow} --ref {FIX_BRANCH} -f {deploy.workflow_inputs.s
ForgeDock — autonomous AI dev pipeline for Claude Code. GitHub as agent memory: issue in, PR out.
Bootstrap an existing repo for ForgeDock — triage open issues, apply labels, suggest a starter milestone, and identify first…
Pull production analytics from GSC, Bing Webmaster, Clarity, Umami, Cloudflare, Stripe, and GA4 — generate insights and create…
Audit agent outputs from an orchestration run — timeline analysis, stall detection, active vs idle time breakdown
Trace a production issue or pipeline failure end-to-end through GitHub artifacts, then file a detailed improvement issue to the…
Autonomous deploy loop — runs until zero open issues remain. Detects pipeline state and resumes from any position. Fully…
Guided idea-to-backlog setup for a brand-new project — interview, defaults, doubts, spike doc, validated orchestrate-ready backlog