Business of AI
Vibe Coding7 min read

From Prototype to Production: When Vibe Coding Stops Being Enough

It gets you 80% of the way. Here is what the last 20% looks like — and what comes next.

By Onil Gunawardana

Three months ago, I vibe-coded an internal analytics tool in a single evening. Real data, real queries, functional UI. My team used it every morning for six weeks. Then one Tuesday at 8:47 AM, the database connection pool exhausted, the retry logic did not exist, and the dashboard showed a blank white screen to fourteen people who needed it for a leadership meeting at nine.

Nobody was angry. The tool had been built in four hours. But the incident clarified something I had been circling for a while: the gap between a working prototype and production software is not a gap of code quality. It is a gap of engineering judgment. And that gap is exactly where vibe coding stops and real engineering begins.

I have built products from zero to scale across my career, contributing to more than two billion dollars in cumulative revenue. I have shipped vibe-coded prototypes that saved weeks of work. I have also watched vibe-coded tools fail in ways that cost far more than the time they saved. The pattern is consistent enough that I can now describe it precisely.

What Vibe Coding Does Well

Let me be clear: vibe coding is not a gimmick. It is a genuine shift in how software gets built, and the things it does well, it does extraordinarily well.

Speed of iteration is the headline. What used to take two to four sprints now takes a day or two. I have seen product managers, designers, and founders go from idea to clickable prototype in under eight hours. That velocity is not incremental improvement. It is a category change. When the cost of trying an idea drops by 90%, you try ten ideas instead of one.

Boilerplate elimination is the workhorse. Form validation, CRUD endpoints, database schemas, component scaffolding, API integrations — these are patterns that AI has seen millions of times. The generated code is not creative. It does not need to be. It needs to be correct and conventional, and for well-established patterns, it usually is.

Exploration without commitment is the strategic advantage. Before vibe coding, exploring an architectural direction meant allocating engineering resources. Now you can prototype three different approaches in a day, evaluate each against real data, and make an informed decision before committing a single engineer. That changes the economics of product development at a fundamental level.

Accessibility is the long-term story. People who could never build software — product managers, analysts, domain experts, founders without technical backgrounds — can now create functional tools. The implications of this are still unfolding, and I think they will be more significant than most people expect.

These are real strengths. They are not hype. And they are precisely why the failure mode is so dangerous — because the 80% that vibe coding handles well creates confidence that the remaining 20% will be just as easy.

It is not.

What the Last 20% Looks Like

The gap between prototype and production is not about the code being ugly or inefficient. The gap is about all the things the code does not do. These are the dimensions where vibe-coded software consistently fails, and they share a common trait: they are invisible until they matter.

Error handling is the first wall. Vibe-coded applications handle the happy path. They assume the API responds, the database connects, the user provides valid input, and the file exists. In production, none of these assumptions hold reliably. A vibe-coded tool might retry a failed request — but without exponential backoff, without circuit breakers, without distinguishing between a timeout and a 403. The difference between "it mostly works" and "it works reliably" is almost entirely error handling, and error handling accounts for 30 to 50% of production code in mature systems.

Security is the second wall. AI-generated code routinely exposes SQL injection vectors, stores secrets in plaintext, skips input sanitization, and implements authentication flows with subtle flaws. I reviewed a vibe-coded internal tool last quarter that had an admin endpoint with no authentication at all — not because the developer was careless, but because they asked the AI for an admin panel and the AI generated one without access controls. The developer was not an engineer. They did not know to ask.

Performance at scale is the third wall. A dashboard that loads in 200 milliseconds with 500 rows takes 14 seconds with 50,000 rows. A batch process that runs in 30 seconds against a test dataset takes 9 hours against production data. Vibe-coded software optimizes for nothing because optimization requires understanding the data profile, the access patterns, and the infrastructure constraints — context that no AI model has.

Observability is the fourth wall, and the one most people miss entirely. Production software needs logging, metrics, alerting, and tracing. Not because something will go wrong — because something will go wrong and you need to know what, where, and why within minutes, not hours. My analytics tool that failed? If it had structured logging and a health check endpoint, the blank screen would have been a five-minute fix. Instead it was a forty-minute scramble.

Edge cases are the fifth wall. The long tail of inputs, states, and sequences that no one anticipated. What happens when a user submits the form twice? When the session expires mid-operation? When the timezone is UTC+13? When the CSV has a column header with a comma in it? Edge cases are not rare in aggregate. In a system serving thousands of users, they occur hourly.

The Judgment Gap

Here is the uncomfortable truth: the last 20% is not just harder. It is a fundamentally different kind of work.

Vibe coding is translation. You describe what you want; the AI translates it into code. The skill required is articulation — being clear about the desired behavior.

Production engineering is judgment. You decide what to optimize for, what risks to accept, what trade-offs to make, and what failure modes to design around. These decisions require context that cannot be specified in a prompt: the traffic pattern at month 12, the compliance requirements in the EU market, the operational capacity of the team that will maintain this system at 3 AM.

I have started thinking about this as two distinct phases with different practitioners, different tools, and different success criteria.

Patterns for the Transition

Having navigated this transition on multiple products, I have identified five patterns that consistently work.

Pattern 1: Harden the happy path before expanding scope. Do not add features. Instead, take the core flow that works and make it unbreakable. Add retry logic, timeouts, input validation, and fallback behavior. This single pattern addresses 60 to 70% of production failures in vibe-coded applications.

Pattern 2: Add observability before you think you need it. Structured logging, health check endpoints, and basic error alerting. The investment is minimal — two to four hours of work — and the payoff is asymmetric. The first production incident you diagnose in five minutes instead of fifty will justify the effort.

Pattern 3: Write tests for the failure modes, not the features. The features work. You have been using them. What you have not tested is what happens when the database is slow, the API returns unexpected JSON, the user's session expires, or the input contains Unicode characters. Write ten tests for failure modes before you write a single test for a feature.

Pattern 4: Introduce authentication and authorization early. Every vibe-coded application I have seen assumes trusted users. In production, you need to know who is making each request, what they are allowed to do, and how to revoke access. Retrofitting auth into an application that was not designed for it is one of the most expensive refactoring tasks in software development.

Pattern 5: Separate configuration from code. Vibe-coded applications hardcode database URLs, API keys, feature flags, and environment-specific values. Moving these to environment variables or a configuration service is a prerequisite for any deployment pipeline and is almost impossible to do incrementally.

When to Hire vs. When to Keep Vibe Coding

This is the question I get most often, and the answer is more nuanced than "hire when it gets complex."

Keep vibe coding when the application serves fewer than 50 users, the data is not sensitive, downtime is annoying but not costly, and the person who built it can fix it. Internal tools, personal productivity apps, and team utilities often live here permanently.

Start hiring when any of these thresholds are crossed: the application serves paying customers, the data includes PII or financial information, downtime costs more than $500 per hour, or the system integrates with more than three external services.

The hybrid model is what I actually recommend. Hire one senior engineer. Not a team. One person who reviews the vibe-coded output, hardens the critical paths, sets up the deployment pipeline, and establishes the patterns that future vibe coding will follow.

What Comes Next

The prototype-to-production gap is real, but it is shrinking. Every month, AI-generated code gets better at error handling, security, and edge cases. Within two years, I expect the "last 20%" to be closer to the "last 10%."

But here is my core thesis: vibe coding changes when you hire engineers, not whether you hire them. Without vibe coding, you hire engineers on day one to build the prototype. With vibe coding, you hire engineers on day ninety to harden the product. The sequence changes. The destination does not.

The companies that will win are the ones that understand both phases — that move fast with vibe coding to validate ideas, then invest deliberately in the engineering judgment required to operate those ideas at scale. Speed to prototype and reliability in production are not opposing forces. They are sequential disciplines, and the best teams are fluent in both.

The worst outcome is the middle ground: a vibe-coded prototype that gets promoted to production without the transition. That is how you get the blank screen at 8:47 AM.

Onil Gunawardana
Onil Gunawardana

Founder, BusinessOfAI.com

Product management executive with 15+ years building enterprise software. Created 8 major products generating $2B+ in incremental revenue.