Why Matt Pocock Is Right About Making Codebases AI Agents Love
05 Mar 2026Matt Pocock is once again on the money in his video “How To Make Codebases AI Agents Love”.
Here's why I agree with him.
The Memento analogy for how AI sees a codebase is spot on. And the idea of deep modules as progressive disclosure of complexity makes a lot of sense.
One thing that has worked well for me, especially when using AI coding agents on legacy codebases, is enforcing a simple code constraint.
fn(args, (deps = defaultDeps));
It is a non-breaking change, and it has proven very reliable.
I wrote about it here:
If You Only Enforce One Rule for AI Generated Code, Make It fn(args, deps).
When he said “the interface sits at the top and explains what the module does”, that idea translates nicely inside the module too.
The Deps type makes the dependency boundary explicit (the same “inside vs outside” idea as ports and adapters). It says exactly what the function needs from the outside world. The AI reads the contract first instead of guessing which collaborators exist or which ones matter.
It also makes testing simpler. Dependencies are visible. Interfaces stay small. You can hold a few of them in your head and let the AI handle the implementation within the module.
This aligns with his point that what works for humans also works for AI.
Making dependencies explicit is not clever. It is boring.
But boring constraints are what let both humans and agents reason about the code.