2026-11-12 · Robert Stark, CTO How I write software has changed dramatically over the last twelve months. It will probably change again in the next twelve, but I thought it might be helpful (to myself and others) if I wrote down some observations about how things have seemed to shake out in my day to day, and how I work now as a result.
Code is now grown, not created. #
This is probably the largest and most abstract observation, and despite sounding metaphorical, it isn’t. You set down basic rules and goals as a seed, see what sprouts out of them, and steer elements of the resulting code as it grows so that it does the things you want the way you want, without really worrying about the finer details.
What I do
I start every project with a constitution type document. It details why the codebase is being created, specific design principles and preferences it is to adhere to, specific technologies to use, and standing rules for what the development loop should look like.
When I first started using AI I had a natural inclination to frontload only concrete directives, but over time, as models have gotten better, I've noticed that having the "why" in the document really helps with aligning AI to my actual goals.
This is ultimately a living document that often becomes the README for the whole repo, but you need some solid content before you let an AI rip.
Code bases don’t get read directly anymore. #
Even if the code generated is beautiful, well organized, well abstracted, and architected around the best possible principles, no one is going to read it directly. All codebases, big and small, beautiful and ugly, are inspected by proxy using AI to search and distill the contents as needed.
What I do
My top level README files lay out three things: purpose, structure, and use. These draw from the constitution document I mentioned before, and become more important over time, because AI will need to see this information at the start of each fresh session. Third party agents will want it as well.
Iterative refinement of a system now takes place via re-writes, and that is better. #
Before AI, starting a new project meant having a very specific vision that you work toward for weeks or months, refining it as you go. You would typically have several weeks, or even months, of consistent effort, building context and a mental model around how things currently work and how the system should be expanded or changed over time.
This journey no longer exists. The system outgrows your ability to understand it completely in a matter of weeks, or even days. Collaborators are there the moment you create the git repo, in the form of AI agents. You no longer get the luxury of refining a vision for the system over time the same way.
However, you now get to try many different visions and throw them away very rapidly. Honestly, it's a lot better, and less prone to getting stuck in the horrible local minima most legacy systems wind up in.
What I do
I frequently task AI with exploring alternative designs or technologies applied existing systems.
"What if we used bazel?"
"What if I wanted to separate search and discovery columns into a separate database?"
I will ask AI to plan a migration to a different architecture, different design patterns, different build systems, different CI providers, and so on, and see what comes out. I probably do this once every two weeks even though I almost never follow through (three times in nine months I have), because I almost always learn something from the plans themselves. Sometimes I discover something has been tightly coupled that shouldn't be, sometimes I find out a feature works differently than I expected, and sometimes I find a pretty big simplicity or performance win.
I’m in the camp that design matters more rather than less now. #
I’m not saying read every line of code and latch on to the fine details. I’m saying rules and conventions can make AI more or less efficient, and efficiency still matters. Getting the same result in less time with less headaches is better, full stop, and caring about design, conventions, and the order in which you attack functionality has a huge effect.
What I do
Learn design patterns. Learn what they are useful for and why they were invented. These things communicate principles in a compact and concise way and have very clear costs and benefits. The reasons they exist have not disappeared from the code, only from our view of it.
The kinds of design principles that matter, and when they matter, have changed. #
YAGNI as a concept has shifted from being something you apply to code to something you apply to your prompts. Ask an AI for one thing at a time, and be specific about what you want. DRY is more about structure than anything else. You need a codebase the AI can navigate and search coherently or it will rewrite the same functions over and over again in different places.
What I do
I work on a single unit of functionality at a time, and separate refactoring from functional changes, at least along commit boundaries.
I also adhere to strict structural rules in where code goes based on what it does, with both breadth and depth structures. “Domains” are the breadth structure and represent the kinds of “things” or “categories” a service or system handles or works on, like “users”, “trust providers”, or “tokens”. “Layers” are the depth structure, and break domains up into different responsibilities like persistence, telemetry, service handlers, or daemons. This allows me to give AI commands with semantic specificity that can translate directly into the directories and files affected without me naming specific paths, and keeps the AI from searching my entire codebase every time I ask it to complete a task.
Slop compounds. #
History builds up in comments, files are copied instead of imported, and package dependencies becoming a directionless web. Code that is hard to navigate cause AI to write code that is hard to navigate. AI goes in without enough context, no way to gather relevant context, and as a result gives you less and less of what you want over time.
What I do
I add cleanup steps to all of my feature development loops. On some cadence, not necessarily every task, I task the AI with specific goals for code reduction, comment reduction, or decoupling, on the basis of simplification and single responsibility.
Specific slop I look for:
- Code that guards against invalid inputs or outputs. This is often unnecessary bloat.
- Database consistency guarantees. Asking Claude what row locks, or mutexes can be removed, or what the consequences would be of removing them, often leads to the discovery that many of them are unnecessary.
- In-package abstractions. Code that is not shared with other packages should almost always be concrete as opposed to using an interface or other such abstraction.
- Temporary tests. Some models are prone to writing lots of temporary tests as they do development, and need to be prompted to clean up after themselves. (Looking at you Astra).
Most of my problems come down to missing context. #
In my experience, most of what SOTA AI tends to “get wrong” stems from some missing piece of information. Either environment knowledge not in the codebase, preferences I didn’t write down, or a decision made in a previous session. Outside of the current context window, LLMs only know what they are trained on, and your codebase probably was not in that corpus. Certainly not prominently enough to meaningfully impact your experience.
What I do
I work in what I call “metaplans”. I start with some high level goals, and build out a file hierarchy of different pieces of the work needed to accomplish those goals in various levels of detail. Execution comes down to executing the “leaf” nodes, which are concrete code changes, of that file tree. The higher level goals, and all the intermediate decisions and discussions live on after those are complete. I keep the files around for a few weeks or more for future work to reference. This is especially helpful in other planning sessions, as prior decisions are often good context for AI to use when planning downstream features and functionality.
Too much context can be a problem too. #
Probably as a mitigation for their blind spots, LLMs will look around way more than necessary, at things that have nothing to do with what you want, and once they have looked somewhere, they can become convinced that it is relevant, whether or not it is. This can often cause off-target changes.
What I do
I keep strict rules around how code is shared across services, repositories, and even within packages. Code is shared at the lowest level it can be, in “pkg” directories. Code shared between domains must live in a shared “pkg” directory. Code in a “pkg” directory must be stateless. It can name or handle state via interfaces and the like, but cannot hold state itself, as state always belongs to a domain. I have linters that enforce many rules like this to promote an easily searchable codebase.
You can’t fight the weights #
LLMs are trained on A LOT of data. You can steer them well with their context window, but they are fundamentally limited to working with the patterns and concepts they are trained on.
No matter how many times you repeat “Do not leave code comments detailing code history” in your prompt, if the model was trained on a billion examples of historical comments, you are going to get them. The weights will always win.
What I do
Give up. Keep the rules you want there, maybe even add a cleanup loop to reinforce the behavior, but if the model ignores them, you just have to let it go. Pick your battles.