The promises of AI coding are alluring: building an entire application in just one afternoon. This is the world of "Vibe Coding" – fast, but also the shortest path to technical debt. So how do we harness this amazing power without creating a mess we'll regret later?
This article is my answer. Not to make you abandon AI, but to help you master it. We'll go beyond simple prompts to build a professional process where AI plays the role of a disciplined teammate, not an unpredictable intern. My goal is to give you a practical handbook to turn AI into a true collaborator, helping you build better, more robust, and naturally, faster software.
What is Vibe Coding?
Imagine you're a developer named Tom, who just received a request to build a project management app. You're excited, fire up Cursor (or whatever AI you prefer), type a prompt like: "Write me a project management app with React". And boom, in just 1 hour, you have a working prototype! You feel like Tony Stark, just say one sentence and JARVIS does everything. That's "Vibe Coding" – programming by inspiration, quick and easy, relying on AI without carefully checking the code it produces.
But wait, not everything stays rosy. According to Simon Willison's definition, "Vibe Coding" is when you use large language models (LLMs) to build software without really carefully considering what they create. The result? Tom's codebase becomes a mess, without structure, full of temporary solutions. When the client requests additional features, Tom starts sweating because he doesn't know where to start fixing.
Don't get me wrong, "Vibe Coding" isn't bad. It's fast, it helps you create prototypes in (tens of) minutes, saving hours compared to traditional methods. As Steve Yegge pointed out in his article "Revenge of the Junior Developer", vibe coding can be "5x more effective than traditional programming" and is increasingly becoming an unavoidable trend as tools like coding agents emerge. However, the flip side of this coin is not light. According to CSET's report (November 2024), nearly half of AI-generated code contains errors, even security vulnerabilities that can be exploited. Speed is there, but without foundational knowledge to control it, you'll turn yourself into a security time bomb. Addy Osmani also emphasizes in his blog that "speed means nothing if the wheels fall off halfway", and vibe coding is not an excuse for low-quality work.
So how do we keep the speed without shooting ourselves in the foot? The answer lies in professional AI-powered programming. Let's explore!
Professional AI-Powered Programming: Slow but Sure
Now meet Sarah, another developer in our story. Sarah isn't rushed like Tom. Instead, Sarah takes time to plan, design architecture, break down sprints like a real Scrum Master. The result? After 2 weeks, Sarah has a solid product, easily scalable and maintainable in the long run. Sure it's slower at first, but anything worthwhile usually takes time, right?
So how does professional AI-powered programming differ from "Vibe Coding"? It's not about abandoning AI, but using AI in a controlled manner. I summarize it into 2 foundational mindsets you need to remember:
- Trust the Process: AI is most powerful when integrated into a clear process system. Don't let AI run too free, give it a "map" to follow.
- AI as Teammate: AI isn't a replacement for you, but a colleague. Coordinate, evaluate and adjust its output, just like how you work with another programmer on the team.
This perspective is reinforced by Mike Krieger, CPO of Anthropic, who emphasizes that in the future, programmers will shift from writing code to the role of "AI Orchestrators" – coordinating AI, designing systems and ensuring quality. At Anthropic, embedding Product Managers with AI researchers has increased efficiency by 10x, showing the importance of coordinating humans and AI as teammates (Mike Krieger Interview).
To better illustrate how AI can become a teammate, look at the diagram below:
This diagram shows you (Product Owner) playing the guiding role, while various AIs take on specific tasks like requirements, research and code writing. Most importantly, there's a feedback loop for you and AI to evaluate and adjust together. This is the spirit of "AI as Teammate" – collaborating like members of a real team.
8 Best Practices
Now that we understand the mindset, let's go into detail with 8 best practices to elevate from "Vibe Coding" to professional AI-powered programming. I divide them into 4 familiar stages in software development: Preparation, Planning, Development, and Troubleshooting.
Preparation
The preparation phase is like laying the foundation for a house. If the foundation isn't solid, the entire structure will collapse. Here are the first 2 best practices:
Best Practice 1: Coordinate Multiple AI Tools
Don't rely on just one AI. Create a pipeline where each AI takes on a separate role. For example:
- Reasoning AI: Specializes in writing requirements documents, design, and implementation instructions.
- Internet Search AI: Searches for the latest information about frameworks or community experiences.
- Coding AI Agent: Focuses on writing code.
The output of one AI becomes the input for another, ensuring consistency and quality. Think about it, you're building a super-powered AI team, not just having one superhero! This perspective is supported by Steve Yegge in his article, when he predicts the emergence of "agent clusters" and "agent fleets" – where programmers manage multiple agents in parallel to handle different tasks, from bug fixing to developing new features.
Best Practice 2: Prepare Detailed Requirements
Requirements are the roadmap for AI. If the map is vague, AI will lead you into a forest of errors. Turn AI into a brainstorming assistant, chat with it like a colleague to discover new perspectives and detect gaps in initial requirements. You can refer to details of how I do this in my blog: Optimizing Requirement Writing with AI. Addy Osmani also encourages keeping humans in the design leadership position, using AI for execution rather than deciding basic architecture, ensuring requirements are clearly defined from the start (Addy Osmani Substack).
The mindset at this stage: "Preparation is the foundation of success". Don't rush to code, take time to build the team and clarify what you want to create.
Planning
The planning phase is when you concretize what needs to be done. In Scrum, this is Sprint Planning. Here are the next 2 best practices.
Best Practice 3: Task Breakdown for AI
AI works best with small, independent tasks. Break down according to "AI-friendly tasks" rules:
- Each task no more than 100-200 lines of code.
- Clear input/output.
- Little dependency on context from other tasks.
- Specific test cases to verify.
Save the task list and implementation plan in the folder containing source code, so the Coding Agent can easily access context. Nobody wants to work in the dark, including AI! Steve Yegge emphasizes that breaking down tasks is extremely important when working with coding agents, because if you give agents tasks that are too large, they will "bang their heads against the wall" without achieving results (Sourcegraph Blog).
Best Practice 4: Setup Implementation Rules
Create a "company handbook" for AI, called Implementation Rules. It defines coding standards, preferred patterns and workflow. When AI has clear rules, it won't have to guess your intentions, but focus 100% on business logic. Addy Osmani also agrees with this idea, recommending teams establish coding standards and ensure AI output is edited to comply before integrating into the codebase (Addy Osmani Substack).
The mindset here is: "Structure enables creativity". Good structure doesn't constrain, but liberates creativity for both you and AI.
Development
Development is when you and AI work together to turn ideas into reality. Here are 2 important best practices.
Best Practice 5: Edit-Test Loops
Edit-Test Loops are the most effective way to work with AI. Each cycle should only last 15-30 minutes, enough for AI to focus and give quick feedback. The process is as follows:
- Identify a small increment (15-30 minutes).
- Write failing test case for this increment.
- Ask AI to implement code to make test pass.
- AI automatically runs test.
- If fail, AI analyzes and fixes code. If pass, review and commit.
Addy Osmani also emphasizes the importance of thorough testing, advising that all AI-generated code needs to be tested both manually and automatically to detect errors, especially unexpected cases that AI often overlooks (Addy Osmani Substack). Additionally, Mike Krieger from Anthropic shares that at their company, AI not only writes code but is also used to review other AI's code, with humans only performing acceptance testing, significantly speeding up the review process (Mike Krieger Interview).
To illustrate more clearly, look at the diagram about the Development phase below:
This diagram shows how you and AI work through short loops, with clear checking and progress saving steps.
The mindset here is: "Small iterations, continuous feedback". Don't let AI take on too much, guide step by step.
Best Practice 6: Context Management
Context is AI's "memory", but if context is too long, AI will get "confused" and produce inconsistent results. Manage context effectively with the following methods:
- Use @ references to add specific files.
- Start new chat if context exceeds 50-100 messages.
- Resync codebase regularly.
- Use git commits as checkpoints.
- Create summary after each session.
The diagram below illustrates how to manage context:
The Context Repository stores all important information, and each AI working session reads/writes to it to ensure consistency.
Troubleshooting
AI isn't always perfect. Sometimes it will struggle and not be able to solve problems. Don't panic, use these 2 best practices:
Best Practice 7: Problem Report System
When AI encounters difficulties, ask it to create a Problem Report, describing in detail the current state, error messages and solutions tried. Then, give this report to another Search AI for a fresh perspective, like asking for expert opinion outside the team. Addy Osmani also supports using AI iteratively, encouraging programmers to ask AI to improve output if initial results don't meet requirements, or even abandon AI to write code themselves if needed (Addy Osmani Substack).
Best Practice 8: Context Reset Strategy
When everything is too messy, be bold and "reset". Context reset is the "emergency brake" when AI goes in the wrong direction. When to reset? When conversation exceeds 100 messages, AI starts hallucinating or repeating infinitely. An effective reset method is to summarize progress into a problem report, then start a fresh conversation with clean context.
The diagram below illustrates the troubleshooting process:
The mindset here? "Systematic beats random". Don't try to fix errors randomly, be systematic: document, analyze, consult, and apply a structured approach.
"Trust The Process"
To help you visualize the entire AI workflow more clearly, look at the "Trust the Process" diagram below. It covers all 4 stages from Preparation to Troubleshooting:
This diagram shows that working with AI is not AI-centric, but process-centric. The process establishes a clear framework, while AI is just the implementation tool within it. Context is stored and reused throughout, ensuring AI always has enough information to work effectively. Mike Krieger from Anthropic also emphasizes that when AI can write code quickly (90-95% of code at Anthropic is already AI-generated), new bottlenecks emerge in feature decision-making and merge queues, so processes need to be redesigned to adapt (Mike Krieger Interview).
Conclusion
The software development world is entering a new era, where AI is no longer a passive tool, but becomes a companion in every line of code. But let's pause and think about how we've worked together over the years.
When building a development team, you never just hire a bunch of people then throw them into a room and say "Do something cool!". Instead, you place each person in the right position: Frontend Developer for UI, Backend Developer for API, DevOps for infrastructure. You clearly define input and output for each role – Designer gives mockups to Frontend, Frontend provides API specs to Backend. And most importantly, you review each member's output from the beginning through code reviews, daily standups, and sprint demos. Nobody gets to "freely create" without feedback!
Working with AI is exactly the same. You can't completely delegate to one AI and expect it to solve everything automatically. Instead, you need to guide the approach carefully like onboarding a new junior developer, adjust each AI's output like reviewing a colleague's code. Each AI in your "team" needs a clear role, specifically defined input/output, and output needs to be thoroughly checked before moving to the next step. When you apply this approach correctly, AI can produce output faster and better than humans in areas where it excels. And when each "AI member" on the team operates effectively, the overall project output will be significantly improved.
To collaborate effectively, remember 2 mindsets: Trust the Process and AI as Teammate. Trust the process, invest time in planning, testing and continuous improvement. Treat AI like a real teammate – share goals, provide feedback and solve problems together.
Success with AI doesn't lie in being the best coder, but in team management and process skills. Try applying the 8 best practices above, and you'll find yourself not only coding faster, but also viewing problems more deeply, solving challenges more effectively. As Steve Yegge said, "AI doesn't need to prove it's better than you, but you need to be better thanks to AI". He also predicts that programmers' roles will shift to managing "agent fleets", and those who don't adapt will fall behind, especially senior devs compared to junior devs – those who are quickly embracing AI (Sourcegraph Blog). Are you ready to become an AI Orchestrator, coordinating the entire AI ecosystem?
Start today, and remember, the journey with AI is just like working with humans – it needs planning, coordination, and patience. Happy coding, and don't forget to leave comments if you have questions or experiences to share!
Top comments (0)