Claude Skill

retro

Use when a Claude Code or Codex session ends or is declared finished, a friction needs fixing, a reusable learning needs capturing, local memory needs promoting upward, or for cross-session audits — detect friction AND learnings, route each to the right destination, including tea

LLM Mart · 0 points · 0 views 5 listing impressions 0 install-command copies
Download lufox-digital-retro-skill-skills_retro-9378928.zip · 464 KB

Install

skills CLI npx skills add https://github.com/lufox-digital/retro-skill/tree/main/skills/retro
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install lufox-digital-retro-skill@llmmart
Git git clone https://github.com/lufox-digital/retro-skill.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole lufox-digital/retro-skill collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Retro — LLM-driven Session Retrospection

On Codex, resolve script paths from this loaded skill directory and use the native discovery reader (find-org-skills.py --host codex), not Claude cache paths. Host selection and coverage limits: references/skill-discovery.md.

Improve accepted task completion at the required quality within economically feasible time and cost, across models, knowledge, tools and environment. One LLM pass detects friction and reusable learnings, routes them to seven destinations, and follows their availability, later use and observed benefit. Read references/learning-contract.md for evidence, Mad/Sad/Glad perspectives, configuration limits and justified no-op/pruning outcomes.

Core principle: No silent writes — verify existing authorization for the target, action and audience; execute covered changes and ask only for uncovered decisions. Process critique grants no new authority.

Modes

  • /retro — Sweep: the whole current session. A short session with no pre-pass or review finding takes the fast exit after Phase 1b; /retro --full runs the full Sweep (references/workflow.md § Sweep).
  • /retro "<problem>" — Spotlight: one described issue. A short or question-shaped argument naming retro itself (/retro zur retro?) reads two ways — the work since the last retro, or that retro run: ask one question with both before Phase 1 (references/workflow.md § Spotlight). A described problem that mentions retro in passing is a Spotlight as usual.
  • /retro outcome [session-id|--since N] — replay a past session by its outcomes.
  • /retro audit [--scope project|repo|skill] — cross-session architectural drift.
  • /retro promote — re-home already-written local memory upward (never project-local memory), and by default the team-usable sections of the global rules file; keep active access until the accepted target is delivered and reachable, then drain. See references/promote-mode.md.
  • /retro done — definition-of-done gate: eight evidence-backed checks (task, findings, retro, cleanup, questions, tickets, time, docs), each ✅ / ❌ / ⏸ / N/A. ⏸ only when a named person can close it with a named action; what is structurally absent is N/A with its reason — a ⏸ nobody can close makes the whole table get skipped. Say done when every row is ✅ or N/A. See references/done-mode.md.
  • Auto — optional SessionEnd hook, off by default. It is plugin-level, not part of this skill directory: hooks/session-end.json at the repository root (see README, "Optional auto-trigger").

Pipeline (all modes)

  1. Mechanical pre-pass — uv run ${CLAUDE_SKILL_DIR}/scripts/detect-mechanical.py (Promote: uv run ${CLAUDE_SKILL_DIR}/scripts/scan-memory-inventory.py). Every Python script runs through uv run: its header declares Python 3.11 or later, and python3 can be an older interpreter (macOS ships 3.9). It requires --transcript-file, and the transcript is located by content — a token from this session — never by mtime: several sessions share one project slug, so the newest JSONL is regularly somebody else's. Codex rollout JSONL must first be converted with scripts/codex-transcript.py; on Windows set PYTHONUTF8=1 before uv run. Invocation and adapter limits are in references/workflow.md. Its JSON holds coverage.status, findings_total and findings[], each with signal and name and further fields per signal (field list: references/workflow.md § Shared pipeline). Then uv run ${CLAUDE_SKILL_DIR}/scripts/collect-review-findings.py on the same transcript (its header also declares the tree-sitter parser; plain python3 stops with a message): review threads, bot reviews, and comments on the session's PRs/MRs, their linked issues, plus normalized tracker feedback supplied via --feedback-file (input for B18–B20, D4, D6). The subagents' transcripts (<session id>/subagents/agent-*.jsonl) are read with it; transcripts in the output lists every file read. PRs a script opened (a fleet driver's opened.jsonl) are not in the transcript: pass that file with --pr-list. Resolve relevant opaque hints through the owning integration, never by key shape. See references/feedback-contract.md; incomplete coverage is not silence.
  2. LLM enrichment — Mad/Sad/Glad perspectives, both classes (friction + learnings B16–B21); check each visible warning sign for the check it called for (B22), with the changed code's tests and one bounded probe run in a copy, offline, when that code is reachable (or skipped, with the reason); judge each loaded procedure against the work it governed (B23) and each subagent brief against the subagent's transcript (B24); distinguish observations, hypotheses and decisions; filter false positives. A prior failure is not required for a learning.
  3. Before proposing another fix for a recurring problem, a prior measure or a changed configuration, consult the existing attempt history. Search scoped native memory and session sources (including Orca when available), resolve leads at the original and use the evidence to keep, revise or retire the earlier approach. Follow references/prior-attempts.md. Other cross-session enrichment is optional (scripts/scan-cross-session.py).
  4. Discover skills — always run ${CLAUDE_SKILL_DIR}/scripts/find-org-skills.py (not after a fast exit), also when the owning skill seems obvious (opening it by path is a skip that needs a deviation line) — and the repo's harness (project-harness-inspection.md). When the session changed files in a repository or a decision will be written there, run uv run ${CLAUDE_SKILL_DIR}/scripts/check-decision-records.py --repo <repo> with each changed path, relative to the repository root, as --changed-file (E1, E7, E8 in friction-catalog.md). For each B21 candidate, search the team's records and state what was searched (documentation-lookup.md): not searched is unknown, never absent.
  5. Classify (classification-heuristic.md) — authority and rule purpose before enforcement and reach; consider simplification, tools or environment changes; never project-local memory. A rule, document or gate that existed does not close a friction that happened anyway (§ An existing control).
  6. Evals — read a matched skill's evals/; propose a TDD stub. For targeted native or shared-runner comparisons, prepare isolated inputs with scripts/prepare-behavior-evals.py; follow references/eval-integration.md.
  7. Proposals — prose Why + How-to-apply, grouped, ≤10; learnings survive the trim. When revisiting an attempt, tell the owner what it predicted, what happened, and which part of the next decision changed.
  8. Authorization — reuse the valid mandate; put the uncovered decisions about proposals into the one closing question of Phase 10, not into a question per proposal. Another write that needs approval (a Done-mode booking, a ticket comment, removing anything unpushed) keeps its own concrete decision, also when no proposal is open. A decision that belongs to another authority (a team norm, a product decision) is named with its owner. Do not request the same permission again.
  9. Materialize per destination; for Promote, drain the source last (verified).
  10. Report — with one deviation line per phase of the mode table that did not run as prescribed (the fast exit's single line covers Phases 2–9) (references/workflow.md § Report deviations). When proposals remain open, end with one closing question that the user answers in one word: complete, noted or propose (references/workflow.md § Closing question).
  11. Self-check — the retro's own scripts, phases and reading of the invocation: detect-mechanical.py --since-command retro, three closed questions, a finding only with evidence, at most two skill-updates against retro-skill, otherwise one "nothing found" line. See references/workflow.md § Phase 11.

When a material outcome or cost claim needs host data, use scripts/collect-session-metrics.py; for evidence-backed later opportunities, use scripts/scan-cross-session.py --learning-observations <file>. Read references/session-metrics.md for counter scope, unknowns and provenance.

Boundaries

Scope: session-end/cross-session analysis, skill-PR routing, done gate. Tracker identity and access belong to the owning integration; QA and time policy belong to project/organization rules. No implicit tracker, CLI discovery or organization-specific billing defaults in the core.

Always: LLM is primary classifier. Patches go to source repos, never the cache. Verify private-repo and audience authorization. Conventional Commits. DCO sign-off (git commit -s). Preserve commit signing.

Ask first when not already covered: material skill-match ambiguity, auto-mode activation, private-repo access/push, a dirty-worktree fallback that risks existing work, and promotion to a new audience. New product decisions, team norms and permissions require the responsible authority.

Never: auto-merge, silent writes, harness-invented attribution (a disclosure the user's rules prescribe is required), skip hooks (--no-verify), patch the cache, hardcode a static skill list, rm a drained memory (tombstone); from Done mode: merge, tag or deploy (except the merges a complete answer to the closing question authorizes), or touch another session's containers, processes or worktrees.

References

File Purpose
references/learning-contract.md Purpose, evidence, quality and configuration bounds
references/prior-attempts.md Find earlier attempts, decide what carries over, record a testable next attempt
references/session-metrics.md Observed usage/time and later application evidence
references/feedback-contract.md Tracker-neutral evidence and reference resolution
references/friction-catalog.md All signals: friction + learnings (A/B/C, B16–B21)
references/destination-taxonomy.md The seven destinations
references/classification-heuristic.md Friction → destination mapping
references/skill-discovery.md Finding skills at runtime
references/documentation-lookup.md Phase 4c: what the team's records already say
references/patch-workflow.md Source-repo patching (never cache)
references/eval-integration.md Evals for context + TDD stubs
references/promote-mode.md Promote: materialize-then-drain
references/done-mode.md Done: eight-gate finish check
references/project-harness-inspection.md Rule purpose, environment and session signals
references/workflow.md All modes + phase selection
Files (retro-skill)
  • evals
    • fixtures
      • critical-questions
        • downstream
          • after
            • report.py 499 B
              Loading…
          • before
            • report.py 567 B
              Loading…
          • docs
            • runbook.md 495 B
              Loading…
          • AGENTS.md 248 B
            Loading…
          • checks.json 563 B
            Loading…
          • results.json 807 B
            Loading…
          • session.txt 766 B
            Loading…
        • downstream-noisy
          • .github
            • workflows
              • ci.yml 349 B
                Loading…
          • after
            • report.py 499 B
              Loading…
          • before
            • report.py 567 B
              Loading…
          • config
            • batches.yaml 110 B
              Loading…
            • healthcheck.yaml 113 B
              Loading…
            • inventory.yaml 217 B
              Loading…
          • docs
            • adr
              • 0001-batch-rollout.md 281 B
                Loading…
              • 0002-signed-packages.md 220 B
                Loading…
              • 0003-inventory-yaml.md 221 B
                Loading…
              • 0004-no-central-log.md 253 B
                Loading…
            • operations
              • backup.md 212 B
                Loading…
              • certificates.md 226 B
                Loading…
              • dns.md 209 B
                Loading…
              • incident-template.md 179 B
                Loading…
              • on-call.md 477 B
                Loading…
              • scaling.md 245 B
                Loading…
            • architecture.md 256 B
              Loading…
            • configuration.md 230 B
              Loading…
            • contributing.md 193 B
              Loading…
            • faq.md 205 B
              Loading…
            • glossary.md 242 B
              Loading…
            • inventory.md 203 B
              Loading…
            • release-process.md 248 B
              Loading…
          • src
            • healthcheck.py 174 B
              Loading…
            • inventory.py 112 B
              Loading…
            • packages.py 145 B
              Loading…
            • rollout.py 283 B
              Loading…
            • __init__.py 78 B
              Loading…
          • tests
            • test_healthcheck.py 199 B
              Loading…
            • test_inventory.py 198 B
              Loading…
          • AGENTS.md 296 B
            Loading…
          • CHANGELOG.md 277 B
            Loading…
          • checks.json 563 B
            Loading…
          • deploy.sh 240 B
            Loading…
          • Makefile 172 B · in bundle
          • README.md 257 B
            Loading…
          • results.json 807 B
            Loading…
          • rollback.sh 238 B
            Loading…
          • session.txt 766 B
            Loading…
        • unwired
          • .github
            • workflows
              • build.yml 276 B
                Loading…
          • src
            • validate.py 364 B
              Loading…
          • tests
            • test_validate.py 670 B
              Loading…
          • AGENTS.md 219 B
            Loading…
          • checks.json 474 B
            Loading…
          • Dockerfile 65 B · in bundle
          • Makefile 106 B · in bundle
          • session.txt 630 B
            Loading…
        • wired
          • .github
            • workflows
              • build.yml 276 B
                Loading…
              • ci.yml 289 B
                Loading…
          • src
            • validate.py 364 B
              Loading…
          • tests
            • test_validate.py 670 B
              Loading…
          • .pre-commit-config.yaml 155 B
            Loading…
          • AGENTS.md 219 B
            Loading…
          • checks.json 474 B
            Loading…
          • Dockerfile 65 B · in bundle
          • Makefile 106 B · in bundle
          • session.txt 630 B
            Loading…
      • dispatch-history
        • a
          • lookup.txt 328 B
            Loading…
          • records.txt 656 B
            Loading…
        • b
          • lookup.txt 242 B
            Loading…
          • records.txt 623 B
            Loading…
      • environment
        • bootstrap.py 412 B
          Loading…
        • check.py 419 B
          Loading…
        • run-tests.sh 131 B
          Loading…
        • session.txt 463 B
          Loading…
      • loaded-version
        • installed
          • content.md 213 B
            Loading…
        • source
          • content.md 241 B
            Loading…
        • installation.txt 127 B
          Loading…
        • session.txt 527 B
          Loading…
      • promotion
        • destination.md 256 B
          Loading…
        • notes.md 421 B
          Loading…
        • pr-status.json 150 B
          Loading…
        • session.txt 461 B
          Loading…
      • relay-backlog
        • archive
          • native-notes.jsonl 182 B · in bundle
          • owner-records.jsonl 497 B · in bundle
          • runs.jsonl 349 B · in bundle
        • current.txt 343 B
          Loading…
      • session-reconciliation
        • case-a
          • after
            • inventory.py 664 B
              Loading…
            • test_inventory.py 783 B
              Loading…
          • before
            • inventory.py 213 B
              Loading…
          • api.json 274 B
            Loading…
          • checks.json 457 B
            Loading…
          • session.txt 1 KB
            Loading…
        • case-b
          • after
            • inventory.py 787 B
              Loading…
            • test_inventory.py 1.3 KB
              Loading…
          • before
            • inventory.py 213 B
              Loading…
          • api.json 274 B
            Loading…
          • checks.json 470 B
            Loading…
          • session.txt 1 KB
            Loading…
        • case-c
          • before
            • inventory.py 213 B
              Loading…
          • api.json 274 B
            Loading…
          • session.txt 1 KB
            Loading…
        • case-d
          • after
            • rendering.py 614 B
              Loading…
            • test_rendering.py 775 B
              Loading…
          • before
            • rendering.py 237 B
              Loading…
          • checks.json 473 B
            Loading…
          • content.json 102 B
            Loading…
          • session.txt 1006 B
            Loading…
      • source-lookup
        • inventory.md 204 B
          Loading…
        • runbook.md 356 B
          Loading…
        • session.txt 392 B
          Loading…
    • applied-change-no-benefit.md 1020 B
      Loading…
    • authorized-reversible-change.md 1 KB
      Loading…
    • bounded-instruction-ablation.md 1.1 KB
      Loading…
    • bundled-measures-confounded.md 1.8 KB
      Loading…
    • canonical-owner-not-skill-copy.md 2.6 KB
      Loading…
    • cheap-quality-regression.md 986 B
      Loading…
    • cleanup-scope-derived-not-remembered.md 2.9 KB
      Loading…
    • closing-question-one-word.md 2 KB
      Loading…
    • conflicting-skill-instructions.md 1.3 KB
      Loading…
    • cross-session-pattern-scope.md 3.4 KB
      Loading…
    • decision-outside-mandate.md 960 B
      Loading…
    • decision-policy-undefined.md 2 KB
      Loading…
    • decision-record-crossed.md 2.1 KB
      Loading…
    • decision-record-superseded-with-reason.md 1.7 KB
      Loading…
    • deferred-effect-not-done-blocker.md 961 B
      Loading…
    • description-no-match-not-conclusive.md 1.8 KB
      Loading…
    • discriminating-check-before-more-analysis.md 1.6 KB
      Loading…
    • dispatch-history-a.md 1.1 KB
      Loading…
    • dispatch-history-b.md 1.1 KB
      Loading…
    • documented-fact-needs-no-doc-write.md 1.6 KB
      Loading…
    • done-gate-holds-on-unbooked-time.md 1.8 KB
      Loading…
    • done-gate-holds-on-unwritten-doc-fact.md 1.6 KB
      Loading…
    • downstream-role-loses-information.md 1.7 KB
      Loading…
    • downstream-side-effect-unevidenced.md 1.3 KB
      Loading…
    • dug-out-host-fact-routes-to-inventory.md 2.5 KB
      Loading…
    • duplicate-learning-consolidated.md 1.1 KB
      Loading…
    • durable-change-codified.md 2.1 KB
      Loading…
    • environment-enables-economics.md 996 B
      Loading…
    • environment-prerequisite.md 1.1 KB
      Loading…
    • eval-tightening-retains-valid-controls.md 3.1 KB
      Loading…
    • existing-control-gate-duplicates-prose.md 1.7 KB
      Loading…
    • existing-control-gate-false-positive.md 1.5 KB
      Loading…
    • existing-control-negligible-refusal.md 1.2 KB
      Loading…
    • existing-control-review-found-untested-platform.md 1.7 KB
      Loading…
    • existing-control-warning-recurred.md 1.9 KB
      Loading…
    • first-success-procedure.md 1.2 KB
      Loading…
    • green-session-checks-already-wired.md 1014 B
      Loading…
    • green-session-unwired-checks.md 1.5 KB
      Loading…
    • harness-artefact-over-prose.md 2.7 KB
      Loading…
    • human-rework-hidden.md 984 B
      Loading…
    • hypothesis-not-fact.md 959 B
      Loading…
    • loaded-version-behind-source.md 1 KB
      Loading…
    • mechanical-failure-not-skill-update.md 1.5 KB
      Loading…
    • no-action-low-confidence.md 1.2 KB
      Loading…
    • no-matching-opportunity.md 937 B
      Loading…
    • obsolete-instruction-removal.md 1.4 KB
      Loading…
    • pending-state-memory-is-reverified.md 2.6 KB
      Loading…
    • personal-rule-alias-accepted.md 1.8 KB
      Loading…
    • project-harness-not-only-skills.md 2 KB
      Loading…
    • promotion-pr-rejected.md 1.2 KB
      Loading…
    • raw-downstream-role-loses-information.md 1.5 KB
      Loading…
    • raw-downstream-runbook-not-referenced.md 1.6 KB
      Loading…
    • raw-green-session-checks-already-wired.md 1 KB
      Loading…
    • raw-green-session-unwired-checks.md 1.3 KB
      Loading…
    • reachable-doc-gets-a-link-not-a-page.md 1.8 KB
      Loading…
    • read-source-overridden.md 951 B
      Loading…
    • reader-and-timing-of-moved-rules.md 1.5 KB
      Loading…
    • README.md 15 KB
      Loading…
    • relay-backlog.md 1.2 KB
      Loading…
    • reusable-learning-survives-cap.md 2.5 KB
      Loading…
    • review-feedback-outside-transcript.md 3.2 KB
      Loading…
    • reviewer-not-target-config.md 1 KB
      Loading…
    • rule-never-applicable-is-a-candidate.md 1.3 KB
      Loading…
    • rule-tally-window-too-small.md 1015 B
      Loading…
    • self-check-ambiguous-invocation.md 1.4 KB
      Loading…
    • self-check-clean-run-stays-silent.md 1.3 KB
      Loading…
    • self-check-guessed-script-output.md 1.7 KB
      Loading…
    • self-check-unread-feedback-source.md 1.9 KB
      Loading…
    • self-check-unreported-skipped-phase.md 1.5 KB
      Loading…
    • session-reconciliation-a.md 1.6 KB
      Loading…
    • session-reconciliation-b.md 1.1 KB
      Loading…
    • session-reconciliation-c.md 1.2 KB
      Loading…
    • session-reconciliation-d.md 1.4 KB
      Loading…
    • shorter-skill-target-regression.md 1020 B
      Loading…
    • signal-count-validated-before-escalation.md 2.4 KB
      Loading…
    • situational-check-claimed-not-performed.md 1.7 KB
      Loading…
    • situational-check-fix-is-the-evidence.md 1.7 KB
      Loading…
    • situational-check-independent-causes.md 1.2 KB
      Loading…
    • situational-check-justified-small-fix.md 1.6 KB
      Loading…
    • situational-check-later-information.md 1.3 KB
      Loading…
    • situational-check-not-assessable.md 1.5 KB
      Loading…
    • situational-check-omitted.md 2.7 KB
      Loading…
    • situational-check-overgeneralization.md 1.7 KB
      Loading…
    • skill-bug-vs-gap.md 1.4 KB
      Loading…
    • skill-over-specification.md 1.4 KB
      Loading…
    • skill-procedure-guarded-real-risk.md 1.2 KB
      Loading…
    • stale-open-not-obsolete.md 1.8 KB
      Loading…
    • steering-size-not-for-linked-doc.md 1.1 KB
      Loading…
    • steering-size-stated-with-proposal.md 1.6 KB
      Loading…
    • subagent-brief-gap.md 1.4 KB
      Loading…
    • subagent-erred-despite-complete-brief.md 1.1 KB
      Loading…
    • superseded-copy-pruned.md 2.5 KB
      Loading…
    • sweep-fast-exit-not-on-autonomous-run.md 1.6 KB
      Loading…
    • sweep-fast-exit-short-clean-session.md 1.7 KB
      Loading…
    • tracker-neutrality.md 1.9 KB
      Loading…
    • unfulfilled-goal-sad.md 971 B
      Loading…
    • unnecessary-rule-simplified.md 953 B
      Loading…
    • unsearched-doc-system-is-unknown.md 2 KB
      Loading…
    • usage-unknown-inclusive.md 1.1 KB
      Loading…
  • references
    • classification-heuristic.md 31.2 KB
      Loading…
    • destination-taxonomy.md 17.8 KB
      Loading…
    • documentation-lookup.md 6.9 KB
      Loading…
    • done-mode.md 21.2 KB
      Loading…
    • eval-integration.md 14.2 KB
      Loading…
    • feedback-contract.md 9 KB
      Loading…
    • friction-catalog.md 50 KB
      Loading…
    • learning-contract.md 5.9 KB
      Loading…
    • patch-workflow.md 24.3 KB
      Loading…
    • prior-attempts.md 6.5 KB
      Loading…
    • project-harness-inspection.md 7.8 KB
      Loading…
    • promote-mode.md 23.8 KB
      Loading…
    • session-metrics.md 5.3 KB
      Loading…
    • skill-discovery.md 10.5 KB
      Loading…
    • workflow.md 42.8 KB
      Loading…
  • scripts
    • check-decision-records.py 29.2 KB
      Loading…
    • check-eval-samples.py 7.5 KB
      Loading…
    • check-upstream-sources.py 15.5 KB
      Loading…
    • codex-transcript.py 36.4 KB
      Loading…
    • collect-review-findings.py 66 KB
      Loading…
    • collect-session-metrics.py 14.2 KB
      Loading…
    • derive-session-scope.py 96.7 KB
      Loading…
    • detect-mechanical.py 119.2 KB
      Loading…
    • feedback-contract.py 12.1 KB
      Loading…
    • find-installed-skills.sh 6.1 KB
      Loading…
    • find-org-skills.py 24.4 KB
      Loading…
    • mask-secrets.py 8.4 KB
      Loading…
    • materialize-pr.sh 9.2 KB
      Loading…
    • opencode-transcript.py 28.1 KB
      Loading…
    • orca-search-refs.jq 1.4 KB · in bundle
    • prepare-behavior-evals.py 8.9 KB
      Loading…
    • scan-cross-session.py 52 KB
      Loading…
    • scan-memory-inventory.py 42.7 KB
      Loading…
    • sibling_loader.py 864 B
      Loading…
    • steering-size.py 5.3 KB
      Loading…
    • transcript-results.py 2.3 KB
      Loading…
    • validate-evals.py 7.7 KB
      Loading…
  • checkpoints.yaml 3.1 KB
    Loading…
  • SKILL.md 11.8 KB
    ---
    # SPDX-License-Identifier: CC-BY-SA-4.0
    # SPDX-FileCopyrightText: Lufox Digital GmbH
    name: retro
    description: "Use when a Claude Code or Codex session ends or is declared finished, a friction needs fixing, a reusable learning needs capturing, local memory needs promoting upward, or for cross-session audits — detect friction AND learnings, route each to the right destination, including team documentation, and gate 'done'. Triggers: /retro, /retro done, 'retrospective', 'capture this learning', 'fix this skill', 'promote memory', 'audit', 'alles erledigt'."
    license: "(MIT AND CC-BY-SA-4.0). See LICENSE-MIT and LICENSE-CC-BY-SA-4.0"
    compatibility: "Requires uv (runs the scripts on Python 3.11 or later), jq, and gh and/or glab (PR creation)."
    metadata:
      author: Lufox Digital GmbH
      version: "3.8.0"
      repository: https://github.com/lufox-digital/retro-skill
    allowed-tools: Bash(bash ${CLAUDE_SKILL_DIR}/scripts/*) Bash(${CLAUDE_SKILL_DIR}/scripts/*) Bash(uv run ${CLAUDE_SKILL_DIR}/scripts/*) Bash(gh:*) Bash(glab:*) Bash(git:*) Bash(find:*) Bash(grep:*) Bash(jq:*) Read Write Edit Glob Grep Task
    ---
    
    # Retro — LLM-driven Session Retrospection
    
    On Codex, resolve script paths from this loaded skill directory and use the
    native discovery reader (`find-org-skills.py --host codex`), not Claude cache
    paths. Host selection and coverage limits: `references/skill-discovery.md`.
    
    Improve accepted task completion at the required quality within economically
    feasible time and cost, across models, knowledge, tools and environment. One
    LLM pass detects **friction and reusable learnings**, routes them to seven
    destinations, and follows their availability, later use and observed benefit.
    Read `references/learning-contract.md` for evidence, Mad/Sad/Glad perspectives,
    configuration limits and justified no-op/pruning outcomes.
    
    **Core principle:** No silent writes — verify existing authorization for the
    target, action and audience; execute covered changes and ask only for uncovered
    decisions. Process critique grants no new authority.
    
    ## Modes
    
    - **`/retro`** — Sweep: the whole current session. A short session with no
      pre-pass or review finding takes the fast exit after Phase 1b;
      `/retro --full` runs the full Sweep (`references/workflow.md` § Sweep).
    - **`/retro "<problem>"`** — Spotlight: one described issue. A short or
      question-shaped argument naming retro itself (`/retro zur retro?`) reads
      two ways — the work since the last retro, or that retro run: ask one
      question with both before Phase 1 (`references/workflow.md` § Spotlight).
      A described problem that mentions retro in passing is a Spotlight as usual.
    - **`/retro outcome [session-id|--since N]`** — replay a past session by its
      outcomes.
    - **`/retro audit [--scope project|repo|skill]`** — cross-session architectural
      drift.
    - **`/retro promote`** — re-home already-written local memory upward (never
      project-local memory), and by default the team-usable sections of the global
      rules file; keep active access until the accepted target is delivered and
      reachable, then drain. See `references/promote-mode.md`.
    - **`/retro done`** — definition-of-done gate: eight evidence-backed checks
      (task, findings, retro, cleanup, questions, tickets, time, docs), each ✅ / ❌ /
      ⏸ / N/A. **⏸ only when a named person can close it with a named action;
      what is structurally absent is N/A with its reason** — a ⏸ nobody can close
      makes the whole table get skipped. Say **done** when every row is ✅ or N/A.
      See `references/done-mode.md`.
    - **Auto** — optional SessionEnd hook, off by default. It is plugin-level, not
      part of this skill directory: `hooks/session-end.json` at the repository root
      (see README, "Optional auto-trigger").
    
    ## Pipeline (all modes)
    
    1. Mechanical pre-pass — `uv run ${CLAUDE_SKILL_DIR}/scripts/detect-mechanical.py` (Promote:
       `uv run ${CLAUDE_SKILL_DIR}/scripts/scan-memory-inventory.py`). Every Python
       script runs through `uv run`: its header declares Python 3.11 or later, and
       `python3` can be an older interpreter (macOS ships 3.9). It requires `--transcript-file`, and the
       transcript is located **by content** — a token from this session — never by
       mtime: several sessions share one project slug, so the newest JSONL is
       regularly somebody else's. Codex rollout JSONL must first be converted with
       `scripts/codex-transcript.py`; on Windows set `PYTHONUTF8=1` before
       `uv run`. Invocation and adapter limits are in `references/workflow.md`.
       Its JSON holds `coverage.status`, `findings_total` and `findings[]`, each
       with `signal` and `name` and further fields per signal (field list:
       `references/workflow.md` § Shared pipeline).
       Then `uv run ${CLAUDE_SKILL_DIR}/scripts/collect-review-findings.py` on the
       same transcript (its header also declares the tree-sitter parser; plain
       `python3` stops with a message): review threads, bot reviews,
       and comments on the session's PRs/MRs, their linked issues, plus normalized tracker feedback supplied via
       `--feedback-file` (input for B18–B20, D4, D6). The subagents' transcripts
       (`<session id>/subagents/agent-*.jsonl`) are read with it; `transcripts`
       in the output lists every file read. PRs a script opened (a
       fleet driver's `opened.jsonl`) are not in the transcript: pass that file
       with `--pr-list`. Resolve relevant opaque
       hints through the owning integration, never by key shape. See
       `references/feedback-contract.md`; incomplete coverage is not silence.
    2. LLM enrichment — Mad/Sad/Glad perspectives, both classes (friction +
       learnings B16–B21); check each visible warning sign for the check it called
       for (B22), with the changed code's tests and one bounded probe run in a copy,
       offline, when that code is reachable (or skipped, with the reason); judge each
       loaded procedure against the work it governed (B23) and each subagent brief
       against the subagent's transcript (B24); distinguish observations, hypotheses and decisions;
       filter false positives. A prior failure is not required for a learning.
    3. Before proposing another fix for a recurring problem, a prior measure or a
       changed configuration, consult the existing attempt history. Search scoped
       native memory and session sources (including Orca when available), resolve
       leads at the original and use the evidence to keep, revise or retire the
       earlier approach. Follow `references/prior-attempts.md`. Other cross-session
       enrichment is optional (`scripts/scan-cross-session.py`).
    4. Discover skills — always run `${CLAUDE_SKILL_DIR}/scripts/find-org-skills.py` (not after a fast exit), also when the owning skill seems obvious (opening it by path is a skip that needs a deviation line) — and the repo's harness (`project-harness-inspection.md`). When the session changed files in a repository or a decision will be written there, run `uv run ${CLAUDE_SKILL_DIR}/scripts/check-decision-records.py --repo <repo>` with each changed path, relative to the repository root, as `--changed-file` (E1, E7, E8 in `friction-catalog.md`). For each B21 candidate, search the team's records and state what was searched (`documentation-lookup.md`): not searched is unknown, never absent.
    5. Classify (`classification-heuristic.md`) — authority and rule purpose before
       enforcement and reach; consider simplification, tools or environment changes;
       never project-local memory. A rule, document or gate that existed does not
       close a friction that happened anyway (§ An existing control).
    6. Evals — read a matched skill's `evals/`; propose a TDD stub.
       For targeted native or shared-runner comparisons, prepare isolated inputs
       with `scripts/prepare-behavior-evals.py`; follow `references/eval-integration.md`.
    7. Proposals — prose Why + How-to-apply, grouped, ≤10; learnings survive the
       trim. When revisiting an attempt, tell the owner what it predicted, what
       happened, and which part of the next decision changed.
    8. Authorization — reuse the valid mandate; put the uncovered decisions about
       proposals into the one closing question of Phase 10, not into a question per
       proposal. Another write that needs approval (a Done-mode booking, a ticket
       comment, removing anything unpushed) keeps its own concrete decision, also
       when no proposal is open. A decision that belongs to another authority (a
       team norm, a product decision) is named with its owner. Do not request the
       same permission again.
    9. Materialize per destination; for Promote, drain the source last (verified).
    10. Report — with one deviation line per phase of the mode table that did not
        run as prescribed (the fast exit's single line covers Phases 2–9) (`references/workflow.md` § Report deviations). When
        proposals remain open, end with one closing question that the user answers
        in one word: `complete`, `noted` or `propose` (`references/workflow.md`
        § Closing question).
    11. Self-check — the retro's own scripts, phases and reading of the invocation:
        `detect-mechanical.py --since-command retro`, three closed questions, a
        finding only with evidence, at most two `skill-update`s against retro-skill,
        otherwise one "nothing found" line. See `references/workflow.md` § Phase 11.
    
    When a material outcome or cost claim needs host data, use
    `scripts/collect-session-metrics.py`; for evidence-backed later opportunities,
    use `scripts/scan-cross-session.py --learning-observations <file>`. Read
    `references/session-metrics.md` for counter scope, unknowns and provenance.
    
    ## Boundaries
    
    **Scope:** session-end/cross-session analysis, skill-PR routing, done gate.
    Tracker identity and access belong to the owning integration; QA and time
    policy belong to project/organization rules. No implicit tracker, CLI discovery
    or organization-specific billing defaults in the core.
    
    **Always:** LLM is primary classifier. Patches go to source repos, never the
    cache. Verify private-repo and audience authorization. Conventional Commits. DCO sign-off
    (`git commit -s`). Preserve commit signing.
    
    **Ask first when not already covered:** material skill-match ambiguity,
    auto-mode activation, private-repo access/push, a dirty-worktree fallback that
    risks existing work, and promotion to a new audience. New product decisions,
    team norms and permissions require the responsible authority.
    
    **Never:** auto-merge, silent writes, harness-invented attribution (a disclosure
    the user's rules prescribe is required), skip hooks (`--no-verify`),
    patch the cache, hardcode a static skill list, `rm` a drained memory (tombstone);
    from Done mode: merge, tag or deploy (except the merges a `complete` answer to
    the closing question authorizes), or touch another session's containers,
    processes or worktrees.
    
    ## References
    
    | File | Purpose |
    |---|---|
    | `references/learning-contract.md` | Purpose, evidence, quality and configuration bounds |
    | `references/prior-attempts.md` | Find earlier attempts, decide what carries over, record a testable next attempt |
    | `references/session-metrics.md` | Observed usage/time and later application evidence |
    | `references/feedback-contract.md` | Tracker-neutral evidence and reference resolution |
    | `references/friction-catalog.md` | All signals: friction + learnings (A/B/C, B16–B21) |
    | `references/destination-taxonomy.md` | The seven destinations |
    | `references/classification-heuristic.md` | Friction → destination mapping |
    | `references/skill-discovery.md` | Finding skills at runtime |
    | `references/documentation-lookup.md` | Phase 4c: what the team's records already say |
    | `references/patch-workflow.md` | Source-repo patching (never cache) |
    | `references/eval-integration.md` | Evals for context + TDD stubs |
    | `references/promote-mode.md` | Promote: materialize-then-drain |
    | `references/done-mode.md` | Done: eight-gate finish check |
    | `references/project-harness-inspection.md` | Rule purpose, environment and session signals |
    | `references/workflow.md` | All modes + phase selection |
    

Comments

Sign in to join the conversation.

No comments yet. Start the conversation.

Reviews (0)

No reviews yet.