Compare commits

...

2 Commits

Author SHA1 Message Date
Alex Dunmow
cce49e7271 sitrep: add orchestration sections for subagent handoff
Add a status line, a Left Behind table (agents, worktrees, processes),
and a Work Lanes table with file ownership, dependencies, model choice,
and done checks. Tag next actions as you or dispatch. Fix the output
path mismatch in the after-writing steps and drop em dashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 19:26:00 +08:00
Alex Dunmow
bb4e04cbe6 developing-blockninja-plugins: theme fontSizeSteps note
Themes can define what the admin base-size step chips mean by shipping
fontSizeSteps in a preset's typography. Rem-only, UI-facing, never emitted
to CSS and unrelated to per-element overrides.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-04 00:54:12 +08:00
2 changed files with 60 additions and 28 deletions

View File

@ -1,47 +1,55 @@
---
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.
description: Generate a comprehensive session-handoff resume written to /tmp and opened in VS Code, structured so the next agent can orchestrate subagents from it. Use when the requester asks for /sitrep, handoff notes, resume context, or a transfer summary with current state, in-flight agents, parallel work lanes, 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.
Goal: the next agent must know **where the plans are**, **what the current situation is**, and **which work it can hand to subagents**, in minimal tokens. Point at plan/spec/work-order files and leave their contents there; the next agent reads them in full. Git detail is a one-liner.
The deliverable is a FILE in /tmp opened in VS Code — do not print the full sitrep in the terminal.
The next agent may be an orchestrator that dispatches subagents. Subagents, Monitors, and background shells from this session die with it. Their worktrees, branches, and output files survive, so record those.
## Pre-Generation Checks (minimal — assume you are low on context)
The deliverable is a FILE in /tmp opened in VS Code. Keep the sitrep body out of the terminal.
1) Workspace + branch: `pwd`; if a git repo, `git status -sb | head -3` (branch + dirty/clean is all you need).
## Pre-Generation Checks (minimal: assume you are low on context)
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 '\[ \]' <wo-file> | head -10`
1) Workspace + branch: `pwd`; if a git repo, `git status -sb | head -3` (branch + dirty/clean is all you need) and `git worktree list` (worktrees left by subagents).
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 '\[ \]' <wo-file> | head -10`
- Legacy fallbacks: `./plans/`, `~/.claude/plans/`
- If nothing: "Ad-hoc work — no plan file"
- If nothing: "Ad-hoc work, no plan file"
Do NOT read whole plan/WO files — grep for phase markers and unchecked items only.
Grep plan/WO files for phase markers and unchecked items only. Skip reading them whole.
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.
4) From the conversation, list everything still running or left behind: subagents/workflows (name, task, worktree/branch, last known status), background shells and dev servers (command, port), and scratch output files. Check that listed ports are still live with `ss -ltnp 2>/dev/null | grep -E ':(<port>)\b'`.
5) Split the remaining work into lanes. A lane is parallel-safe when its file set is disjoint from every other parallel lane and its dependencies are done. Everything touching shared state (merges, migrations, commits, lockfiles, shared config) goes in the serial lane the orchestrator runs itself.
## Output
Write this exact structure — raw markdown, no surrounding code fence — to `/tmp/sitrep-<project>--<work-tag>.md`, where `<project>` 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.
Write this exact structure (raw markdown, no surrounding code fence) to `/tmp/sitrep-<project>--<work-tag>.md`, where `<project>` is the basename of the workspace root and `<work-tag>` is 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]
Status: [in-progress | blocked | ready-for-review | done] · Lanes: [N parallel-ready, M serial] · Live agents: [N or 0]
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
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.")
(Omit lines that don't apply. If none at all: "Ad-hoc work, no plan file.")
## Task Intent
@ -53,15 +61,33 @@ You are a [specific expert role] continuing the requester's intent: [one sentenc
- 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
- 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
## Left Behind
| Kind | Name / command | Location (worktree, branch, port, file) | Last status | Action for you |
|------|----------------|------------------------------------------|-------------|----------------|
| agent | [name]: [task] | [worktree path / branch] | [done, unreviewed / partial / failed] | [review + merge / re-dispatch lane X / discard] |
| process | [command] | [port / PID] | [live / dead] | [keep / restart with: cmd / kill] |
(If nothing: "None. No agents, worktrees, or background processes remain.")
## Work Lanes
| Lane | Goal | Files owned | Depends on | Model | Done when |
|------|------|-------------|------------|-------|-----------|
| A | [one line; cite WO task IDs] | [paths/globs] | [none / lane X] | [Sonnet: mechanical / Opus: design, debugging] | [observable check] |
| S | Serial: [merges, migrations, commits, integration] | [shared files] | [A, B] | you | [check] |
(Parallel lanes have disjoint "Files owned". If the work is single-threaded: "Serial only: [reason]".)
## Next Actions
1) [exact next step]
2) [exact next step]
3) [exact next step]
1) [you | dispatch lane X] [exact next step]
2) [you | dispatch lane X] [exact next step]
3) [you | dispatch lane X] [exact next step]
## Verify
@ -76,7 +102,7 @@ You are a [specific expert role] continuing the requester's intent: [one sentenc
## Blocker
- [blocker] — unblock requires: [specific info/decision/command] OR None
- [blocker]: unblock requires [specific info/decision/command] OR None
## Notes
@ -86,16 +112,17 @@ You are a [specific expert role] continuing the requester's intent: [one sentenc
## After Writing the File
1. Open it for the requester: `code /tmp/sitrep-<project>.md`
1. Open it for the requester: `code /tmp/sitrep-<project>--<work-tag>.md`
2. Reply in the terminal with ONLY:
- `Sitrep: /tmp/sitrep-<project>.md (opened in VS Code)`
- the `# Resume:` title line
- `Resume with: claude --dangerously-skip-permissions --chrome "$(cat /tmp/sitrep-<project>.md)"`
- `Sitrep: /tmp/sitrep-<project>--<work-tag>.md (opened in VS Code)`
- the `# Resume:` title line and the `Status:` line
- `Resume with: claude --dangerously-skip-permissions --chrome "$(cat /tmp/sitrep-<project>--<work-tag>.md)"`
Do not echo the sitrep body into the terminal.
Keep the sitrep body out of the terminal reply.
## Rules
- Point at files; never duplicate what they already record (task lists live in the plan/WO, not here).
- Point at files. Task lists live in the plan/WO; lanes cite their task IDs.
- Every status claim is either verified (say how) or explicitly unverified.
- Every lane names its files and a checkable "Done when", so a subagent brief can be built from the row plus the cited WO tasks.
- Full absolute paths. Terse bullets. No narrative.

View File

@ -160,6 +160,11 @@ Rules for theme/plugin authors:
- **Published pages freeze markup**: pages published before a hook existed pick it up
only on republish. The `var()` path applies immediately.
Themes may also define what the base-size step chips mean by shipping `fontSizeSteps` in
a preset's typography: keys `small`, `normal`, `large`, `huge`, rem values only. Steps
feed the admin UI chips for the site-wide base size; they are never emitted to CSS and
have no effect on per-element overrides.
## Presets, fonts, email, motion
- **presets.json** — 4 to 6 presets, all 19 tokens, `mode: "both"`. Tune the dark side