AI can write code in seconds. That is no longer the hard part. The hard part is making sure the code is correct, secure and maintainable, and that your organisation still understands its own systems a year from now. AI can make a small team deliver like a large one. It can also fill your codebase with code nobody has really checked. The difference is not the tool. It is how you lead it.
This guide is for leaders who are responsible for software, whether you run a development team, own a product or sit in the management group. It is based on how we build our own platform, ACS.Entrepreneur, with AI as part of the team every day.
Why this is a leadership question
Buying AI tools is easy. The risk is in how they are used, and three things change when AI joins your team:
- Speed. Far more code is produced, far faster.
- Review load. Everything that is produced still has to be checked, and checking does not speed up by itself.
- Accountability. When AI-written code fails in production, the responsibility is still yours.
Doing nothing is not a safe option either. If there is no plan, developers start using AI tools on their own, with no shared rules for quality or for what data may be shared. The question is not whether AI will be used in your development, but whether it will be used well.
Principle 1: AI assists, humans decide
Decide explicitly which decisions always stay with a person. In most organisations that list should include what gets built, how the architecture looks, changes that touch security, what goes to production and changes to infrastructure.
AI can draft, propose, test and review. But a named person approves. The simplest way to make this real is to make the last step technical, not just a policy: in our own work, nothing reaches the release branch without a pull request that a human has reviewed, and AI agents simply cannot push there.
Principle 2: Give AI clear roles and written rules
One general-purpose assistant that plans, writes, tests and approves its own work is the AI version of a developer who reviews their own code. You would not accept that from a person, so don’t accept it from a machine. Split the work into roles with one job each, such as planning, building, testing and reviewing, so that the one who wrote the change is never the only one who checked it.
Then write down the rules. AI follows instructions remarkably well, but it can only follow the ones it is given. If your standards for architecture, security, privacy and testing only live in experienced people’s heads, the AI cannot follow them, and neither can your next new hire. Keep the rulebook short, specific and alive: when something goes wrong, the rulebook changes.
Principle 3: Rules in code, not just on paper
Rules that only live in a document get forgotten, by people and by AI alike. We learned this first-hand. We had a written rule that every AI work session must end with a report of what was done and what was not. When we measured it, only 7 of 30 agents followed it. We didn’t send a reminder. We built a check that stops a session from finishing without the report.
The lesson applies far beyond AI. For every rule that really matters, ask: what stops us if we break it? If the answer is “someone remembers”, it is not a rule yet. Typical rules worth enforcing automatically are that all tests pass before a change is merged, that no passwords or keys end up in the code, and that every change is linked to a described task.
Principle 4: Tests that prove something
AI produces code that looks right. Looking right is not the same as being right. Tests are how you tell the difference, but only if the tests themselves are trustworthy.
- Tests first. Describe the intended behaviour as a test before the code is written. AI is very good at writing code that passes a test, so make sure the test describes what you actually want.
- Test the tests. AI can write tests that always pass, whatever the code does. Break the code on purpose and check that the test fails. A test that cannot fail protects nothing.
- Set a floor. Agree on a minimum test coverage for new and changed code, and let an automated check enforce it.
Principle 5: A paper trail for every change
When AI produces a large share of your code, you need to be able to answer a simple question about any line: why is this here? A paper trail makes that possible:
- Every change starts from a described task with a clear “done when” list.
- One change solves one task. Nothing gets bundled in on the side.
- Before handover, the change is checked against the “done when” list, line by line.
- Every AI work session ends with a short report: what was done, what was not, and what is uncertain.
This is not bureaucracy for its own sake. It is what makes errors quick to trace, new people quick to onboard, and your development easy to explain to a customer or an auditor. If you work towards the principles of ISO/IEC 27001, this is change management in practice.
Principle 6: Least access, and care with your data
Treat an AI agent like a new contractor on their first day: give it the access it needs for the task, and nothing more. No production credentials, no ability to release its own work, and never secrets in prompts or code.
Know where your code and data go when you use AI tools. Choose business versions with clear terms for how your data is processed and stored. Don’t put customer data or other personal data into prompts unless you have checked that it is allowed: under GDPR, sending personal data to an AI service can count as processing like any other.
The same thinking applies when you build AI into your own products. An AI assistant acting for a user should never be able to do more than that user is allowed to. Read more about how we approach this in security and privacy by design.
What to measure, and what not to
Measure outcomes, not activity. Useful measures include:
- How long it takes from a decided change to having it in production.
- How often changes fail or have to be redone.
- Errors found after release, compared with before you introduced AI.
- Time spent on review, and whether it is growing faster than the output.
- Security findings, and how quickly they are closed.
The first two are among the delivery measures made widely known by the DORA research programme, and they work just as well with AI in the team. Be careful with lines of code, number of AI suggestions accepted and “percentage of code written by AI”. They reward volume, not value, and they look best exactly when things are going wrong.
Common mistakes
- Buying licences and calling it a strategy. Tools without principles, rules and checks just produce more unchecked code.
- Treating AI output as reviewed. Code that compiles and looks tidy has not been reviewed.
- Banning AI completely. People use it anyway, just without rules and out of sight.
- Letting AI approve its own work. Separation of duties matters just as much for machines as for people.
- Measuring speed only. Faster delivery of the wrong thing, or of fragile code, is not progress.
- Forgetting the people. Developers spend less time typing code and more time describing, reviewing and designing. Those skills need investment.
Getting started: a 90-day path
Days 1–30: Decide and describe
Agree on the principles and on which decisions always stay with people. Set the rules for data, choose tools with proper business terms, and pick one team and one area to start with.
Days 31–60: Build the guardrails
Write the rulebook, set up the automated checks, limit access, and decide how the paper trail works. Start measuring before you scale, so you have something to compare with.
Days 61–90: Run, measure and adjust
Follow the measures, look closely at what slipped through, and turn every lesson into a rule or a check. Expand to more teams only when the first one works.
Ten questions every leader should be able to answer
- Which decisions in our development are always made by a person?
- Where are our development standards written down, and does the AI follow them?
- What automatically stops a change that breaks our most important rules?
- Can AI-written code reach production without a human review?
- How do we know our tests would catch a real error?
- Can we trace any change back to the decision behind it?
- What access do our AI tools have, and is it the minimum they need?
- Where do our code and data go when we use AI tools, and on what terms?
- What do we measure to know whether AI is actually helping?
- How are we building our people’s skills for this way of working?
If several of these are hard to answer today, you are not alone. Most organisations are early in this, and the good news is that every one of them can be answered within a few months.
How we can help
We build our own platform this way every day, with more than 10,000 commits behind us. We help organisations introduce AI in their development with the guardrails in place: from principles and rulebooks to automated checks and the skills of the team. We build and teach at the same time, so the knowledge stays with you. Read more about how we build with AI and how we work with customers.
