retro
Extract Claude session summaries and owner messages to ground a retrospective and evergreen handoff
Session Retrospective from Transcript Evidence
Use when the owner invokes retro with a Claude Code session ID/prefix or JSONL path.
Write a candid session study from a cheap extract, then hand durable lessons to evergreen.
This is a separate workflow from story; use the study skill's required sections without copying
its template here.
Extract first
- Only Claude Code transcripts under
~/.claude/projects/<slug>/<id>.jsonlare supported. For another provider, stop and report the unsupported format; do not invent a parser. - Resolve the requested session with
harnez session extract <id|path> --json. If the owner did not identify a session, ask for its ID or path. Do not guess from the newest file. - Redirect the extract to a private temporary file and check the command's exit status before reading it:
retro_extract=$(mktemp)
harnez session extract <id-or-path> --json > "$retro_extract"
- JSON contains
source.path,source.bytes, orderedrecords(kind,timestamp,uuid,line,text), andstats(summary count, owner-message count, text bytes, first/last selected record, truncated tail). Default text output is also available. An error can leave a partial extract; discard it and report the error. - Inspect metadata first to prove the session: resolved path, source size, counts and selected time span.
State that first/last selected records may differ from the session's actual start/end.
If
truncated_tailis true, report that the incomplete final record was omitted. - Read owner messages completely in bounded chunks, preserving long decisions, slash-command names and arguments,
interruption markers and
[Image #n]placeholders. Images themselves are absent; never infer visual quality. Cite transcript evidence by source UUID and JSONL line number when a concrete decision or event needs verification. For example, select.records[] | select(.kind == "user")with a local JSON tool into another private file, then use line-bounded reads. Do not print the whole JSON extract into model context. - Read only needed summary sections first (especially errors/fixes and owner decisions). Headings vary:
4. Errors,**4. Errors**,4. Errors and fixes:. Repeated summaries may repeat or refer to earlier content; deduplicate the evidence while reading, and skip material already in live context. The extractor preserves all summaries; it does not deduplicate or offer section/date filters. - If there are no compaction summaries, stop and report that gap instead of silently making a transcript-based retro. Tool results, assistant replies, task notifications, system reminders and meta skill bodies are intentionally absent. Keep temporary extracts local; do not commit transcripts or extracts. Remove your temporary files when finished.
Ground the study
- Check current git status, then bounded git history for the selected time span in each relevant repository. Verify commit counts, ticket files/closes and studies against git and the tracker. On shared branches these are repository totals, not proof this session produced every commit; label attribution gaps.
- Use the Harnez session store for agent-start evidence if available. Do not infer agent counts or durations from prose.
- Search for an existing story/retro covering the same work. Extend or cross-link it instead of duplicating it; link per-sprint studies rather than retelling them.
- Return to the raw JSONL only for a specific unresolved fact via a targeted bounded search. Never read the whole transcript into context or inspect every tool result.
Write and hand off
- Read the installed
studyskill's required sections and output-location rules (source:docs/commands/study.mdin Harnez). Follow those shared rules and include relevant evidence. Respectdocs.studies: falseand the repository's local-docs fallback. Front matterkind: retro. - Add a mandatory Method and gaps section: identify session/source, extraction command, counts, evidence read and skipped, time range, truncation, unavailable images/tool evidence and any uncertain commit attribution. Separate observations from inferences; do not present summary claims as independently verified facts.
- Propose durable rules for
evergreen's repo docs/AGENTS.md targets. Harnez-managed docs and skills receive proposals for the owner, not direct edits. List harness changes for owner decision; do not invoke an unrequested workflow. - Present the draft and open questions for owner review. Do not describe it as owner-reviewed before that happens.
When committing is authorized,
git addnew study files first, then commit only explicit paths; update the study index only when the repo enables it. Report the study path, evidence counts, gaps and proposed evergreen handoff.
- Content
- file-backed
- License:
- AGPL-3.0-or-later
- Origin
- first-party
- Source:
- docs/commands/retro.md
- Source revision
3cb914dfaf6c43cbbbc43868d6b47c2cc7516c22- Requires
- Targets
- codex, claude
- Invocation
- /retro
Related skills
- bug-hunt — Run a bug hunt over active P1/P2 bug tickets: re-verify each against live code, close obsolete ones, fix the rest the way forward. Only on explicit /bug-hunt or 'bug hunt'.
- decide — Session-scoped autonomy for the orchestrating agent: answer simple questions yourself, consult cheap or smart advisors, push ready work without asking, and stop only for very critical questions. Only on explicit /decide.
- docup — Review and update bounded repository documentation by category (testing, architecture)
- epic — Plan, refine and run epics with open-epic checks, affinity grouping, internal goal setting, and file/run/next modifiers. Only on explicit /epic or 'epic'.