Set review policy
set-review-policy-toolChoose how much review this team's pull requests need. Once a policy is on, Coderbuds decides a tier for every pull request it sees opened or pushed to — no review, an AI review, one review, or a careful review — and says which, and why, on its pull request comment, and posts a Review policy check on the pull request.
policy is one of:
skip_trivial— docs-only and tests-only changes skip review; every other change gets one.risk_based— trivial changes skip review, small code changes need only an AI review, and changes tosensitive_pathsor over the team's size standard need a person's approval — two people's whencareful_approvalsis 2.ai_review_all— trivial changes skip review, and every other change needs only an AI review: for a team whose coding agents fix and merge their own pull requests. What review by risk would have given a person is still named on each pull request. Changes to CI, CODEOWNERS or agent instructions still need a person: they decide how the change is reviewed.off— no policy; Coderbuds says nothing about review.
Under every policy but ai_review_all, a person always reads changes to CI, CODEOWNERS, dependency manifests
and lockfiles, built bundles and agent instructions, database migrations, sign-in and
permissions code, billing code, a newcomer's first change, and an agent's change nobody
has read. The comment then names the files to read first.
holds_merges makes that check fail until the review it asks for is in, instead of
showing neutral. Where the check is required in branch protection, that blocks the merge;
elsewhere it is a failing check and nothing more. Omit it to keep the current setting.
Coderbuds then approves each change the policy lets through without a person, so a branch
rule requiring one approval follows the policy with nothing more to set up. Under
risk_based or ai_review_all it can only be turned on while Coderbuds triage runs
for the team, or once the team's own AI review has reported from one of its repositories.
While some repositories still have none, the response carries a warning.
merges_when_ready has the coding agent that opened a pull request merge it once it has
the review the policy asks for and every check on its latest commit passed: Coderbuds
approves it, or posts "Ready to merge" after a person's approval, and
get-pull-request-review-tool answers action: merge. It only
acts while holds_merges is on, and only on pull requests an agent reported writing. Off
unless someone asks for it; a team that merges by hand leaves it off. Omit it to keep the
current setting.
director_approves has Coderbuds approve a pull request on GitHub once the person who
directed the coding agent that wrote it has reviewed its latest commit — with /reviewed,
a Comment review, or record-pull-request-review-tool — so a ruleset requiring one
approval lets it merge. GitHub will not let them approve it themselves. Never for a
careful review, changes to CI, CODEOWNERS or agent instructions, or changes that cannot be
undone: those still need someone else. It only acts while holds_merges is on. Off unless
the team owner asks for it. Omit it to keep the current setting.
careful_approvals is how many people must approve a change in sensitive_paths or over
the size standard: 1 (the default) or 2. Omit it to keep the current setting. Only set 2
when a person on the team asked for two approvers.
sensitive_paths are folders (app/Billing/) or patterns where * reaches into
subfolders (database/migrations/*). Omit them to keep the team's current list; pass an
empty list to clear it.
When the policy relies on an AI review and none has reported from repository yet, the
response carries setup: the workflow file to commit and the steps around it. Follow them.
Read the current settings and what each policy does with get-review-policy-tool.
Only call this when a person on the team has asked for it, and set what they said. Only the team owner can change it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"policy": "<policy>"
},
"name": "set-review-policy-tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | Yes | The policy the team asked for, or off. | |
| repository | No | Optional "owner/name" repository slug, used only to bind the session to the owning team. | |
| holds_merges | No | Make the Review policy check fail until the review it asks for is in. Omit to keep the current setting. | |
| sensitive_paths | No | Paths that need a person under risk_based, whatever their size. Omit to keep the current list; an empty list clears it. | |
| careful_approvals | No | How many people must approve a change in sensitive_paths or over the size standard: 1 or 2. Omit to keep the current setting. | |
| director_approves | No | Have Coderbuds approve on GitHub once whoever directed the coding agent has reviewed its pull request, except where someone else must review. Needs holds_merges. Omit to keep the current setting. | |
| merges_when_ready | No | Have the coding agent that opened a pull request merge it once it has its review and every check passed. Needs holds_merges. Omit to keep the current setting. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team | Yes | Team name. | |
| setup | No | When the policy relies on an AI review and none has reported from the repository: workflow_path, workflow (the file to commit) and steps. Null otherwise. | |
| policy | No | The policy now in force, or null when it is off. | |
| message | Yes | Human-readable confirmation. | |
| warning | No | When merges are held under a policy that relies on an AI review and some active repositories have none: what that does to their pull requests. Null otherwise. | |
| holds_merges | Yes | Whether the Review policy check fails until the review is in. | |
| previous_policy | No | The policy before this call, or null when there was none. | |
| sensitive_paths | Yes | The sensitive paths now in force. | |
| careful_approvals | Yes | How many people must approve a change in sensitive_paths or over the size standard: 1 or 2. | |
| director_approves | Yes | Whether Coderbuds approves on GitHub once whoever directed the coding agent has reviewed its pull request. | |
| merges_when_ready | Yes | Whether the coding agent that opened a pull request merges it once it is ready. |