Agentic codeowners
Friday, February 13, 2026 AI
Scraped Article
When a PR is opened, it needs to be reviewed by the right person. Most teams solve this with CODEOWNERS, which matches file paths to reviewers. But path based matching doesn't account for risk. A safe refactor touching 50 files gets the same review requirements as a three line change to a critical path.
This caused two problems:
Low risk PRs sat in queues, blocking engineers who needed to ship
High risk PRs didn't get enough review, because reviewers had too many PRs to look at
What we built
We built an internal system that reads each PR and estimates risk.
Very low and low risk PRs get auto approved.
Higher risk PRs get routed to the right reviewer.
We can also use Git history to assign PRs to the most relevant reviewer where the person who has recently worked on the area being changed. This increases the chance of catching issues!
It's built on Cloud Agents, which can be triggered by events like a new PR and act autonomously. Here's an excerpt from the prompt:
The full version includes detailed examples for each risk level.
Here's what an approved PR looks like:
Break glass merges
Sometimes you need to merge outside the default workflow, e.g if the PR is urgent, or the agent's routing is wrong.
We treat these as explicit exceptions and require a short reason, so we can audit what happened and calibrate the system. Internally, we use a Slack command like this:
We're working on making it easy for any team to build workflows like this!