The unexpected shift in codebase design
Stockholm, around 2006. A young student puts down his iPod Nano to inspect the book in front of him. With the upcoming computer science course approaching, his paperbound guide for the coming weeks now has his attention. "Design...?" he mumbles to himself as he reads the title. "Did I get the wrong one?"
It has been about 20 years since I first read The Design Of Everyday Things by Don Norman (1988; revised edition 2013) and it's a book that really made an impression on me. Two things have changed since then: my iPod has retired after a long and faithful service, and I have gotten the opportunity to work in the tech industry for many years. I recently decided to re-read the book to find out if these years have changed my perception of it. The re-read came with the unexpected realization that I have witnessed a design shift in my field.
The Design of Everyday Things is a guide to the design principles behind (you guessed it) everyday things like doors, scissors and cars. Although physical objects take center stage, the book highlights that design is a matter of human psychology and technology does not change that fact.
Codebase as a design artefact
At the time, a book about design made me think of web applications and UIs. When I re-read the book, however, I found that I associated a lot of examples with something else: the environment in which I work with code, the codebase. Documentation, directory structure, scripts and pipelines all work together to form an artefact that engineers interact with on a daily basis.
Whether we intend for it or not, the design of this artefact will either help or make it harder for us to achieve our goals. Good design is all about discoverability and understanding. A codebase can offer a number of actions like building, running and deploying the code. It can also support activities like migrations, backups and synchronizations. How do we make them discoverable? Discoverability is not just about making these actions accessible but about making it clear what they mean and how they fit into the rest of the codebase. How can we guide towards an understanding of the internal structure and how the different parts work together to form the final product? These are all design challenges.
The conceptual model
One way to approach this problem is to try to create a shared conceptual model. When you develop a codebase, or any artefact for that matter, you become an expert on that codebase. You, as a designer, have a good conceptual model in your mind. The question is how to transfer that model to others. If you're working on an open source project, you share the codebase with hundreds or thousands of users. If you're working on an internal project, you will eventually pass the torch to someone else. Bottom line, the users of your codebase can't rely on the good old "can you jump on a quick call?" routine to get answers. Instead, you need to leave clues in the codebase itself so your users can piece together a proper conceptual model. I was once offered a side gig to "quickly" investigate and debug a production system I had never seen before. A situation like that calls for pretty good clues.
How do we solve this challenge? So far, we have not found a good answer. Our best attempts often involve some sort of documentation along with adhering to naming conventions. But absorbing text and translating it to a conceptual model is a difficult task for a human, especially if the model is complex. Documentation is not bad, but using it as the primary medium here is often not enough. Furthermore, while proper naming is obviously good, the presence of a Dockerfile tells the user that the application can be run in a container but not much more than that. For whatever reason, we have not found a successful and widely adopted set of principles for codebase design. Strong conventions and standards are powerful tools in design and they are simply missing here. At least for humans...
The AI effect
Does this discussion remind you of something? The vocabulary might be different, but we face the same challenges with AI agents. Instead of using terms like "understanding" and "conceptual models" we talk about what context the agents need. Instead of "discoverability" we talk about how we can provide relevant capabilities, for example via skills or tool calling. And what did we do when we faced the challenges this time around? We gave the agents exactly what they needed.
AGENTS.md basically is a conceptual model in text form. Agents can use it to form an understanding of the structure, architectural patterns and conventions. The format also caters to the agents' strength: absorbing text is what LLMs do best.
Agent skills are perfect examples of what the book calls affordance and signifiers. They are easily discoverable capabilities. Agents know where to find them, when to use them and what they mean. After decades of missing conventions for humans, how long did it take for us to implement textbook examples of good design for agents? An afternoon?
Don't get me wrong, this is a great shift and hopefully the learnings we draw from agents will have a positive effect on how we design for humans. The original title of the book was actually The Psychology Of Everyday Things and the principles are very much based on human psychology. We needed AI to start using good design for humans.
References
- Norman, D. A. (2013). The Design of Everyday Things: Revised and Expanded Edition. Basic Books. (Original work published 1988)