Skip to main content

The Limits of Vibe Coding: AI Needs Architecture

We have all seen the demos. A developer opens an AI coding agent, types a few prompts, and a functioning application appears in minutes. It has helped popularise "vibe coding," a high-velocity workflow where large language models generate substantial amounts of code with minimal human input.

I recently stress-tested this approach on a Next.js application, intentionally allowing AI agents to drive much of the implementation. The initial results were impressive. Features appeared quickly, boilerplate disappeared, and development velocity felt dramatically higher than traditional workflows.

However, the momentum did not last. As the application grew, the limitations became increasingly apparent. What began as rapid progress gradually turned into a cycle of rework, architectural drift, and mounting technical debt. The experience reinforced an important lesson: AI can accelerate implementation, but it cannot replace architecture, system design, or technical leadership.

Greenfield Development vs. the Refactoring Bottleneck

AI coding agents are exceptionally good at greenfield development. If you ask an agent to create a new API route, build a React component, or scaffold a feature from scratch, it will often produce a workable solution within seconds. This is largely because these tasks closely resemble the clean patterns and examples the model has processed during training.

The challenge emerges when the application needs to evolve. As my Next.js project matured, requirements changed. State management patterns needed restructuring, components required consolidation, and parts of the application had to adapt to new feature requirements. These were not isolated coding tasks; they were system-wide changes.

At this point, the agents began to struggle. A fix in one area would frequently introduce regressions elsewhere. Refactoring became increasingly unreliable because the model lacked a complete, persistent understanding of the broader codebase. Instead of making coordinated architectural changes, it tended to optimise locally, often creating new problems while solving old ones.

The result was a frustrating loop: prompting the agent to fix a bug, discovering a new issue, prompting another fix, and repeating the cycle. Generating code and safely restructuring a growing application are fundamentally different challenges, and current AI agents remain far stronger at the former than the latter.

The Cost of Missing Architectural Constraints

The second lesson was even more significant. When architectural boundaries are not defined early, AI agents tend to solve problems in isolation rather than as part of a coherent system.

In this project, instead of consistently leveraging established libraries and patterns, the agent repeatedly generated custom implementations to satisfy immediate requirements. A multi-select dropdown became a bespoke React component with extensive custom state management. A modal dialog became another custom implementation, and similar patterns appeared throughout the application.

Individually, each solution appeared reasonable. Collectively, they created a fragmented codebase. Different components used different state management approaches, logic was duplicated across features, and accessibility considerations were inconsistent. In several cases, keyboard navigation, focus management, and ARIA support fell short of what mature component libraries already provide out of the box.

None of these issues were caused by poor code generation; they were caused by the absence of clear constraints. Had the project established strict architectural rules from day one the agent would have operated within those boundaries rather than continuously inventing new solutions. AI is highly effective when working inside a well-defined system, but it is far less effective when asked to design the system itself.

System Design is Becoming More Valuable, Not Less

The broader lesson extends beyond a single project. For years, software development bottlenecks often centred around implementation speed. Today, AI tools are dramatically reducing that constraint. Features that previously required hours can now be generated in minutes.

As implementation becomes cheaper, architecture becomes more important. When code generation is effectively abundant, the primary challenge shifts toward designing systems that remain maintainable as they grow. Decisions around data boundaries, API contracts, state ownership, dependency management, security, observability, and scalability have a far greater impact on long-term success than the speed at which code is produced.

AI agents do not naturally challenge requirements, nor do they identify conflicting business objectives. They do not proactively simplify complexity or recognise when a feature should not be built at all. Their objective is simply to produce a solution to the exact prompt they were given.

That distinction matters. A senior engineer's value increasingly lies in defining the architecture, constraints, and standards that guide implementation. The code itself is becoming easier to generate, but the system design remains incredibly difficult to automate.

The Reality Check

The eventual solution to my Next.js project was not generating more code. It was removing it.

Large sections of custom logic were replaced with proven libraries, state management was simplified, component boundaries were clarified, and architectural consistency was restored. Once those foundations were back in place, the AI tools became useful again because they were operating within a framework designed by a human.

This is where the industry is heading. AI coding agents are powerful productivity tools that can accelerate delivery, reduce repetitive work, and help experienced developers move faster than ever before. However, they are only effective when paired with strong technical leadership and clearly defined architectural guardrails.

Building software without architecture is similar to building a tower block without a blueprint. Construction is quick but complexity eventually exposes the structural weaknesses. The real opportunity is not replacing software engineering with AI-generated code; it is combining AI-assisted implementation with disciplined system design.

Code may increasingly be written by machines but the architecture still needs to be designed by people who know what they are doing.

Looking for Expert WordPress or Drupal development?

I am a freelance website developer and designer based in the UK. I work as a remote Drupal developer, WordPress developer and Front-end developer for a variety of startups, charities and international businesses in Bristol, Bath, London and Europe. You can learn more about me by visiting my resume page.

Get in touch for a free quote on your next project and if you want to connect me with then check out my LinkedIn profile.