Skip to content
The Operon Library

Volume IX · Chapter 1

Knowledge Compounds

Why knowledge, not code, is the compounding asset.2026-07-13 · 9 min read

A team inherits a service nobody currently on the roster wrote. The code works, mostly, and nobody wants to touch the file with the two-hundred-line function that seems to check the same condition four different ways. An engineer new to the team — or, increasingly, an AI agent asked to clean it up — reads it, concludes it is a mess, and proposes the obvious fix: delete it, rewrite it clean, ship something a competent developer would actually be proud of. The rewrite ships. Three weeks later, a customer on an unusual billing plan in an unusual time zone hits an unusual error, and nobody can explain why, because the explanation used to live in the ugly function, encoded as a branch nobody remembered writing and nobody thought to ask about before it was gone.

This is not a story about bad code. It is a story about where value actually lived. The function was ugly because it was correct — each strange branch was a scar from a real incident, a fix earned the hard way, in production, at cost. The rewrite improved the code and destroyed the knowledge, and those turned out not to be the same axis at all.

What compounds and what depreciates

Most engineering organizations implicitly treat code as the asset and knowledge as its byproduct — something that lives in people’s heads, in Slack threads, in the tribal memory of whoever has been around longest, useful but secondary to the artifact that actually ships. It is worth stating the inversion plainly, because almost nothing about how teams organize themselves reflects it: code depreciates, and knowledge — the accumulated understanding of why the system looks the way it does — is the thing that compounds.

Code depreciates because it is never finished depreciating. It absorbs maintenance cost from the moment it ships. Its dependencies go out of date. Its assumptions about scale, about regulation, about the shape of the business stop holding. Eventually it gets rewritten, or deleted, or quietly left to rot behind a feature flag nobody dares remove. None of that is a failure of the code; it is simply what code is — a snapshot of a decision, aging the moment it is made.

Knowledge behaves differently. The understanding of why the retry logic backs off the way it does, which two approaches were tried and abandoned before the current one, what the compliance team actually meant by a requirement that reads ambiguously on the page, what broke in production and what fixed it — that understanding does not go stale the way a dependency version does. It keeps paying out for as long as anyone can retrieve it, and it compounds precisely because each new decision can build on the last one instead of re-deriving it from nothing. The asset was never really the code. The code was always downstream of the understanding that produced it.

Code is a snapshot of a decision, aging the moment it ships. Knowledge is the decision-making itself, and it keeps paying out for as long as it can be retrieved.

Why this inverts in the AI era, not just persists

It would be reasonable to assume that AI-assisted engineering makes this distinction less important — if code is cheap to produce, who cares whether the old version depreciated, an agent can just make more. This Library’s chapter on the verification asymmetry already established the premise this chapter needs: generation is no longer the constraint. An agent can regenerate a plausible version of almost any function in seconds, for a fraction of what it cost a human to write the original.

That cheapness is exactly why knowledge matters more now, not less. An AI agent can regenerate code. It cannot regenerate lost institutional knowledge, because regeneration requires something to retrieve, and reasoning that was never captured anywhere — never written down, never structured, existing only as a half-remembered incident in one engineer’s head — has nothing for even the most capable model to retrieve it from. Generation got cheap. Recovery of lost context did not get cheap; it got, in a specific and important sense, permanently harder, because the fastest available way to destroy institutional knowledge is now a single prompt away and takes about the same effort as any other prompt.

This produces a trap that is easy to walk into precisely because each step looks reasonable. The code is messy. The AI can make it clean. Clean code is obviously better than messy code. Ship the rewrite. Every step in that chain is locally true and the composite is a mistake, because it treats messiness and knowledge-density as opposites when the ugliest parts of a codebase are very often the parts carrying the most compressed, hardest-won understanding of the domain — Joel Spolsky made exactly this case in 2000, long before agentic coding existed, arguing that a function riddled with odd-looking branches is very often not bad code but a fossil record: “those are bug fixes,” each one a piece of knowledge earned in production and encoded nowhere else. His conclusion about full rewrites, aimed at a very different kind of software company, reads as though it were written for this exact failure mode: “when you throw away code and start from scratch, you are throwing away all that knowledge.” An AI agent asked to “clean this up” inherits none of Spolsky’s caution unless a human supplies it, because the agent has no way to distinguish an ugly branch that is dead weight from an ugly branch that is a scar.

What the loss actually costs

This is not a hypothetical risk invented for the AI era; it is a well-studied one, sharpened by a new tool for triggering it faster. Software engineering research on developer turnover already treats knowledge loss as a real, costly, and measurable phenomenon, not a vague morale concern. A large-scale empirical study of turnover at Chrome and at a project inside Avaya found that projects routinely face losses several times larger than a naive expected-value estimate would predict, and that the presence of a successor — someone deliberately handed the departing engineer’s context before they left — reduced that expected loss by as much as 15%. A separate qualitative study interviewing twenty-seven professional developers and managers across three companies catalogued the ways that loss shows up in practice: decisions nobody can explain anymore, rationale that has to be reverse-engineered from the code itself because the person who could just answer the question is gone, work that gets redone because nobody remembered it had already been tried and had already failed.

An AI-driven rewrite is turnover compressed into an afternoon. It has the same signature — the person or process that held the context is no longer the one holding it — without the years of accumulated best practice teams have built around actual staff departures: handoff documents, exit interviews, a successor deliberately paired with the departing engineer before they leave. Nobody runs a knowledge-transfer process before asking an agent to rewrite a file, because the file is still right there, and it does not feel like anyone left. But if the reasoning behind the file’s odd shape was never captured anywhere else, the rewrite has the exact effect of an undocumented departure: the code survives, or a cleaner version of it does, and the “why” quietly does not.

A rewrite is turnover compressed into an afternoon — with none of the handoff.

A discipline older than software

None of this is a novel discovery about AI. It is a rediscovery, under new pressure, of a distinction organizational-knowledge research settled decades before agentic coding existed. Ikujiro Nonaka’s 1994 theory of organizational knowledge creation drew the line this chapter has been drawing all along: between tacit knowledge — understanding that lives in experience and judgment, hard to write down, easy to lose — and explicit knowledge, the version that has been deliberately converted into something a document, a diagram, or a database can hold. Nonaka’s core claim was that organizations do not simply store knowledge; they have to actively convert tacit understanding into explicit, shareable form, and back again, on an ongoing basis, or the tacit portion — which is most of it — quietly evaporates as the people who held it move on to other problems, other teams, other companies. That conversion work was already the hard, unglamorous, chronically underfunded part of organizational life before AI. It has not gotten easier. It has gotten more urgent, because the tool now capable of discarding tacit knowledge fastest is the same tool teams increasingly point at their own codebase without a second thought.

This Library has already introduced the mechanism built for the explicit half of that conversion at the level of a single AI session: Decision Memory, the practice — established earlier in this Library — of persisting an agent’s choices as queryable records of what was decided, why, and what it superseded. Decision Memory is this chapter’s direct predecessor, not a separate idea. What Decision Memory does for one session’s reasoning, this volume’s third chapter, Decision Archives, extends to an organization’s full history — the same conversion Nonaka described, built as infrastructure instead of left as a hope that someone remembers to write it down. This Library’s chapter on provenance and attribution supplies the adjacent half of the same argument: provenance records who — or what — made a change; Decision Memory records why it was made. Knowledge compounding needs both, because a change with a name attached but no rationale is exactly as unrecoverable, three months later, as one with no record at all.

A framework for the question worth asking before a rewrite

The practical failure this chapter is naming is not "AI rewrites are bad." Plenty of code should be rewritten, cleanly, by an agent, in an afternoon — code that is ugly because it is merely unmaintained, not because it is knowledge-dense. The failure is skipping the one question that distinguishes those two cases before deleting anything: does this code’s ugliness encode understanding that exists nowhere else? A short framework for asking it, before the rewrite prompt gets sent:

QuestionIf the answer is yes
Is there a comment, commit message, ticket, or test explaining the odd branch?The knowledge is already explicit — a clean rewrite that preserves the documented behavior is low-risk.
Does anyone currently on the team remember why this exists?Capture it in writing before the rewrite starts, not after — this is the conversion Nonaka described, done deliberately instead of by accident.
Would a behavioral test catch it if the rewrite silently dropped this case?Write that test first. It is now the explicit record standing in for the tacit one about to be discarded.
Is the answer to all three "no" or "unknown"?Treat the rewrite as a knowledge-loss event, not a cleanup — the same caution a departing engineer’s last two weeks would get, compressed into the time before the prompt is sent.

What this looks like in decision data

The rest of this volume builds out what a serious answer to that question looks like at organizational scale: what gets forgotten and what it actually costs, decision archives that extend Decision Memory beyond a single session, documentation written for both human and agent readers, knowledge graphs that connect a decision to everywhere it applies, playbooks that convert one team’s hard-won pattern into another team’s starting point, a genuinely new category — knowledge written by agents, not just consumed by them — learning organizations, reusable thinking, and engineering wisdom, closing with the claim this chapter has been building toward: that knowledge deserves to be treated as infrastructure, budgeted and maintained the way any other durable system is, rather than left as folklore that survives only as long as the person who happened to be in the room.

For Discussion

  1. Pick the ugliest function in your codebase that nobody wants to touch. Does anyone on the current team know why it looks that way — and if not, when did that knowledge actually leave?
  2. The next time an AI agent proposes a clean rewrite of something old, what would it take for your team to ask "what does this encode" before asking "is this better" — and who owns that question today?
  3. If your best engineer left tomorrow with no notice, how much of what they know would survive in a form anyone else — human or agent — could actually retrieve?

References

  1. establishedFoundational theory of organizational knowledge creation: the tacit/explicit conversion cycle (the SECI model)Ikujiro Nonaka — "A Dynamic Theory of Organizational Knowledge Creation," Organization Science, Vol. 5, No. 1 · 1994-02
  2. establishedEmpirical study (Chrome + an Avaya project): turnover-induced knowledge loss routinely several times larger than expected-value estimates; a deliberate successor reduces expected loss by up to 15%Rigby, Zhu, Donadelli & Mockus — "Quantifying and Mitigating Turnover-Induced Knowledge Loss," ICSE 2016 · 2016-05
  3. establishedQualitative study (27 practitioners, 3 companies): a four-theme framework for how turnover-induced knowledge loss actually shows up in software teamsRobillard et al. — "Turnover-Induced Knowledge Loss in Practice," ESEC/FSE 2021 (Industry Track) · 2021-08
  4. establishedClassic argument that "ugly" legacy code frequently encodes hard-won bug fixes, and that a full rewrite discards that knowledge wholesale (the Netscape rewrite case)Joel Spolsky — "Things You Should Never Do, Part I," Joel on Software · 2000-04-06
  5. emergingPractitioner account of an internal documentation-first system (50+ specialized agents) built to extract non-obvious design patterns before deploying AI agents on legacy code, and a self-reported drop in production debugging time attributed to itTian Pan — "AI Coding Agents on Legacy Codebases: What Works and What Backfires" · 2026-04-19
  6. establishedAI as an amplifier of existing organizational strengths and dysfunctions, including documentation and knowledge-sharing practicesDORA — State of AI-assisted Software Development 2025 · 2025-09