Why the Best Expert Is Not a Model, but a Memory Palace

Mark Erdmann

Hatched by Mark Erdmann

Jun 18, 2026

9 min read

86%

0

The Strange Promise Hidden in a Codebase

What if the most valuable AI system for your team is not one that predicts the next token, but one that remembers why the code exists at all?

That question sounds almost backward. We are used to thinking of intelligence as compression, pattern recognition, and speed. Yet the most frustrating part of working in software is rarely the absence of syntax knowledge. It is the absence of context: why this function is brittle, why that module was written in a hurry, why a supposedly elegant refactor never happened, why a workaround became permanent. A system that can become a living expert on your codebase is promising not because it can imitate a smart engineer, but because it can accumulate the kind of memory that organizations usually lose.

Now add a second idea: natural selection, given vast amounts of data over immense time, produces an astonishing configuration, one that can be compared to the informational scale of human DNA. That image is unsettling and useful at once. It suggests that intelligence can emerge from a process that does not start with understanding, only with accumulation, filtering, and retention. The deeper tension is this: are experts built by reasoning, or by the long compression of experience into structure?

The answer may be that the best expertise is neither pure reasoning nor pure memory. It is the ability to turn experience into navigable structure.


Intelligence Is Often a Storage Problem in Disguise

We tend to describe expertise as if it were mostly about clever inference. But in many real domains, the bottleneck is not reasoning power. It is the cost of holding enough of the world in mind to reason well. A senior engineer is useful not merely because she is smarter than a junior engineer, but because she has internalized the shape of the system: the historical accidents, the failure modes, the hidden dependencies, the “do not touch” areas, and the places where the code says one thing and the business means another.

That is why a codebase can feel like a living organism. It has scars, habits, and inherited mutations. A clean-looking repository can still be full of invisible constraints. One service might be coupled to an old billing rule. Another might be shaped by a production incident from two years ago. Documentation almost never captures this texture fully, because documentation is static while software is historical.

This is where the idea of a living expert matters. It is not just a better search tool. It is an attempt to build a system that maintains a coherent memory of the project as it changes, a memory that can answer not only “what does this code do?” but also “why is it this way, what would break if we changed it, and what assumptions are buried here?” In other words, it is an effort to convert an evolving artifact into something like an always-available senior collaborator.

Expertise begins when information stops being a pile of facts and becomes a map of constraints.

The natural selection analogy sharpens this point. Evolution is not intelligent in the conversational sense, yet it produces organisms that are exquisitely adapted to their environments. Why? Because selection preserves useful structure across enormous numbers of trials. Human DNA is not a transcript of a design meeting. It is a compressed record of what survived. Likewise, a mature codebase is often not a tidy architectural blueprint. It is a record of what survived deadlines, bugs, market changes, and human limitations.

A system that becomes expert on that codebase must therefore do something evolutionary in spirit. It must absorb traces of many changes, keep what matters, discard what does not, and present the result as actionable context.


The Real Challenge: Turning Accumulation Into Understanding

But here is the tension. A lot of accumulated information is not the same as meaningful expertise. Nature can produce breathtaking complexity without any guarantee of elegance. A codebase can also accumulate complexity without ever becoming wise. There is a difference between dense memory and usable intelligence.

That distinction matters because many AI systems are good at the first and weak at the second. They can ingest a mountain of data, but unless they organize it into stable, queryable, and situation-aware knowledge, they remain impressive archives rather than dependable experts. A person asking for help in a codebase does not just need fragments retrieved from the repository. They need a judgment that reflects priorities, tradeoffs, and the practical consequences of change.

This is where the best metaphor is not a database, but a memory palace.

A memory palace does not merely store things. It places them in relation to one another. Rooms, corridors, landmarks, and routes create an internal geography of meaning. The point is not recall alone. It is orientation. You know where to look, what belongs near what, and how to move through the space without getting lost.

A truly useful codebase expert must do something similar. It should not just index files. It should understand the architecture of dependencies, the history of decisions, the clusters of functionality, and the relationships among concepts. If the system knows that authentication code sits near payment logic because of an old integration compromise, that is not trivia. It is a clue that shapes future work.

Here is a useful mental model:

Expertise = compression + topology + retrieval

  • Compression: it reduces overwhelming detail into manageable representations.
  • Topology: it preserves the shape of relationships, not just isolated facts.
  • Retrieval: it surfaces the right detail at the right moment, in context.

Most tools do one of these well. Very few do all three.


Why Evolution and Engineering Belong in the Same Conversation

At first glance, code assistance and natural selection seem to live in different worlds. One is human-designed software. The other is blind biological adaptation. Yet both are fundamentally about search in a vast space of possibilities under constraints.

Evolution explores a universe of potential forms through variation and selection. Engineering explores a universe of implementations through design choices, debugging, and iteration. In both cases, most possibilities are bad. What survives is what fits the environment. The analogy is not that codebases are alive in a literal sense. It is that both biology and software reveal how intelligence can emerge from the accumulation of filtered history.

Think about the difference between a brand-new project and a ten-year-old system. The new project may look clean, but it is shallow. It has little memory, few scars, and limited resilience. The old system may look messy, but it contains hard-won knowledge embedded in structure. A payment retry loop exists because money is painful. A schema quirk exists because migrations once failed. A weird abstraction survived because reality refused to fit the neat model.

That is why the phrase living expert is more profound than it first appears. It implies that expertise is not just a snapshot of current understanding. It is a living record of adaptation. The system does not need to be omniscient. It needs to preserve the things that matter as the environment changes.

This also exposes a common mistake in how we build tools and organizations. We often optimize for elegance at the point of creation, but neglect memory across time. We value clean abstractions, but forget that the world punishes forgetfulness. Teams rewrite systems because they cannot recover the story of how those systems evolved. Engineers repeat mistakes because the reasoning behind past choices was never made retrievable.

The hidden cost of forgetting is not just inefficiency. It is forced rediscovery.

A system that cannot remember its own past must keep paying for the same lessons.


From Static Documentation to Adaptive Institutional Memory

If this synthesis is right, then the future of tools is not only about answering questions faster. It is about creating adaptive institutional memory.

Traditional documentation tries to solve memory with static text. That works briefly, then decays. Code comments become outdated. Wikis drift. Architecture diagrams simplify away the very tensions that made the system hard to build. What teams need is not just documentation maintenance. They need a memory system that stays in motion with the code.

Imagine asking a system three different kinds of questions:

  1. Local: What does this function do?
  2. Relational: What depends on this module, and what does it depend on?
  3. Historical: Why was this implementation chosen instead of the alternative?

A basic search tool can answer the first somewhat. A graph or indexing system helps with the second. The third is the hardest, and the most valuable. It requires the system to treat history not as noise, but as a source of operational knowledge. It has to know that a choice was made after an outage, that a parameter was tuned for a client segment, or that an apparent shortcut was actually a survival tactic.

This is also where the biological analogy becomes practical rather than poetic. Evolution does not preserve everything. It preserves what remains functional under pressure. In the same way, an intelligent codebase system should not try to remember all facts equally. It should preserve the facts that carry decision weight. A repository is full of trivia, but only some of it is structurally important.

That implies a strong design principle: memory should be selective, not maximal.

A good expert system does not flood you with notes. It surfaces the few details that change your decision. It tells you the hidden coupling before you ship the change. It warns you that a seemingly local edit will trigger a cascade. It remembers which area of the code is stable, which is fragile, and which has a history of regressions.

This is the difference between information and wisdom. Information says, “Here are all the facts.” Wisdom says, “Here is the fact that changes what you should do next.”


Key Takeaways

  • Treat expertise as structured memory, not just clever inference. The most valuable systems remember relationships, constraints, and history, not only surface-level facts.

  • Build for orientation, not just retrieval. A truly useful expert on a codebase should help you navigate the system’s topology, not merely search it.

  • Preserve decision-making context. The reason behind a choice is often more important than the choice itself, especially in long-lived software.

  • Optimize for selective memory. Retain the details that affect future decisions, not every detail that can be stored.

  • Think in terms of evolution. The best systems, like the best organisms, are not born perfect. They become useful through accumulated, filtered adaptation.


The New Standard for Expertise

The deepest connection between a living codebase expert and the logic of natural selection is not “lots of data makes smart things.” That is too shallow. The real insight is that intelligence is often the power to condense a long history of interaction into a form that can be used now.

Nature does this with genomes. Teams do it poorly with memory and documentation. Good AI systems may do it better, if they are built not merely to answer, but to remember structurally. In that sense, the future expert will not be the one that knows everything. It will be the one that knows what matters, where it fits, and how it came to be.

That changes how we should think about software, organizations, and even intelligence itself. We do not need more static knowledge piles. We need systems that can carry the past forward without drowning the present in it.

The real mark of expertise, then, is not omniscience. It is the ability to make history legible at the moment of action.

Sources

← Back to Library

Hatch New Ideas with Glasp AI 🐣

Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)

Start Hatching 🐣