Matt Pocock Warns AI Spec-to-Code Push Fuels Costly System Entropy

"Software Fundamentals Matter More Than Ever" — Matt Pocock — AI Engineer

AI Engineer

Treating AI as a black-box compiler accelerates codebase degradation, making disciplined system architecture and interface boundaries essential to keep automated development viable.

AI-assisted summary of "Software Fundamentals Matter More Than Ever" — Matt Pocock — original source. Check the original for full context.

Source published:

Key ideas

  • The popular 'specs-to-code' approach, where developers generate code without inspecting it and rely on black-box model iteration, accelerates codebase entropy and turns into unmaintainable 'vibe coding by another name.' (0:00)
  • Matt Pocock's open-source 'Grill Me' skill turns AI models into adversarial interviewers asking 40 to 100 targeted architectural questions, establishing a shared design concept before writing PRDs or code. (5:00)
  • Adopting Domain-Driven Design's Ubiquitous Language by extracting codebase terminology into structured Markdown tables constrains the LLM's reasoning traces, dramatically reducing verbosity and semantic drift. (7:22)
  • Refactoring tangled codebases into John Ousterhout's 'deep modules' allows engineers to specify interfaces while delegating internal gray-box implementation to AI agents, curbing severe developer cognitive burnout. (12:30)

Detailed notes

## Background Published on YouTube by AI Engineer on April 23, 2026, this presentation features educator Matt Pocock addressing the realities of AI-assisted software development. Drawing from 18 months of teaching engineers to build with AI agents, Pocock examines why relying on AI coding tools without strict software fundamentals produces unmaintainable spaghetti code, and presents an iterative framework grounded in classic engineering principles.

## TL;DR Pocock rejects the popular 'specs to code' paradigm, labeling hands-off compilation as a dangerous form of vibe coding that compounds architectural entropy. To overcome common AI failure modes, he introduces tactical techniques such as the adversarial 'Grill Me' interview prompt to establish a shared design concept, and domain dictionaries to enforce a ubiquitous language. He stresses that developers must enforce tight feedback loops through TypeScript and Test-Driven Development (TDD) while refactoring codebases into deep modules with simple boundaries. Ultimately, Pocock argues that while AI excels as a tactical sergeant writing code changes on the ground, human engineers must remain strategic architects who design system interfaces and control module topology.

## Atmosphere & style The presentation is pragmatic, empathetic, and reassuring, striking an immediate chord with developers struggling under the cognitive overload of the AI transition. Pocock blends sharp industry critique with warm, self-deprecating humor, openly commiserating with audience fatigue before systematically dismantling Silicon Valley hype. The talk carries an empowering emotional arc, transforming developer anxiety about obsolescence into renewed confidence in hard-won, foundational engineering discipline.

## Bulletin - [00:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=0s) The popular 'specs-to-code' approach, where developers generate code without inspecting it and rely on black-box model iteration, accelerates codebase entropy and turns into unmaintainable 'vibe coding by another name.' - [05:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=300s) Matt Pocock's open-source 'Grill Me' skill turns AI models into adversarial interviewers asking 40 to 100 targeted architectural questions, establishing a shared design concept before writing PRDs or code. - [07:22](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=442s) Adopting Domain-Driven Design's Ubiquitous Language by extracting codebase terminology into structured Markdown tables constrains the LLM's reasoning traces, dramatically reducing verbosity and semantic drift. - [12:30](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=750s) Refactoring tangled codebases into John Ousterhout's 'deep modules' allows engineers to specify interfaces while delegating internal gray-box implementation to AI agents, curbing severe developer cognitive burnout.

## Key takeaways - [00:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=0s) Software engineering fundamentals have become more critical than ever in the AI era rather than obsolete. - [00:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=0s) Treating AI code generation as a black-box compiler degrades codebase maintainability because LLMs lack awareness of global architectural entropy. - [00:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=0s) The industry aphorism that 'code is cheap' is false; unmaintainable code is more expensive than ever because it prevents developers from leveraging AI effectively. - [05:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=300s) Human developers rarely understand their exact requirements upfront, making alignment a collaborative requirements-gathering exercise rather than simple task delegation. - [05:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=300s) The 'Grill Me' prompt pattern forces models to aggressively interrogate the developer's design decisions across branches of the design tree prior to generating code. - [05:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=300s) Default AI planning modes, such as Claude Code's plan mode, often rush into code generation prematurely before reaching true conceptual consensus. - [07:22](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=442s) Semantic misalignment between developers and AI mirrors communication breakdowns with domain experts, requiring a shared Ubiquitous Language from Domain-Driven Design. - [07:22](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=442s) Grounding AI planning and code generation sessions with an explicit dictionary of codebase terms sharpens the model's internal reasoning traces and prevents verbose outputs. - [10:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=600s) AI models tend to 'outrun their headlights' by writing sprawling amounts of code without checking intermediate feedback loops like static types, browser rendering, or tests. - [10:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=600s) Enforcing Test-Driven Development (TDD) constrains LLMs into small, disciplined steps: writing failing tests, writing minimal passing code, and refactoring cleanly. - [10:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=600s) A well-architected codebase directly improves LLM output quality because modular, easily testable architectures yield cleaner automated feedback loops. - [12:30](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=750s) Shallow modules with sprawling interfaces confuse AI agents' context windows and obscure dependency chains across the codebase. - [12:30](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=750s) Deep modules encapsulate extensive internal complexity behind narrow, well-designed public interfaces, making boundaries clearer for both AI agents and automated tests. - [15:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=900s) Deep module boundaries alleviate developer cognitive exhaustion by enabling 'gray-box' delegation, where engineers review the external interface and tests without inspecting every internal line. - [15:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=900s) The recommended operational dynamic is 'design the interface, delegate the implementation,' positioning human engineers at the strategic level while the AI serves as a tactical on-the-ground sergeant.

## Detailed walkthrough ### [00:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=0s) The "Specs to Code" Trap and Why Software Fundamentals Matter More Than Ever

Matt Pocock opens with an encouraging message for developers who fear their hard-earned skill sets have been rendered obsolete in the era of artificial intelligence. Having recently designed and taught a course titled *Claude Code for Real Engineers*, he found constructing an AI-centric curriculum a daunting task because the paradigm shifts daily. The prevailing trend in the community is the "specs to code" movement: the premise that engineers only need to author an abstract specification detailing application behavior, delegate the implementation entirely to an AI compiler, and avoid inspecting the resulting code. Whenever a bug or architectural flaw surfaces, developers are told to modify the spec, rerun the generation pass, and let the model fix itself.

```mermaid flowchart TD accTitle: The Specs to Code Anti-Pattern Cycle accDescr: A vicious loop where treating code generation like a compiler worsens codebase entropy over time.

subgraph Cycle["The Compounding Entropy Loop"] A["Write/Update High-Level Spec"] --> B["Run AI Generation Pass"] B --> C["Generate Source Code"] C --> D["Observe Application Failure"] D -->|"Ignore the code & edit spec"| A end C -.->|"Accumulates hidden complexity"| E["Unmaintainable Spaghetti Code"] ```

Pocock recounts his own experimentation with this workflow and reveals the breakdown that occurs in practice. Each time he reran the compiler without inspecting the code, the structural integrity degraded, cascading from slightly flawed code to outright garbage. Rather than a revolutionary approach, Pocock argues that treating code generation like a black-box compiler is merely "vibe coding by another name." To diagnose why LLMs systematically degrade projects, he revisited classical software literature, starting with John Ousterhout’s *A Philosophy of Software Design*. Ousterhout defines complexity as anything about a system's structure that makes it difficult to understand and modify; a codebase is fundamentally bad if changes cannot be made safely and cleanly. This directly mirrors the chapter on "software entropy" in *The Pragmatic Programmer*, which outlines how systems naturally drift toward disorder when individual changes are introduced without evaluating global architecture. Pocock firmly rejects the common industry aphorism that "code is cheap," asserting instead that bad code is more expensive than it has ever been because an unmaintainable system prevents teams from harvesting the immense upside AI models can provide inside clean architectures.

- **Central Thesis:** “I believe, that software fundamentals matter now more than they actually ever have.” — Matt Pocock - **On System Degeneration:** “If you're only thinking about that change, not thinking about the design of the whole system, your code base is gonna get worse and worse and worse.” — Matt Pocock - **On Code Value:** “I think code is not cheap. In fact, bad code is the most expensive it's ever been.” — Matt Pocock - **Recommended Reading:** *A Philosophy of Software Design* by John Ousterhout, and *The Pragmatic Programmer*.

---

[05:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=300s) Failure Mode 1: Aligning on the "Design Concept" with the "Grill Me" Skill

The first common breakdown Pocock tackles is misalignment: when the developer believes they hold a crystal-clear objective, yet the AI implements an entirely different, unusable solution. Drawing on *The Pragmatic Programmer*, Pocock reminds the audience that humans rarely know precisely what they want at the outset. Prompting an AI is not just issuing orders; it is a collaborative requirements-gathering exercise. Pocock connects this challenge to Frederick P. Brooks' book *The Design of Design*, specifically the notion of the *design concept*—an invisible, ephemeral mental model of the system that exists between multiple collaborating designers, rather than an explicit artifact that can simply be pasted into a Markdown document.

```mermaid flowchart LR accTitle: The Grill Me Iterative Interview Flow accDescr: How the Grill Me skill resolves architectural dependencies before writing PRDs or code.

subgraph Alignment["Pre-Code Alignment Phase"] U["Developer Initial Plan"] --> G["Grill Me Prompt"] G --> Q["Adversarial AI Interrogation (40-100 Questions)"] Q -->|"Resolve Design Tree Branches"| S["Shared Design Concept"] end S --> P["Structured PRD or GitHub Issues"] P --> A["AFK Agent Implementation"] ```

To bridge this conceptual divide, Pocock created a prompt skill titled `Grill Me`. It instructs the LLM: *"Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one by one."* The prompt repositions the AI from an eager, compliant assistant into an adversarial inquisitor that routinely fires 40, 60, or up to 100 targeted questions at the developer. The resulting dialog can then be summarized cleanly into a Product Requirements Document (PRD) or discrete GitHub issues for asynchronous ("AFK") agents to execute. Pocock critiques the default "plan mode" in Anthropic's Claude Code, arguing that it is overeager to output static planning assets and start generating source code before true conceptual consensus is attained.

- **On Shared Understanding:** “Interview me relentlessly about every aspect of this plan until we reach a shared understanding.” — Matt Pocock - **Adoption:** The repository hosting the `Grill Me` skill went viral, accumulating approximately 13,000 GitHub stars. - **Architectural Reference:** Frederick P. Brooks’ concept of navigating branches of the "design tree" to resolve interdependent system trade-offs.

---

[07:22](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=442s) Failure Mode 2: Solving Verbosity and Miscommunication via Ubiquitous Language

The second failure mode occurs when communication breaks down through verbosity or semantic misalignment, with the AI and developer speaking at cross-purposes. Pocock compares this dynamic to a software engineer collaborating with a specialized domain expert (such as someone building tools for microchips): if both sides lack a shared vocabulary, domain terms get mangled in translation, resulting in incomprehensible code and faulty logic. To resolve this, Pocock applies principles from Eric Evans' *Domain-Driven Design* (DDD), specifically the foundational pattern of a **Ubiquitous Language**—a single, rigorous conceptual lexicon used identically across code identifiers, planning documents, and verbal conversations.

```mermaid flowchart TD accTitle: Ubiquitous Language Workflow with AI accDescr: Extraction of codebase terminology into a structured Markdown dictionary that guides planning and code generation.

C["Existing Codebase"] --> S["Ubiquitous Language Skill"] S --> M["Ubiquitous Language File (Markdown Tables)"] M -->|"Context Injection"| P["Planning / Grill Me Sessions"] M -->|"Constrains Thinking Trace"| A["AI Implementation & Reasoning"] A --> O["Concise, Domain-Aligned Code"] ```

Pocock packaged this concept into a dedicated tool that scans a codebase, extracts recurring business entities and technical jargon, and generates an organized Markdown document of terminology tables. Keeping this file open and injecting it into the context during both `Grill Me` interrogations and code-generation tasks creates immediate benefits. By reviewing the model's intermediate thinking traces, Pocock discovered that grounding the LLM in an explicit dictionary prevents excessive verbosity, sharpens its internal reasoning paths, and yields an implementation tightly mapped to the original architectural intent.

- **Definition of Ubiquitous Language:** “With the ubiquitous language, conversations among developers and expressions of the code, and conversations with domain experts are all derived from the same domain model.” — Matt Pocock - **Operational Payoff:** Grounding the LLM's context with a domain dictionary reduces verbosity in reasoning traces and keeps programmatic outputs strictly aligned with specs. - **Next Dilemma Preview:** Pocock transitions to the subsequent hurdle in the engineering lifecycle: even after reaching complete mutual alignment on what to build, the generated code simply fails to work at runtime.

[10:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=600s) Feedback Loops, Outrunning Your Headlights, and TDD

Feedback loops are the most obvious lever for improving an LLM's output. Developers building applications must lean on static types—Matt Pocock bluntly states that if you are not using TypeScript, "that's crazy." Similarly, frontend applications require giving the model access to a headless browser so it can inspect its work, coupled with robust automated test suites. Yet even when equipped with these tools, LLMs fail to exploit them the way a veteran engineer would. By default, an LLM attempts far too much at once, generating vast swaths of code before belatedly checking whether it type-checks or passes tests. Pocock references *The Pragmatic Programmer*, which terms this pitfall "outrunning your headlights": moving faster than your rate of feedback allows.

```mermaid flowchart TD accTitle: TDD Feedback Loop for AI Coding accDescr: An iterative cycle of test-driven development showing small steps from writing tests to refactoring. subgraph Cycle["TDD Cycle"] A["1. Write Test First"] --> B["2. Make Test Pass"] B --> C["3. Refactor & Refine Design"] C --> A end ```

To counter this tendency, developers must enforce Test-Driven Development (TDD) as an explicit skill for the AI. TDD constrains the model to small, disciplined steps: write a failing test first, write minimal code to make it pass, and only then refactor for design. However, testing is notoriously difficult because every testing choice is tightly coupled: determining unit size, deciding what dependencies to mock, and selecting specific behaviors to verify all affect one another. Testing a massive chunk of an application leads to flakiness, while testing small units demands extensive mocking. Pocock observes that throughout his career, the fundamental truth remains unchanged: good codebases are naturally easy to test, and because a well-architected codebase produces cleaner feedback loops, the LLM in turn generates significantly higher quality code.

- “The rate of feedback is your speed limit, which means that you should be testing as you go, taking small deliberate steps.” — Matt Pocock - Core feedback mechanisms that must be supplied to the AI: static type-checking (TypeScript), browser access for frontend inspection, and automated test runners.

---

[12:30](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=750s) Deep vs. Shallow Modules and Codebase Architecture

To make a codebase testable and navigable for AI agents, Pocock turns to John Ousterhout’s philosophy of software design, specifically the concept of "deep modules" versus "shallow modules." A shallow module provides little functionality behind an unnecessarily complex, sprawling interface. Codebases dominated by shallow modules resemble a scattered field of tiny blobs; AI agents struggle to explore these topologies, frequently losing context, missing critical files, and failing to comprehend dependency chains. In contrast, deep modules hide extensive internal complexity behind a clean, minimal interface, allowing callers to use the interface without needing to understand the inner workings.

```mermaid flowchart LR accTitle: Shallow versus Deep Modules accDescr: Structural contrast between shallow modules with sprawling interfaces and deep modules with simple boundaries. subgraph Shallow["Shallow Modules (Sprawling Complexity)"] direction TB S1["Tiny Blob A"] <--> S2["Tiny Blob B"] S2 <--> S3["Tiny Blob C"] S1 <--> S3 end

subgraph Deep["Deep Module (Clean Boundary)"] direction TB I["Simple, Well-Designed Interface"] subgraph Impl["Implementation (Internal Complexity)"] D1["Functionality"] --- D2["Logic"] --- D3["State"] end I --> Impl end ```

Pocock outlines a reusable architectural refactoring pattern to transition from fragile, shallow code to deep modules. Developers systematically explore the codebase, identify clusters of related logic, and encase them inside well-defined module boundaries topped with strict interfaces. Human engineers should retain tight control over interface design, as models easily misjudge system design, while delegating the internal implementation details to the AI. Because deep modules establish clear perimeter boundaries, testing shifts to the interface level, creating an architecture that directly rewards TDD and clarifies the system for LLM exploration.

- Shallow modules: low functionality, high interface complexity, difficult for AI context windows to traverse accurately. - Deep modules: high internal functionality, narrow and simple interfaces, ideal for automated test assertions. - Architectural workflow: inspect sprawling related code, encapsulate it inside a deep module, expose a simple interface, and verify solely through that boundary.

---

[15:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=900s) Cognitive Burnout, Gray-Box Delegation, and Strategic Engineering

Pocock addresses failure mode number six: shipping code faster than ever before, only for the developer's brain to collapse under the cognitive load. Asking the audience to raise their hands if they feel more exhausted than ever in their careers, Pocock commiserates, noting that navigating messy, shallow architectures forces human engineers to maintain the entire tangled system in their heads alongside the AI. Deep modules resolve this cognitive strain by enabling developers to treat large parts of the application as "gray boxes." For non-critical domains outside of high-stakes areas like finance, developers can design the interface, verify behavior from the outside with tests, and entirely skip reviewing every line of internal implementation.

```mermaid flowchart TD accTitle: Strategic Developer vs Tactical AI accDescr: Hierarchy of strategic human system design versus tactical AI implementation. subgraph Strategy["Human: Strategic Level"] M["System Map & Ubiquitous Language"] --> P["PRD (Module Changes & Interfaces)"] P --> I["Design Public Interfaces"] end subgraph Tactical["AI: Tactical Level (On-the-Ground Sergeant)"] I --> G["Implement Gray-Box Internals"] G --> T["Pass Automated Boundary Tests"] end ```

This dynamic leads to Pocock's fifth tip: "Design the interface, delegate the implementation." Achieving this requires software engineers to keep a rigorous mental map of system boundaries, incorporating these interfaces into their project's ubiquitous language and planning artifacts. In his own PRDs (Product Requirement Documents), Pocock explicitly specifies intended module boundaries and interface modifications before code generation begins. Echoing Kent Beck’s maxim to invest in system design every day, he warns that treating code as disposable "spec-to-code" divests from architecture. Software fundamentals honed over decades remain essential because while the AI operates as an exceptional tactical sergeant writing changes on the ground, the human engineer must command the system strategically.

- “Raise your hand if you felt more tired than you have ever before in your development career. Yeah, me too. It's knackering.” — Matt Pocock - “Design the interface, delegate the implementation.” — Matt Pocock - “Invest in the design of the system every day.” — Kent Beck (cited by Matt Pocock) - “Code is not cheap. That's the message I want you to take away. Code is important.” — Matt Pocock - “If we think about AI as a really great on-the-ground programmer, a kind of tactical programmer, a sergeant on the ground making the code changes—you need someone above that. You need someone thinking on the strategic level, and that's you.” — Matt Pocock - Speaker resources mentioned: GitHub repository `mattpocock/skills`, educational materials at AIHero.dev, along with Matt Pocock's YouTube channel, Twitter/X account, and newsletter.

## Notable quotes > [00:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=0s) I think code is not cheap. In fact, bad code is the most expensive it's ever been. — Matt Pocock

> [15:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=900s) If we think about AI as a really great on-the-ground programmer, a kind of tactical programmer, a sergeant on the ground making the code changes—you need someone above that. You need someone thinking on the strategic level, and that's you. — Matt Pocock

> [10:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=600s) The rate of feedback is your speed limit, which means that you should be testing as you go, taking small deliberate steps. — Matt Pocock

> [00:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=0s) I believe, that software fundamentals matter now more than they actually ever have. — Matt Pocock

## Mentioned Matt Pocock, Claude Code, Anthropic, John Ousterhout, A Philosophy of Software Design, The Pragmatic Programmer, Frederick P. Brooks, The Design of Design, Eric Evans, Domain-Driven Design, Kent Beck, TypeScript, Grill Me, AIHero.dev

## Video description AI coding tools are overhyped and powerful at the same time. Used well, they're extraordinary. Used badly, they'll bury you in spaghetti code faster than any human team could. The difference isn't the tool. It's the process. After 18 months of teaching developers to build with AI agents, Matt Pocock has watched the same patterns emerge: the devs who succeed aren't the ones who delegate everything or nothing. They're the ones who fall back on engineering fundamentals. In this talk, he shares the iterative process his students use to ship high-quality applications with AI agent swarms, and why the principles that make it work (ubiquitous language, vertical slices, TDD, deep modules) are decades-old ideas that didn't break. They got more important.

Speaker info: - https://x.com/mattpocockuk - https://www.linkedin.com/in/mapocock/

---

Explore this talk's slides, transcript, key takeaways and resources on its official AI Engineer page: https://ai.engineer/talks/v4F1gFy-hqg-software-fundamentals-for-ai-coding

---

[Source](https://www.youtube.com/watch?v=v4F1gFy-hqg)

Reading summary

Matt Pocock argues that artificial intelligence makes classical software fundamentals more critical rather than obsolete, warning that treating LLMs as black-box spec compilers leads to compounding codebase entropy. In his view, developers must act as strategic system architects who tightly define interfaces and feedback loops while delegating tactical implementation to AI. The Spec-to-Code Trap and Compounding Entropy (0:00) Pocock critiques the "specs to code" trend, where developers supply abstract specifications to an AI compiler and avoid inspecting the underlying implementation. In his own experiments, treating code generation as an uninspected black box caused structural integrity to degrade into unmaintainable spaghetti code—a failure mode he characterizes as "vibe coding by another name." Drawing on John Ousterhout’s A Philosophy of Software Design and The Pragmatic Programmer, Pocock explains that introducing code changes without evaluating global system design accelerates software entropy, making subsequent changes difficult and hazardous. Rejecting the common industry claim that "code is cheap," Pocock contends that bad code is more expensive than ever. When structural complexity spirals out of control, an unmaintainable codebase prevents engineering teams from capturing the substantial speed and productivity advantages that AI models offer inside well-architected systems. Pre-Code Alignment and Ubiquitous Language (5:00) A primary breakdown in AI-assisted development occurs when humans and models fail to align on project requirements. Referencing Frederick P. Brooks’ concept of an implicit "design concept," Pocock points out that developers rarely know precisely what they want at the outset. To resolve interdependent system trade-offs before writing code, Pocock designed the "Grill Me" prompt skill, which instructs the model to act as an adversarial inquisitor by asking 40 to 100 targeted questions. Pocock notes that the repository containing the skill accumulated roughly 13,000 GitHub stars, and he cautions that default tools like Claude Code's "plan mode" tend to generate code prematurely before reaching true conceptual consensus. To address verbosity and cross-purpose communication, Pocock implements the "Ubiquitous Language" pattern from Eric Evans’ Domain-Driven Design. By scanning a repository to generate a structured Markdown dictionary of technical and business terms, developers can inject a consistent vocabulary into planning sessions and prompts. Pocock observed that grounding the LLM in an explicit dictionary constrains its internal reasoning traces, curbs conversational verbosity, and aligns programmatic outputs directly with architectural intent. Constraining Generation with TDD and Fast Feedback (10:00) Without disciplined boundaries, LLMs frequently fall into the trap of "outrunning your headlights"—a phrase from The Pragmatic Programmer describing systems that move faster than their rate of feedback allows. Pocock observes that models by default attempt vast changes before checking whether the code compiles or passes tests. To counteract this, Pocock insists that developers equip agents with tight feedback mechanisms, including static type-checking via TypeScript, automated test suites, and headless browser access for frontend inspection. Because testing large units risks flakiness while testing microscopic units requires heavy mocking, Pocock advocates enforcing Test-Driven Development (TDD) as a mandatory operational constraint for AI agents. Under TDD, the LLM is restricted to writing a failing test first, writing minimal code to make it pass, and then refactoring for design. Pocock asserts that a codebase's inherent testability dictates the clarity of the AI's feedback loop, which in turn determines the quality of the generated code. Deep Modules and Strategic Gray-Box Delegation (12:30) Addressing the widespread cognitive exhaustion among engineers trying to track dense AI output, Pocock leverages Ousterhout's distinction between deep and shallow modules. Codebases dominated by shallow modules feature sprawling, complicated interfaces with little internal substance, creating fragmented topologies that confuse LLM context windows. In contrast, deep modules hide extensive internal complexity behind narrow, clean interfaces, making systems far easier to test and navigate. Establishing deep module boundaries enables what Pocock describes as "gray-box delegation." For non-critical product domains outside high-stakes sectors like finance, developers can design the public interface, verify external behavior through automated tests, and skip reviewing every line of internal implementation. Citing Kent Beck’s maxim to invest in system design daily, Pocock frames the human engineer as a strategic commander directing high-level architecture and PRD boundaries, while the AI functions as a tactical sergeant executing implementation details on the ground. Pocock's framework demonstrates that established software design patterns enable safe gray-box delegation in low-risk software domains, though he notes high-stakes domains like finance still require full code scrutiny. His thesis relies on human engineers possessing the architectural maturity to set strategic module boundaries, leaving unresolved how junior developers will acquire those critical software fundamentals if entry-level tactical programming is increasingly delegated to AI.

Source quotes

[0:00] Matt Pocock: I think code is not cheap. In fact, bad code is the most expensive it's ever been. [15:00] Matt Pocock: If we think about AI as a really great on-the-ground programmer, a kind of tactical programmer, a sergeant on the ground making the code changes—you need someone above that. You need someone thinking on the strategic level, and that's you. [10:00] Matt Pocock: The rate of feedback is your speed limit, which means that you should be testing as you go, taking small deliberate steps. [0:00] Matt Pocock: I believe, that software fundamentals matter now more than they actually ever have.

Original transcript

[0:00] Thank you. Hello everyone, having a good conference so far? Are you having a good conference so far? Good, wonderful. I have a message for you that I hope will be a comforting message. For folks who believe that... Their skill set is no longer worth anything in this new age. which is, I believe, that software fundamentals matter now more than they actually ever have. And I'm a teacher, and I've been recently teaching a course called Claude Code for Real Engineers. Nice and provocative. In the process of kind of working on this course, I had to come up with a curriculum about AI coding. which is a bit of a nightmare because things are changing all the time, right? AI is a whole new paradigm. We need to chuck out all of the old rules, surely, so that we can bring in the new stuff. And there's-- a kind of movement that has come up around this, which is the specs to code movement. And the specs to code movement says that, okay, you can write a specification about how an application is supposed to work. then you can use AI to turn it into code. If there's a problem with the application, you then go back to the spec. You don't really look at the code. You just change the spec, you run the compiler again, and you end up with more code. Raise your hand if you've heard of that. Keep your hand raised if you've tried it. Okay, I've tried it too. You can put your hands down. What I noticed was I would run it, And I would try not to look at the code. but I would look at the code and I realised I would get code out first of all and then I would run it, I would get worse code and I did it again and I got even worse code. I got it again, I kept running the compiler, kept running the compiler and I would just end up with garbage. Raise your hand if that's happened to you. Yes. I don't think this works. The idea that we can just ignore the code and just have the code, let it manage itself, is just sort of Vibe coding by another name. And I didn't believe that back then. I thought, okay, how do I fix the compiler? How do I make it so that it doesn't produce bad code each time, or worse code? And so I thought, okay, I need to explain to the LLM, in English, what a good code base looks like. Let me dig out one of my old favourite books, which is a philosophy of software design by John Ousterhout. Go on Amazon, get it. And he has a definition for what bad code looks like. He calls it complex code. Complexity is anything related to the structure of a software system that makes it hard to understand and modify the system, right? So a bad code base is a code base that's hard to change. If you can't change a code base without causing bugs, then it's a bad code base. Good code bases are easy to change. So I thought, ooh, that was good. Let's try another book. Let's try the pragmatic programmer. Go on Amazon, get it. they have a whole chapter on something called software entropy and this is exactly what i was seeing entropy is the idea that things tend towards disaster and floating away from each other and collapse and this is exactly how most software systems behave too is that every time you make a change to a code base If you're only thinking about that change, not thinking about the design of the whole system, "Your code base is gonna get worse and worse and worse." And that's what I was seeing. Everything inside the specs to code idea that you just run the compiler again and again was making worse code. Now, there's an idea that sort of drives the spectra code movement, which is that code is cheap. Raise your hand if you've heard that phrase before, that code is cheap. Yeah. Well, I don't think this is right. I think code is not cheap. In fact, bad code is the most expensive it's ever been. Because if you have a code base that's hard to change, you're not able to take all of the bounty that AI can offer, 'cause AI in a good code base actually does really, really well. And this means good code bases matter more than ever, which means software fundamentals matter more than ever. That's the thesis of this talk. So let's actually get into practical stuff. I'm going to talk about different failure modes that you may have experienced or you may not have experienced yet with AI and how you can avoid them by just going back to old books and looking at good software practices. Sound good? So the first one is that the AI didn't do what I wanted. I thought I had a good idea in my head and the AI just did something totally different or it did some like specs that I, you know, it just made something I didn't want. Raise your hand if you've hit this mode. Cool. Okay. Well, This is what they say in the pragmatic programmer, is that no one knows exactly what they want. [5:00] And the AI, there is a communication barrier there, right? And so when you're talking to the AI, that's kind of like the AI doing its requirements gathering. It's basically working out from you what it is that you need. And I realised that there was another book, Frederick P. Brooks, The Design of Design, And it talks about this idea called the design concept. It's that when you have more than one person designing something together, you have this idea sort of floating between you, this ephemeral idea of the thing that you're building. And that thing that you're building, or the idea of it, is called the design concept. It's not an asset. It's not something you can put in a markdown file. It is the invisible theory of what you're building. And so I thought, okay, that's what's going on. Me and the AI don't share a design concept. So I came up with a skill. This skill is very, very simple. It's called Grill Me, and it looks like this. Interview me relentlessly about every aspect of this plan until we reach a shared understanding. "Walk down each branch of the design tree," which is another thing from Frederick P. Brooks, resolving dependencies between decisions one by one. This skill is like, the repo containing this skill has like 13,000 stars or something. It just went nuts. went viral, people love this thing. These couple of lines means the AI asks you like 40 questions, 60 questions, I've had it ask people 100 questions before it's satisfied they've reached a shared understanding. And it means it turns the AI into a kind of adversary. where it's just continually pinging you ideas and trying to reach a shared understanding. And that means that the conversation that you then generate, you can take that and turn it into a product requirements document or something. Or if it's a small change, you can just... to turn it directly into issues. And then your AFK agent will then pick it up. And... Don't at me on this, but I personally believe this is better than the default plan mode in the... the tool that I use, which is claw code. Plan mode is extremely eager to create an asset. It really wants to just create a plan and start working. Whereas I think it's a lot nicer to reach a shared design concept first. So that's tip number one. Now, failure mode number two is that the AI is just way too verbose. It's like you're almost talking across purposes with the AI. Raise your hand if you feel this, if you ever experienced that failure mode, yeah. It's kind of like the AI is like talking, just using too many words to try to communicate what it's doing. It's not like you're talking using the same language. And this to me felt very, very familiar, right? If you've ever been a developer for a long time, and you've worked with, let's say, domain experts, someone building an application, Let's say the domain expert wants you to build something on microchips, you have no idea what microchips are. you need to establish some kind of shared language, right? Because otherwise, they're going to be using terms you don't understand, you're going to be translating that into code that maybe you don't even understand, And certainly the domain expert won't. And so there's this kind of language gap between you and the domain expert. And so... I went back to domain-driven design. DDD. This is something I'm still kind of on the edge of exploring, but everything I'm reading about DDD is just music to my ears. I freaking love it. And DDD has a concept of a ubiquitous language. With the ubiquitous language, conversations among developers and expressions of the code, and conversations with domain experts are all derived from the same domain model. It's essentially a markdown file full of a list of terms that you and the AI have in common. And you really focus on those terms and you really make sure that they're aligned with what it actually means and you use them all the time. In the code, when you're talking about the code, when you're talking to domain experts, or in our case, when you're talking with AI. So I made a skill. This skill is the ubiquitous language skill. Basically just scans your code base, looks for terminology, and then... creates a mocktab file. creates the ubiquitous language markdown file, a bunch of markdown tables with all of the terminology. And this, then I pass it to the AI, And I'm able to read it too. And I actually have it open all the time when I'm grilling with the AI and planning and that. What I noticed by reading the thinking traces of the AI, it not only improves the planning, but it allows the AI to think in a less verbose way, and actually means that the implementation is more aligned with what you actually planned. So this has absolutely been a powerhouse. It's been unbelievably good. So that's tip number two, create a shared language with the AI. Thank you. So, okay, let's imagine that you've aligned with the AI. You know what it is you're supposed to be building. The AI has built the right thing. But it doesn't work. Raise your hands if that's happened to you. Yeah, just doesn't work. [10:00] There's an obvious thing that we can do to make that. better, which is we can use feedback loops. We can use static types, if you're not using TypeScript, that's crazy. If you're building a front-end app and you're not giving it... the LLM access to the browser so it can look around, absolutely needs that. And you obviously also need automated tests. And one sort of The thing I notice here is that even with these feedback loops, the LLM doesn't use them very well. It doesn't kind of like get the most out of its feedback loops in the way that a veteran developer would. And so it does, what it tends to do is just, does way too much at once, it will produce huge amounts of code and then think, oh, I should probably type check that actually. Or I should, yeah, maybe check a test on that. Or maybe do something like that. And this in the pragmatic programmer they describe as outrunning your headlights, as essentially driving too fast because the rate of feedback is your speed limit. The rate of feedback is your speed limit, which means that you should be testing as you go, taking small deliberate steps. And the AI, by default, is really not very good at that. So, skill number three is TDD. You should be using test-driven developments. Because TDD forces the LLM to... really take small steps. You create a test first. You make that test pass and then you refactor the code to make it nicer and consider the design. The issue here is that testing is really hard. Testing has always been hard. Thank you. And the reason for that Thank you. Is there a ton of different decisions you need to make when you write a test? You need to figure out how big a unit do you want to test? You need to figure out what to mock. You need to figure out what behaviors do you even want to test in the first place. And all of these decisions are dependent. So if you are testing a really big unit, like an entire massive application, then it might be quite flaky. You might not want to test that many behaviors. If you only test this unit, you need to mock this unit. It's all interlinked. And I've been thinking about this for years, for my entire development career. And what we notice is that good code bases are easy code bases to test. Right? So here we're starting to get back to the idea of code being important. It's that the better your code base is, the better your feedback loops are. because you're able to give better feedback to the LLM, it produces better code. And so I thought, what does a good code base, what does a testable code base look like? Again, we go to John Osterhout. He talks about having deep modules in your code base. not shallow modules, not lots of modules that expose lots of functions, There should be relatively few large, deep modules with simple interfaces. Let's compare them quickly. Deep modules, lots of functionality hidden behind a simple interface, hiding the complexity. You can look inside the deep module if you want to, but you don't need to. You can just use the interface. Shallow modules, not much functionality, complex interface. And I just wait for you to take the photos. Shallow modules in a code base kind of look like this. We have a ton of different tiny little blobs that the AI has to walk through and navigate. And this is really hard for the AI to explore actually. And so often what you'll see is if you have a code base like this, which AI is really good at creating code bases like this, is that you'll have a situation where AI doesn't understand what your code is doing. It will attempt to explore the code, but because it's poorly laid out, filled with shallow modules, it doesn't maybe get to the right module in time or doesn't understand all the dependencies, all that stuff. It doesn't understand your code. And so what does a codebase full of deep modules look like? Well, it looks like this... where it's the same code, but it's just structured inside boundaries, where you have these interfaces on the top. And these interfaces, you should probably have a lot of control over them and design them really well. Otherwise, you know, AI might mess up the design. But the implementation, you can kind of leave that to the AI a bit. So how do you turn a codebase that looks like this into a codebase that looks like that? Well, I've got a skill for that. Improve code-based architecture. Turns out this is not... It's quite complicated to do this, but it's like a set of steps that you can reusably do again and again. You just sort of explore the code base... look for opportunities where there's code that's kind of related, and wrap all of that in a deep module. And this is a testable code base because the boundaries around this code are so, so simple. You test at the interface, you verify using that interface, And you're good to go. [15:00] So this is a code base that rewards TDD. But how about failure mode number six? which is your, okay, let's say your feedback loops are working. Let's say that things are kicking into gear. You're able to ship more code than you ever have before. but your brain can't keep up. Raise your hand if you felt more tired than you have ever before in your development career. Yeah, meet soon. It's knackering. And I think that this is a code base that actually makes it harder for your brain because you as well as the AI need to keep all of that information in your head. Whereas this, not only is it simpler, for you to read and understand, it also means you can kind of treat these modules or these deep modules as gray boxes. You can kind of say, Okay. I'm going to just design the interface, but I'm not going to worry too much or not review the implementation too much. You can do this obviously with things that are less critical in your application. Can't do this with various things like finance or whatever, but in many, many modules in your app, you don't need to think about the implementation too much, as long as you have a testable boundary outside the module, and as long as you understand its purpose and can design it from the outside. I have found this has really saved my brain because I can just go, okay, the AI, I'll let you handle what's inside the big blob. I'm just going to test from the outside and verify it. So that's tip number five. Design the interface, delegate the implementation. But this means that whenever we're touching the code, whenever we're planning stuff, We need to think about and be aware of the modules in our application. We need to know that map really well. It needs to be part of our ubiquitous language. We need to build it into our planning skills as well. So my writer PRD, inside the PRD, I'm specific about the module changes and the interfaces inside those modules, how they're being modified. I'm thinking about them all the time. And this comes from Kent Beck. Invest in the design of the system every day. And this is the core of it, right? Because specs the code, we are not investing in the design of the system. We are divesting from it. We're getting rid of that. Whereas this, I think, is absolutely key. And so-- Code is not cheap. That's the message I want you to take away. Code is important. And if we think about AI as a really great on the ground programmer, a kind of tactical programmer, a sergeant on the ground making the code changes. You need someone above that. You need someone thinking on the strategic level. and that's you. And that requires software fundamental skills that we've been using for 20 years, for longer. Now, if you were interested in any of the skills I put up here, it's in the GitHub repo, Matt Pokok skills. And if you're interested in the training that I do or any free stuff, I'm on YouTube, I'm on Twitter, but I'm also at AIHero.dev. or I have a newsletter that you can check out. Thank you so much. I hope that this gives you confidence in this new AI age, that you can actually make a good impact. Thank you. Music