Workflows and the Theory of Execution
In the last few months, I've been talking and thinking a lot about how to use agentic tools and agentic coding effectively, what they are doing to the software industry, and what they are doing to the workflows that me and my team are used to.
In order to learn what other people are doing, I've done many coffee chats, and I've been invited to a couple of podcast appearances and interviews.
Last week, I had a long conversation with Warren Parad, who is the co-host of Adventures in DevOps, where we talked about agentic coding, what it is doing to the software development lifecycle, and more importantly, what it is doing to developers.
And in that conversation, Warren introduced a concept that he calls the "theory of execution", which is a fancier way to say, the mental model that a team keeps about how a system behaves in production. And typically, it takes shape in tests, in specs, or in code.
We talk at length about how mental models are built, and specifically about how much writing code, specs and tests contributes to creating that mental model. One of the interesting points in the conversation is when I asked him if writing a spec was enough of an exercise for developers to have a complete mental model of the solution that they are creating.
In other words, if developers are only responsible for writing the spec and reviewing the output, not writing the code, is that enough for them to have a mental model? Or to satisfy Warren's definition of the theory of execution?
Warren's perspective is that the spec might be good enough to build this mental model. Personally, I'm more doubtful, and I want to talk in detail about that.
Mental Models and Developer Loops
Most software developers work in a kind of mental loop, regardless of if we are starting with a bug or with a new feature, the developer starts with a hypothesis. This can be either what the bug fix needs to be, or it can be a rough idea of how to implement the feature.
From there, depending on the type of coding style or the philosophy of coding style that the developer has, the developer will write a small piece of code and try to get it to run.
And by running it, the developer gets feedback. This can be that the code executed, it can be that there were warnings, or it can be that the code failed completely.
And that feedback will drive the developer to continue developing — either refactoring, adding more functionality, or fixing the failure — until they reach whatever definition of done they started with.
This loop, this process of reasoning, writing, and testing, is what most developers are used to as their regular cadence, and it's how they learn, and it's how they build a mental model of what the application is doing and what the application needs to do.
Now, this is not the first time that the software development loop has been changed. For example, TDD, or test-driven development, was very popular, where developers started with a failing test, and then they wrote code to make the test pass, and then they iterated.
But the commonality between TDD and the way that we were working was that the developer was still front and center in the creation and the iteration process.
Generative AI and eroding mental models
Today, with generative AI the development loop is changing. As we delegate more and more of the active writing of code to LLMs, we are starting to distance ourselves from the creation and iteration process.
We no longer see the failures. We no longer reason about how to correct them, at least in great part. Today, developers that are working with agentic coders have been relegated to architecture and verification of the output.
So rather than writing code the developer now focuses on defining the tasks for the LLM. This can be specs, it can be very long prompts, or it can be tests that are written ahead of time. And then they task the LLM to write the code, to write the implementation based on those specs.
Then the LLM does the job and returns corrections, or the output, or a notice that it is done.
The developer only comes back to validate the output of the LLM, but it was deprived of the struggle, the mistakes, and the corrections that would have shaped their mental model more deeply.
And my opinion is that struggle is what really shapes and creates a complete mental model, writing code is just part of the process. Without it our existing mental models will dull and weaken over time. Newer mental models will not be formed as deeply, and our understanding of the system will become more superficial.
A case of mental model drift
Think about the following scenario, a developer has decided to fully offload the writing and implementation of code to an LLM, relying on it to handle the details of the system; while they take the role to architect, review and plan the overall structure and design.
You could roughly define the loop as:
The developer writes the specifications and tests for the desired functionality.
The LLM receives the specifications and generates an implementation.
The LLM runs the tests and validates the implementation.
The developer reviews the output and either accepts it or requests changes.
However there is a hidden danger: the implementation that the LLM produces might diverge from the mental model that the developer had in mind when writing the specifications and tests.
Yet the tests pass and the output is correct. Now, the mental model that the developer had when writing the specifications and the tests, differs from the actual implementation that was built.
You might think that spec might give you more control of the design and the architecture, but some LLMs and agentic coders, or harnesses, now have an internal feedback loop. They test their own code, they validate the implementation that they are doing, and they might correct problems with the original spec or the original architecture that the developer gave them.
And that knowledge might not necessarily reach the developer, so the developer ends up operating with a mental model that is fake and incomplete, because the implementation that the LLM created no longer matches the spec that was given.
Drift compounds
If you repeat that cycle a couple of times, assuming that the developer never reads the code and corrects their own mental model, the drift continues until it hits a breaking point where there is no longer enough context and understanding of the underlying system to write good tests, to write things that make sense, or to give the LLM enough guidance to make good decisions.
We greatly underestimate how important the role of the human operator is in guiding and controlling the LLM's output, and how dangerous it can be to assume that the LLM can make correct decisions on its own.
In one of the studies, people that had a computer science background got better results in the quality of an LLM than people that didn't have a computer science background, when they were tasked with the same objective.
LLMs don't have judgment and, in some cases, don't have the proper ability to architect code. Depending on the model, the LLM may make architecture mistakes or create an abstraction that is poor or incorrect for the problem statement.
A developer that realizes that an abstraction is wrong would typically go back and refactor. LLMs will typically not do that. They will continue building on top of that abstraction and build an incorrect implementation that patches the abstraction deficiencies in order to get the tests passing.
The result can be a bunch of spaghetti, or it can be building on a foundation of sand.
And the tests are not good enough to give you certainty that the LLM is making correct decisions. There are tons of things that could be happening behind the scenes — duplicate requests, duplicate code or logic — and you will not know, because some people are pushing towards moving away from being involved in reading code.
Traditionally, as an engineer or as a developer that is working on a project, you have a pretty good idea of the overall picture of the system — where the rough patches are, where the technical debt is, where things might be duplicated, what could be improved.
What we might see in the future is that even experienced developers that have been working with agentic coding on the same application for years might lack the right level of understanding and enough of a mental picture of the application to continue making decisions.
And unless the LLMs get significantly better, smarter, and more autonomous at making those decisions, the quality of the output — the quality of those applications — will start to take a nosedive, because there is no longer an experienced operator in control of the creation process and the architectural process.
What to do
Now, it's not all doom and gloom and we are not completely screwed and we are not going to lose the ability to develop software in the future.
There are ways to leverage the power and the time that agentic coding tools, LLMs, and AI are giving back without fully losing our skill sets:
Be an active participant: Review the LLM's output and don't defer architectural decisions.
Read the code and the output to keep your mental model up to date, try to follow along on what is happening.
Write code every now and then, don't let the LLM have all the fun. Pick up some tickets every once in a while.
Play with things and experiment, new models, new harnesses and completely different workflows. Find what works best for you.
This technology is still pretty new and evolving, so it is up to each one of us to figure the best way to engage with it and build our workflows around it.



