AI sucks at big projects

AI is specifically bad at writing more complex or non generic code that for example but not exclusively leverages off of General Purpose Frameworks such as .net, Vue.js or Laravel. This is why it is better to write small chunks of code and weave it together manually for larger or more complex projects.

Artificial intelligence is often presented as a revolutionary tool for software development, capable of generating entire applications from a prompt. In practice, however, AI systems begin to struggle much earlier than people assume. The breakdown does not only occur in massive AAA video games or enterprise-scale distributed systems. AI frequently shows structural weaknesses even in moderately sized or relatively small projects. As the code base grows beyond a handful of files and interconnected modules, the rate of mistakes increases: hallucinated functions, duplicated utilities, inconsistent patterns, tangled logic, and subtle security flaws become more common.

The core issue is not only scale in terms of millions of lines of code. The problem is structural complexity. Once a project requires multiple layers—such as data models, service logic, controllers, and UI—AI systems begin to lose coherence. They generate code that is locally plausible but globally inconsistent.

Take a mid-sized indie game built in Unity. Suppose the project contains a player controller, an inventory system, an AI enemy behavior tree, a save/load system, and a UI layer. This is not a massive AAA production; it might be 15,000 to 30,000 lines of code. Yet even at this size, AI-generated additions often introduce structural issues. For example, if you ask the AI to implement a crafting feature, it may create a second inventory representation rather than extending the existing one. It might bypass established event systems and directly modify object states. The result is redundancy and fragmentation.

Even smaller projects show similar weaknesses. Consider a web application built with Django or React. A typical startup MVP might include user authentication, dashboards, API endpoints, background jobs, and database migrations. This is not an enormous code base. Yet when AI is used to iteratively extend such a system—adding roles, permissions, billing logic, or reporting—the cracks start to appear.

One common failure pattern is duplication. The AI may implement permission checks directly inside view functions rather than reusing middleware. Later, when asked to “improve security,” it may add a second layer of checks elsewhere. Now two authorization systems coexist. If one is updated and the other is forgotten, inconsistencies arise. These inconsistencies are subtle and often invisible until edge cases trigger them.

Another issue is architectural drift. Suppose an engineer initially defines a service layer separating business logic from controllers. After several AI-assisted feature additions, new logic begins creeping into controllers again. The AI often optimizes for immediate functionality rather than respecting long-term architectural boundaries. Over time, this produces spaghetti code: tightly coupled modules, circular imports, and brittle dependencies.

Hallucination remains a significant factor even in small projects. AI may invent helper functions that were never defined, reference environment variables that do not exist, or assume the presence of certain libraries. In isolation, these errors are easy to fix. But as they accumulate across multiple files and sessions, they create cognitive overhead for developers who must constantly reconcile AI assumptions with project reality.

Security degradation also appears earlier than expected. In a relatively small REST API, AI might implement password hashing correctly at first. Later, when adding a new login endpoint, it might accidentally compare raw strings. In another feature, it might forget to sanitize user input in a search filter. Each individual mistake seems minor. Collectively, they introduce serious vulnerabilities.

Even AI agents—systems designed to iteratively plan, generate, and refine code—do not fully solve the problem. Agents can read files, write new ones, and run tests. However, they still rely on probabilistic reasoning. If the test suite is incomplete, the agent may produce changes that technically pass tests but violate architectural principles. For example, it might mock away integration complexity rather than properly implementing it. The system “works,” but its internal integrity erodes.

The key pattern is this: as the specification grows, ambiguity increases. The larger the feature set—even in modest projects—the more interpretation is required. AI fills gaps in specifications with statistically plausible guesses. Those guesses often diverge from the engineer’s intent. In a two-file script, this divergence is manageable. In a 20-file project, it compounds. By 50 files, the divergence can meaningfully alter system structure.

This is why careful architectural planning is essential, even for projects that are not massive. Before using AI to generate code, an experienced engineer should define:

  • Clear module boundaries
  • Interface contracts
  • Naming conventions
  • Data flow diagrams
  • Security constraints
  • Testing standards

Then, AI should be constrained to small, well-defined components. Instead of prompting, “Build the whole authentication system,” one might specify, “Implement this function according to this exact interface; do not modify other files.” Smaller scopes reduce hallucination and duplication.

Component-based development mitigates many of AI’s weaknesses. If each piece is generated, reviewed, and integrated deliberately, the system remains coherent. The engineer acts as the architect and integrator; AI acts as a code accelerator. Without this oversight, even modest projects degrade quickly.

The misconception is that AI only fails at extreme scale. In reality, the threshold for structural breakdown is much lower. Once a project requires sustained coherence across multiple interacting modules, AI’s lack of true architectural understanding becomes visible. It can produce impressive fragments, but maintaining long-term structural integrity—even in relatively small systems—still demands disciplined human engineering.

In short, complexity is not measured only in lines of code. It is measured in interconnected responsibilities. And AI begins to struggle as soon as those responsibilities require consistent, intentional design over time.