Session Retrospective
Distill past sessions for this project into evidenced, ack-gated
improvements to the team's memory and shared docs. Efficiency-led: process
waste first, durable facts second. You (scout) run this manually when asked.
Read-only analysis, assisted writes. The parser only reads transcripts.
You propose every change and write nothing until the user acks.
When to use
- The user says "run a retrospective", "mine past sessions", "what slowed us
down", or "improve the team from recent work".
- Periodically, to fold lessons from recent sessions into
.agents/.
Not for: onboarding a fresh repo (that's seeding-a-project), or refreshing
config from code/PR changes (that's scout's normal update flow).
Procedure
Distill. Run the parser from the project root:
node {skill}/scripts/distill-sessions.mjs
It reads ~/.claude/projects/<this-project>/ transcripts newer than the
watermark (.agents/memory/scout/.last-retrospective), plus each session's
subagents/, and prints a bounded markdown digest. Add --all to ignore
the watermark, --exclude-session <id> to skip the active session, or
--out <path> to save the digest. Exit code 3 = no transcripts found →
use the Fallback below. The newest session is usually the one you're
running in — pass --exclude-session <its id> so the retrospective
doesn't analyze itself.
Read the digest (it fits in context — never read raw .jsonl).
Interpret — see references/signal-taxonomy.md. Separate:
- Efficiency findings — repeated corrections, retry loops, file churn,
tool errors, ignored conventions.
- Durable facts — gotchas, decisions, "X doesn't work, use Y".
Every finding MUST cite the session id it came from. Drop anything you
cannot evidence from the digest.
Map findings to targets — see references/finding-to-target.md:
role-specific → that role's .agents/memory/<role>/; team-wide process →
.agents/workflow.md / .agents/conventions.md; durable fact → a curated
entry (via the memory skill). If .agents/ doesn't exist, the project
isn't seeded — a retrospective refines an existing lens, it doesn't create
one; run seeding-a-project first.
Propose, then wait. Present each proposed change as a diff plus a
one-line rationale with its session-id evidence. Stop and wait for the
user's ack. Do not write yet.
On ack, write:
- Memory deltas via the
memory skill (curated entries + MEMORY.md
index lines; project_briefing.md updates).
- Surgical edits to
.agents/workflow.md / conventions.md.
- A dated report
.agents/retrospectives/YYYY-MM-DD.md: sessions analyzed,
findings, what was applied, what was deferred and why.
- Advance the watermark: write
.agents/memory/scout/.last-retrospective
as {"lastRun":"<ISO>","analyzed":[<session ids you just covered>]},
merging with any existing ids. Only after writing — never on a decline.
Fallback (non–Claude Code hosts)
If the parser exits with code 3, transcripts aren't accessible here. Ask the
user to paste a session transcript or summary, then run steps 3–6 on that text
(skip the watermark; note in the report that it was a pasted-transcript run).
Anti-memory-poisoning rules
- Never write without an explicit ack.
- Every durable fact cites a session id. No inventing.
- Record corrections as one-line lessons, not raw quotes.
- Bounded recall — reason over the digest, never raw
.jsonl.
Common mistakes
- Writing before ack — forbidden; always propose-then-wait.
- Advancing the watermark on a dry run or a decline — only after writing.
- Treating a candidate correction as a fact without judgment — the digest
flags candidates; you decide.
- Reading raw transcripts into context — use the digest.
References
references/transcript-schema.md — Claude Code JSONL + sub-agent layout.
references/digest-format.md — the digest the parser emits.
references/signal-taxonomy.md — signal definitions + thresholds.
references/finding-to-target.md — finding→target mapping + safeguards.
1---2name: session-retrospective-23description: Use when asked to run a retrospective, mine past sessions, or improve the team from what already happened — turning prior Claude Code conversations and sub-agent sessions into proposed memory and workflow updates. Used by scout.4license: Apache-2.05---67# Session Retrospective89Distill past sessions for this project into **evidenced, ack-gated**10improvements to the team's memory and shared docs. Efficiency-led: process11waste first, durable facts second. You (scout) run this manually when asked.1213**Read-only analysis, assisted writes.** The parser only reads transcripts.14*You* propose every change and write nothing until the user acks.1516## When to use1718- The user says "run a retrospective", "mine past sessions", "what slowed us19 down", or "improve the team from recent work".20- Periodically, to fold lessons from recent sessions into `.agents/`.2122Not for: onboarding a fresh repo (that's `seeding-a-project`), or refreshing23config from code/PR changes (that's scout's normal update flow).2425## Procedure26271. **Distill.** Run the parser from the project root:2829 ```30 node {skill}/scripts/distill-sessions.mjs31 ```3233 It reads `~/.claude/projects/<this-project>/` transcripts newer than the34 watermark (`.agents/memory/scout/.last-retrospective`), plus each session's35 `subagents/`, and prints a bounded markdown digest. Add `--all` to ignore36 the watermark, `--exclude-session <id>` to skip the active session, or37 `--out <path>` to save the digest. Exit code 3 = no transcripts found →38 use the Fallback below. The newest session is usually the one you're39 running in — pass `--exclude-session <its id>` so the retrospective40 doesn't analyze itself.41422. **Read the digest** (it fits in context — never read raw `.jsonl`).43443. **Interpret** — see `references/signal-taxonomy.md`. Separate:45 - **Efficiency findings** — repeated corrections, retry loops, file churn,46 tool errors, ignored conventions.47 - **Durable facts** — gotchas, decisions, "X doesn't work, use Y".48 Every finding MUST cite the session id it came from. Drop anything you49 cannot evidence from the digest.50514. **Map findings to targets** — see `references/finding-to-target.md`:52 role-specific → that role's `.agents/memory/<role>/`; team-wide process →53 `.agents/workflow.md` / `.agents/conventions.md`; durable fact → a curated54 entry (via the `memory` skill). If `.agents/` doesn't exist, the project55 isn't seeded — a retrospective refines an existing lens, it doesn't create56 one; run `seeding-a-project` first.57585. **Propose, then wait.** Present each proposed change as a diff plus a59 one-line rationale with its session-id evidence. **Stop and wait for the60 user's ack.** Do not write yet.61626. **On ack, write:**63 - Memory deltas via the `memory` skill (curated entries + `MEMORY.md`64 index lines; `project_briefing.md` updates).65 - Surgical edits to `.agents/workflow.md` / `conventions.md`.66 - A dated report `.agents/retrospectives/YYYY-MM-DD.md`: sessions analyzed,67 findings, what was applied, what was deferred and why.68 - Advance the watermark: write `.agents/memory/scout/.last-retrospective`69 as `{"lastRun":"<ISO>","analyzed":[<session ids you just covered>]}`,70 merging with any existing ids. **Only after writing — never on a decline.**7172## Fallback (non–Claude Code hosts)7374If the parser exits with code 3, transcripts aren't accessible here. Ask the75user to paste a session transcript or summary, then run steps 3–6 on that text76(skip the watermark; note in the report that it was a pasted-transcript run).7778## Anti-memory-poisoning rules7980- Never write without an explicit ack.81- Every durable fact cites a session id. No inventing.82- Record corrections as one-line lessons, not raw quotes.83- Bounded recall — reason over the digest, never raw `.jsonl`.8485## Common mistakes8687- Writing before ack — forbidden; always propose-then-wait.88- Advancing the watermark on a dry run or a decline — only after writing.89- Treating a candidate correction as a fact without judgment — the digest90 flags candidates; you decide.91- Reading raw transcripts into context — use the digest.9293## References9495- `references/transcript-schema.md` — Claude Code JSONL + sub-agent layout.96- `references/digest-format.md` — the digest the parser emits.97- `references/signal-taxonomy.md` — signal definitions + thresholds.98- `references/finding-to-target.md` — finding→target mapping + safeguards.