Module depth is reframed as an agent-comprehension property, not just a human-maintainability property: shallow modules decompose into 'tiny blobs' that both humans and the AI struggle to navigate and explore, while deep modules with simple interfaces act as grey boxes where the human designs the boundary and delegates the interior. This makes codebase shape a direct input to agent performance.
If agent success depends on the navigability of the module graph, then architectural refactoring becomes an investment in agent throughput rather than a purely hygiene activity, and interface design becomes the human's primary artifact.
For any agent operating over a large artifact graph (code, schemas, service catalogs, docs), abstraction granularity and interface narrowness govern how much of the system the agent must load and reason about per task.
Shallow modules create tiny blobs that are hard for both humans and AI to understand and explore
Deep modules act as grey boxes where you design the interface and delegate implementation
Structuring code into deep modules saves mental energy and allows both developer and AI to interact via clean, testable boundaries.