You’re holding it wrong!
I've noticed an influx of videos and blog posts about the "correct" way of working with AI agents.
A lot of the advice is different variations of the same thing. Give more context to the model. Make a PRD, divide into a million subtasks, give half a billion tokens worth of code and your first born to the AI gods while you're at it, and perhaps they might bless you with a todo list app in one prompt! A hole in one!
I think this is bad advice. Unnecessary at best.
If you code, you probably already know this instinctively. The mental models we have about our apps are imperfect. They are based on assumptions and abstractions. We all have stories of working on a ticket that made sense to the person who wrote it (possibly even ourselves), but it started to feel completely illogical when we started working on it.
The planning stage is when you know the least about what you're building. Software is an iterative process.
If I have to be super prescriptive with the AI agent, I might as well write the damn code. Front load as much work as you want, but you’re fooling yourself.
Sure, you need a target, but if you were to build a mountain, would you start from the top?
Check notes: “Hrmm Something something agile!”
Somehow when it comes to coding with LLM agents, we’re one step away from dusting the old waterfall charts off the shed.
The prescriptive prompt approach pigeonholes the agentic coding model into a path. You're missing out on AI agents' greatest strength—explorability! (I like to keep one em dash per post just to tickle AI Skeptics).
AI agents cut the cost of exploring tenfold! (you got me, ChatGPT just hallucinated that stat.) Doing a spike is now essentially free! Why would you want to pass on that?
This would be like building an entire SaaS without ever talking to any customer. (It’s fine, I know they really want the rewrite in rust.)
There is a better way.
The double loop model
Yes, I suck at naming things, but you already knew that.
The first loop: I am just vibing
If the vibe coding crowd discovered anything, it’s this: you get to explore, experiment, and chase multiple ideas. Virtually free! (Until the VCs decide they are tired of losing money, that is.) You can change your mind, go in a bunch of directions in parallel. You want to see how confetti explosions and screen shake would feel in your accounting app? You’re one prompt away! Go nuts!
At this point you are iterating on the feature. The look and the feel. You are in product mode.
I don’t always know precisely what I want before I start seeing it take shape. Having an AI agent (or multiple) on a solution lets me approach this in a way that isn’t too far from gradient descent.
In the first loop I iterate only on the product, how it feels, how it looks. I don’t care about the code. I don’t even look at it. Not yet. Looking at the code at this point would be like trying to pour the concrete for the foundation before you’re even done with the blueprint.
Really, think of this like you are on a spike. The code doesn’t matter.
Try to keep scope small, but also don’t limit yourself. You can always backtrack and divide into smaller steps, but you’ll want something small before moving to the next step.
The second loop: Painting the shed
“Vibe code is trash and your app will be full of bugs!”
Yes. But who said we have to stop here? Have you ever done a spike? Did you push your code straight to prod after? Why would you do it now?
Once you hit something that feels good, put on your engineering hat and ask the agent to open a draft PR.
When you open the PR the first time, the code will suck, but eh, you didn’t write a thing. Nothing but tokens was lost. In fact, something magical is about to happen that will help you polish this 💩 into a diamond.
Have you ever had an idea of what you wanted in your head, but could see five paths to get there and all of them had problems? It’s paralyzing.
The solution is the McDonald's method.
The same thing happens when you’re in a group and someone asks “where do we eat?”
Mind goes blank. Too many possibilities. None of them appealing.
Then someone says “McDonald’s” and immediately, you’ll think of something better.
McDonald’s is the baseline, the seed upon which the crystal can grow. The same thing happens with the garbage code you got from the LLM. This 💩 code is the seed upon which your brain will start the crystallization process.
When the surge of disgust hits you, you’ll know exactly what good code looks like and you can start iterating your way there.
Review the PR like you’d normally do. Close/collapse files that you think could be merged as is, leave the ones that you have a problem with open. Review per commit, and only the files that are left open. That way your loop will get smaller and smaller until you’re ready to merge.
Give your thoughts about the code to the model. Just like you would do in a PR review, but with more swearing (I am trying to get on the basilisk list).
You don’t have to be super precise. Code snippets and a vague idea of what you have in mind are generally enough.
Let the agent change the code. Iterate with it until the code looks just like you want! You get to vibe code AND paint the shed the exact shade of turquoise you had in your mind! Amazing!
That being said, I do recommend that you keep the scope narrow. By holding off on fixing every single issue you see, you’ll minimize diff size and you’ll be able to run more agents in parallel. (Plus it'll boost your GitHub metrics!) I am not suggesting that you accept bad code, I am saying that maybe, even though you really wanted the shed to be Aqua Chiffon, Teal Zeal will do just fine until tomo … oh nevermind, the second agent is done and the second PR is already open.
I know you’ve been conditioned to think that //TODO
in code will outlive you. The cost of fixing small irritants has dropped dramatically, so rejoice. You finally get to fix those damn salts you've been carrying forever. Instead of holding the PR, focus on getting things clean, not perfect. Keep the momentum going and just launch more agents.
Conclusion: Use agentic AI to iterate
If you think you can map out the perfect SaaS product in your mind, first try, fine. Ignore this.
If instead, like me, you suffer from having a human brain, iterating your way there is probably your best bet. I believe that the single most important thing in software is obsessing over loops. Closing feedback loops and obsessing over making them shorter.
Writing a giant prompt with everything laid out in advance is counter to that.
I’m sure it’ll feel slower than typing it yourself, especially when the agent takes a wrong turn and does something unfathomably moronic. But that’s fine. You’re not stuck waiting. Launch multiple agents asynchronously, each chasing different paths. The mental overhead of juggling multiple tasks has dropped dramatically, as agents make context shifting much easier.
Wanna see what this process looks like? Check out the screencast of me doing just that.
Resources
This flow will work regardless of tools, but if you watch the video and wonder what tools I am using:
- Claude code (Terminal AI agent)
- Superwhisper (allows me to prompt by voice)