Compound Engineering: Why Banked Knowledge Stops Paying
Compound engineering is the idea that each piece of work should make the next piece easier. You record what you learned, where your agents will read it, so the next feature starts ahead of the last one. The pitch is easy to agree with, and the first few weeks bear it out.
Then the lessons pile up. Some go stale, some contradict each other, and a few go on being followed after they stopped being true. At that point the store has stopped compounding: it's just growing, and growth isn't the same thing. This post is about that second phase, the maintenance side, which is where I've spent most of my own effort on this practice.
Where the term comes from
When people search for "compound engineering" they're mostly looking for a named method from Every. Dan Shipper and Kieran Klaassen set it out in Compound Engineering: How Every Codes With Agents (December 2025). Their framing is that each feature should make the next one easier to build. Their loop is plan, work, review, compound, and the compound step is where lessons get written down for agents to use next time. Every keeps a longer guide and publishes an open-source Claude Code plugin built around the same loop.
I'm not going to summarize their method, and I'm not describing their plugin; go to the source for both. This post comes from running the same underlying habit across my own repos. What I have to add is narrow: what happens to banked knowledge after the compound step, and why it stops paying if nobody looks after it. Most of what I've read on the subject is about getting lessons written down. Keeping them true takes about as much effort and gets far less attention.
Banking is the easy half
The mechanics of where lessons live are covered in my context engineering guide. Its memory layer is the one that "makes the whole system compound instead of reset." There I describe those files as files that only grow, and that's accurate for the writing side: entries get added as the work happens, not batched up later.
This post is about the other side. A file that only grows still has to be read, and every entry in it costs attention whenever it's loaded. So the question is whether the next session can still trust what's there, not how much you've banked.
Why banked knowledge stops compounding
Four things go wrong, roughly in this order.
Entries expire silently. A lesson is true about a system at a moment in time. Then the system changes: a dependency moves, a workflow gets replaced, a constraint is lifted. The lesson stays in the file, written in the present tense, with nothing marking it as out of date. An agent reading it has no way to tell a rule that still holds from one that held in the spring.
Entries start contradicting each other. Six months of corrections means the early ones and the later ones disagree. The later one is usually right, because it was written with more information, but the file doesn't say which one wins. Faced with two confident instructions, a model picks one, and it won't reliably pick the newer.
The signal gets diluted. The lessons that matter, the ones that stop an expensive mistake, sit in the same list as one-off notes that were never going to come up again. In a file that loads into every session, each new line means less attention for everything else in it, the important entries included. Loading only the lessons that match the task softens this, but it doesn't cure it: a stale entry that matches still gets loaded, and it still sounds as sure of itself as the day it was written.
The reason goes missing. "Don't do X" survives far longer than the reason it was written. Once the reason is gone, nobody can tell whether the rule still applies, so it gets followed forever or ignored at random. It's hard to say which is worse.
None of this is a model problem. It's what happens to any store of knowledge that gets written to and never maintained. Agents make it hurt faster, because they act on whatever lessons reach their context, and nothing in a stale entry tells them it has stopped being true.
Pruning: compress, don't just delete
Memory that's kept useful doesn't keep every entry. It carries the value forward and drops the rest. Here, carrying the value forward means a periodic pass that does three things:
- Merge instances into rules. Five entries that are really the same lesson in five costumes ("check the date before writing a filename," "don't infer the date from a commit," and so on) become one general rule with one example. Then the five go.
- Retire the dead. Anything about a system, tool or constraint that no longer exists gets removed, not annotated. A struck-through entry is still there to be loaded, and still a line the next reader has to get past.
- Resolve contradictions explicitly. When two entries disagree, keep the right one and delete the other. Don't leave both with a note saying "see below." The reader you're writing for doesn't scroll back to reconcile.
When to run it matters more than how often. I watch for three triggers. One: an entry turns out to be wrong in practice. That's the cheapest moment to check its neighbours too, because they were often written in the same period, under the same assumptions. Two: a session follows an old rule that a newer one should have overridden. Three, for a file that loads into every session: it has grown past the point where you'd read it yourself before starting work. If you'd skim it, don't count on the model reading it closely either.
This is the least fun work in the practice. It's also what keeps the rest of it working. A store of lessons nobody prunes ends up worse than having none, because having none at least doesn't send you confidently the wrong way.
Expiry: write the shelf life into the entry
You can't prune what you can't date, and most lessons are written as if they'll be true forever. The cheapest fix is a habit at write time: say when the entry stops being true.
- "Until we migrate off the old queue."
- "As of the current major version of the library."
- "True while this job runs nightly; revisit if it moves to hourly."
- Or, at the very least, the date it was written.
A lesson with a stated shelf life can be checked by anything that reads it, an agent included. One written in the eternal present can't. In my experience, dated facts written as timeless ones are the most common way a memory system starts giving confident wrong answers. The expiry condition costs a few words when you write the entry and saves the whole pruning pass from guesswork.
The same applies to the reason. "Don't do X, because Y" lets a future reader check whether Y still holds. "Don't do X" leaves them with superstition.
What not to bank
The best pruning happens before anything is written. Some things look worth recording and aren't:
Successes, mostly. What went right is in the diff, the tests and the commit history. Anything that can read the repo can recover it.
Anything derivable. If it can be computed from the code, the task system or a config file, a banked copy is a second source that will drift from the first. The context engineering guide calls the governing principle derive, don't duplicate, and it applies to lessons as much as to facts. Point at the source instead.
Snapshots of things you don't control. A third-party API's current behaviour, a vendor's pricing page, a tool's default setting. They change on someone else's schedule. Store a pointer to the authoritative place and a note on what to check there, not a copy of what it says today.
Taste. You can record a judgment. You can't record the judgment that produced it. Entries like "prefer clean solutions" cost attention wherever they're loaded and change nothing.
One-offs. A fix in a file nobody touches, under conditions that won't recur. It was real work, but nobody will need it again.
What is worth banking
What's left is narrower than most people expect, and it pays well.
The rediscovery. Anything you've now worked out twice. The second time is the signal: whatever produced the problem comes back, so there'll be a third time. Nothing is cheaper to justify banking.
The near-miss. Something that almost shipped wrong and got caught by luck rather than by process. These rarely get written down, because the outcome was fine. But it was only fine this time, and luck doesn't carry over to the next one.
Both share one property: the information exists nowhere except in the head of whoever just paid for it, and it'll be gone by the next session. That's the whole case for writing it down immediately.
The rule, in one line
You don't need a system to decide what to bank. You need a rule you'll actually apply at the end of a long day:
Bank it when the cost of rediscovering it, multiplied by the odds it comes up again, beats the cost of recording it and of keeping it true.
The last clause is what this post is about, and it's the one usually left out. Every entry has a carrying cost: the attention it takes whenever it's loaded, and the pruning it'll eventually need. Count that cost and plenty of things that felt worth writing down turn out not to be. What's left is a store the next session can trust, which is the only kind that compounds.
If you're setting up the habit from scratch, the context engineering guide has a working order for the files themselves. Start there, then come back to this when the file gets long.
FAQ
What is compound engineering?
It's an approach to building with AI agents where each unit of work is meant to make the next one easier, mostly by recording lessons where agents will read them automatically. The name as most people search for it comes from Every, whose loop is plan, work, review, compound. This post covers what happens to those recorded lessons over time.
How do I install the Compound Engineering plugin?
The plugin is Every's, published open source at EveryInc/compound-engineering-plugin. Its README has the current install steps, so follow that rather than a copy here: plugin install steps change, and a copied version is exactly the kind of snapshot this post says not to bank.
How often should I prune a lessons file?
Prune on triggers rather than on a calendar: when an entry turns out to be wrong, when an old rule overrides a newer one, or when the file has grown past the point where you'd read it yourself. A file that triggers none of those probably doesn't need pruning yet.
Should I delete old lessons or mark them as outdated?
Delete them, or merge them into the rule that replaced them. A line marked outdated can still be loaded: every time, if the file loads into every session, or whenever it matches, if lessons are retrieved by topic. Either way it competes with the rule that's current.
What's the difference between banking a lesson and writing documentation?
Documentation describes how a system works, and you can usually recover that from the system itself. A banked lesson records what the system doesn't say: why a choice went one way, which plausible path wastes a day, what almost went wrong. It also lives somewhere it gets re-read automatically, not in a folder someone has to remember to open.