DEV Community

Ashkan Rajaee
Ashkan Rajaee

Posted on

Writing an AI Coding Assistant Policy Your Engineers Will Actually Follow

An engineer on a client project is stuck on a bug late in the day. She pastes a large chunk of the client's code, including a configuration file with real database credentials, into a free AI chat tool she uses at home. The fix works. Nobody notices anything until the client's security team asks, months later, which outside services have ever seen their source code. The team has a written policy somewhere. It is eleven pages long, nobody has read it, and it bans AI tools outright, which is exactly why nobody followed it.

Most AI rules on engineering teams fail for one of two reasons. Either there is no policy and every engineer makes up their own rules, or there is a policy so strict and long that people quietly ignore it.

Earlier in my career, as a partner, I helped grow a software consulting company from about $6M to $60M in under three years, and later I founded and ran a fully remote consultancy. In services work, the client trusts you with code and data that are not yours, and how your team uses AI tools with them is now part of that trust. Here is how I think about an AI coding assistant policy: keep it to one page, be specific about tools, data and ownership, and write it so following it is easier than ignoring it.

Why Most AI Policies Get Ignored

Policies fail in three predictable ways.

They are too long. A policy that takes twenty minutes to read gets skimmed once and forgotten. Engineers make decisions about AI tools many times a day. The rules need to fit in their heads.

They ban what people find useful. When a policy forbids every AI tool, engineers who find those tools helpful do not stop using them. They stop mentioning them. A ban turns a visible habit into a hidden one, which is the worst outcome for a client's confidentiality.

They are vague where it matters. "Use good judgment with sensitive data" sounds sensible and tells nobody anything. The engineer with a bug at the end of the day needs to know, in a few seconds, whether this file can go into this tool.

The fix is not a stricter policy. It is a clearer one.

Keep It to One Page

A policy engineers will follow covers three questions and little else:

  • Which tools are allowed, and in which settings?
  • What code and data may be shared with them?
  • Who owns the output, and who is responsible for it?

Anything that does not answer one of those questions belongs in a separate guide, if anywhere. One page is a discipline. It forces you to decide what actually matters.

Which Tools Are Allowed

Name the tools. A short approved list is far more useful than a general principle. For each one, say which account or plan is approved, since the same tool can handle data very differently depending on whether it is a personal account or a business account with data retention turned off.

A few habits help:

  • List approved tools by name and account type, not by category.
  • Say how a new tool gets added, who decides and how quickly. If the answer is "never," people will route around it.
  • Be clear that personal accounts are not approved for client work, and say why in one sentence.
  • Review the list on a regular schedule, because the tools change faster than most policies do.

What Code and Data May Be Shared

This is the heart of the policy, and the place where vague language does the most harm. I like a simple traffic-light rule that an engineer can apply in seconds:

  • Green: code the team wrote that contains no client secrets, internal names or personal data. Fine to use with approved tools.
  • Yellow: client code that is not public. Only with approved business tools, and only where the client contract allows it.
  • Red: credentials, keys, customer personal data, production data and anything the client has marked confidential. Never shared with any AI tool.

The yellow line depends on each client. Some clients are comfortable with approved tools touching their code. Others are not, and some contracts say so explicitly. That is why the policy should point to a short per-client note, kept with the project, that says which level applies. Ask the client early rather than assuming.

Who Owns the Output

The third question is responsibility. The policy should say plainly that AI output is treated like any other code: the engineer who submits it is responsible for it, it goes through normal review, and it is not exempt from licensing or security checks. Ownership of the resulting code should follow whatever the client contract already says about work product. If the contract is silent on AI, raise it with the client rather than guessing, and get the answer in writing.

Make Following It the Easy Path

A policy works when the right choice is also the convenient one. If the approved tool requires a two-week request and a personal account takes thirty seconds, the policy has already lost. Set up the approved business accounts before you publish the rules, so engineers have something better to reach for on day one.

A few small steps make the difference:

  • Put the one page where engineers already work, such as the team wiki home page or the repository readme, not in an HR folder.
  • Walk new engineers through it in their first week, using a real file from their project.
  • Make it safe to ask. An engineer who is unsure whether a file is yellow or red should get a quick answer, not a lecture.

How This Differs From Code Review Standards and AI Ethics

An AI coding assistant policy is related to a few other topics, but it is not the same as any of them. Code review standards cover how a team checks AI-assisted code once it exists. The ethics of AI in hiring is about how AI judges people. AI in sales is about how teams use it to find and talk to customers. The policy sits before all of them. It decides which tools engineers may use, with what client material, and who answers for the result.

A Hypothetical Example

Here is a made-up scenario. A team works for two clients. One is a retail company that is comfortable with approved AI tools. The other is a healthcare company whose contract forbids sharing source code with any outside service.

The team writes a one-page policy with an approved tool list, the traffic-light rule and a line on ownership. Each project folder has a two-line client note: the retail project is marked yellow-allowed, the healthcare project red for all code.

A new engineer joins and is assigned to both projects. On day one, she reads the page in five minutes and checks the two client notes. On the retail project, she uses the approved business tool for boilerplate and tests. On the healthcare project, she does not use it for code at all, and asks in the team channel when she is unsure about a log file. When the healthcare client later asks how the team handles AI tools, the answer is one page and a project note, not a scramble.

What a Policy Will Not Fix

A one-page policy does not guarantee good behavior. People make mistakes, especially under deadline pressure, and some will need reminders. The tools also change quickly, so a policy written once and never updated will drift out of date within months. And a policy cannot replace the conversation with each client about what they allow. It can only make that conversation easier to have and easier to follow.

Start With One Page

You do not need a committee. This week, write down the tools your team already uses, decide which accounts are approved, draft the traffic-light rule for code and data, and add one line on ownership. Share it with the team, ask what is unclear, and fix it. Then ask each client which level applies to their work.

A good AI coding assistant policy comes down to three things: named tools, clear rules on what code and data may be shared, and plain responsibility for the output. When those three fit on one page, engineers follow it because it answers their real question in seconds, and clients see a team that takes their confidentiality seriously.

If your team is using AI tools on client work without clear rules and you want help writing a policy that protects client confidentiality without slowing engineers down, visit https://tdzpro.com.

Ashkan Rajaee is the founder of TDZ Pro. He has spent years building and scaling software engineering teams, including a fully remote software consultancy.

Top comments (0)