Sub topic 12
Writing, rolling out, and revising the policy
This chapter assumes you know the basic Git and pull request workflow, have taken part in code review, and have seen a CI pipeline. It also assumes you have read the earlier chapters on risks, acceptable use, data sharing, accountability, review, disclosure, and guardrails. Here you combine those pieces into one policy and plan how to introduce it.
Write a policy people will read
A policy that nobody reads does not change behavior. Keep it short, specific, and checkable.
- Put it in the repository, for example in
docs/policies/ai-assisted-code.md, so it is versioned and reviewed like code. - Open with a one-paragraph purpose, then use the same sections as the earlier chapters: acceptable use, data rules, tool approval, accountability, review, disclosure, and agent permissions.
- Write rules as testable statements. "Do not paste customer data into unapproved tools" can be checked. "Be careful with data" cannot.
- Name an owner and a review date, so the document does not go stale.
- Link each rule to the control that enforces it, such as a CODEOWNERS entry, the pull request template, or a required CI check.
Protect the policy file itself. A CODEOWNERS entry for /docs/policies/ means that changes to the rules need review from engineering leads.
Roll it out in stages
Switching on every rule for every team on one day tends to cause workarounds. A staged rollout lets you find problems while they are cheap to fix.
- Draft with the people affected. Ask a few developers, a security representative, and a reviewer to comment before you publish.
- Pilot with one team. Run the policy for a few weeks, with the template and checks in place.
- Adjust. Fix unclear wording and checks that produce false alarms.
- Announce to everyone. Explain the reasons for the rules, and say where to ask questions.
- Move from advisory to required. Start new checks as non-blocking. Once they are reliable, mark them as required status checks in branch protection.
Revise on a schedule
AI tools change quickly, so a policy written once will drift out of date. Use two triggers for revision:
- Scheduled: a review every quarter, or at least every six months. The owner checks the approved tool list, the permission limits for agents, and any legal guidance.
- Event-driven: a review after an incident, after a near miss that reviewers caught, or when a new tool or major feature is proposed.
Treat changes as pull requests against the policy file. The commit history then records what changed and why. Announce meaningful changes in the team channel rather than relying on people to notice a diff.
Common mistakes
| Mistake | Effect | Fix |
|---|---|---|
| Rules with no enforcement | People ignore them | Link each rule to a control or a review step |
| Blocking checks on day one | Developers bypass or disable them | Run checks as advisory first, then require them |
| No owner | The policy goes stale | Name an owner and a review date |
| Banning everything | Usage moves to unapproved tools | Offer approved tools and clear restricted uses |
| Policy changes without notice | Teams follow old rules | Announce changes and keep a changelog |
Exercise
Your team has written a policy and wants to add a new CI check that flags pull requests missing the AI-assistance section of the template. What is a sensible way to introduce it, and what should trigger a later revision of the policy?
Show answer
Pilot the check with one team and run it as non-blocking at first, so false alarms can be fixed. Once it is reliable, mark it as a required status check in branch protection. The policy should be revised on a fixed schedule, such as quarterly, and also after an incident, a near miss, or a proposal to adopt a new tool or agent feature.
Exercise
Why should the policy file live in the repository and be covered by CODEOWNERS?
Show answer
Keeping it in the repository versions every change and lets it go through pull request review. A CODEOWNERS entry for the policy path means that changes to the rules need approval from named owners, such as engineering leads, so the rules cannot be quietly weakened.