1---2name: gsd-forensics3description: Post-mortem investigation for failed GSD workflows — diagnoses what went wrong.4---56<objective>7Investigate what went wrong during a GSD workflow execution. Analyzes git history, `.planning/` artifacts, and file system state to detect anomalies and generate a structured diagnostic report.89Purpose: Diagnose failed or stuck workflows so the user can understand root cause and take corrective action.10Output: Forensic report saved to `.planning/forensics/`, presented inline, with optional issue creation.11</objective>1213<execution_context>14@/Volumes/Main/GitHub/vibecoding/skills/.opencode/gsd-core/workflows/forensics.md15</execution_context>1617<context>18**Data sources:**19- `git log` (recent commits, patterns, time gaps)20- `git status` / `git diff` (uncommitted work, conflicts)21- `.planning/STATE.md` (current position, session history)22- `.planning/ROADMAP.md` (phase scope and progress)23- `.planning/phases/*/` (PLAN.md, SUMMARY.md, VERIFICATION.md, CONTEXT.md)24- `.planning/reports/SESSION_REPORT.md` (last session outcomes)2526**User input:**27- Problem description: $ARGUMENTS (optional — will ask if not provided)28</context>2930<process>31Execute end-to-end.32</process>3334<success_criteria>35- Evidence gathered from all available data sources36- At least 4 anomaly types checked (stuck loop, missing artifacts, abandoned work, crash/interruption)37- Structured forensic report written to `.planning/forensics/report-{timestamp}.md`38- Report presented inline with findings, anomalies, and recommendations39- Interactive investigation offered for deeper analysis40- GitHub issue creation offered if actionable findings exist41</success_criteria>4243<critical_rules>44- **Read-only investigation:** Do not modify project source files during forensics. Only write the forensic report and update STATE.md session tracking.45- **Redact sensitive data:** Strip absolute paths, API keys, tokens from reports and issues.46- **Ground findings in evidence:** Every anomaly must cite specific commits, files, or state data.47- **No speculation without evidence:** If data is insufficient, say so — do not fabricate root causes.48</critical_rules>