Why Code Quality Compounds in the AI Age

▶ Watch (01:52)

Matt Pocock ran the specs-to-code workflow himself. Each time he re-ran the compiler without examining the code, the output got worse. The Pragmatic Programmer calls this software entropy: every change that ignores the whole-system design makes the codebase harder to modify. Pocock’s conclusion inverts the “code is cheap” premise. Bad code is now the most expensive it has ever been, because a hard-to-change codebase blocks every productivity gain AI can offer. Good codebases, by contrast, let AI perform well.

Building Shared Understanding Before Writing a Line

▶ Watch (05:53)

Pocock’s fix for misaligned output is a two-line prompt he calls “grill me”: “Interview me relentlessly about every aspect of this plan until we reach a shared understanding.” The repo hit 13,000 stars. The prompt generates 40 to 100 questions before the AI considers itself aligned. That conversation then feeds a product requirements document or a list of issues for an async agent. The second technique borrows from domain-driven design: a ubiquitous language file, scanned from the codebase, gives both you and the AI a shared vocabulary that tightens planning and shortens the thinking trace.

Feedback Loops and Test-Driven Development

▶ Watch (10:00)

Even with TypeScript, browser access, and automated tests wired in, the LLM defaults to generating large chunks before running any checks. The Pragmatic Programmer calls this outrunning your headlights: the rate of feedback is your speed limit. Pocock’s fix is test-driven development. Writing a test first forces the LLM to take one small step, make it pass, then refactor. Testing is still genuinely hard (unit size, what to mock, which behaviors matter), but a well-designed codebase makes those decisions obvious and keeps the LLM within its feedback window.

Deep Modules: Structuring Code the AI Can Navigate

▶ Watch (12:43)

John Ousterhout’s deep module packs lots of functionality behind a simple interface. Shallow modules invert that ratio: many small files with complex interfaces, and AI handles them poorly because it reads the wrong file or misses a dependency. Pocock’s “improve codebase architecture” skill groups related code behind a clean boundary, then lets AI fill the implementation. You design the interface; AI writes what’s inside. Reviewing only the interface keeps cognitive load low enough that developers stop feeling exhausted, and the result is a codebase that rewards TDD.

Notable Quotes

software fundamentals matter now more Matt Pocock · ▶ 0:34

a concept of a ubiquitous language. Matt Pocock · ▶ 8:26

And so code is not cheap. That’s the Matt Pocock · ▶ 17:16

Key Takeaways

  • Specs-to-code workflows degrade codebases by skipping design investment on every iteration.
  • The ‘grill me’ prompt forces 40-100 clarifying questions to build a shared design concept before coding starts.
  • Deep modules with simple interfaces make codebases testable and easier for AI to reason about correctly.