Most of us start our AI coding journey with autocomplete or vibe coding where we chat to an AI agent. Neither of these get you to a full blown software application very fast. AI coding should be a fast route to enterprise grade software but, like all tools, it needs to be used a certain way to get the most out of it.
Step 1. Vibe, baby Link to heading
Yes, vibe coding produces slop but it is also the fastest way from zero to something and it allows you to develop ideas quickly and really understand what it is you want to build. Tell the agent what you intend to build and it will make a half decent attempt at creating the application. It is unlikely that it is perfect or scalable or well architected or eye catching but it will be OK and border on good.
Step 2. Back to the drawing board Link to heading
AI agents respond well to very detailed specs just like humans do, particularly when outsourced. They are also good at writig the first draft of a spec. With your working prototype in Step 1 you now have the basis for the spec. Ask the agent to generate the spec but add in details like authentication, testability, features you didn’t implement, look and feel. This will produce a spec as a markdown file. Convention says it is called SPEC.md. I will then take the spec and copy it into a new repo before creating a branch for this change.
Step 3. Reading time Link to heading
Read the produced spec in great detail. This will form the basis for your future application. Do not assume anything at this stage, you are now BA and product owner and pedantry will be rewarded later on. Every feature, requirement and story must be described as well as any gaps will allow the AI agent to deviate from your intended outcome. Focus on what the application should be doing in this section.
Step 4. Principles Link to heading
AI agents can be guided by overarching principles. These can include coding guidelines, project structure, testing agressiveness, definition of done and other things you might document for your coding teams. These documents are created as markdown and should be loaded by the agent for every change they make. The file may be called CLAUDE.md or AGENT.md. Taking time to think about the principles you want your agents to adopt will give a much more consistent end result.
Step 5. Plan Link to heading
The plan is where the agent starts to think about how the application will be built. This is where you might tell it the languages or frameworks to use. WHen toy tell the AI agent o plan tt will use the SPEC.md and CLAUDE.md or AGENT.md to build a plan. Agains, saved as markdown.
Step 6. Reading time Link to heading
Review the plan and make sure it is going in the right direction. This is where you look for technical aspects of the design which have gone off into the undergrowth.
Step 7. Task list Link to heading
The final step before we build is to setup a task list. This helps the agent to iterate through what needs to be done with fresh context windows and with sub-agents. It also allows you to see how far things have gone. Ask the agent to build out a task list. I give it a quick read to check it it along the right lines but not the same level of scrutiny as the spec and the plan.
Step 8. Set it free Link to heading
Now tell the agent to build. Before doing that it is good to restart the session so that the context window is cleared. The previous steps have probably filled up the agents concious memory and it will have to start compacting things soon if we don’t help. With each iteration start a new session. Now tell the agent to build the first iteration.
Step 9. Iterate Link to heading
For now, I restart the AI agent session and then move to the next iteration. I could use a Ralph loop but like to conduct a brief code reciew of changes between iterations for now. This helps me spot little coding issues which I perhaps forgot to cover in AGENT.md or the spec.
Step 10. Test Link to heading
Yes, the agent will have built some lovely tests but there is no substitite for manually reviewing what has been built. That will be code reoiew and system smoke test. Be pedantic, be brutal.
Step 11. Vibe Link to heading
There will be things you don’t like, minor adjustments, wording changes. These can all be fixed by using an agents chat interface and vibe coding. Anything substantial or which changes core functionality shoud go back to step 2 and have its own spec.