How to Stay in Control When AI Writes Code

An owner shows us an app built with an AI tool in a few weeks. It works, and two colleagues use it every day. Then, on Monday, one figure in the report is wrong. The questions around the table have little to do with programming: what changed since Friday, who reviewed it, and how do we restore the previous version?
Those three questions determine whether the speed gained from AI remains useful.
The work already done is useful because it makes the idea concrete enough to inspect. Its value from here depends on whether someone can review a change, trace what happened and restore an earlier state. XPO Inventory, a business app we built for the trade-fair builder NEO Expo, shows what those control points look like. We decided early which values the system may propose and which ones a person must set.
Define code organization first
AI tools solve the task in front of them, one local decision at a time. Without a structure, one helper function appears beside another and the same value is stored in a third way. Decide once where data access and workflow rules belong. In XPO Inventory, four location types contain the operational logic: warehouse, truck, trade-fair stand and container. The app records every movement as a transaction, from goods receipt to disposal. This creates an audit trail that nobody has to reconstruct later.
Keep the technology stack small
AI can suggest a new library for almost every problem, and each one is free when introduced. The maintenance work arrives later through updates and the question of who will still understand the exception in two years. XPO Inventory therefore uses a small set of common building blocks, centered on Next.js and PostgreSQL. A constrained stack keeps AI-generated changes within familiar patterns.
Use linting and typechecking as hard boundaries
You cannot tell whether AI-generated code is correct just by looking at it. Linting and typechecking run on every change without tiring, and they catch unsafe type assumptions before those assumptions cause trouble in operation. One question separates the work: can a machine determine whether a defined property or rule holds? If it can, automate the check. If it cannot, a person must apply judgment, which is the scarce resource.
How much AI accelerates development is an open question. In a study by METR, 16 experienced developers took around 19 % longer on 246 familiar tasks with the early-2025 tools than without them, while Google's DORA report 2025 measures higher throughput across close to 5,000 respondents alongside weaker delivery stability; 30 % have little or no trust in AI-generated code. The pace depends on the surrounding system, not on the tool alone.
Tests protect against convincing mistakes
AI code rarely looks wrong, and that is exactly what makes its mistakes dangerous. A badly rounded total shows up; a permission check that covers one case too few goes unnoticed for months. Not every change needs a large test suite, but every rule carrying money, deadlines or access rights needs a test. In XPO Inventory, end-to-end tests are part of the application's foundation, and when offline bookings sync, the server checks the same stock and reservation rules as online.
Six questions you can ask without knowing how to code
Whether a project is under control can be checked without reading a line of code. Ask them in your next conversation; the answers say more than any demo.
- Who checked the last change, and how did that person know it was right?
- Show me every change from the last four weeks, with date and sign-off.
- How long does it take to restore the previous version?
- Which checks run before every release, and what happens when one fails?
- Which values may the AI propose, and which ones does a person set?
- Where are the source code and access credentials stored, and could someone else take over tomorrow?
If an answer can only be described rather than demonstrated, the evidence is missing.
Humans decide, AI accelerates
The objective, data model, security requirements and definition of done are human decisions. AI can draft, write, revise and explain. A rule from our own work: a system may propose a value, but it must not set that value silently when later calculations depend on it. In XPO Inventory, image analysis proposes the name, description, color, category and unit from an article photo, while dimensions and quantity remain manual. A named person is ultimately responsible for what goes live.
For the broader context, read our guide to developing software with AI. Using AI in your business shows where else it can help. If you want us to review an app you have started and put it on a clear path, talk directly to the developer.
How do I recognize without coding knowledge whether a software project is under control?
Look for four things that can be demonstrated: a dated list of changes and approvals, automated checks before every release, a rehearsed way to restore the previous version and a clear decision about which values a person must set. If an answer can only be described rather than demonstrated, the evidence is missing.
Does every line written by AI have to be reviewed?
No. Review depth depends on risk: the scope of a change, the sensitivity of its data, how easily it can be reversed and how often it runs. A text block on an internal page needs less attention than a permission check. Reviewing everything with the same rigor consumes the time saved; leaving everything unchecked exposes the business to the full risk.
We started an application with an AI tool and cannot get further. Is that work lost?
The work already done makes the idea concrete and gives us something to inspect. Only that inspection shows what is usable. There are then four honest options. You can continue on the current base, simplify, rebuild selected parts or stop.
Does development with AI really get faster?
It depends on the process around the tool. In the METR study, 16 experienced developers took around 19 % longer with the early-2025 tools than without them, while Google's DORA report from the same year measures higher throughput alongside weaker delivery stability. Structure, checks and tests determine how much human review the faster output still needs.