Session Retro
Capture non-obvious learnings from this session in the project's existing reference docs. Prefer the single most canonical destination for each learning, and skip updates when the right doc does not already exist.
What Qualifies
- Environment quirks or workarounds that cost time to discover
- Non-obvious API behavior, flag combinations, or config requirements
- Dependency gotchas (version conflicts, install flags, peer deps)
- Commands that exist but weren't documented
- New CLI commands or features built this session
- Build/test/deploy steps that differ from what you'd expect
What Does NOT Qualify
- Anything already in the project's docs
- Obvious language/framework behavior
- One-off typos or syntax errors that were fixed
- Session-specific context (current task state, temp files)
- Anything the next agent would figure out in under 30 seconds
Eligible Targets
Only update docs that already exist. Never create new reference docs during /retro.
- Root docs:
AGENTS.md, CLAUDE.md, README.md
- Canonical system docs:
docs/system/OPERATIONS.md, docs/system/ARCHITECTURE.md, docs/system/FEATURES.md
- Canonical project docs:
docs/project/ROADMAP.md, docs/project/VISION.md
- Other project ref docs only when they are clearly canonical, already present, and a better fit than the files above
Routing Guide
Choose exactly one primary destination per learning. Avoid duplicate updates across multiple docs unless the user explicitly asks for that.
- Agent workflow / implementation gotcha / repo-specific shortcut ->
AGENTS.md or CLAUDE.md (prefer AGENTS.md)
- Quickstart / primary commands / setup the next developer expects at repo entry ->
README.md
- Runbooks / CI / cron / env vars / migrations / operational commands ->
docs/system/OPERATIONS.md
- Service boundaries / invariants / data flow / required code patterns ->
docs/system/ARCHITECTURE.md
- Shipped capability or catalog-style reference ->
docs/system/FEATURES.md
- Actual project status or planned work that changed this session ->
docs/project/ROADMAP.md
- Product direction or policy decisions ->
docs/project/VISION.md or the matching existing policy doc
If the best-fit doc is missing, fall back to the closest existing root doc only when the learning still belongs there. Otherwise skip it.
Process
Inventory existing ref docs — check which eligible target files actually exist in the current project.
Identify learnings — from session context, list candidates. Apply the "would this save the next agent 5+ minutes?" filter. Discard the rest.
Route each learning to one canonical doc using the routing guide above. Prefer the most specific existing doc, not the most convenient one.
Use the smallest safe edit.
- Prefer single-line append-only additions for root docs and gotcha-style notes.
- Allow minimal in-place edits for stateful structured docs when append-only would create duplication or stale information.
- Match the file's existing format exactly (table row, bullet, numbered item, short paragraph, code block entry).
For gotchas in agent docs, match numbering, bold-key style, and indentation exactly. The standard format is:
N. **Bold Key**: One-line explanation with specific details.
If no gotchas section exists, add ## Implementation Gotchas before appending.
For commands, features, roadmap items, or architecture tables, update only the smallest relevant section. Do not reorganize unrelated content.
Present the diff — group the preview by file, show exactly what will change, and wait for approval before writing.
Rules
- Update only existing docs. No new
docs/system/* or docs/project/* files during /retro.
- One learning, one home. Do not copy the same learning into multiple docs.
- Prefer append-only. Use in-place edits only when a structured ref doc would become misleading or duplicative otherwise.
- Keep edits narrow. Touch the smallest relevant section and avoid rewrites or reorganization.
- Never add comments like
// added by agent or timestamps. The git log is the audit trail.
- Max 5 learnings per session. If you have more, keep only the highest-signal ones.
- Max 3 files per run unless the user explicitly asks for broader documentation cleanup.
- Be specific. "Use
--legacy-peer-deps with npm install" not "npm install may need flags."
- Skip weak fits. If no clearly correct existing doc exists, do not force the update.
When To Use
- At the end of a coding session when non-obvious learnings were discovered
- After solving a tricky problem that cost significant debugging time
- When new CLI commands, features, architecture constraints, or operational procedures were added and the matching ref doc already exists
- When triggered by
/retro or explicit request to capture learnings
Output
- One to five narrow updates in the project's existing ref docs
- Each learning is routed to exactly one canonical file
- Each change follows the target doc's existing formatting conventions
- A grouped diff preview shown to the user before any file writes
Verification
- Every learning passes the "would this save the next agent 5+ minutes?" filter
- Every target file exists before editing
- Every learning has a clear canonical home, with no unnecessary duplication
- Edits are append-only unless a minimal in-place structured update is clearly better
- The correct section is identified before editing, and untouched sections remain unchanged
Sibling skills
Four knowledge-capture skills, distinguished by scope and timing:
handoff — produces a session summary for a fresh instance. Different output: this skill routes facts into existing reference files; that one writes a fresh summary doc.
compound-docs — write a categorized solution document. Use when the learning is a confirmed end-to-end solution with reproducible code, not a one-line operational fact.
1---2name: session-retro3description: Update existing project reference docs with non-obvious learnings from the current session rather than creating new files. Use at session end, after solving tricky problems, or when new CLI commands/features were added. Triggers on "/retro", "update docs with learnings", "save what we learned", or proactively at session end.4---56# Session Retro78Capture non-obvious learnings from this session in the project's existing reference docs. Prefer the single most canonical destination for each learning, and skip updates when the right doc does not already exist.910## What Qualifies1112- Environment quirks or workarounds that cost time to discover13- Non-obvious API behavior, flag combinations, or config requirements14- Dependency gotchas (version conflicts, install flags, peer deps)15- Commands that exist but weren't documented16- New CLI commands or features built this session17- Build/test/deploy steps that differ from what you'd expect1819## What Does NOT Qualify2021- Anything already in the project's docs22- Obvious language/framework behavior23- One-off typos or syntax errors that were fixed24- Session-specific context (current task state, temp files)25- Anything the next agent would figure out in under 30 seconds2627## Eligible Targets2829Only update docs that already exist. Never create new reference docs during `/retro`.3031- Root docs: `AGENTS.md`, `CLAUDE.md`, `README.md`32- Canonical system docs: `docs/system/OPERATIONS.md`, `docs/system/ARCHITECTURE.md`, `docs/system/FEATURES.md`33- Canonical project docs: `docs/project/ROADMAP.md`, `docs/project/VISION.md`34- Other project ref docs only when they are clearly canonical, already present, and a better fit than the files above3536## Routing Guide3738Choose exactly one primary destination per learning. Avoid duplicate updates across multiple docs unless the user explicitly asks for that.3940- **Agent workflow / implementation gotcha / repo-specific shortcut** -> `AGENTS.md` or `CLAUDE.md` (prefer `AGENTS.md`)41- **Quickstart / primary commands / setup the next developer expects at repo entry** -> `README.md`42- **Runbooks / CI / cron / env vars / migrations / operational commands** -> `docs/system/OPERATIONS.md`43- **Service boundaries / invariants / data flow / required code patterns** -> `docs/system/ARCHITECTURE.md`44- **Shipped capability or catalog-style reference** -> `docs/system/FEATURES.md`45- **Actual project status or planned work that changed this session** -> `docs/project/ROADMAP.md`46- **Product direction or policy decisions** -> `docs/project/VISION.md` or the matching existing policy doc4748If the best-fit doc is missing, fall back to the closest existing root doc only when the learning still belongs there. Otherwise skip it.4950## Process51521. **Inventory existing ref docs** — check which eligible target files actually exist in the current project.53542. **Identify learnings** — from session context, list candidates. Apply the "would this save the next agent 5+ minutes?" filter. Discard the rest.55563. **Route each learning to one canonical doc** using the routing guide above. Prefer the most specific existing doc, not the most convenient one.57584. **Use the smallest safe edit.**59 - Prefer single-line append-only additions for root docs and gotcha-style notes.60 - Allow minimal in-place edits for stateful structured docs when append-only would create duplication or stale information.61 - Match the file's existing format exactly (table row, bullet, numbered item, short paragraph, code block entry).62635. **For gotchas in agent docs**, match numbering, bold-key style, and indentation exactly. The standard format is:6465 ```66 N. **Bold Key**: One-line explanation with specific details.67 ```6869 If no gotchas section exists, add `## Implementation Gotchas` before appending.70716. **For commands, features, roadmap items, or architecture tables**, update only the smallest relevant section. Do not reorganize unrelated content.72737. **Present the diff** — group the preview by file, show exactly what will change, and wait for approval before writing.7475## Rules7677- **Update only existing docs.** No new `docs/system/*` or `docs/project/*` files during `/retro`.78- **One learning, one home.** Do not copy the same learning into multiple docs.79- **Prefer append-only.** Use in-place edits only when a structured ref doc would become misleading or duplicative otherwise.80- **Keep edits narrow.** Touch the smallest relevant section and avoid rewrites or reorganization.81- **Never add comments like `// added by agent` or timestamps.** The git log is the audit trail.82- **Max 5 learnings per session.** If you have more, keep only the highest-signal ones.83- **Max 3 files per run** unless the user explicitly asks for broader documentation cleanup.84- **Be specific.** "Use `--legacy-peer-deps` with npm install" not "npm install may need flags."85- **Skip weak fits.** If no clearly correct existing doc exists, do not force the update.8687## When To Use8889- At the end of a coding session when non-obvious learnings were discovered90- After solving a tricky problem that cost significant debugging time91- When new CLI commands, features, architecture constraints, or operational procedures were added and the matching ref doc already exists92- When triggered by `/retro` or explicit request to capture learnings9394## Output9596- One to five narrow updates in the project's existing ref docs97- Each learning is routed to exactly one canonical file98- Each change follows the target doc's existing formatting conventions99- A grouped diff preview shown to the user before any file writes100101## Verification102103- Every learning passes the "would this save the next agent 5+ minutes?" filter104- Every target file exists before editing105- Every learning has a clear canonical home, with no unnecessary duplication106- Edits are append-only unless a minimal in-place structured update is clearly better107- The correct section is identified before editing, and untouched sections remain unchanged108109## Sibling skills110111Four knowledge-capture skills, distinguished by *scope* and *timing*:112113- `handoff` — produces a session summary for a fresh instance. Different output: this skill routes facts into existing reference files; that one writes a fresh summary doc.114- `compound-docs` — write a categorized solution document. Use when the learning is a confirmed end-to-end solution with reproducible code, not a one-line operational fact.