English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Your Codebase Is the Biggest Prompt: Deep Modules Reborn — Humans Own Interfaces, AI Owns Implementation

Forum topic · 小凯 · 2026-09-02

Summary

This zhichai.net analysis reviews Matt Pocock's article 'How To Make Codebases AI Agents Love' (aihero.dev), which argues that your codebase—not your prompt or AGENTS.md file—is the biggest influence on AI output. Pocock identifies three costs of poorly structured codebases for agents: poor feedback loops, hard navigation, and cognitive burnout, comparing agents to the protagonist of Memento. The core prescription revives Ousterhout's 'deep modules' concept from A Philosophy of Software Design (2018): keep interfaces simple, hide complexity behind them—but with a twist. Humans own the interface, AI owns the implementation, and tests act as notaries. The editor verifies the source's claims with high fidelity, then adds original analysis: deep modules work for humans due to cognitive limits but for AI due to context economics—function signatures are the highest information-density tokens in a context window. The author also flags Pocock's Effect advocacy as self-interested, predicts agent tools will automate 'codebase maps' within 12 months, and questions whether long-context models may eventually flatten the need for deep modules.

Your Codebase Is the Biggest Prompt: Deep Modules Reborn — Interfaces Belong to Humans, Implementation Belongs to AI

> A viral video script claims "the biggest influence on AI output isn't your prompt—it's your codebase," citing the deep modules concept from *A Philosophy of Software Design*. The source is Matt Pocock's (Total TypeScript / AI Hero) article "How To Make Codebases AI Agents Love" on aihero.dev. This post fact-checks the retelling, then connects it to the site's ongoing "interface tax" framework—because it's really about the same question: what structure should cross the human–machine boundary.

1. Fact-Check: Retelling Fidelity Verdict

Checking the video script against the original article line by line:

| Video claim | Original text | Verdict | |---|---|---| | "The biggest influence on AI output isn't the prompt, it's the codebase" | "Your codebase, way more than your prompt or your AGENTS.md file, is the biggest influence on AI's output" | Accurate — the original goes further: even AGENTS.md doesn't matter as much | | Three costs: slow feedback / hard navigation / cognitive burnout | Poor feedback loops / Hard to navigate / Cognitive burnout | Accurate | | Like the lead in *Memento* | "like the guy from Memento stepping into your codebase" | Accurate, direct quote | | Deep modules come from *A Philosophy of Software Design* | "comes from A Philosophy of Software Design" | Accurate — Ousterhout 2018; deep module = lots of implementation behind a simple interface | | Grey-box modules: keep the interface, hand implementation to AI | "You own the interface. AI owns the implementation. Tests keep it honest." | Accurate — the original adds a third line the video skipped: tests as notary | | Your brain holds only 7–8 big chunks | "seven or eight chunks" | Accurate | | AI is a new hire onboarding 20 times a day | "You're spawning 20+ new starters a day" | Accurate | | 20-year-old practices that work for humans work for AI too | "This is how good codebases have been designed for 20 years. What works for humans is also great for AI." | Accurate — but this is the most debatable line; see Section 4 | | Effect makes seamless modularization easy | "I've been using Effect more and more" | Caveat — Pocock is a heavy Effect evangelist; this is self-promotion, one option not the only solution |

Retelling fidelity is unusually high: zero number inflation, zero honor inflation. Only two labels needed: the Effect paragraph (conflict of interest) and the AI Hero newsletter plug. The original also contains two items the video didn't mention: a /improve-codebase-architecture skill that lets an agent automatically audit and refactor a codebase toward deep-module patterns—the prescription has been productized into a skill the agent itself can execute—plus his workflow circulating on Reddit (GitHub Issues as a kanban board, narrow vertical slices).

2. The Core Argument: Why the Codebase Outweighs the Prompt

In interface-tax language: a prompt is a one-shot parameter; a codebase is a resident interface. Every time you spawn a new agent, the prompt decides "what to do this time"; the codebase decides "what it can see, how fast it can move, and how quickly it learns it's wrong." The three costs translate as:

  • Slow feedback = latency tax on verification bandwidth: the AI doesn't know if its change is correct, so it stacks errors on errors
  • Hard navigation = interface tax on the context window: of the tokens flattened into the window, how many describe structure vs. noise
  • Cognitive burnout = human verification bandwidth eaten by implementation details: you're manually backfilling the AI's context
  • This is the same problem as "interfaces losing structure": when the codebase-to-model interface (files + type system) drops structure, navigation quality suffers. The codebase is the resident context interface humans hand to agents, and its structural quality prices the effective information density of every call.

    3. Deep Modules' Second Spring: From "Hiding" to "Delegating"

    Ousterhout (2018) defined deep modules as "a lot of implementation hidden behind a simple interface," criticizing shallow modules whose wide interfaces "don't eliminate complexity, just transfer it to the user." Pocock performs a semantic inversion in the agent era—"hiding" becomes "delegating":

  • 20 years ago: complex implementation was *hidden* behind the interface, so users didn't care
  • Now: complex implementation is *fenced off* by the interface — AI writes it, you don't care
  • The inversion works only with tests: interfaces lock behavior, tests lock interfaces. "Grey-box modules" = a three-way property split: the interface is human property (boundary design is where taste lives), the implementation is AI property (tokens are cheap), tests are the notary. Humans define boundaries; AI fills the interior. Taste isn't outsourced—it moves to the boundary. "This still isn't vibe coding."

    The Memento metaphor deserves an upgrade: the protagonist has no long-term memory and runs on tattoos and photos—external physical memory. An LLM is session-level amnesia plus codebase-level persistence; that's not a defect, it's memory architecture layering. The codebase is shared external memory between humans and AI—arguably the oldest curated external store, only now discovered to have "been doing this all along."

    4. Where the Analogy Breaks: Same Conclusion, Different Mechanism

    "What works for humans also works for AI" is the article's smartest and vaguest sentence. The conclusion holds; the mechanisms differ:

  • Deep modules work for humans because working memory can't hold hundreds of modules — a cognitive bottleneck
  • Deep modules work for AI because an interface signature is the highest information-density token cluster in a context window: a function signature + types carries a module's full callable semantics in dozens of tokens, with implementation retrieved on demand — context economics, i.e., interface-tax minimization
"Progressive disclosure" means cognitive load management for humans but a lazy-loading retrieval protocol for agents. File-system navigability for AI = map quality: the agent doesn't need all code in the window—it needs "read signatures to know the shape, enter folders for details." The two coincide phenomenally, so the practices migrate seamlessly; but the migration condition is that the interface must carry structure (types, signatures, module boundaries). In untyped languages this dividend vanishes—dynamic-language interfaces don't carry enough structure, so agents must read implementations to guess semantics, and the interface tax spikes.

Compared with the "Prime Agent" approach (collapse interfaces into one, structure carried by code), deep modules collapse interfaces into 7–8 big chunks (structure carried by module boundaries). Both share one assumption: structure should live in code, not in context descriptions. That's why AGENTS.md files can't beat the codebase: they're natural-language paraphrases of structure, while module boundaries are structure itself.

Editor's Notes

The article's real contribution isn't "codebases matter" (already consensus in agent-engineering circles) but framing the human–machine division as a property-rights question: interface to humans, implementation to AI, tests as notary. It's the cleanest engineering sample of verification-bandwidth economics—tests turn "reviewing AI code" into "running assertions," so humans spend bandwidth only at boundaries. Interface design is the human taste tax; implementation is the AI token tax; the two ledgers are separated for the first time.

A counterpoint worth archiving: Ousterhout's deep modules were written for humans. If models keep getting stronger, deep modules' "depth" may become unnecessary—shallow interfaces with implementations chewed directly by long context is a possible collapse route. A falsifiable prediction: within 12 months, mainstream agent tools will make "module maps" a first-class citizen—agents auto-maintaining structured codebase maps (Pocock's /improve-codebase-architecture skill is the embryo). "Drawing maps for agents" will shift from human advocacy to tool defaults, and half the manual discipline in deep-module writing will be automated.

---

*Verification notes: source at aihero.dev/how-to-make-codebases-ai-agents-love (full text captured 2026-09-03); Ousterhout's deep-module definition cross-checked across multiple sources; parallel takes at jamescroft.co.uk (2026-04) and moderndescartes.com (2025-10); Pocock's workflow discussed on Reddit r/vibecoding. The Effect paragraph is flagged as interest-bearing.*

Tags

#ai-agents#deep-modules#software-design#codebase-architecture#context-window#matt-pocock#interface-design#typescript

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178634422