Originally published on tamiz.pro.
The honeymoon phase of AI-assisted development is over. For the past two years, "vibe coding"—describing an application to an LLM and deploying whatever comes back—has been sold as the great democratizer of software. But the industry is now colliding with a brutal engineering truth: AI can generate syntactically valid code at scale, yet it remains fundamentally incapable of owning architecture, cost, or security. The result is a new class of production incidents—surprise cloud bills that rival engineering salaries, and security postures so porous they make legacy unpatched systems look hardened by comparison.
This is not an argument against AI tooling. It is an argument for treating AI output as what it actually is: untrusted, unoptimized, and unowned code that demands rigorous human governance.
The Vibe-Coding Proliferation
Tools like Cursor, GitHub Copilot, v0, Bolt, and Lovable have collapsed the distance between idea and deployment. Product managers, designers, and founders are now shipping full-stack applications without writing a single line of code by hand. The output looks complete—React components, Express routes, database schemas, Dockerfiles. But completeness is not correctness.
The problem is not that AI writes bad code. In isolation, generated functions are often elegant. The problem is that AI writes unowned code. There is no architect behind the decisions, no operator who understands the failure modes, and no engineer who has read the dependency tree. When the generated application breaks, scales poorly, or leaks data, there is no institutional memory to debug against—only the chat log that produced it.
Bill Shock: The Economics of Probabilistic Architecture
AI optimizes for immediate functionality, not fiscal efficiency. It does not know your AWS Reserved Instance strategy, your Cloudflare cache hit ratio, or your OpenAI token budget. It defaults to patterns that work in a demo, regardless of their cost profile at scale.
Consider a typical vibe-coded serverless application. The LLM happily generates an API route that queries a database on every request, invokes an LLM for classification without caching, and returns verbose JSON payloads. None of these decisions are malicious; they are simply the path of least resistance for a model trained to produce plausible code. The result is an application that burns through free tiers in days and scales into four-figure monthly bills the moment it finds product-market fit.
The deeper issue is architectural. AI does not understand trade-offs. It will spin up a Kubernetes cluster for a to-do list because the prompt mentioned "microservices," or it will use a heavyweight ORM that generates N+1 queries because that is the most common pattern in its training data. Cost efficiency requires context—knowledge of traffic patterns, data locality, and provider pricing models—that LLMs simply do not possess.
The Security Debt Is Already Due
If the financial surprises are bad, the security gaps are worse. AI-generated code introduces vulnerabilities at every layer of the stack, often in ways that are invisible to the developer who shipped it.
Supply chain hallucinations are perhaps the most insidious. LLMs frequently invent npm or PyPI packages that sound plausible but do not exist—or worse, that have been squatted by attackers. This "slopsquatting" vector turns a hallucination into a malware deployment pipeline. A developer who trusts the generated package.json without auditing dependencies is importing whatever the attacker registered under that hallucinated name.
Insecure defaults are equally rampant. Generated authentication flows routinely omit rate limiting, session invalidation, and proper authorization checks. The AI implements login because the prompt asked for it, but it does not implement secure login unless explicitly constrained. Hardcoded secrets, missing CORS policies, and raw SQL queries constructed via string concatenation appear with alarming frequency because they are statistically common in the training data.
The scariest part? These vulnerabilities ship to production with green CI checks, because the tests were also generated by the same model that wrote the vulnerable code.
// A typical AI-generated Express handler with multiple critical flaws
app.post('/api/user/update', async (req, res) => {
const { userId, email, role } = req.body;
// No authentication middleware
// No input validation
// No authorization check—any user can set any role
const query = `UPDATE users SET email = '${email}', role = '${role}' WHERE id = ${userId}`;
await db.raw(query);
res.json({ success: true });
});
Why AI Cannot Architect
At its core, software architecture is the discipline of making trade-offs under constraint. It requires understanding blast radius, compliance boundaries, data gravity, and organizational risk tolerance. LLMs are pattern-matching engines; they predict the next likely token, not the next likely outage.
An AI does not know that your payment processor requires idempotency keys, that your HIPAA compliance boundary prohibits a specific cloud region, or that your database connection pool will collapse under the generated retry logic. It has no threat model. It has no capacity plan. It optimizes for syntactic plausibility, not semantic safety or operational resilience.
This is why vibe-coded apps tend to fail in the same ways: they lack idempotency, they lack observability, they lack graceful degradation, and they lack defense in depth. These are not coding problems. They are systems-thinking problems, and systems thinking is precisely what generative AI does not do.
Governance Is the New Compiler
The path forward is not to abandon AI—that is a losing battle. The path forward is to treat every AI-generated diff as untrusted third-party code and wrap it in the same governance you would apply to an open-source contribution from a stranger.
This means mandatory security scanning in CI/CD that treats AI-authored pull requests with higher suspicion, not lower. It means dependency allow-lists to prevent hallucinated packages from ever reaching production. It means cost anomaly detection wired directly into your deployment pipeline, with automatic rollback when spend deviates from baseline. It means human architecture review for any code touching authentication, authorization, payments, or PII—no exceptions.
Most importantly, it means cultural change. The developer who prompts an app into existence still owns the outage, the bill, and the breach. Vibe coding does not transfer liability to the model. It only transfers the typing.
The Verdict
AI is a power tool, not an architect. The teams that thrive in this new landscape will not be the ones that generate the most code fastest; they will be the ones that build the strongest guardrails around probabilistic generation. The surprise bills and security breaches we are seeing today are not growing pains. They are the predictable output of a tool being used without an operating model.
If your organization is still treating AI-generated code as production-ready by default, you are not innovating. You are accumulating risk at machine speed. The reality check has arrived, and the invoice is already in your inbox.
For teams looking to operationalize these guardrails without slowing down AI adoption, frameworks for automated cost governance and supply-chain security are explored in depth on Tamiz's Insights.
Top comments (0)