compound
Every session leaves the repo smarter than it found it.
A Claude Code plugin. Three commands to learn, a knowledge base that fails a check when it
goes out of date, and a working agreement that keeps diffs small and honest.
Install
claude plugin marketplace add mthanhlm/compound
claude plugin install compound@compound
Then, in each repo you want it to work in:
/compound:setup
That's it. Setup reads the repo, writes a working agreement into CLAUDE.md, scaffolds a
wiki/, and tells you what it decided. It doesn't interview you — every choice has a
defensible default and it shows its reasoning so you can correct it in one sentence.
How to use it
Mostly: don't. Work the way you already do. The plugin's job is to change how Claude
behaves, not to give you more things to remember.
you: the checkout page is slow, fix it
Underneath, without you asking: Claude builds a measurable check before touching code
(because "slow" isn't a pass/fail signal), keeps the diff to what you asked for, runs the
check and shows you the output, and files anything hard-won into the wiki so the next
session starts with it.
The three commands
| Command | When |
|---|
/compound:setup | Once per repo, at the start |
/compound:go | Before building something you haven't thought all the way through |
/compound:handoff | You're stopping, or the context is nearly full |
/compound:go is the one most worth reaching for. It interviews you one question at
a time — looking facts up itself, asking only what's genuinely in your head — until you and
Claude mean the same thing. Most wasted work starts as a misunderstanding that survived
because nobody asked.
Using it well
Start real work with /compound:go. Not a typo fix — anything you'd struggle to
describe in one sentence. Ten minutes of questions beats an hour of building the wrong
thing, and the answers end up in the wiki instead of only in your head.
Say what "working" means, or let it ask. "Make it faster" has no pass/fail signal, so
Claude will construct one before writing code. If you already know the number, say it —
that's one round-trip saved.
Let the wiki fill on its own. Don't curate it. capture writes decisions and root
causes as they happen; wiki-lint cleans up when things drift. Your job is to read it
occasionally and disagree.
Long sessions are fine. Name them (/rename), compact when you get heavy, keep going.
Before every compaction a snapshot of the concrete state lands in .compound/pre-compact.md,
so the specifics survive even though the narrative gets summarised.
/compound:handoff is for forking, not for stopping. Use it when you want a fresh
window on the same work — a hard bug, a change of direction, a second opinion. To simply
continue, compact and carry on.
Clear between unrelated tasks. Different feature, different bug, different repo —
/clear. Context from the last task doesn't help the next one and quietly makes it worse.
Trust the push block. Claude commits and tells you the branch is ready. You push.
What runs on its own
These have no command. They fire from what you say, which is the point — you describe the
task, not the process.
| Fires when |
|---|
| verify-first | A task has no pass/fail signal. Builds the check before any code exists |
| tdd | A behaviour is clear enough to write as a test. Red, green, refactor |
| diagnosing | A bug resists — intermittent, or a regression you can't explain yet |
| guardrails | A scope or simplicity call needs arguing rather than asserting |
| to-spec | An agreed but unbuilt plan needs to outlive the window |
| to-slices | Work spans more than one sitting and needs an order |
| implement | A settled slice gets built, reviewed, and filed. Runs on Sonnet |
| handoff | The session grew heavy, or work needs to fork to a fresh window |
| capture | Something was decided, diagnosed, or learned. Writes it to the wiki |
| wiki-lint | The wiki needs auditing for contradictions and stale claims |
You can't type these, and that's deliberate — typing /implement gains nothing over
saying "build slice 2".
What you'll notice
- Claude asks before assuming, instead of picking an interpretation silently
- Diffs contain what you asked for and not a drive-by refactor
- "Done" comes with the command it ran and the output, not a claim
- Things you decided weeks ago don't get re-litigated
The knowledge base
Setup creates two tiers of one graph:
CONTEXT.md # your project's vocabulary — small, read every session
wiki/
index.md # the catalog; a page missing here is an orphan
log.md # append-only: ## [2026-07-25] decision | ...
<slug>.md # flat — decisions, areas, bugs, concepts, roadmap