retrospective-learning

retrospective-learning is a command for coding agents from damusix/atomic-claude. It costs 53 tokens per session (9,696 once invoked), scanned D, original, MIT.

A command that reviews a coding session and its stored history for friction, corrections, and repeated problems. It also compares findings with installed coding instructions and tools.

In plain words
What is it for?
Use it after a long session or repeated difficulties to audit the interaction, review findings one at a time, and apply only the improvements you accept.
Why use it?
It makes recurring workflow problems visible and records accepted improvements so later sessions can avoid the same mistakes.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/damusix/atomic-claude/retrospective-learning
Clone the repo
git clone --depth 1 https://github.com/damusix/atomic-claude

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for retrospective-learning

README.md
[![agentmods](https://agentmods.dev/badge/commands/damusix/atomic-claude/retrospective-learning.svg)](https://agentmods.dev/commands/damusix/atomic-claude/retrospective-learning)
Your own site
<a href="https://agentmods.dev/commands/damusix/atomic-claude/retrospective-learning"><img src="https://agentmods.dev/badge/commands/damusix/atomic-claude/retrospective-learning.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 9,696 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.09696
Opus 5 $0.00026 $0.04848
Sonnet 5 $0.00011 $0.01939
Haiku 4.5 $0.00005 $0.00970

Measured 6d ago against content hash d00810d3274a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade D, and why

retrospective-learning scanned grade D with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Global: ~/.claude/CLAUDE.md, ~/.claude/CLAUDE.local.md, ~/.claude/commands/, ~/.claude/agents/, ~/.claude/skills/, ~/.claude/output-styles/, ~/.claude/rules/, ~/.claude/settings.json, ~/.claude/settings.local.json, ~/.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$SCRATCH"
context/commands/retrospective-learning.md · 677 lines

How it starts

The opening of the file, as written. The whole thing — 677 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You orchestrate a retrospective audit. Subagents do the scanning (read-only). You categorize, present findings indexed, and apply only what the user accepts per item.

$ARGUMENTS is targeted feedback — any free-form hint ("the tool-use felt off today", "audit my skills budget") gets highest priority but never narrows scope. The audit is always a full sweep.

Pre-flight

  1. Announce: Starting retrospective.
  2. Resolve state paths once and cache them:
    ATOMIC_STATE="${HOME}/.atomic"
    RUNS_DIR="${ATOMIC_STATE}/retro-runs"
    LEARNINGS="${ATOMIC_STATE}/retro-learnings.md"
    SCRATCH="tmp/$(date +%Y-%m-%d)-retro"
    mkdir -p "$RUNS_DIR" "$SCRATCH"
    RUN_ID="$(date +%Y-%m-%d-%H%M%S)"
    
  3. Resolve the current Claude project session dir (used by history scan):
    PROJECT_SLUG=$(pwd | sed 's|/|-|g')
    SESSIONS_DIR="${HOME}/.claude/projects/${PROJECT_SLUG}"
    
    If $SESSIONS_DIR does not exist, the history scan will degrade to current-only — note that in the run summary, do not abort.
  4. Read $LEARNINGS if it exists. It carries: acceptance rates per category, modify-signal patterns, deprioritized finding types. Apply as soft weights during Phase 4 categorization. If absent, proceed — it will be created at the end of the run.

Step 1 — Pick scope

Prompt via AskUserQuestion:

Question: What scope should this retrospective cover?
Options:
  - Historical + current conversation (recommended) — last 5 .jsonl sessions + prior /retrospective-learning audits + this conversation
  - Current conversation only — skip history scan, no prior-audit cross-check

Store the answer as $SCOPE.

Step 2 — Dispatch background agents in parallel

Single message, two or three Agent tool calls. Briefs live in $SCRATCH/.

2a. Discovery — atomic-investigator (always)

Write $SCRATCH/discovery-brief.md:

# Discovery brief

Catalog every config-shaped file at BOTH installed (~/.claude) and project levels. Return a `file:line — purpose` table grouped by kind and level.

Look for:

- Global: ~/.claude/CLAUDE.md, ~/.claude/CLAUDE.local.md, ~/.claude/commands/, ~/.claude/agents/, ~/.claude/skills/, ~/.claude/output-styles/, ~/.claude/rules/, ~/.claude/settings.json, ~/.claude/settings.local.json, ~/.atomic/config.toml, ~/.atomic/profile.md
- Project: ./CLAUDE.md, ./CLAUDE.local.md, .claude/commands/, .claude/agents/, .claude/skills/, .claude/settings.json, .claude/settings.local.json, docs/wiki/index.md, .claude/project/followups/INDEX.md, .claude/project/followups/*.md
- Memory: ~/.claude/projects/${PROJECT_SLUG}/memory/MEMORY.md and topic files

For each artifact: path, one-line purpose, char count, line count.
Do NOT propose changes. Inventory only.

Respond in atomic style. Drop filler, pleasantries, hedging. Fragments OK. Technical terms exact. Inventory table only — no preamble, no echo of this brief.

Read the full file on GitHub · 677 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 677 lines · 53 tokens per session scan D d00810d3274a

Subscribe to this mod's changes

retrospective-learning is a command published in the GitHub repository damusix/atomic-claude (84 stars, last pushed today), licensed MIT. It adds 53 tokens to every session and 9,696 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.