The pitch was simple. Plug an AI coding assistant into the repo, let it write the boring code, and watch velocity go up. The first week felt like magic. Boilerplate appeared in seconds. Test scaffolding wrote itself. A junior dev fixed a bug in an hour that would have taken a day. By the third week, we found a hardcoded API key in a file the assistant had generated, a dependency it had invented that did not exist, and a function that silently swallowed errors in the payment flow. The magic had fine print, and we had not read it.
None of that means AI coding tools are a bad idea. They are genuinely useful, and they are not going away. It means the same lesson applies here as everywhere else in software: a powerful tool with no guardrails will find the weakest part of your process and press on it. The guardrails are not complicated. They are just the kind of thing nobody does before the first incident, because the demo looked so good.
Your codebase is not a demo project
An AI assistant trained on public code has opinions about how code should look, and those opinions come from the internet at large, not from your team. It will suggest libraries you have never heard of, patterns your team deliberately avoided, and shortcuts that work in a tutorial and fail in production. That is not a flaw in the tool. It is a mismatch between a general purpose model and a specific codebase with specific constraints.
Before you give an assistant access, write down the rules you already expect a human to follow. Which libraries are approved. How secrets are handled. What the error handling conventions are. How tests are structured. Then check whether the assistant knows those rules. Most tools let you feed in project context, style guides, and examples. That context is the difference between an assistant that writes code your team would write and one that writes code a stranger would write.
Review the output the way you would review a new hire’s first month of work. Closely, kindly, and with the understanding that confidence is not the same as correctness. AI generated code reads well. It is clean, it is commented, and it looks like it knows what it is doing. That polish is exactly why it needs a careful review. A human who is unsure writes hesitant code. A model that is unsure writes confident code. Treat the confidence as a style, not a signal.
Secrets are the first thing to lock down
The most common real world problem with AI coding tools is not bad code. It is data leaving the building. When a developer pastes a chunk of your codebase into a tool, that code goes to a third party server. If the chunk contains a database password, a customer email, or a private key, that secret has now traveled somewhere you do not control. Most vendors promise not to train on your data, and most of them mean it, but a promise is not a control.
Fix this before anyone uses the tool. Use a tool with a business tier that gives you data controls in writing, not just a marketing page. Turn on the setting that keeps your code out of training data. Give the team a clear rule: never paste secrets, customer data, or production credentials into any AI tool, ever. Then make the rule easy to follow by giving them a secrets manager and a local config setup that keeps secrets out of the code in the first place. If the secrets are not in the code, they cannot be pasted by accident.
Run a scan on the repo for secrets that are already there. You will probably find some, and that is fine. Finding them now is better than finding them in a breach report later. Rotate anything you find, move it into the secrets manager, and add a pre commit check that blocks new secrets from getting in. This is good hygiene with or without AI, but AI makes it urgent, because it turns a quiet mistake into a fast one.
The review process has to change, not just the writing process
AI changes the shape of code review. When a developer writes code by hand, the review is a check on their thinking. When a developer generates code and reviews it themselves, the review is a check on a machine’s thinking, filtered through a human who is now slightly less engaged because they did not write the code. That is a real risk. People skim generated code more than code they wrote. They assume it works because it looks right.
Adjust the process to match. For AI generated code, require the author to explain what it does in their own words in the pull request. If they cannot explain it, it should not ship. That one rule does more than any linter. It forces engagement, and it catches the cases where the code looks right but does the wrong thing, like the function that silently swallowed errors in our payment flow.
Also keep a human in the loop for anything that touches money, authentication, or customer data. Those are the areas where a subtle bug is expensive and a confident wrong answer is dangerous. Let the assistant write the CRUD screens and the test scaffolding. Keep the payment logic and the auth flow under human eyes, every time.
What we do now
We still use the assistant, and we like it. The difference is that it now works inside rules we set on purpose. It has project context. It knows which libraries are approved. It never sees secrets. Generated code gets a real review, and the author has to explain it. The velocity gain is smaller than the demo promised, but it is real, and it does not come with surprises.
If you are about to roll out an AI coding tool, do the boring work first. Write the rules down. Lock down the secrets. Set the review bar. Tell the team what the tool can and cannot see. It takes an afternoon, and it is the difference between a tool that helps your team and a tool that quietly creates work your team will be cleaning up for months.
Measuring whether it is actually helping
After a month with an AI coding assistant, the team will have opinions. Some people will love it. Some will say it slows them down. Opinions are useful, but they are not measurements, and this is a tool worth measuring, because the cost is real and the benefit should be too.
Pick a few simple numbers and track them for a month. How long does a typical task take from start to finished pull request. How many review comments does the average pull request get, and how many of them catch real bugs. How often does a deploy break something. How many lines of generated code get deleted or rewritten within a week of being written. None of these numbers is perfect on its own, but together they tell a story about whether the tool is helping or just making the team feel busy.
Also ask the team directly, and ask specific questions. What does the tool save you time on. What does it waste your time on. What do you no longer trust it to do. The answers will be more useful than any dashboard, because the people using the tool know where it helps and where it gets in the way. If the senior developers say it saves them an hour a day and the juniors say it confuses them, that tells you something about training, not about the tool.
Set a review date, ninety days after rollout, and decide then whether to keep it, change how it is used, or drop it. A tool that is not reviewed is a tool that becomes permanent by default, and permanent by default is how teams end up paying for things that stopped helping months ago. The review does not need to be formal. It needs to happen, and it needs to be honest.