Retrospective
Turn execution experience into institutional knowledge. This skill orchestrates a fixed
Phase 0 through Phase 5 workflow that gathers evidence, generates insights, diagnoses root
causes, decides actions, scores atomicity, and persists learnings. The long-form rubrics
live verbatim in references/; this file is the orchestration contract.
This skill replaces the former retrospective agent (.claude/agents/retrospective.md).
It is callable from Skill("retrospective") and from /retro fill <date> (Issue #2079).
The Stop hook that once invoked it automatically was deleted in #3349, so a
retrospective is written when someone asks for one.
Triggers
| Trigger Phrase |
Operation |
run a retrospective |
Full Phase 0..5 workflow over the given scope |
retro fill |
Fill an unfilled auto-retro skeleton for a date |
extract learnings from this session |
Phase 0..4 over the current session |
diagnose this failure |
Phase 0..2 root-cause analysis, then stop |
what did we learn |
Phase 4 atomicity-scored learning extraction |
When to Use
| Situation |
Use This Skill? |
| Session ended with meaningful work and you want learnings persisted |
Yes |
An unfilled auto-retro skeleton exists in .agents/retrospective/ |
Yes (fill it) |
| Diagnosing why a task failed (Five Whys, fishbone) |
Yes |
| Capturing a single in-conversation correction ("no", "wrong") |
No, use reflect |
| Saving a quick checkpoint with no analysis |
No, use /checkpoint |
The output artifact is a Markdown file. The Learning Extraction Template in
references/learning-template.md defines the exact structure. Save to
.agents/retrospective/YYYY-MM-DD-[scope].md. When filling an auto-retro skeleton, write
to the existing YYYY-MM-DD-auto-retro.md file produced by the Stop hook.
Inputs
| Input |
Source |
Required |
| Scope |
User argument (session, task, date, PR) |
Yes |
| Session log |
.agents/sessions/ most recent for the period |
When available |
| Git history |
git log over the period |
When available |
| GitHub activity |
PRs and issues for the period (via the github skill) |
Optional enrichment |
Treat the session log as the system of record for what happened. Git history and GitHub
activity are derived evidence that corroborate or extend it. When a source is unavailable,
degrade gracefully: produce the artifact from the evidence you have and mark the missing
sections, never substitute invented data.
Process
The workflow is six sequential phases. Phase 0 gathers facts. Phases 1 and 2 interpret them.
Phase 3 decides actions. Phase 4 extracts and scores learnings. Phase 5 persists them. Each
phase links to the rubric and template it uses. Run them in order; do not interpret before
you observe.
Phase 0: Data Gathering
Gather facts before interpretation. Observation precedes diagnosis.
- Run the 4-Step Debrief (Observe, Respond, Analyze, Apply): see
frameworks.md, 4-Step Debrief.
- Build the Execution Trace chronology: see
frameworks.md, Execution Trace Analysis.
- Run Outcome Classification (Mad, Sad, Glad): see
frameworks.md, Outcome Classification.
Evidence sources: the most recent session log under .agents/sessions/, git log for the
period, and optional GitHub activity through the github skill. Do not use raw gh.
Phase 1: Generate Insights
Make meaning from data. Look past symptoms to find causes.
- Five Whys is mandatory for every failure: see
frameworks.md, Five Whys.
- Fishbone Analysis for complex failures with multiple contributing factors: see
frameworks.md, Fishbone Analysis.
- Force Field Analysis when a pattern recurs despite knowing better: see
frameworks.md, Force Field Analysis.
- Patterns and Shifts for multi-session trends: see
frameworks.md, Patterns and Shifts.
- Learning Matrix for quick categorization when short on time: see
frameworks.md, Learning Matrix.
Phase 2: Diagnosis
Prioritize findings for action. Diagnostic priority order: critical error patterns, success
analysis, near misses, efficiency opportunities, skill gaps, traceability health. The full
priority order, traceability metrics, and diagnosis template live in
diagnosis-and-actions.md, Diagnosis.
For each root cause that Five Whys surfaces, store a root-cause pattern for future
prevention: see
diagnosis-and-actions.md, Root Cause Pattern Management.
If the work touched diagnosis or action classification, stop here for the diagnose this failure trigger; otherwise continue to Phase 3.
Phase 3: Decide What to Do
Move from insights to action.
- Action Classification (Keep, Drop, Add, Modify): see
diagnosis-and-actions.md, Action Classification.
- SMART Validation of every proposed learning before storage: see
diagnosis-and-actions.md, SMART Validation.
- Dependency Ordering of the resulting actions: see
diagnosis-and-actions.md, Dependency Ordering.
Phase 4: Learning Extraction
Transform insights into stored knowledge. Score every learning 0 to 100 percent for
atomicity and reject vague statements. The scoring rubric, quality thresholds, worked
examples, and evidence-based tagging live in
diagnosis-and-actions.md, Atomicity Scoring.
Assemble the artifact using the byte-exact
Learning Extraction Template. Save to
.agents/retrospective/YYYY-MM-DD-[scope].md. When filling an auto-retro skeleton, overwrite
the placeholder sections in the existing YYYY-MM-DD-auto-retro.md and remove the UNFILLED
banner.
Phase 5: Persist and Close
Persist learnings to memory and evaluate the retrospective itself.
- Persist learnings with atomicity at or above 70 percent to Serena memory (ADR-037). Search
for existing patterns before creating new entries to avoid duplicates: see
diagnosis-and-actions.md, Memory Protocol.
- Close with +/Delta, ROTI, and Helped, Hindered, Hypothesis: see
frameworks.md, Closing Activities.
- Route any P0 or P1 delta item to a GitHub issue through the
github skill; store P2 and P3
items in backlog memory.
Success Criteria
Before the retrospective is complete, confirm:
Boundaries
- This skill reads evidence and writes one artifact plus memory entries. It does not open PRs
itself; it routes delta items to the
github skill.
- Memory and GitHub are integration points. A failed memory call degrades to a documented
fallback (write the artifact, note the memory write failed), never a silent context loss.
- Keep entry points thin. The Stop hook and
/retro fill parse inputs and call this skill;
they do not re-implement the workflow.
Scripts
| Script |
Purpose |
Exit codes |
scripts/run_retrospective.py |
Orchestrate Phase 0 to Phase 5 and write the retrospective artifact. |
0 artifact written; 1 a supplied learning scored below the persistence threshold (still written); 2 usage or configuration error; 3 unexpected external failure. |
scripts/extract_evidence.py |
Gather Phase 0 evidence (session log, git history) for the scope. |
0 evidence gathered (sources may be marked absent); 2 usage or configuration error; 3 unexpected external failure. |
scripts/score_atomicity.py |
Score a candidate learning against the 70% persistence threshold. |
0 at or above threshold; 1 below threshold (refine or reject); 2 usage or configuration error. |
References
- frameworks.md: Phase 0, 1, and closing activity rubrics
(4-Step Debrief, Execution Trace, Outcome Classification, Five Whys, Fishbone, Force Field,
Patterns and Shifts, Learning Matrix, +/Delta, ROTI, Helped/Hindered/Hypothesis).
- diagnosis-and-actions.md: Phase 2, 3, 4, and 5
rubrics (diagnosis priority and traceability, root-cause patterns, action classification,
SMART validation, atomicity scoring, evidence-based tagging, memory protocol).
- learning-template.md: the byte-exact Learning Extraction
Template that the output artifact must match.
.claude/agents/retrospective.md: the source agent body these references were lifted from
(canonical source for the rubrics; retired once the skill ships).
1---2name: retrospective3description: Extract learnings from a session or task through structured retrospective frameworks. Gathers evidence, runs Five Whys and fishbone diagnosis, scores atomicity, and writes a canonical retrospective artifact. Use to turn execution experience into institutional knowledge. Use when you say "run a retrospective", "retro fill", or "extract learnings from this session". Do NOT use for in-conversation correction capture (use the reflect skill).4license: MIT5---67# Retrospective89<!-- vendor-portability: declared. This skill reads the consumer's most recent session log under .agents/sessions/ as evidence and writes the retrospective artifact to .agents/retrospective/YYYY-MM-DD-[scope].md (creating the directory on demand). The session-log read is best-effort (the skill notes the source as absent when missing); the retrospective path is a write target. A vendored install without .agents/ gathers from git history alone and creates the output directory. Issue #2050. -->1011Turn execution experience into institutional knowledge. This skill orchestrates a fixed12Phase 0 through Phase 5 workflow that gathers evidence, generates insights, diagnoses root13causes, decides actions, scores atomicity, and persists learnings. The long-form rubrics14live verbatim in `references/`; this file is the orchestration contract.1516This skill replaces the former `retrospective` agent (`.claude/agents/retrospective.md`).17It is callable from `Skill("retrospective")` and from `/retro fill <date>` (Issue #2079).18The Stop hook that once invoked it automatically was deleted in #3349, so a19retrospective is written when someone asks for one.2021## Triggers2223| Trigger Phrase | Operation |24|----------------|-----------|25| `run a retrospective` | Full Phase 0..5 workflow over the given scope |26| `retro fill` | Fill an unfilled auto-retro skeleton for a date |27| `extract learnings from this session` | Phase 0..4 over the current session |28| `diagnose this failure` | Phase 0..2 root-cause analysis, then stop |29| `what did we learn` | Phase 4 atomicity-scored learning extraction |3031---3233## When to Use3435| Situation | Use This Skill? |36|-----------|-----------------|37| Session ended with meaningful work and you want learnings persisted | Yes |38| An unfilled auto-retro skeleton exists in `.agents/retrospective/` | Yes (fill it) |39| Diagnosing why a task failed (Five Whys, fishbone) | Yes |40| Capturing a single in-conversation correction ("no", "wrong") | No, use `reflect` |41| Saving a quick checkpoint with no analysis | No, use `/checkpoint` |4243The output artifact is a Markdown file. The Learning Extraction Template in44`references/learning-template.md` defines the exact structure. Save to45`.agents/retrospective/YYYY-MM-DD-[scope].md`. When filling an auto-retro skeleton, write46to the existing `YYYY-MM-DD-auto-retro.md` file produced by the Stop hook.4748---4950## Inputs5152| Input | Source | Required |53|-------|--------|----------|54| Scope | User argument (session, task, date, PR) | Yes |55| Session log | `.agents/sessions/` most recent for the period | When available |56| Git history | `git log` over the period | When available |57| GitHub activity | PRs and issues for the period (via the `github` skill) | Optional enrichment |5859Treat the session log as the system of record for what happened. Git history and GitHub60activity are derived evidence that corroborate or extend it. When a source is unavailable,61degrade gracefully: produce the artifact from the evidence you have and mark the missing62sections, never substitute invented data.6364---6566## Process6768The workflow is six sequential phases. Phase 0 gathers facts. Phases 1 and 2 interpret them.69Phase 3 decides actions. Phase 4 extracts and scores learnings. Phase 5 persists them. Each70phase links to the rubric and template it uses. Run them in order; do not interpret before71you observe.7273### Phase 0: Data Gathering7475Gather facts before interpretation. Observation precedes diagnosis.7677- Run the **4-Step Debrief** (Observe, Respond, Analyze, Apply): see78 [frameworks.md, 4-Step Debrief](references/frameworks.md#activity-4-step-debrief).79- Build the **Execution Trace** chronology: see80 [frameworks.md, Execution Trace Analysis](references/frameworks.md#activity-execution-trace-analysis).81- Run **Outcome Classification** (Mad, Sad, Glad): see82 [frameworks.md, Outcome Classification](references/frameworks.md#activity-outcome-classification).8384Evidence sources: the most recent session log under `.agents/sessions/`, `git log` for the85period, and optional GitHub activity through the `github` skill. Do not use raw `gh`.8687### Phase 1: Generate Insights8889Make meaning from data. Look past symptoms to find causes.9091- **Five Whys** is mandatory for every failure: see92 [frameworks.md, Five Whys](references/frameworks.md#activity-five-whys).93- **Fishbone Analysis** for complex failures with multiple contributing factors: see94 [frameworks.md, Fishbone Analysis](references/frameworks.md#activity-fishbone-analysis).95- **Force Field Analysis** when a pattern recurs despite knowing better: see96 [frameworks.md, Force Field Analysis](references/frameworks.md#activity-force-field-analysis).97- **Patterns and Shifts** for multi-session trends: see98 [frameworks.md, Patterns and Shifts](references/frameworks.md#activity-patterns-and-shifts).99- **Learning Matrix** for quick categorization when short on time: see100 [frameworks.md, Learning Matrix](references/frameworks.md#activity-learning-matrix).101102### Phase 2: Diagnosis103104Prioritize findings for action. Diagnostic priority order: critical error patterns, success105analysis, near misses, efficiency opportunities, skill gaps, traceability health. The full106priority order, traceability metrics, and diagnosis template live in107[diagnosis-and-actions.md, Diagnosis](references/diagnosis-and-actions.md#diagnosis).108109For each root cause that Five Whys surfaces, store a root-cause pattern for future110prevention: see111[diagnosis-and-actions.md, Root Cause Pattern Management](references/diagnosis-and-actions.md#root-cause-pattern-management).112113If the work touched diagnosis or action classification, stop here for the `diagnose this114failure` trigger; otherwise continue to Phase 3.115116### Phase 3: Decide What to Do117118Move from insights to action.119120- **Action Classification** (Keep, Drop, Add, Modify): see121 [diagnosis-and-actions.md, Action Classification](references/diagnosis-and-actions.md#activity-action-classification).122- **SMART Validation** of every proposed learning before storage: see123 [diagnosis-and-actions.md, SMART Validation](references/diagnosis-and-actions.md#activity-smart-validation).124- **Dependency Ordering** of the resulting actions: see125 [diagnosis-and-actions.md, Dependency Ordering](references/diagnosis-and-actions.md#dependency-ordering).126127### Phase 4: Learning Extraction128129Transform insights into stored knowledge. Score every learning 0 to 100 percent for130atomicity and reject vague statements. The scoring rubric, quality thresholds, worked131examples, and evidence-based tagging live in132[diagnosis-and-actions.md, Atomicity Scoring](references/diagnosis-and-actions.md#atomicity-scoring).133134Assemble the artifact using the byte-exact135[Learning Extraction Template](references/learning-template.md). Save to136`.agents/retrospective/YYYY-MM-DD-[scope].md`. When filling an auto-retro skeleton, overwrite137the placeholder sections in the existing `YYYY-MM-DD-auto-retro.md` and remove the UNFILLED138banner.139140### Phase 5: Persist and Close141142Persist learnings to memory and evaluate the retrospective itself.143144- Persist learnings with atomicity at or above 70 percent to Serena memory (ADR-037). Search145 for existing patterns before creating new entries to avoid duplicates: see146 [diagnosis-and-actions.md, Memory Protocol](references/diagnosis-and-actions.md#memory-protocol).147- Close with **+/Delta**, **ROTI**, and **Helped, Hindered, Hypothesis**: see148 [frameworks.md, Closing Activities](references/frameworks.md#closing-activities).149- Route any P0 or P1 delta item to a GitHub issue through the `github` skill; store P2 and P3150 items in backlog memory.151152---153154## Success Criteria155156Before the retrospective is complete, confirm:157158- [ ] One Markdown file exists at `.agents/retrospective/YYYY-MM-DD-[scope].md` (or the159 existing auto-retro skeleton was filled and its UNFILLED banner removed).160- [ ] The artifact structure matches the161 [Learning Extraction Template](references/learning-template.md) byte-for-byte, with162 placeholders filled.163- [ ] Every extracted learning carries an atomicity score and an evidence reference.164- [ ] Learnings at or above 70 percent atomicity are persisted to Serena memory, or the165 memory write failure is noted in the artifact.166167---168169## Boundaries170171- This skill reads evidence and writes one artifact plus memory entries. It does not open PRs172 itself; it routes delta items to the `github` skill.173- Memory and GitHub are integration points. A failed memory call degrades to a documented174 fallback (write the artifact, note the memory write failed), never a silent context loss.175- Keep entry points thin. The Stop hook and `/retro fill` parse inputs and call this skill;176 they do not re-implement the workflow.177178---179180## Scripts181182| Script | Purpose | Exit codes |183|---|---|---|184| `scripts/run_retrospective.py` | Orchestrate Phase 0 to Phase 5 and write the retrospective artifact. | `0` artifact written; `1` a supplied learning scored below the persistence threshold (still written); `2` usage or configuration error; `3` unexpected external failure. |185| `scripts/extract_evidence.py` | Gather Phase 0 evidence (session log, git history) for the scope. | `0` evidence gathered (sources may be marked absent); `2` usage or configuration error; `3` unexpected external failure. |186| `scripts/score_atomicity.py` | Score a candidate learning against the 70% persistence threshold. | `0` at or above threshold; `1` below threshold (refine or reject); `2` usage or configuration error. |187188## References189190- [frameworks.md](references/frameworks.md): Phase 0, 1, and closing activity rubrics191 (4-Step Debrief, Execution Trace, Outcome Classification, Five Whys, Fishbone, Force Field,192 Patterns and Shifts, Learning Matrix, +/Delta, ROTI, Helped/Hindered/Hypothesis).193- [diagnosis-and-actions.md](references/diagnosis-and-actions.md): Phase 2, 3, 4, and 5194 rubrics (diagnosis priority and traceability, root-cause patterns, action classification,195 SMART validation, atomicity scoring, evidence-based tagging, memory protocol).196- [learning-template.md](references/learning-template.md): the byte-exact Learning Extraction197 Template that the output artifact must match.198- `.claude/agents/retrospective.md`: the source agent body these references were lifted from199 (canonical source for the rubrics; retired once the skill ships).