/pbr:forensics runs instead · from pbr
Investigates failed or stuck workflows by analyzing git history, planning artifacts, and file system state to detect anomalies like loops, missing artifacts, or crashes.
This skill never runs in Claude Code
It ships in pbr at skills/, but /pbr:forensics (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
STOP — DO NOT READ THIS FILE. You are already reading it.
Read-only investigation for failed or stuck workflows. Analyzes git history, .planning/ artifacts, and file system state to detect anomalies. Writes a diagnostic report. Does NOT modify project files.
╔══════════════════════════════════════════════════════════════╗
║ PLAN-BUILD-RUN ► FORENSICS ║
╚══════════════════════════════════════════════════════════════╝
If $ARGUMENTS is empty, ask: "What went wrong? Describe the issue — e.g., 'autonomous mode got stuck on phase 3', 'execute-phase failed silently', 'commits seem wrong'."
Collect data from all available sources. Missing sources are fine — adapt.
git log --oneline -30
git log --format="%H %ai %s" -30
git log --name-only --format="" -20 | sort | uniq -c | sort -rn | head -20
git status --short
git diff --stat
Record: commit timeline, most-edited files, uncommitted changes.
Read if they exist: STATE.md, ROADMAP.md, config.json. Extract current phase, last session, blockers.
For each phase in .planning/phases/*/, check which artifacts exist vs expected (PLAN, SUMMARY, VERIFICATION, CONTEXT, RESEARCH).
git worktree list
Check for orphaned worktrees from crashed agents.
Same file in 3+ consecutive commits within a short time window. HIGH confidence if commit messages are similar.
Phase appears complete (has commits, past in roadmap) but lacks PLAN, SUMMARY, or VERIFICATION.
Large gap between last commit and now, with STATE.md showing mid-execution.
Uncommitted changes + STATE.md active + orphaned worktrees.
Recent commits touch files outside current phase's expected scope (from PLAN.md).
Commit messages containing "fix test", "revert", or re-commits of test files.
mkdir -p .planning/forensics
Write to .planning/forensics/report-{YYYYMMDD-HHMMSS}.md:
# Forensic Report
**Generated:** {ISO timestamp}
**Problem:** {user's description}
## Evidence Summary
### Git Activity
- **Last commit:** {date} — "{message}"
- **Commits (last 30):** {count}
- **Uncommitted changes:** {yes/no}
- **Active worktrees:** {count}
### Planning State
- **Current phase:** {N} — {name} ({status})
- **Last session:** {date}
- **Blockers:** {list or "none"}
### Artifact Completeness
| Phase | PLAN | SUMMARY | VERIFICATION | Status |
|-------|------|---------|-------------|--------|
| {N} | {Y/N} | {Y/N} | {Y/N} | {complete/incomplete} |
## Anomalies Detected
### {Anomaly Name}
**Confidence:** {HIGH/MEDIUM/LOW}
**Evidence:** {specific data points}
**Impact:** {what this caused}
**Recommendation:** {what to do}
## Recommendations
1. {Prioritized action items}
Display a summary of findings inline, point to the full report on disk:
Report: .planning/forensics/report-{timestamp}.md
Anomalies found: {count}
- {anomaly 1}: {brief}
- {anomaly 2}: {brief}
Recommended: {top action item}
Optionally offer to create a GitHub issue with the findings.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (sienklogic/plan-build-run) — no native marketplace selected
npx claudepluginhub p/sienklogic-pbr-plugins-pbr46 skills in this plugin
/backlogManage backlog items — ideas not ready for active planning. Add, review, promote, or remove.Other plugins' skills for the same job