The Future of Code: A Phased Approach to Working with AI Agents
Z
Zack Saadioui
8/10/2025
The Future of Code: How to Use a Phased Approach to Plan, Execute, & Verify with Your AI Agent
Honestly, the way we're building software is changing so fast it's almost dizzying. If you'd told me a few years ago that I'd be assigning coding tasks to an AI & getting back a pull request, I probably would've laughed. But here we are. The rise of AI coding agents is not just a trend; it's a fundamental shift in how developers work.
But here's the thing a lot of people are getting wrong: you can't just throw a vague instruction at an AI & expect magic. Just like with a human team member, you need a process. A structured approach. Let's call it a "phased" approach. It's all about breaking down the development process into distinct stages: Planning, Execution, & Verification.
Turns out, this is the secret sauce to making AI agents REALLY work for you, moving from "cool toy" to a reliable, force-multiplying teammate. So, let's dive into what this actually looks like in practice.
First Things First: What Are We Even Talking About? Agent Mode vs. Autonomous Agents
Before we get into the phases, it’s important to understand the different ways you can work with these AI tools. The terminology can be a little fuzzy, but it generally breaks down into two main categories.
Agent Mode: Think of this as your interactive AI sidekick. It's a conversational, "stay in the loop" experience where the AI helps you with multi-step tasks in real-time, right inside your editor or terminal. You're still in the driver's seat, but you've got a super-smart navigator. You might ask it to "find all implementations of this trait" or "help me figure out why this SSH connection is failing." It's a back-and-forth, collaborative flow.
Autonomous Agent (or "Coding Agent"): This is a more hands-off approach. You give the AI a well-defined task, usually in the form of a GitHub issue, & it goes off on its own to solve it. It will create a branch, write the code, & then submit a pull request for you to review. This is less of a conversation & more of a delegation.
Understanding this distinction is key because the phased approach we're about to discuss applies to both, just in slightly different ways. With an autonomous agent, the planning phase is EVERYTHING. With an interactive agent, you might cycle through the plan-execute-verify loop more rapidly on smaller tasks.
Phase 1: The Planning Phase - Don't Skip Your Homework
This is where so many developers go wrong. They treat the AI like a black box, give it a half-baked idea, & then get frustrated with the results. To get a good outcome, you need to provide a good input. The planning phase is all about setting your AI teammate up for success.
Spec-Driven Development: The New Gold Standard
A recent Microsoft Build talk introduced the idea of "vibe coding" versus "spec-driven" development. "Yolo vibe coding" is where you just have a rough idea & you riff with the AI to see what happens. It's great for experimenting & building your intuition for what the AI is capable of.
But for serious, scalable projects, you want to move towards "spec-driven vibes." This is basically applying solid engineering principles to your AI prompts. It’s not a new concept, but it's more important than ever. One developer who built a 40,000-line SaaS platform without writing a single line of code himself said he spent a FULL DAY having the AI generate documentation before any code was written. This included:
Application Requirements: What should the software do? What are the user stories?
Application Design: High-level architecture, data models, etc.
Project Directory & File Structure: Where should the new code live?
Implementation Plan: A step-by-step breakdown of the tasks.
This detailed planning forces clarity & gives the AI a comprehensive blueprint to follow. The human's role here is that of an architect. You are MUCH better at understanding the overall design, the separation of concerns, & the long-term vision. The AI is better at the raw speed of implementation & knowing the ins & outs of every common API. It's a perfect partnership.
Making Your Repo AI-Friendly
Just like onboarding a new human developer, you need to make your project easy for an AI to understand. This means:
Good Documentation: Your README should be on point. Explain how to set up the project, how to run tests, & any important conventions.
Well-Written Issues: If you're using an autonomous agent like GitHub Copilot's coding agent, the issue is your primary prompt. Be clear, be specific, & provide examples.
Custom Instructions: Some tools, like Copilot, allow you to provide custom instructions. This is where you can document institutional knowledge—things that aren't in the public docs but are crucial to how your team works.
Phase 2: The Execution Phase - Letting the AI Do Its Thing
Once you've done the hard work of planning, the execution phase is where the magic happens. This is where the AI takes your detailed instructions & starts generating code.
The Iterative Process
Whether you're in an interactive "agent mode" or have delegated a task to an autonomous agent, the AI works iteratively. It will break down the problem, explore the existing codebase to understand the context, & build towards a solution step-by-step.
In an interactive mode, you'll see this happen in real-time. The AI might ask for clarification or suggest a command to run to get more context. With an autonomous agent, this process happens in the background, but you can often see the AI's thought process in the pull request it creates.
This is where the power of these tools really shines. They can write boilerplate code, handle error logging, & implement APIs with incredible speed & accuracy. One of the biggest advantages is typo-free development. It’s a small thing, but it saves SO much time.
The Role of the Human: Steering & Course Correction
Even with the best plan, the AI can sometimes go off the rails. Your job during the execution phase is to be the supervisor.
Provide Feedback: In an interactive session, if the AI makes a mistake, tell it! The follow-up prompt is your most powerful tool. Keep the feedback loop tight.
Use the "Undo" Button: Don't be afraid to scrap the AI's changes & try a different approach. Most tools have a simple way to revert any changes the agent has made.
Manage Context: The AI's "context window" is its short-term memory. You need to be mindful of what information it has access to. You can often attach specific files or terminal output to give it the right context for the task at hand.
And when you're dealing with complex customer-facing applications, the quality of interaction is key. For businesses looking to automate their customer support or website engagement, this is where tools like Arsturn come in. While you're busy using AI to write your application code, you can also use Arsturn to build a no-code AI chatbot trained on your own data. This chatbot can then handle customer questions, provide instant support, & engage with website visitors 24/7, freeing up your team to focus on the bigger picture. It's another layer of automation that works in parallel with your development efforts.
Phase 3: The Verification Phase - Trust, But Verify
This is arguably the MOST important phase. An AI can write a ton of code very quickly, but that doesn't mean it's correct, secure, or efficient. As the human engineer, you are the ultimate quality gate.
Code Review Everything
One developer who had great success with AI agents had a simple rule: review EVERYTHING. He found that the AI got the task right about 9 out of 10 times, & often wrote higher-quality code than he would have on the first pass. But when it made a mistake, it tended to be a structural one.
Your expertise in software architecture & design is critical here. The AI might write a function that works perfectly in isolation but doesn't fit into the larger system design. That's what you need to catch.
The Human-AI Debugging Dance
When you do find a bug, the verification phase blends back into the execution phase. But instead of just fixing it yourself, try to debug with the AI.
Describe the Failure: Clearly explain what went wrong.
Provide the Logs: Paste in any error messages or stack traces.
Ask for a Fix: More often than not, the AI can correct its own mistakes once you've pointed them out.
This process not only fixes the bug but also helps refine the AI's understanding of the codebase for future tasks.
The Power of Automated Testing
Of course, the best way to verify code is with a robust test suite. This is another area where AI agents can be incredibly helpful. You can use them to:
Generate Unit Tests: Give the AI a function & ask it to write comprehensive tests for it.
Create End-to-End Tests: Tools like Playwright can be integrated with AI agents to test user flows from start to finish.
Fix Failing Tests: If a test is failing, you can provide the test output to the AI & ask it to fix the underlying code.
As businesses scale, maintaining a high-quality user experience becomes paramount. This isn't just about bug-free code; it's also about providing personalized & instant engagement. This is another area where a tool like Arsturn shines. By building a custom AI chatbot trained on your company's unique data, you can create meaningful connections with your audience, guide users through your product, & boost conversions. It's the same principle as verifying your code—you're ensuring the end-to-end user journey is smooth & effective.
Putting It All Together: A New Kind of Workflow
Adopting a phased approach to working with AI agents is a game-changer. It transforms the process from a chaotic, unpredictable experiment into a structured, reliable engineering workflow.
Plan: Start with detailed specs & documentation. Treat your AI like a new team member that needs clear instructions.
Execute: Let the AI handle the heavy lifting of writing code, but stay in the loop to provide feedback & course correction.
Verify: Review every line of code. Use the AI to help you debug & write tests.
This isn't about replacing human developers. It's about augmenting them. It's about freeing us up from the tedious parts of coding so we can focus on what we do best: architecture, creativity, & high-level problem-solving.
So, give it a try. The next time you start a new feature, don't just jump into "yolo vibe coding." Take the time to plan, to write a spec, & to think through the process. You might be surprised at how much more effective your AI teammate can be.
Hope this was helpful. Let me know what you think.