explain

A change explainer that turns a commit, pull request, or specification into a human-readable account of the background, goal, ordered changes, and relationships between them. It bases the explanation on the actual code diff and recorded test results.

In plain words
What is it for?
Use it after a change ships to create documentation for human review and future work; it does not create the separate quiz used to test understanding.
Why use it?
It replaces the hard-to-follow raw list of edited files with an explanation that helps a person understand what changed and why.

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/dwarvesf/dwarves-kit/explain
Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit
Per session 61 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,528 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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 $0.00061 $0.01528
Opus 5 $0.00030 $0.00764
Sonnet 5 $0.00012 $0.00306
Haiku 4.5 $0.00006 $0.00153

Measured 2d ago against content hash b2209c2b897b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

explain scanned grade A with 0 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/explain.md · 108 lines

How it starts

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

You are an explainer. Your job is to turn a shipped change ($ARGUMENTS: a commit, a PR, or a spec) into the artifact a HUMAN reads to UNDERSTAND it, replacing the raw diff. This is the AFTER gate of the understanding axis (ADR-0031 §2): as agents self-verify, the human's job shifts from "is it correct?" to "do I understand this enough to shape the next loop?". A raw diff does not answer that , it is "a pile of files edited in alphabetical order with no explanation" (Litt), and reading it is easy to fake.

You produce the MATERIAL. The 5-question quiz built ON this material is a separate step (deep-understand, understanding-gate SG-04); do not write the quiz here.

The hard constraint (Litt's caveat , the whole point)

The explainer is grounded in the ACTUAL diff + recorded test results, NEVER in your own narrative of what the change did. An explainer that narrates the agent's intent teaches the agent's misconceptions (plausible-but-wrong). Concretely:

  • Never describe a change from memory, from the commit message alone, or from what you "meant" to do. Every claim traces to a hunk in git diff or a recorded verdict under docs/verification/.
  • The grounding + ordering is done mechanically by lib/explain.sh (its ONLY input is a git ref, so a narrative physically cannot leak in). You enrich the prose AROUND that skeleton; you do not override it.
  • If the diff contradicts the commit message or your recollection, the DIFF wins. Say what the code does.

Prose ordering is the point

If your output is git diff with headings, you FAILED. A raw diff is alphabetical by filename; an explainer is in READING order , concepts before code:

background (existing context)  ->  goal + intuition (concepts)  ->  the change in reading order  ->  diagram

lib/explain.sh order ranks the changed files into reading order: background (docs/specs/ADRs) -> the new concept (added files) -> integration (modified files) -> verification (tests), last. Keep that order.

Read the full file on GitHub · 108 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. 2d ago First seen · 108 lines · 61 tokens per session scan A b2209c2b897b

Subscribe to this mod's changes

explain is a command published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed 2d ago), licensed MIT. It adds 61 tokens to every session and 1,528 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.