Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Claude Approvals policy file reference changedapprovals-policy

Nearest release: v2.1.332, published 4 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 25 Nov 2026 02:08 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 25 Nov 2026 02:37 UTC.

Upstream edited
Recorded here
Lines+15added
Lines−10removed
From line 72 where the diff opens
First seen 23 Nov 2026 this site's first read of the page
Recorded edits5to this page, all time

## Rules for the whole file

The whole hunk

from line 72, old and new numbered
/
lines
from line 72
7272* **Each policy file has its own `mode`**: while the root policy file observes, none of its rules count under a directory's enforcing policy file, the `nested: inherit` rules included
7373* **Some custom classifiers go only under `advisory`**: that's a classifier whose [`tools`](https://code.claude.com/docs/en/approvals-classifiers#tools) list `reviewers` or `labels`, or that has an [input](https://code.claude.com/docs/en/approvals-classifiers.md#inputs) with no `merge`. List it in an enforced rule with no `if`. If a rule reads its result, the check on pull requests under a directory's policy file can read **Cannot evaluate: classifier outside advisory**
7474 
75## Top-level keys
75## Rules for the whole file
7676 
77Approvals refuses a file that has an unknown key. Write keys, and fixed words such as `observe` and `approves`, in lower case. Put double quotes around every purpose, pattern, condition, and `"!"` item.
77Follow these rules in every part of the file:
7878 
79Keep the file to one YAML document, quote each `!` item, and indent with spaces, or Approvals refuses the file. Anchors, aliases, and `!!` tags draw a warning.
79* **Keys and fixed values**: write keys, and fixed values such as `observe` and `approves`, in lower case. Approvals refuses a file that has an unknown key
80* **Purposes, patterns, and conditions**: put double quotes around every purpose, `paths` pattern, and condition
81* **`!` items**: put double quotes around each `"!"` item outside a condition. Inside a condition, a `!` item takes single quotes. Approvals refuses a file that has an unquoted `!` item
82* **YAML**: keep the file to one YAML document, or Approvals refuses the file. Indent with spaces. Anchors, aliases, and `!!` tags draw at least a warning
8083 
84## Top-level keys
85 
8186Write these keys at the top level of the file:
8287 
8388| Key | Required | Values | Default | Description |
from line 124
119124| `*` | Any characters within one folder |
120125| `**` | Any number of folders, dot folders too. It has to be a whole segment, as in `**/*.go` |
121126| `{a,b}`, `[ab]`, `?` | Alternatives, one character of a set, and any one character |
122| `infra/**` | Every file in the folder. A bare `infra` matches no file in it |
127| `infra/**` | Every file in the folder. A bare `infra` matches no file in it, and `infra/` is refused |
123128| `*.md` | Markdown files beside the policy file's `.claude` folder. For any depth, write `**/*.md` |
124129| `"!docs/**"` | Takes the files out of this rule only. A rule needs at least one pattern with no `!` |
125130 
from line 134
129134 
130135* **Operators**: `=`, `!=`, `<`, `<=`, `>`, `>=`
131136* **Joining**: `AND` and `OR` in capitals. Use parentheses to mix the two.
132* **Lists**: write `ANY` or `ALL` before `pr/authors` and `pr/approved_by`. Where the condition leads to a lighter verdict, use `ALL`: with `ANY`, one listed author relaxes the rule for everyone else's commits. Where it leads to a stricter one, use `ANY`: with `ALL`, one unlisted author switches it off.
133* **Quotes**: single quotes around a login or a branch pattern, and none around a team, a `bot:` name, or a fact, as in `"ALL pr/authors = ['ana-acme', acme/payments]"`
137* **Lists**: write `ANY` or `ALL` before `pr/authors` and `pr/approved_by`. Where the condition leads to a lighter verdict, use `ALL`: with `ANY`, one listed author relaxes the rule for everyone else's commits. Where it leads to a stricter one, use `ANY`: with `ALL`, one unlisted author switches it off. To test for an empty list, write neither, as in `"pr/approved_by = empty"`.
138* **Quotes**: single quotes around a login, a branch pattern, or a whole `!` item in a [list of people](#people-lists), as in `"ANY pr/authors = [humans, '!acme/interns']"`. No quotes around a team, a `bot:` name, or a fact without a `!`, as in `"ALL pr/authors = ['ana-acme', acme/payments]"`
134139* **Classifiers**: `claude/code_review = pass`, `repo/change_risk <= medium`, and the other forms under [Read a classifier's answer from a rule](https://code.claude.com/docs/en/approvals-classifiers.md#read-a-classifier’s-answer-from-a-rule)
135140 
136141A fact comes from the pull request itself:
from line 147
142147| `rule/files_changed`, `rule/files_added`, `rule/files_removed` | `"rule/files_changed = pr/files_changed"` | Counts among the files that this rule's `paths` match |
143148| `pr/authors` | `"ALL pr/authors = bot:dependabot"` | Accounts that wrote or pushed a commit, and the account that opened the pull request |
144149| `pr/opened_by` | `"pr/opened_by = acme/release"` | The account that opened the pull request. After someone else pushes to a bot's pull request, an override on `pr/opened_by = bot:dependabot` stops lowering what the rule asks for |
145| `pr/approved_by` | `"ANY pr/approved_by = acme/security"` | People with write access who approved the current diff. Authors and bots aren't among them. Also takes `= empty` and `!= empty` |
150| `pr/approved_by` | `"ANY pr/approved_by = acme/security"` | People with write access who approved the current diff. Authors and bots aren't among them. Also takes `= empty` and `!= empty`, with no `ANY` or `ALL` |
146151| `pr/base` | `"pr/base = 'release/**'"` | The branch that the pull request targets |
147152 
148153### `verdict`
from line 176
171176| `acme/payments` | A team of the repository's GitHub organization |
172177| `bot:dependabot` | One bot, with no `[bot]` suffix. `bot:claude` means Claude's apps |
173178| `pr/authors`, `pr/opened_by` | The accounts that the fact holds |
174| `"!pr/authors"` | Takes accounts away. Quote it, and put it beside an item with no `!` |
179| `"!pr/authors"` | Takes accounts away. Quote it, with single quotes in a condition, and put it beside an item with no `!` |
175180 
176181If a set's `from` admits Claude, for example through `bots`, `everyone`, or `bot:claude`, and every rule that applies says `approves`, Approvals counts a seat in that set as filled before Claude approves. The **Claude Approvals** check can then pass with no person's approval.
177182 
from line 358
353358* **Git files**: `.gitmodules`, `.gitattributes`, symlinks, and submodule pointers
354359* **Code owners**: any file named `CODEOWNERS`
355360 
356Don't rely on other files being protected. Write a rule for the ones that matter to you, such as `.github/`, `CLAUDE.md`, `AGENTS.md`, `.mcp.json`, and the rest of `.claude/`.
361Don't rely on other files being protected. Write a rule for the ones that matter to you, such as the `.github` folder, `CLAUDE.md`, `AGENTS.md`, `.mcp.json`, and the rest of the `.claude` folder.
357362 
358363### Who has to approve a change to a protected file
359364 
Feedback