AI-assisted changes
A form rule that asks more of AI-assisted pull requests and releases: extra approvals, an approval from an approver group, or a label.
Availability
The AI-assisted changes rule applies only to changes Prodgator classified as AI-assisted. Other changes pass it. Use it to ask for a second reviewer on code an AI tool helped write, to require someone from a group you trust with AI changes, or to require a label that says a person checked the change.
How Prodgator classifies a change
A pull request is AI-assisted when any of these is true:
- a commit message ends with a trailer that names an AI tool, such as or , or an AI agent authored a commit,
- the pull request description ends with such a line, such as "Generated with Claude Code",
- an AI agent account opened it, such as , or an account your organization added,
- it carries one of your organization's AI labels ( and by default). Bitbucket Cloud pull requests have no labels,
- its branch name is an AI agent's, such as , when your organization turned that on.
Admins choose the labels, add agent accounts, turn trailer detection off and turn branch names on in Admin Console > AI.
A release is AI-assisted when it ships an AI-assisted pull request or a commit with an AI trailer, counted from the last successful deployment to the same environment. For the first deployment to an environment, only its own commit is read. When Prodgator cannot read the repository's history, it reads the release's commit and the labels of the pull request that produced it (GitHub only).
Settings
| Setting | Meaning |
|---|---|
| Extra approvals | From 0 to 20. An AI-assisted change needs this many approvals more than the highest number any Prodgator approvers or GitHub reviews rule in the same policy asks for. |
| Approval from an approver group | An AI-assisted change also needs an approval from a member of one of the checked approver groups. |
| Required labels | An AI-assisted change must carry one of these labels, or the rule fails. Matched without regard to case. |
| While the classification is not known | Wait for it (the default) or Pass. |
A rule needs extra approvals, a group or a label.
For example, a pull request policy with a Prodgator approvers rule that needs 1 approval and an AI-assisted changes rule with 1 extra approval needs 2 approvals for an AI-assisted pull request and 1 for any other.
How the rule decides
- While the classification is not known, the rule is pending, or passes with Pass.
- A change that is not AI-assisted passes.
- An AI-assisted change without one of the required labels fails.
- An AI-assisted change waits until it has enough approvals and, when groups are set, an approval from a group member.
- Otherwise it passes.
The reason names the tools found and what is missing, for example "AI-assisted change (claude): waiting for 1 of 2 approvals".
Which approvals count
- An approval given in Prodgator on the current commit (any approval on a release) by someone other than the person who opened the pull request or started the release. It counts when the approver's role can approve, or when the policy names them in a Prodgator approvers rule or in this rule's groups.
- On a pull request, when the policy has a GitHub reviews rule: an approving review of the latest commit, from a reviewer that rule accepts, by someone other than the author. On GitLab, Bitbucket and Azure Repos, the provider's approvals count the same way.
Each person counts once, even when they approve in Prodgator and on the provider with a linked account. Rejections and comments do not count.
This rule always asks for fresh approvals: it does not count stale reviews or Prodgator approvals of an earlier commit, even when the policy's GitHub reviews rule counts stale approvals or its Prodgator approvers rule keeps approvals after a new commit.
When the classification is not known
Prodgator reads a pull request's commits a few seconds after it is opened or pushed to, then evaluates the pull request again. Until then the classification is not known, unless a label or the author already shows the change is AI-assisted. Wait for it keeps the check pending for those seconds; Pass lets the pull request through if it merges first.
Open pull requests that were never classified (for example, opened before your plan included AI impact) stay unknown until their next push, so a rule that waits holds them until then. With many such pull requests, start with Pass.
What the rule reads
The rule reads from the input document (, , and ), plus , on a pull request, and . See the release input document and the pull request input document. Rego policies can read too.
The rule's evidence lists whether the change is AI-assisted and known, the tools and signals, the approvals required and who counted.