AI writes the code fast. Bad requirements break it in production.

lines of HTML codes

AI coding assistants are fast. That speed is also the problem. When you can go from idea to working code in minutes, incomplete requirements stop surfacing during development and start surfacing in production, where they cost a lot more to fix.

A Hanover Research survey of technology decision makers found more than three-quarters report that AI-generated code degrades reliability through measurable spikes in product incidents, increased senior developer firefighting, and outright production failures. The bottleneck did not disappear. It moved downstream.

What the Numbers Actually Show

The production reliability problems are not anecdotal. Research and surveys cited in a Communications of the ACM report paint a specific picture:

  • Reproducibility: Nearly one-third of AI-generated projects fail to execute as specified, according to a 2026 survey of 300 AI-generated development projects.
  • Security: AI-generated code is insecure against cross-site scripting attacks 86% of the time and is similarly vulnerable to log injection attacks, across both initial and improved AI models, per Veracode research.
  • Hallucinated dependencies: AI tools fabricate software package names, creating supply chain vulnerabilities that attackers can exploit. Researchers have named this pattern “slopsquatting.”

Gartner predicts 90% of enterprise software engineers will use AI code assistants by 2028. If the reliability gap does not close, that is a lot of production incidents on the calendar.

person writing on white paper

️ Why AI Needs Tight Specs to Perform

Disha Patel, a software engineer and machine learning researcher, explained the core failure mode directly: AI will faithfully implement an incomplete or ambiguous requirement, producing software that appears correct while violating the intended behavior. The code passes review. It fails in the real world.

Anand Rao, a professor of applied data science and AI at Carnegie Mellon’s Heinz College, points to scope explosion as a compounding issue. Give Claude an open-ended prompt and it can generate more than 10,000 or 20,000 lines of code with a complicated directory structure. That output is extremely difficult to test.

Rohit Poduval, a senior software engineer at Amazon, put the fix plainly: give AI a massive, unspecified task and it hallucinates. Give it a small, well-scoped task with clear acceptance criteria and it executes cleanly.

The Fix: Front-Load the Thinking

The practitioners quoted in the report converge on the same answer: requirements engineering. That means explicitly defining what a system must do, verifying those definitions with subject matter experts, and constraining the AI’s work to a tested, scoped chunk at a time.

Vit Koval, co-founder of B2B AI engineering firm GoGloby, frames it this way: AI is excellent at execution but poor at resolving ambiguity. Forcing teams to answer critical questions upfront identifies edge cases early, aligns expectations, and reduces the structural instability that delays mid-sized SaaS projects by months.

Alejandro Declerk, senior AI manager at Veritas Automata, a regulated-industry AI integrator, draws a clean line between two modes. Informal input works for a 48-hour prototype demo. Formal requirements work for production. With a clear and complete spec, the cost goes down and the quality goes up, he said. The spec guides the model so the model does not have to guess.

Kriti Fajudar, a senior product manager at Microsoft, identified a subtle trap: AI has dropped the cost of building the wrong thing to nearly nothing. You can now generate a fully working feature nobody asked for in an afternoon. Speed does not equal quality, and the two are easy to conflate when the output looks polished.

The Practical Pattern

Rao recommends painting the big picture first, then asking AI to work through it in bite-size chunks. Smaller tasks are easier to test, easier to verify against requirements, and far less likely to produce the kind of tangled output that nobody can debug in production. Move the load earlier in the project, and the development becomes more phased and controllable.

For indie developers and small teams using AI coding tools daily, this is less a software engineering lecture and more a workflow adjustment: write the spec before you write the prompt.

Stay on top of AI & Automation with BizStack Newsletter
BizStack  —  Entrepreneur’s Business Stack
Logo