Retrospect

From mikeprasad/aria-knowledge · View interactive version

Retrospect is an AI agent skill from the GitHub repository mikeprasad/aria-knowledge. Structured retrospective on a shipped commit range, release, PR, commit, or session: per-fix validation, evidence-sourcing pass, re-diagnosis, action verdicts, growing failure-mode library. Triggers — "/aria-cowork:retrospect", "retrospect this". (Cowork variant — namespaced-only.)

How to use this skill

Skill file

/retrospect — Release retrospective with validation enforcement (cowork variant)

Run a structured retrospective on a shipped commit range (or single commit, release, deployment, PR, or current session). Produces a 10-section markdown report with per-fix verdicts, validation status, action recommendations, and re-diagnosis when fixes failed. Writes findings to <knowledge_folder>/logs/retrospect/ and runs aria's standard intake.

Cowork variant of aria-knowledge's /retrospect. Output schema (10-section report shape, frontmatter, logs/retrospect/ destination) byte-identical per #19i + #19j. Three input-discovery divergences (per #19c + #19e + #19f):

Per-fix validation enforcement (#19g), Evidence-Sourcing Pass at Step 3.5 (#19h), failure-mode pattern library reads/writes to shared rules/retrospect-patterns.md + project-tier projects/aria/retrospect-patterns.md (#19k) port byte-faithfully. Cross-plugin output coordination per #19n: cowork's /retrospect writes to the same logs/retrospect/ directory as aria-knowledge's. Filename collisions handled via timestamp slug. Both plugins reading the same dir produces unified retrospective history.

Source spec: aria-knowledge's docs/specs/2026-05-03-retrospect-skill-design.md (cross-plugin shared spec).

Runtime Gate (per ADR-094)

Canonical resolution: This is the Claude Cowork variant — namespaced-only. When both plugin-claude-code and plugin-claude-cowork are loaded in the same session (most common in Claude Desktop), bare /retrospect resolves to aria-knowledge's variant — Code is the canonical owner of all 24 dual-port skills per ADR-094 §Part 1. To reach this skill, use the namespaced form: /aria-cowork:retrospect. Do NOT match bare /retrospect — that belongs to aria-knowledge.

Before Step 0 — runtime self-correction. Check whether the Bash tool is available in this session. If Bash IS available (you are running in Claude Code or another runtime with shell access), this invocation reached the wrong variant for the runtime. Do not ask — redirect. Announce it in one line, then use the Skill tool to invoke retrospect with the same arguments the user provided, and do not run this skill's steps:

↪️ Redirecting to /retrospect — you invoked the aria-cowork variant, but you are running in Claude Code or another runtime with shell access.

This variant uses user-paste fallback for git output (Cowork has no shell access). For the Code-native variant (runs git log / git diff / gh pr view directly via Bash), use /retrospect (the aria-knowledge canonical).

⛔ The redirect is unconditional — every mode including auto, and no opt-out. Reaching this variant under that condition is always a mis-invocation, so there is nothing for the user to decide. Design record: docs/superpowers/specs/2026-08-28-runtime-gate-auto-redirect-design.md (D2 auto-redirect, D3 no escape hatch, D6 announce-don't-swap-silently).

If Bash is NOT available (normal Cowork runtime), proceed to Step 0.

When to use

Step 0: Inputs & Mode Detection

Parse the invocation arguments. The first positional argument is the scope keyword; subsequent positional arguments are scope-specific. Seven scopes plus a no-args default:

| Scope | Trigger | Backward-compat flag (still accepted) | Bundle source |

|---|---|---|---|

| (no args) | /retrospect | — | Auto-range: last push on current branch — git log @{push}..HEAD if upstream is set, else git log -10 and ask user to confirm range |

| commit | /retrospect commit <hash> | --commit <hash> | Single commit |

| range | /retrospect range <ref1>..<ref2> | --range <ref1>..<ref2> | git log <ref1>..<ref2> |

| pr | /retrospect pr <num> | --pr <num> | gh pr view <num> --json commits then resolve to commit SHAs |

| session | /retrospect session | --session | Files Claude has touched in the current conversation (read from session state, not git). No deploy yet — all fixes auto-tag 🚫 unvalidatable. |

| release (NEW) | /retrospect release | (none) | Commits since the most recent semver tag. git describe --tags --abbrev=0 to find the tag, then git log <tag>..HEAD. If no tags exist on the repo, fall back to auto-range and warn the user. |

| deployment (NEW) | /retrospect deployment | (none) | Commits since the last deployment marker — see "Deployment detection cascade" below. |

Argument parsing rules:

Cowork scope-handling per #19c (user-paste fallback for git-bound scopes):

| Scope | Cowork behavior |

|---|---|

| session | Native. Uses files Claude has touched in the current conversation — no git needed. |

| decision | Native (cowork-relevant scope). Reviews decisions surfaced in the current conversation — no git needed. |

| commit / range / pr / release / deployment / (no args = auto-range) | User-paste fallback. Cowork has no shell access to run git log, git diff, gh pr view, gh release view, etc. At scope-start, prompt the user to paste the equivalent output. Example prompts: "Paste the output of git log --oneline <range> (or just the commit subjects, one per line):", "Paste gh pr view <num> JSON or human-readable output:". Accept whatever shape the user provides and parse the commit SHAs / subjects / file lists from there. Once data is in conversation context, downstream Step 1+ analysis is IDENTICAL to aria-knowledge — same anchor block, same pattern-library lookup, same Evidence-Sourcing Pass, same verdicts. |

If a git command appears in the scope-table or body below, treat it as aria-knowledge documentation — cowork prompts the user to paste the equivalent output instead of running the command. The skill's analytical logic doesn't care where the git data came from (shell or paste); only the acquisition path differs.

Deployment detection cascade (Q2.1=3)

When invoked as /retrospect deployment, attempt to resolve the deployment marker by trying these signals in order. First success wins; on no-success, fall through to the prompt.

  1. GitHub Releases — gh release view --json publishedAt,tagName 2>/dev/null (most recent release). If returned, treat the release tag as the marker; bundle = git log <tag>..HEAD.
  2. Semver tags — git tag --sort=-creatordate | head -1. If a tag matches v?\d+\.\d+\.\d+ (and step 1 returned nothing), use it as the marker.
  3. Last commit on main (or master) — git log -1 --format=%H origin/main (or origin/master if main doesn't exist). Treat as the marker; bundle = git log <sha>..HEAD. This catches projects without releases or tags.
  4. Prompt user — if none of the above resolved (e.g., no remote, no tags, no gh auth), ask: "I couldn't auto-detect the last deployment for /retrospect deployment. Provide a marker (commit hash, tag, or ISO timestamp), or type auto-range to fall back to last-push behavior."

Print the resolved marker source ("Detected via gh release: v1.4.2 (2026-05-01)") in the Anchor block (§4.1) so the user can verify what the skill thought "deployment" meant.

After mode detection, gather:

  1. Goal — Ask the user: "What was this release/range supposed to fix? (One sentence is fine.)" If they don't reply, fall back to commit message subjects + PR description.
  2. Tickets — Scan commit messages with regex \b([A-Z]{2,}-\d+)\b for Linear-style ticket IDs. If any are found AND Linear MCP is available, fetch each ticket's Product/Technical Intake + recent comments. If Linear MCP is unavailable, note "ticket context unavailable" but continue.
  3. Post-deploy outcome — Ask the user: "For each fix, what's the post-ship evidence? (✅ closed / ⚠ partial / ❌ failed / ❓ untested)" Show the per-commit list and accept inline replies. If user can't supply evidence for any fix, mark those ❓ and note that §10 will recommend instrumentation.

If scope is session (or invoked via --session), skip post-deploy outcome (no production yet) and tag all fixes 🚫 unvalidatable; their actions will resolve to HOLD-PENDING-DEPLOY.

Step 0.5: Active Knowledge Surfacing

If the user's config (<knowledge_folder>/aria-config.md) has active_knowledge_surfacing: true (default as of v2.15.0), surface relevant tagged knowledge BEFORE Steps 1-3 so loaded files inform pattern selection and evidence sourcing. If the field is false, skip this step entirely (note Active surfacing: disabled in the Anchor block).

Algorithm:

  1. Build query. Combine, separated by spaces: the Goal sentence from Step 0; the first 3 commit subjects in the bundle range; PR title if scope is pr; any detected Linear ticket IDs (e.g., LINEAR-123); the resolved deployment marker label if scope is deployment; the range descriptor (e.g., v0.4.2..HEAD).

2–6. Rank and select. This runtime cannot run code, so apply the shared ranking by hand. (a) Read <knowledge_folder>/index.md (resolve <knowledge_folder> from the config's knowledge_folder field) and take the ### tagname headers under ## Tag Index as the vocabulary; ignore ## Other Tags (the freeform tier). (b) Lowercase the query, strip punctuation to spaces, dedupe to a word set, and match words to tag names by exact equality — no substring, no fuzzy. A word also matches through an alias: a ## Known Tags line of the form tag [aliases: a, b] makes a and b count as tag (first definition wins). (c) Gather the - path — description lines under each matched tag and dedupe by path. When projects_enabled: true and projects_list is non-empty (both in <knowledge_folder>/aria-config.md), each tag listed there is a configured project tag and also carries every index line whose path starts with projects/<tag>/. (d) Rank, fire and cap with this paragraph, which is the canonical ranking copied verbatim — do not paraphrase it: <!-- surfacing-ranking:start -->Rank the candidate files: (1) a file carrying a matched project tag first; (2) then files carrying more of the matched tags; (3) then files whose path or index description contains more of the task's own words (lowercase, length over 2, common words dropped); (4) then authored files before files under logs/; (5) then the file whose rarest matched tag has the fewest files; (6) then index order. Fire when 2 or more tags match, or when 1 matched tag is a configured project. Keep the top 5.<!-- surfacing-ranking:end --> A configured project tag is a tag listed in projects_list, counted only when projects_enabled: true (a disabled or empty list means no project tags). If the firing rule does not hold, note Active surfacing: 0 matches (below threshold) in the Anchor block and skip to Step 1.

  1. Ledger filter (best-effort, cowork-fallback to in-memory per #19e). aria-knowledge's ledger is the file named by ledger= in its ARIA CONFIG line (in its private per-user state directory). If such a line reached this session and the file exists and is readable with Read, drop already-listed paths. ⛔ Never guess by picking the newest file matching the ledger glob — that is the most recently modified ledger on the MACHINE, i.e. another live session's whenever yours is absent or not newest, and a foreign ledger DROPS files never surfaced to this session. If no ledger= path is available (or it reads none) OR the Read fails OR no ledger exists OR Cowork's sandbox cannot reach that directory, fall back to in-skill in-memory dedup: maintain a list of files already loaded earlier in THIS skill's invocation (across all of Step 0.5) and skip re-reads — and say so in the surfacing block (Ledger: none for this session — in-memory dedup only), so an unfiltered load never reads as a filtered one. Per-invocation scope, not per-session — cross-skill dedup is best-effort in cowork (no hook layer pre-populates the ledger). The ledger records paths RELATIVE to <knowledge_folder>, the same form the index lists them in and (in Claude Code) the CLI prints them in, so compare paths against ledger lines exactly as printed; do not resolve them first.
  1. Read matched files. For each remaining path (up to 5), resolve it against <knowledge_folder> to an absolute path before Read (the tool needs an absolute path; paths come relative), then Read the full file into context. Read the top 5 as ranked. Then, if none of the paths you read is under logs/retrospect/, look under the tags you matched in items 2–6 in ## Tag Index of <knowledge_folder>/index.md for logs/retrospect/ lines and Read at most ONE — the most recent by its dated filename — and say in the surfacing block that it was added for loop closure (past retros inform new retros on the same topic). Never reorder or drop any of the top 5.
  1. Summarize. Before Step 1's Anchor Block, emit a 3-line surfacing block:

```

Active Knowledge Surfacing:

Tags matched: <tag1> <tag2> ...

Files loaded: <N> (<file1>, <file2>, ...)

Relevance: <one sentence per file: why this informs the retrospective>

```

  1. Carry-forward. These loaded files become input to Step 2 (Load Pattern Libraries — past retros may already have catalogued the relevant failure-mode patterns) and Step 3.5 (Evidence-Sourcing Pass — they may already provide validation or falsification for fixes in this range).
  1. Tracked artifacts surfacing — SKIPPED in cowork per #19f + ADR-005. aria-knowledge surfaces CODEMAP directory + STITCH file for the analyzed range's project as Step 11 (detects project tag from git diff --name-only; CODEMAP staleness-checked against codemap_staleness_threshold_days; STITCH against stitch_staleness_threshold_days; ledger-deduped via the per-session ledger named by ledger= in ARIA CONFIG, never a guessed path). Cowork excludes /codemap + /stitch skills per ADR-005 AND cowork can't run git diff directly — so this step is dropped entirely. The Step 9 surfacing block does NOT add the "Tracked artifacts: ..." 4th line in cowork. Retrospective verdict in cowork doesn't depend on codebase-structure validation — if a retro needs CODEMAP-grounded analysis, run aria-knowledge's /retrospect from Claude Code.

Step 1: Print the Anchor Block

Before producing any verdict, emit the anchor so the rest of the report can be traced to inputs:

Anchor:
  Goal:    <stated goal>
  Mode:    <auto-range | commit | range | pr | session | release | deployment>
  Range:   <commit range descriptor, e.g. v0.4.2..HEAD, 12 commits, 38 files>
  Tickets: <LINEAR-123 (Acceptance: ...), LINEAR-456 (...) | (none) | (unavailable)>
  Outcome: <user-supplied per-fix status table | (untested) | (per-session — no deploy)>

Step 2: Load Pattern Libraries

Read the canonical pattern library at <knowledge_folder>/rules/retrospect-patterns.md (resolved per <knowledge_folder>/aria-config.md knowledge_folder).

If the bundle is detected to belong to a known project (commits include paths under a configured projects_list[<tag>].project_root), additionally read <knowledge_folder>/projects/<tag>/retrospect-patterns.md if it exists.

Hold both pattern lists in context for use in §4.4 (Failure-Mode Pattern Check). Do not run pattern detection yet — this step is just loading.

Step 3: Enumerate Fixes & Preliminary Triage

For the loaded bundle, enumerate each fix. A fix is one of:

Number them #1, #2, … in commit order. For each fix, capture:

If session scope, enumerate by file-touch sets that resolve a single concern (Claude's judgment from session context). Preliminary Bundle-verified? = N/A and Preliminary Validated? = 🚫 unvalidatable (no deploy yet).

After preliminary triage, list every fix whose Preliminary Bundle-verified? is 🤷 — these are candidates for Step 3.5's bundle-marker pass. Separately, list every fix whose Preliminary Validated? is ⚠ partial / ❓ unvalidated / 🚫 unvalidatable — these are candidates for Step 3.5's outcome pass. ❌ Invalidated fixes skip Step 3.5 (they go directly to REVERT/REDO-MINIMAL in §4.3 unless the user contests the falsification). ✅ Validated fixes also skip Step 3.5 (already confirmed).

Step 3.5: Evidence-Sourcing Pass

Two sub-passes that run in order before the report is rendered. Goal: convert as many 🤷 / ⚠ / ❓ / 🚫 candidates from Step 3 to ✅ or ❌ as possible before §4.2 emits its bundle-verification verdict and §4.3 emits its per-fix Validated? verdict.

This step can be skipped with the --no-source flag for a quick structural review. When skipped, all preliminary statuses pass through to §4.2 and §4.3 unchanged and §4.10 lists every gap as NOT-ATTEMPTED.

The synchronous-barrier discipline applies: if a sub-pass surfaces a USER-INPUT ask, hold for response. Default to one ask at a time unless the user asks for a batch.

3.5.1: Bundle-Marker Sub-Pass (resolves 🤷)

For each fix from Step 3 with Preliminary Bundle-verified? = 🤷, attempt to confirm the fix's code is present in the deployed bundle.

Auto-source candidates (most retrospects fall here):

USER-INPUT escape hatch:

Record per fix using the same shape as /prospect's 3.5.2:

Fix #N — bundle-marker result:
  Question:           Did fix #N's code reach the deployed bundle?
  Tool used:          <Bash curl <url> | WebFetch <url> | gh run view <id> | mcp__vercel__get_logs | ASK <surfaced-to-user>>
  Finding:            <one-paragraph factual summary, with URL anchor or grep hit>
  Verdict:            UPGRADED-TO-✅ verified | UPGRADED-TO-❌ NOT-IN-BUNDLE | NO-MOVEMENT-CAPABILITY | NO-MOVEMENT-STRUCTURAL | INCONCLUSIVE
  New Bundle-verified?: <updated tag>

When this sub-pass completes, every fix has a final Bundle-verified? value (✅ verified / 🤷 unverified / ❌ not-in-bundle). §4.2 emits this state directly. ❌ NOT-IN-BUNDLE is a strong signal — the fix definitively did not ship; its action defaults to REVERT or RESHIP-AND-VERIFY in §4.3.

3.5.2: Outcome Sub-Pass (resolves ⚠ partial / ❓ unvalidated / 🚫 unvalidatable)

For each fix from Step 3 with Preliminary Validated? = ⚠ / ❓ / 🚫 AND Bundle-verified? ≠ 🤷 (a fix that didn't ship can't be outcome-validated), attempt to confirm the fix's outcome in production.

Generate the decisive question — what observable evidence would change the verdict from ⚠/❓/🚫 to ✅ Validated or ❌ Invalidated? Format:

Fix #N: <subject>
  Preliminary Validated?:  <⚠/❓/🚫>
  Decisive question:        <one-line — "what observable evidence would close this?">
  Answer source:            AUTO-SOURCEABLE | USER-INPUT | MIXED
  Sourcing plan:            <tools/queries to run>

Auto-source candidates (retrospect-specific):

USER-INPUT escape hatch (and when to demote to it):

Surface format mirrors /prospect's 3.5.3 exactly:

[ASK #M of K] Fix #N — <subject> (<short-sha>)

Why this matters:
  <one-line — what changes about Fix #N's verdict if we know this>

What I tried autonomously (if MIXED):
  <one-line — e.g., "Queried Vercel logs since deploy; found 0 occurrences of the targeted error and 4 of an adjacent error. Ambiguous — need your read on whether the adjacent one is a regression.">

Citations / context inline:
  <log excerpts, ticket comment quotes, test output — whatever the answer depends on>

Options:
  1) <option, with one-line consequence>
  2) <option, with one-line consequence>
  3) Other — describe in reply
  4) Skip — leave fix #N at <preliminary status>; it will HOLD-PENDING-EVIDENCE in §4.10

Same rules as /prospect's 3.5.3: neutral framing, separate Recommendation line allowed below options, per-question explicit pick, bare-number replies pick, "Skip" defaults to HOLD-PENDING-EVIDENCE / HOLD-PENDING-DEPLOY / HOLD-PENDING-VERIFICATION as appropriate.

Record per fix:

Fix #N — outcome result:
  Question:           <repeat decisive question>
  Tool used:          <listed>
  Finding:            <factual summary with citations>
  User pick (if any): <option N | "skip" | "other: <text>">
  Verdict:            UPGRADED-TO-✅ Validated | UPGRADED-TO-⚠ partial | UPGRADED-TO-❌ Invalidated | NO-MOVEMENT-CAPABILITY | NO-MOVEMENT-STRUCTURAL | INCONCLUSIVE

⛔ A no-movement verdict MUST pick one of the two — in both sub-passes (3.5.1 bundle-marker and 3.5.2 outcome). They respond to a better pass in opposite directions, so a pooled tally cannot be interpreted later: a falling unresolved rate becomes indistinguishable from a shift in what kind of claims the range happened to contain.

⚠ Classify at the moment you stop, while you still know why you stopped — not afterwards from the residual's Attempt status label. Measured 2026-08-22 across 5 such entries, 3 were mislabelled: they carried ATTEMPTED-FAILED while describing an on-device recording, a package fetch, and an SSH read of a live box.

  New Validated?:     <updated tag with sub-tag where applicable>

3.5.3: Constraints (apply to both sub-passes)

3.5.4: Pass Summary

When both sub-passes complete, emit a one-block summary before moving to Step 4:

Evidence-Sourcing Pass complete.

Bundle-marker sub-pass (§3.5.1):
  Candidates examined:        <N>
  Upgraded to ✅ verified:     <N>
  Upgraded to ❌ not-in-bundle: <N>
  No movement (still 🤷):       <N>
  Skipped by user:             <N>

Outcome sub-pass (§3.5.2):
  Candidates examined:        <N>
  Upgraded to ✅ Validated:    <N>
  Upgraded to ⚠ partial:       <N>
  Upgraded to ❌ Invalidated:  <N>
  No movement (still ⚠/❓/🚫): <N>
  Skipped by user:             <N>

Total tool calls:             ~<N>
Skipped by --no-source:       <N> (entire pass)

The post-pass values feed §4.2 (Bundle-verified?) and §4.3 (Validated?). The residual 🤷 / ⚠ / ❓ / 🚫 plus their attempt-status feed §4.10.

Step 4: Produce the 10-Section Retrospective Report

Render a markdown document with the 10 sections below in order. Each section heading uses ### N. <title> format. Sections that don't apply to the current scope are emitted with a one-line "N/A: <reason>" — never silently skipped.

4.1. Section 1 — Anchor & Inputs

Re-emit the anchor block from Step 1, verbatim, as Section 1 of the report. This makes the report self-contained when read outside the chat.

4.2. Section 2 — Bundle-Verification Gate

For each fix from Step 3, emit the post-Step-3.5.1 Bundle-verified? status. §4.2 is the bundle-deployment ledger; its values come directly from Step 3.5.1's Bundle-Marker Sub-Pass, which already attempted to source the marker autonomously and surfaced any USER-INPUT asks that were needed.

Three possible statuses per fix:

Render as a clear list per fix:

Fix #N: <subject> (<short-sha>)  →  <✅ Verified | 🤷 Bundle-unverified | ❌ Not-in-bundle>
  Source: <Step 3.5.1 tool/finding citation, e.g., "curl <url> | grep '[CSB-DIAG-042]' → 1 hit">
  (For 🤷) Reason: <Step 3.5.1 verdict tag>
  (For ❌) Implication: <RESHIP-AND-VERIFY or REVERT, deferred to §4.3 action>

If the scope is session, this section emits "N/A: session scope (no deploy yet)." Step 3.5.1 is also a no-op in this scope.

4.3. Section 3 — Per-Fix Verdict

For each fix from Step 3 that passed §4.2 (bundle verified or session mode), emit a horizontal-rule-separated block with these fields. Mirror the formatting style of the baseline review tag taxonomy (✅, ⚠ partial, ⚠ over-engineered, ⚠ theory-wrong, ⚠ counterproductive).

Required fields:

Optional fields:

Render each fix as a block, not a wide table:

Fix #N: <subject> (<short-sha>)
Status:                <tag>
Necessary?:            <YES/NO/UNCLEAR> — <reason>
Complications:         <list or None>
Minimal alternative:   <description>
Maintenance cost:      <description>
Validated?:            <status>  (post-Step-3.5.2)
Evidence sourced (optional): <one-line with citation>
Action:                <action>
Rule cite (optional):  <rule>
────────────────────────────────────────

Hard rule (action gating):

The hard rule mirrors /prospect's discipline: actions cannot upgrade past their evidence floor. Step 3.5 has already attempted to lift evidence floors; what remains is genuine residual uncertainty that gates action selection.

4.4. Section 4 — Failure-Mode Pattern Check

Run the bundle against both pattern libraries loaded in Step 2 (canonical + project-specific if applicable). Detection is judgment-based — read each pattern's "Detection cues" and assess whether the bundle, commit messages, or session transcript exhibits them.

For each pattern hit, emit:

[PATTERN] <pattern-name> (source: rules/retrospect-patterns.md | projects/<proj>/retrospect-patterns.md)
  Evidence: <what in the bundle/transcript triggered the hit>
  Counter-discipline: <one-line reminder of the pattern's counter-discipline>

If no patterns hit, emit: "No catalogued failure-mode patterns detected. (See §9 for novel patterns.)"

4.5. Section 5 — Cross-Change Tally

Emit raw counts only — no interpretation in v1.

Tally:
  Fixes shipped:                    <N>
  Validated (✅):                    <N>   (post-Step-3.5.2)
  Partially validated (⚠):           <N>   (post-Step-3.5.2)
  Invalidated (❌):                  <N>   (post-Step-3.5.2)
  Unvalidated (❓):                  <N>   (post-Step-3.5.2)
  Unvalidatable (🚫):                <N>   (post-Step-3.5.2)
  Bundle-verified (✅):              <N>   (post-Step-3.5.1, §4.2)
  Bundle-unverified (🤷):            <N>   (post-Step-3.5.1, §4.2)
  Not-in-bundle (❌):                 <N>   (post-Step-3.5.1, §4.2)
  Theory-driven refactors:          <N>
  Required by Linear acceptance:    <N>
  Discovered-during-process:        <N>
  Pattern hits this run:            <N>

Evidence-Sourcing Pass — bundle-marker sub-pass (§3.5.1):
  Candidates examined:              <N>
  Upgraded to ✅ verified:           <N>
  Upgraded to ❌ not-in-bundle:      <N>
  No movement (still 🤷):            <N>
  Skipped by user:                  <N>

Evidence-Sourcing Pass — outcome sub-pass (§3.5.2):
  Candidates examined:              <N>
  Upgraded to ✅ Validated:          <N>
  Upgraded to ⚠ partial:             <N>
  Upgraded to ❌ Invalidated:        <N>
  No movement (still ⚠/❓/🚫):       <N>
  Skipped by user:                  <N>

Sourcing pass overall:
  Total tool calls:                 ~<N>
  Skipped by --no-source:           <N>   (entire pass)

A "theory-driven refactor" is a fix that rewrote working code based on a hypothesis rather than a confirmed bug location. Discovered-during-process means the fix addresses a bug found while working on something else (not the original goal).

Interpretation of these counts is left to §4.6, §4.7, and §4.9.

4.6. Section 6 — Re-frame Check

Three questions, in order. Answer each in 1–2 sentences with the supporting evidence.

  1. Is the original problem statement still right? Or did the bundle reveal that the user-reported bug is a different bug than the bundle was aimed at?
  2. Was the bug correctly scoped? Single bug, or multiple bugs presenting as one?
  3. Is the user-reproducible scenario still the right test? Or has the testing surface drifted?

If the answer to #1 is "no," explicitly note: "Re-frame triggered. Hold all fixes targeting the previous problem statement pending re-diagnosis (§4.7)."

4.7. Section 7 — Re-diagnosis

List the surviving hypotheses for the actual root cause (only run this section if any fix's post-Step-3.5.2 Validated? is ❌ Invalidated or ⚠ partial, OR §4.6 triggered re-frame). For each hypothesis:

Hypothesis: <one-line statement>
  Used by fixes: <#1, #3, #5>
  Evidence FOR:    <observations consistent with this hypothesis — INCLUDE Step 3.5.2 sourced findings with citations>
  Evidence AGAINST: <observations inconsistent — INCLUDE Step 3.5.2 sourced findings>
  Sourcing attempted: <YES (see Step 3.5.2 result for fixes #N) | NO (auto-sourcing skipped, declined, or not categorized as auto-sourceable)>
  Confidence:      LOW / MEDIUM / HIGH
  To confirm:      <specific signal to look for — feeds §4.10>

Evidence FOR/AGAINST must integrate any findings from Step 3.5.2's outcome sub-pass. If Step 3.5.2 produced a finding that moved a fix to ⚠ partial (e.g., closed-part-of-target upgrade from ❓), cite that finding here as Evidence FOR the partial-success hypothesis AND as Evidence AGAINST the full-fix-worked hypothesis. If Step 3.5.2 produced a contradicting finding the user contested or overrode, note both perspectives.

Discarded hypotheses (ones the bundle's outcomes OR Step 3.5.2's sourcing proved wrong) are listed separately under "Hypotheses ruled out by this retrospective or sourcing pass" with one-line reasons and source citations where applicable. This is learning, not waste — captures what was considered AND what evidence retired it.

If all fixes are post-Step-3.5.2 ✅ validated and §4.6 didn't trigger, this section emits "N/A: all fixes validated (Step 3.5.2 closed all gaps)."

4.8. Section 8 — Action Verdict

Per fix, the action determined in §4.3. Render as a clear list:

Action verdict:
  Fix #1: <ACTION>  — <one-line reason>
  Fix #2: <ACTION>  — <one-line reason>
  ...

For REVERT actions, provide the exact git revert <sha> command. For REDO-MINIMAL actions, provide the minimal alternative diff (from §4.3). For FOLLOWUP-TICKET actions, draft a Linear ticket title + Product/Technical Intake skeleton. For RESHIP-AND-VERIFY actions (introduced when §4.2 emitted ❌ Not-in-bundle), provide: (a) the re-deploy command appropriate to the project (gh workflow run deploy.yml --ref main, vercel --prod, project-specific deploy script — pick from aria-config.md's projects_list[<tag>] if present, otherwise prompt user), and (b) a one-line directive: "After re-deploy, re-run /retrospect deployment to confirm the bundle now contains the fix and validate outcome."

End with an Overall recommendation in 1–3 sentences.

4.9. Section 9 — Process Retrospective

What the prior decision-making should have done differently. Format per item:

What I did:               <observed behavior>
What I should have done:  <better behavior>
Trigger condition:        <how to detect this situation in the future>
Pattern reference:        <pattern-name from library | (novel)>

If a behavior matches an existing pattern in the library, cite it. If a behavior is novel (not in either pattern library), prompt the user:

"Identified a new failure-mode pattern: <pattern-name>. Add to:

1) Canonical (rules/retrospect-patterns.md) — applies project-agnostic

2) Project-specific (projects/<proj>/retrospect-patterns.md)

3) No — surface in this report only

Choose: "

If user chooses 1 or 2, append a new entry to the corresponding file using the format defined in rules/retrospect-patterns.md ("Pattern entry format" section). The new entry's "First identified" field is today's date and the current retrospective's filename.

4.10. Section 10 — Next-Step Evidence Ask (Residual)

Anti-speculation barrier. This section lists ONLY the residual evidence asks — the questions Step 3.5 either could not source autonomously, the user deferred, or were not attempted. Items resolved during Step 3.5 (✅ upgrades, ⚠ partials with Step 3.5.2 evidence, or ❌ falsifications) DO NOT appear here — they're recorded in §4.3 (Evidence sourced field), §4.7 (Evidence FOR/AGAINST), and §4.5 (Evidence-Sourcing Pass tally blocks).

For each remaining 🤷 / ⚠ / ❓ / 🚫 fix, emit the residual ask with its attempt-status:

For Fix #N (<subject>) — current status: <🤷 / ⚠ partial / ❓ / 🚫>
  Attempt status:    NOT-ATTEMPTED | ATTEMPTED-FAILED | DEFERRED-BY-USER | SKIPPED-BY--no-source
  Sub-pass:          BUNDLE-MARKER (§3.5.1) | OUTCOME (§3.5.2)
  Why residual:      <one-line — e.g., "Auto-source attempted via Bash curl <bundle-url>; URL returned 403. Demoted to USER-INPUT; user picked Skip.">
  What's needed:     - <specific instrumentation step 1 — log query, repro test, ticket comment, deploy log inspection, etc.>
                     - <specific instrumentation step 2>
                     - <add a unique [<TAG>-DIAG] marker so deployment verification is possible>
  Who can resolve:   <USER | AUTOMATED-RETRY-LATER (e.g., re-query logs after 1h) | EXTERNAL-PARTY <name> (e.g., QA team, customer report)>

Then group the residual asks by surviving hypothesis (from §4.7) so the user can see which hypothesis each piece of evidence would advance:

To confirm Hypothesis A (<short label, from §4.7>):
  - Fix #N residual: <one-line>
  - Fix #M residual: <one-line>

To confirm Hypothesis B (<short label>):
  - ...

Attempt-status meanings (mirror /prospect's §4.10):

If all fixes are post-Step-3.5 ✅ Validated and §4.2 emitted ✅ Verified for all, emit: "N/A: all fixes validated and bundle-verified (Step 3.5 closed all gaps). Proceed to next work."

If Step 3.5 was skipped via --no-source, prefix every entry with "(Sourcing pass skipped — re-run /retrospect <scope> without --no-source to attempt autonomous resolution.)"

End the section with this verbatim warning:

Do not ship another speculative fix until at least one item in this section is satisfied. If a new fix is proposed without new evidence, re-run /retrospect.

Step 5: Validation Status Taxonomy (reference)

When assigning Validated? in §4.3, choose one of the 5 statuses below. Bundle-unverified (🤷) is a precondition gate handled in §4.2, not a status.

| Status | Definition | Required sub-tag (in report) |

|---|---|---|

| ✅ Validated | Evidence shows the fix achieved its stated goal in the deployed state | Evidence type: log event \| reproduction-then-fix-verified \| production instrumentation \| deployed-state check. "Code review confirmed" is not validation. |

| ⚠ Partially validated | Evidence shows the fix changed something, but didn't fully close the bug | Sub-tag: closed-part-of-target \| closed-different-bug |

| ❌ Invalidated | Evidence shows the fix did NOT close the bug, or introduced a regression | Sub-tag: didnt-fix \| introduced-regression |

| ❓ Unvalidated — evidence requestable | No evidence yet, but the skill can describe the specific test/check that would validate | (none) |

| 🚫 Unvalidatable | Cannot be validated from current vantage point (requires production traffic, edge case not yet reproduced) | (none) |

When emitting a Validated? value, always include the required sub-tag where applicable. Examples:

Step 6: Write Outputs

After Step 4 produces the report, write outputs to the configured destinations:

Always

Default (configurable in `<knowledge_folder>/aria-config.md` under `retrospect:` block — to be added when needed)

Prepend a structured YAML frontmatter block to the report before writing. Schema:

```yaml


type: retrospect

date: <YYYY-MM-DD>

scope: <commit | range | pr | session | release | deployment | auto-range>

goal: <one-line stated goal from §4.1 Anchor>

tickets: [<LINEAR-123>, <LINEAR-456>] # empty list if none

fixes_count: <N>

model: <model executing this gate, e.g. claude-opus-5 — or unrecorded if unknown>

effort: unrecorded # always — Cowork has no Bash; the effort level is not readable here

sourcing_pass:

bundle_marker:

candidates: <N>

upgraded_verified: <N>

upgraded_not_in_bundle: <N>

no_movement: <N> # pooled total; MUST equal the two below

no_movement_capability: <N> # attempted, could not settle — a better pass may resolve

no_movement_structural: <N> # needs a live deploy read / running system / a human

outcome:

candidates: <N>

upgraded_validated: <N>

upgraded_partial: <N>

upgraded_invalidated: <N>

no_movement: <N> # pooled total; MUST equal the two below

no_movement_capability: <N>

no_movement_structural: <N>

patterns_hit: [<pattern-name-1>, <pattern-name-2>] # from §4.4; empty list if none

overall_outcome: <closed | partial | unresolved | mixed> # derived from §4.5 tally + §4.8 overall recommendation

related: [<paths to overlapping prior runs — see below>]

tags: [retrospect, <scope>, <project-tag-if-detected>, <pattern-tag-if-applicable>]


```

effort: is always unrecorded here. Cowork has no Bash; the effort level is not readable here, and you cannot see your own effort setting (self-reported values disagreed with the harness record on 24% of 140 matched logs). Write unrecorded, never a guess.

overall_outcome derivation: closed if every fix's post-Step-3.5 Validated? is ✅; unresolved if any fix is ❌ Invalidated or ❌ Not-in-bundle; partial if any fix is ⚠ partial AND none are ❌; mixed for any other combination.

related auto-detection (Q1.2=1, ticket-based): Before writing, glob <knowledge_folder>/logs/prospect/*.md AND <knowledge_folder>/logs/retrospect/*.md for files whose frontmatter tickets: array shares at least one ticket ID with the current report's tickets. Record their paths (relative to <knowledge_folder>/) in the related: array. If no tickets in the current report, leave related: empty. Cap at 10 most-recent overlaps.

tags: field: always includes retrospect and the scope keyword. Add a project tag when the bundle is detected to belong to a configured project (commits/files match a projects_list[<tag>].project_root). Add pattern-name tags for any §4.4 hits. These tags make the file discoverable via /index and /context (per Q1.3=1 — /index extends its scan to logs/{prospect,retrospect}/).

Project-scoped intake goes to projects/<proj>/; agnostic intake goes to the shared knowledge tree. Follow the standard aria intake confirmation flow (suggest, user reviews, write on approval).

Opt-in

Pattern library write-backs

If §4.9 produced a novel pattern and the user approved adding it, the pattern entry is written to either:

Pattern write-backs are separate from intake — they go directly to the patterns file, not through backlog review.

Step 7: Soft-Suggest Trigger Logic (Claude-side judgment)

When the skill is not directly invoked, Claude monitors user messages for cues that suggest a retrospective is warranted. When detected AND the current session has shipped recent fixes (commits in the last hour or since the last /retrospect), Claude offers — never auto-executes — /retrospect.

Cues (non-exhaustive, judgment-based):

Standard offer (paraphrase as appropriate):

"It sounds like the last release didn't fully close the bug. Before I propose another fix, want me to run /retrospect on the change set first? That'll force a validation check + re-diagnosis pass before we ship anything new."

Cue weight is judgment, not regex. When the cue is faint, just acknowledge and proceed. When the cue is clear, offer. Never auto-execute from a cue — always ask.

This logic also fires the pushback-as-cue pattern (see rules/retrospect-patterns.md) — they share the same trigger surface.

Over-build lens (opt-in: `--lens=overbuild`)

Off unless --lens=overbuild is passed. When off, this skill behaves exactly as documented above — zero behavior change. When on, after the standard per-fix pass, run one additional pass over the in-scope diff:

  1. Load the rubric. Read rules/overbuild-patterns.md (same knowledge_folder/template path used for retrospect-patterns.md). Hold the ladder + smell list.
  2. Walk each diff hunk against the ladder, then the smell detection cues.
  3. Marker-respect. If a hunk carries an aria:simplification marker matching aria:simplification — .+ | limitation: .+ | upgrade: .+, report it as resolved (marked) and do NOT flag it. An obvious simplification with NO marker is the unmarked-simplification smell.
  4. Emit findings in the existing per-fix block style, each REQUIRING: the failed ladder rung, the matched smell name, and a concrete leaner alternative. A finding that cannot name the smaller version is suppressed (matches this skill's existing "name the smaller version or it's not a finding" discipline).
  5. Verdict mapping. Over-build findings map to the existing verdict vocabulary: dependency-for-a-oneliner/framework-for-a-function → recommend revert-and-shrink; unmarked-simplification → recommend add-the-marker (not a revert).

Findings append to the report as an ### Over-build lens subsection; they never alter the non-lens verdicts.

Step 8: Validation Gates

Before finalizing the retrospective, verify:

  1. Anchor printed? §4.1 must contain Goal, Mode, Range, Tickets, Outcome lines. For deployment scope, must also include the resolved marker source (per Step 0's deployment-detection cascade).
  2. Evidence-Sourcing Pass run (or explicitly skipped)? Step 3.5 must have addressed every preliminary 🤷 candidate (3.5.1 bundle-marker sub-pass) and every preliminary ⚠/❓/🚫 candidate (3.5.2 outcome sub-pass) — each must end with one of: UPGRADED-TO-✅ / UPGRADED-TO-❌ / NO-MOVEMENT / INCONCLUSIVE / DEFERRED-BY-USER / SKIPPED-BY--no-source. No silent skips. The pass summary (Step 3.5.4) must be emitted.
  3. Bundle-verification gate run? §4.2 must address every fix from Step 3 with one of three values (✅ Verified / 🤷 Bundle-unverified / ❌ Not-in-bundle), reflecting post-Step-3.5.1 state. Each per-fix render must cite the Step 3.5.1 source.
  4. Per-fix verdicts complete? Every fix has all required fields (Status, Necessary?, Complications, Minimal alternative, Maintenance cost, Validated?, Action). Validated? values reflect post-Step-3.5.2 state. Missing field = incomplete report.
  5. Validation hard rule respected? No fix has Action: KEEP unless post-Step-3.5.2 Validated? is ✅ or ⚠ partial. ❌ Not-in-bundle (§4.2) → RESHIP-AND-VERIFY or REVERT. 🤷 Bundle-unverified → HOLD-PENDING-VERIFICATION. ❓/🚫 → HOLD-PENDING-EVIDENCE / HOLD-PENDING-DEPLOY. Verify the full hard-rule ladder from §4.3 before emitting.
  6. Pattern check ran? §4.4 must reference both pattern libraries (canonical + project-specific if applicable).
  7. Tally consistent? Counts in §4.5 must match the per-fix data in §4.3 (post-Step-3.5.2) and §4.2 (post-Step-3.5.1). The two Evidence-Sourcing Pass blocks in §4.5 must match Step 3.5.4's summary verbatim.
  8. Hypotheses present when needed? §4.7 is required if any fix's post-Step-3.5.2 Validated? was ❌ Invalidated or ⚠ partial, or §4.6 triggered re-frame. Evidence FOR/AGAINST must integrate Step 3.5.2 findings where applicable.
  9. Action verdict complete? §4.8 must have an action for every fix in §4.3. RESHIP-AND-VERIFY actions must include the project-appropriate re-deploy command + the re-run-/retrospect directive.
  10. Residual evidence asks correctly scoped? §4.10 must list ONLY residual items (NOT-ATTEMPTED / ATTEMPTED-FAILED / DEFERRED-BY-USER / SKIPPED-BY--no-source). Items resolved by Step 3.5 (✅ upgrades, ⚠ partials with §3.5.2 evidence, or ❌ falsifications) must NOT appear in §4.10. Cross-check: every §4.10 entry must have current status of 🤷 / ⚠ / ❓ / 🚫.
  11. Outputs written? Confirm the persistent log was written to disk at <knowledge_folder>/logs/retrospect/<YYYY-MM-DD>-<scope>-<slug>.md, with structured YAML frontmatter (type, date, scope, goal, tickets, fixes_count, sourcing_pass, patterns_hit, overall_outcome, related, tags) prepended. Confirm intake suggestions were surfaced.
  12. related: cross-refs computed? If the report contains tickets, the related: frontmatter array must list overlapping prior runs (capped at 10) from logs/prospect/ and logs/retrospect/. If empty (no tickets), confirm the empty-list state explicitly.

If any check fails, self-correct once. If self-correction can't close the gap (e.g., the user must supply evidence), surface the gap explicitly in the report rather than silently skipping.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.