/praxis:retrospectfrom praxis
Session retrospect — analyze the current Claude Code session against the rules it ran under (project and global `CLAUDE.md`), identify friction patterns and root causes, propose context-appropriate improvement actions, then execute after user approval.
Ships in praxis. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Repeated friction wastes cycles across sessions. Unexamined pain stays unresolved.
Core principle: ALWAYS analyze root cause before proposing any action. Symptom-level fixes miss the underlying pattern.
Pipeline: Load -> Hygiene -> Analyze -> Audit -> Report/Approve -> Execute
Delegates to: oh-my-claudecode:tracer agent (causal pattern analysis),
oh-my-claudecode:analyst agent (pattern clustering) — invoked via
Agent(subagent_type="oh-my-claudecode:...")
Prerequisites: oh-my-claudecode must be installed. The tracer and
analyst calls in Stage 2 have no fallback, which is why this skill sits in
the Enhanced tier of the compatibility table (README.md), not Standalone.
Reference map:
references/stage1-2-analysis.mdreferences/stage2.5-audit.mdreferences/stage3-reporting.mdreferences/report-template.mdreferences/stage4-execution.mdreferences/appendices.mdNO ACTION WITHOUT ROOT CAUSE ANALYSIS FIRST.
PATTERN ≠ ROOT CAUSE. SYMPTOM ≠ ROOT CAUSE.
REPEATED PATTERN + MEMORY = FAILED REMEDY. ESCALATE.
TRACER + ANALYST CALLS ARE MANDATORY, NOT OPTIONAL.
If you have not completed Stage 2 (Analyze), you cannot propose actions.
Use at the END of a working session to extract learnings:
Use this especially when the same mistake happened more than once, when you feel "I should have done that differently", or when a new workflow pattern emerged that is not captured anywhere.
You MUST complete each stage before proceeding to the next.
Stage 1: Load Calibration Standard Read the governing rule files and turn them into concrete scan questions.
Stage 1.5: MEMORY.md Hygiene Pass (Detect-only) Run the bounded hygiene scan before the conversation analysis. It is unconditional.
Stage 2: Analyze Conversation Run the symmetric pre-scan lanes, derive root causes, and assign preliminary actions.
Stage 2.5: Action Distribution Audit Run the gate suite before any Stage 3 output.
Stage 3: Report + Approval Emit the canonical report shape, carry caveats forward, run the pre-output falsification gate, then ask for per-finding approval.
Stage 4: Execute Run only approved actions, then verify the resulting artifacts.
Before scanning the conversation:
SKILL.md
can exceed ~1500 lines) in bounded section/line-range chunks, never a single
broad read that can truncate and silently drop tail rules (see
references/stage1-2-analysis.md).Use references/stage1-2-analysis.md
before doing the actual scan. That reference is the full procedure for Stage 1,
Stage 1.5, Stage 2, and Stage 2.7.
Stage 1.5 runs unconditionally between Stage 1 and Stage 2. It surfaces latent MEMORY.md defects that the session-scoped friction scan cannot see.
Mandatory shape:
.omc/state/retrospect-hygiene-cursor.jsoncategory: memory_hygieneFive detection signals:
Cursor read mandate (entry — MUST run first):
next_batch_pointer to choose the batch startscanned_recent_batchnote into Stage 3 inputcarried-task-scan.py over the cursor and emit every candidate it prints
as a memory_hygiene finding with origin: carried — a line written into the
note as the next pass's task has no other path into a finding set, so without
this step it is displayed and then carried againCursor write mandate (exit — read-modify-write union under concurrency, MUST). This is the cross-session complement of the single-session falsification gate.
note lines with this cycle's linesnext_batch_pointer to the FURTHER of the two pointersconcurrent advance detected — union-merged note[carried-done <cycle>] / [carried-skipped <cycle>: <reason>]), so the
line stays as the record without resurfacing next cycle — see
references/stage4-execution.mdIf Stage 1.5 finds hygiene defects but Stage 2 finds zero friction events, take the hygiene-only path rather than the "No patterns found" early exit.
Read the full rules, signal definitions, failure modes, and carry-forward logic
in references/stage1-2-analysis.md.
Run the symmetric pre-scan before agent calls. The full mechanics live in
references/stage1-2-analysis.md.
Pre-scan lanes (all deterministic inputs, then judgment where required):
friction_eventssuccessful_patternstool_censususer_correctionself_correctionThe friction/error lanes scan the full corpus including isSidechain: true
(subagent) events, attributed to their delegated agent — so friction inside
git-master / review-* is not misread as parent "smooth" (issue #763). This
observation-layer inclusion does not touch the enforcement-layer discipline
gates' intentional isSidechain filter. Full rule in
references/stage1-2-analysis.md.
Mandatory categorization:
Every emitted finding must carry at least one of:
behavioraltoolworkflowspec-gapmemory_hygieneoutput_qualityIf tool is present, Tool Layer must be one of mcp, cli, builtin, or
skill.
Self-incrimination pass (anti-suppression, MUST): after the five lanes and
before clustering, run the self-incrimination pass — name the single worst
agent-caused friction you are tempted to omit or soften. It occupies a
guaranteed slot that does NOT consume the 5-event friction_events cap, and a
failure with no user_correction marker or no self_correction signature match
is still in scope. An agent-caused, user-visible-impact failure may not be
self-downgraded to note only (severity-honesty floor). The result is recorded
in the Stage 3 retrospect:suppression_ledger fence. Judging which item is most
painful is a self-feedback step and does not mechanize (issue #715) — the
externalized critic tier below is the enforcing external signal, not a smarter
self-check. Gate-8c is the rule that keeps the external tier honest: a
critic_diff: not-run is not acceptable when the live transcript carries user
corrections, so the external tier is not self-skipped in the conceal-prone case. Full rules in
references/stage1-2-analysis.md.
Externalized critic re-scan tier (conditional, issue #702): after MEMORY
repeat / cluster signals are available, run a READ-ONLY external critic scan
when the friction path is non-empty and the tier predicate in
references/stage1-2-analysis.md fires.
Record the outcome in the Stage 3 critic_diff: ledger line whether the tier
ran or was skipped. When it runs, the critic emits a critic_roots: block in
its subagent return; each root must be covered in the findings table or
folded: <root-id> because <reason> — Gate-10 checks this against the
critic's transcript return (not an agent-pasted fence), and applies on
transcript eligibility so the requirement cannot be self-cleared by the
critic_diff label (issue #772).
Core flow:
Early exit only when all are true:
Compaction rule: post-compaction sessions require the
retrospect:transcript_receipt fence in Stage 3.
Stage 2.7 is part of Stage 2 and fires only when the session includes artifact writes such as PR / issue / Slack / Notion actions.
It exists to catch silent-pass quality defects that a friction-only scan can
miss. Use the full trigger list, audit surfaces, and trail rules in
references/stage1-2-analysis.md.
Stage 2.5 is the last gate before Stage 3 output. Follow
references/stage2.5-audit.md: write the
draft findings table to a scratch file, run the deterministic audit script
(audit-distribution-gates.py — owns Gate-1 mechanical checks, Gate-2,
backing_repo, Gate-4, Gate-5, and the distribution card), and evaluate the
semantic gates yourself (Gate-1 category correctness, Gate-3 evidence
robustness, Gate-6 oracle match — verdicts passed via --gate3 / --gate6).
Output: the script-rendered distribution card with action counts plus gate verdicts — paste it verbatim, never hand-edit it.
If a gate still fails after 2 per-finding re-entries, surface the documented override prompt rather than silently continuing.
Stage 3 must follow the canonical report shape from
references/stage3-reporting.md.
Worked examples live in
references/report-template.md.
Output order:
## Retrospect Reportpre_scan_checklist, dismissed_candidates, critic_roots
(display-only when the critic ran), and the required transcript-derived
ledgers)<!-- retrospect:suppression_ledger begin --> ... end --> (mandatory on
every path — records the self-incrimination pass)<!-- retrospect:distribution begin --> ... end --><!-- retrospect:remedy_reach begin --> ... end --> when any finding
proposes a remedy-layer action (memory, claude_md_draft, skill_idea,
hook_code) — Gate-11 blocks the report without itPer-finding plan must state:
Stage 2 caveats: ... when applicableFalsification: ...remedy_reach: ... — does this remedy's surface fire where the finding was
uttered? Name the axis it structurally cannot reach, and whether that axis is
the larger-damage one. reach=none with worse_axis: yes has a stated
destination rather than a workaround: keep the finding at note, and where
the unreached axis is prose the agent writes, cite
ETHOS.md → Claims that terminate in prose
instead of substituting the reachable half. See
references/stage3-reporting.md.This gate fires immediately before each AskUserQuestion emitted by Stage 3.
Trigger detection:
(Recommended) suffix on any option labelsafer, natural fit, 안전한,
자연스러운, 추천, default toMandatory question (internal, never omitted):
If this proposal's premise is wrong, what observation should be missing from the current evidence? Is that observation actually missing?
Carry forward Stage 2 caveats:
tracer confidence: LOW|MEDsingle observationalternative root cause not ruled outGate-3 (c) downgrade appliedGate-3 (b) sibling demoted to triggerrepeat=true, resolved=true (escape hatch)analyst clustered with #NOutcome rules:
(Recommended) allowed(Recommended) DISALLOWED(Recommended) DISALLOWED and
ESCALATE to user with open premiseEvery ranked option needs a Falsification: trace line immediately below
Stage 2 caveats: (or in its place when there are no caveats).
gate-suppressed example: when a single observation leaves an alternative
root cause unresolved, surface the option unranked rather than marking it
(Recommended).
Approval flow:
For each finding, ask:
✅ Execute now⏭ Skip🕐 Defer (create note only)Do not execute any action until the user approves it.
note only items require no execution.
Before executing any approved action, read
references/stage4-execution.md. It holds
the full procedures, prompt variants, repo-resolution rules, and artifact
verification matrix. Actions 2 and 4 share one cross-boundary write gate
there — Step 0 (backing-repo verification) then Step 0a (external-repo
authorization); neither action may reach gh issue create with either step
unrun.
Action map:
| # | Action | Reference-owned gate |
|---|---|---|
| 1 | MEMORY.md feedback | duplicate-check before create; hookable / hookKeywords decision |
| 2 | GitHub issue | cross-boundary write gate (Step 0 backing-repo verification + Step 0a external-repo approval, shared with Action 4) + project issue workflow |
| 3 | global ~/.claude/CLAUDE.md draft | target detection + staging + approval |
| 4 | upstream feedback | cross-boundary write gate (same Step 0 / Step 0a as Action 2); Stage 3 rationale uses backing_repo: <resolved_backing_repo> and praxis-internal routing examples use <resolved-praxis-repo> placeholders until live resolution |
| 5 | skill idea note | local artifact write |
| 6 | hook code | branch/worktree guard + registration prompt |
Do not rationalize past any mandatory gate.
The larger rationalization catalog lives in
references/appendices.md.
STOP and return to the owning stage when any of these happen:
AskUserQuestion recommendation without an accompanying Falsification: trace lineStage 2 caveats: line when caveats applyretrospect:suppression_ledger fence, or silently dropping /
softening an agent-caused failure the self-incrimination pass surfacedThe exhaustive Red Flag catalog is in
references/appendices.md.
| Stage | Minimum check |
|---|---|
| Stage 1 | Load rule files and calibration questions |
| Stage 1.5 | Cursor schedule honored; detect-only hygiene scan executed |
| Stage 2 | Five pre-scan lanes + self-incrimination pass + categories + early-exit carve-outs checked |
| Stage 2.5 | Gates 1-6 evaluated before any Stage 3 output |
| Stage 3 | suppression_ledger fence emitted; Pre-Output Falsification Gate before each AskUserQuestion |
| Stage 4 | Reference procedure read; artifact verified after execution |
Full tables and stage-by-stage failure handling are in
references/appendices.md.
| Stage | Failure | Action |
|---|---|---|
| Stage 1.5 | MEMORY.md index inaccessible | skip hygiene with the documented trail line; continue to Stage 2 |
| Stage 2 | transcript unreachable | emit the documented *_skipped trail line and continue with the allowed fallback |
| Stage 2 | Agent type not found: oh-my-claudecode:tracer (or :analyst) — omc not installed | stop and report the missing prerequisite; do not substitute an inline analysis for the mandatory tracer/analyst pass |
| Stage 3 | Pre-Output Falsification Gate triggered but premise cannot be falsified | drop ranking, surface the option unranked, and ask with open premise |
| Stage 3 | finding lacks Stage 2 caveats line despite required caveats | block Stage 3 emission and return to Stage 2 / 2.5 |
| Stage 4 | artifact write fails | report the failure; do not silently drop the action |
The complete failure matrix is in
references/appendices.md.
Gate enforcement. Gate-7, Gate-8 and Gate-10 through Gate-13 are self-checked: the skill applies each one to its own Stage 3 draft and does not emit the report until every gate passes. No hook backs them up.
audit-distribution-gates.pymechanizes the per-finding half (Stage 2.5). Gate-9 is retired.
audit-distribution-gates.py can read themretrospect:transcript_receipt
fencereferences/stage3-reporting.mdaudit-distribution-gates.py (opens in a new tab)carried-task-scan.py (opens in a new tab)references/appendices.md (opens in a new tab)references/report-template.md (opens in a new tab)references/stage1-2-analysis.md (opens in a new tab)references/stage2.5-audit.md (opens in a new tab)references/stage3-reporting.md (opens in a new tab)references/stage4-execution.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Triggers on "retrospect", "what went wrong", "session review", "session improvement", "what was the issue", "improve".
Other plugins' skills for the same job
16 skills in this plugin
/cmux-delegateHand off an existing independent issue that surfaced mid-task to its own Claude Code session in a new cmux workspace, with auto-collected context; that session runs issue→worktree→PR alone. Not for splitting the current task./cmux-recover-sessionsBulk recover Claude Code sessions after a crash, power loss, OOM kill, or reboot by scanning the .jsonl files Claude Code persists automatically. Interactive interview chooses recovery scope and layout. Use this when sessions died and you need them back. The .jsonl scan reflects each session's real final state, so no snapshot taken before the crash is needed.
/codex-review-wrapWorktree-aware wrapper for /codex:review. Forces explicit worktree selection when several worktrees are active, preventing silent cwd mismatch, then gates every returned finding: premise verification before fact-modifying edits, flip detection halting A→B→A oscillation, sibling cross-checks for a port or parallel hotfix, a diminishing-returns advisory (PRAXIS_DIMINISHING_RETURNS_N), and a per-finding approval ask. It also reaps leaked openai-codex brokers (PRAXIS_CODEX_REAP=1).
npx claudepluginhub devseunggwan/praxis --plugin praxis