--- name: sitrep description: Generate a comprehensive session-handoff resume written to /tmp and opened in VS Code. Use when the requester asks for /sitrep, handoff notes, resume context, or a transfer summary with current state, next actions, verification steps, and blockers. --- Generate a comprehensive resume prompt for session handoff. You are creating handoff documentation for the next agent. Speak directly to them in second person ("You are …"). Never address the user. Refer to the original requester as "the requester". Goal: the next agent must know **where the plans are** and **what the current situation is**, in minimal tokens. Point at plan/spec/work-order files — never duplicate their contents; the next agent reads them in full. Git detail is a one-liner, not a section. The deliverable is a FILE in /tmp opened in VS Code — do not print the full sitrep in the terminal. ## Pre-Generation Checks (minimal — assume you are low on context) 1) Workspace + branch: `pwd`; if a git repo, `git status -sb | head -3` (branch + dirty/clean is all you need). 2) Find the governing docs — check in order, note every hit: - `docs/superpowers/plans/` — the active plan (newest, or the one this session worked from) - `docs/superpowers/specs/` — governing spec, if any - `works/` or `docs/works/` — active work orders: `grep -rl 'TODO\|IN PROGRESS' --include='WO-*.md' works/ docs/works/ 2>/dev/null | head -3`, then unchecked tasks in the active WO: `grep -n '\[ \]' | head -10` - Legacy fallbacks: `./plans/`, `~/.claude/plans/` - If nothing: "Ad-hoc work — no plan file" Do NOT read whole plan/WO files — grep for phase markers and unchecked items only. 3) From the conversation, extract only what the docs cannot know: intent, decisions made this session, what is verified working vs broken right now, failures to avoid. ## Output Write this exact structure — raw markdown, no surrounding code fence — to `/tmp/sitrep---.md`, where `` is the basename of the workspace root plus a short tag for the work being done (e.g. `/tmp/sitrep-blockninja--error-handling.md`). Overwrite any previous sitrep for the same project work. ```markdown # Resume: [Feature Name] You are a [specific expert role] continuing the requester's intent: [one sentence]. ## Read These First 1. [path to active plan] — start at [phase/section] 2. [path to active WO] — [N] unchecked tasks remain 3. [governing spec or essential doc, if any] (Omit lines that don't apply. If none at all: "Ad-hoc work — no plan file.") ## Task Intent - [Outcome the requester wants] - [Hard constraint] - [What must not change] ## Current Situation - Workspace: `[absolute/path]` on `[branch]` ([clean / N files uncommitted]) - Just happened: [the 1-3 things this session did that the docs don't yet record] - Working (verified): [fact — and how it was verified] OR None - Broken / in flight: [path:line — current state → intended end state] OR None - Assumptions — confirmed: [bullet]; unverified: [bullet] OR None ## Next Actions 1) [exact next step] 2) [exact next step] 3) [exact next step] ## Verify - Commands: [exact command(s); include check-safety for cms / plugins/* / sites/* / themes/* repos] - Expected: [one line] - Last actual: [one line] OR Unknown (not run) ## Failed Approaches - [approach] → [failure] → avoid [pitfall] - If none: None ## Blocker - [blocker] — unblock requires: [specific info/decision/command] OR None ## Notes - Contracts to preserve (APIs/flags/env/schemas that must not break): [bullets] OR None - Risky areas touched (migrations/auth/billing/prod config): [bullets] OR None ``` ## After Writing the File 1. Open it for the requester: `code /tmp/sitrep-.md` 2. Reply in the terminal with ONLY: - `Sitrep: /tmp/sitrep-.md (opened in VS Code)` - the `# Resume:` title line - `Resume with: claude --dangerously-skip-permissions --chrome "$(cat /tmp/sitrep-.md)"` Do not echo the sitrep body into the terminal. ## Rules - Point at files; never duplicate what they already record (task lists live in the plan/WO, not here). - Every status claim is either verified (say how) or explicitly unverified. - Full absolute paths. Terse bullets. No narrative.