docs(fermata): the promises Known limits allows, and the limits named (I-2, N-3, N-4, M-4)

A failed command's output is stated as the largest limit: only a [policy.bash] deny stops
it, and only for the spelling it names. Monitor output and changed-file attachments added.
fermata is documented as no permission approver. Recovery from onFailure block.
This commit is contained in:
2026-11-06 23:36:57 +01:00
parent 0902ca2160
commit fe041051ca
4 changed files with 36 additions and 19 deletions
+6 -5
View File
@@ -15,10 +15,10 @@ Three concentric layers; nothing inner imports from anything outer.
- **`core/`** — harness-unaware, transport-unaware, sync. Types (`Op`, `Decision`), `.botignore` walker, `Policy::check` / `check_command`, path extraction. `.botsecrets` contains a `[policy]` section for access control rules (`fermata.toml` is accepted as an alias for `.botsecrets`). Sync, no tokio. - **`core/`** — harness-unaware, transport-unaware, sync. Types (`Op`, `Decision`), `.botignore` walker, `Policy::check` / `check_command`, path extraction. `.botsecrets` contains a `[policy]` section for access control rules (`fermata.toml` is accepted as an alias for `.botsecrets`). Sync, no tokio.
- **`core/secrets/`** — the secret filtering engine: - **`core/secrets/`** — the secret filtering engine:
- `config.rs` — `.botsecrets` TOML parser (`SecretsConfig`, `PolicyConfig`) and hierarchical resolution (user, project, local override). - `config.rs` — `.botsecrets` TOML parser (`SecretsConfig`, `PolicyConfig`) and hierarchical resolution (user, project, local override).
- `manifest.rs` — discovers secret-containing files from `.botsecrets` patterns and loads their content for redaction. - `manifest.rs` — discovers secret-containing files from `.botsecrets` patterns and loads their content for redaction. One entry per spelling of a value: file text, decoded, escaped forms, each line of a multi-line value from 8 characters (`MIN_LINE_LEN`).
- `parser.rs` — multi-format secret file parser (`.env`, TOML, YAML, JSON). Extracts key-value pairs where the value is a secret. - `parser.rs` — multi-format secret file parser (`.env`, TOML, YAML, JSON). Extracts key-value pairs where the value is a secret, numbers from 6 characters, and a value's text as the file spells it as a second entry of the key.
- `patterns.rs` — built-in key name patterns (~30 universal patterns like `*_KEY`, `*_SECRET`, `*_PASSWORD`) and gitleaks-derived regex patterns for heuristic scanning. - `patterns.rs` — built-in key name patterns (~30 universal patterns like `*_KEY`, `*_SECRET`, `*_PASSWORD`) and gitleaks-derived regex patterns for heuristic scanning.
- `redactor.rs` — `Redactor` builds an Aho-Corasick automaton from known secret values and replaces them in arbitrary text. Sub-millisecond performance. - `redactor.rs` — `Redactor` builds an Aho-Corasick automaton from known secret values and replaces them in arbitrary text; overlapping matches become one mask under the longest. Sub-millisecond performance.
- `scanner.rs` — `Scanner` applies heuristic regex patterns to detect secrets not covered by the known-value manifest (entropy-based and format-based detection). - `scanner.rs` — `Scanner` applies heuristic regex patterns to detect secrets not covered by the known-value manifest (entropy-based and format-based detection).
- **`harness/`** — `HarnessAdapter` trait over a normalized `ToolCall` (PreToolUse) and `PostToolUsePayload` (PostToolUse). Each adapter (Claude, future Codex, etc.) lives in its own submodule, feature-gated. PostToolUse enables output redaction via `updatedToolOutput` before content enters the LLM context. - **`harness/`** — `HarnessAdapter` trait over a normalized `ToolCall` (PreToolUse) and `PostToolUsePayload` (PostToolUse). Each adapter (Claude, future Codex, etc.) lives in its own submodule, feature-gated. PostToolUse enables output redaction via `updatedToolOutput` before content enters the LLM context.
- **`bin/fermata.rs`** — only place where `clap`, stdio, and exit codes appear. - **`bin/fermata.rs`** — only place where `clap`, stdio, and exit codes appear.
@@ -35,8 +35,9 @@ Developed in this monorepo; planned to be exported as a standalone repo in the f
- **Hooks fail open, except under `on_parse_error = "deny"`.** With `deny` in effect, PostToolUse answers with a refusal naming the file when the config or a secret file cannot be loaded, and PreToolUse answers `deny` when the config or the rules cannot be loaded or applied. A malformed hook payload and a missing working directory stay open: no payload means nothing to render, no directory means no setting to read. `fermata check` does not refuse on a broken config. - **Hooks fail open, except under `on_parse_error = "deny"`.** With `deny` in effect, PostToolUse answers with a refusal naming the file when the config or a secret file cannot be loaded, and PreToolUse answers `deny` when the config or the rules cannot be loaded or applied. A malformed hook payload and a missing working directory stay open: no payload means nothing to render, no directory means no setting to read. `fermata check` does not refuse on a broken config.
- **A config that cannot be read: the setting is unknown.** `SecretsConfig::denies_on_failure` reads the raw bytes of every layer: an uncommented line setting `deny` counts, broken layer or not; without one the hook stays open as for any default root; a layer whose bytes cannot be read says nothing and does not count, so an unreadable global config cannot stop every project on the machine. - **A config that cannot be read: the setting is unknown.** `SecretsConfig::denies_on_failure` reads the raw bytes of every layer: an uncommented line setting `deny` counts, broken layer or not; without one the hook stays open as for any default root; a layer whose bytes cannot be read says nothing and does not count, so an unreadable global config cannot stop every project on the machine.
- **Replacing output depends on the harness.** Claude Code ignores an `updatedToolOutput` that does not match a built-in tool's output schema and then uses the original. `harness/claude.rs` therefore walks `tool_response` in any shape and masks strings in place. `SCHEMA_VALUES` lists the enum and literal values of every built-in output schema in Claude Code v2.1.314 (re-read it when a release adds tools): those exact values stay. A secret elsewhere under those names or in a built-in's object key cannot take a mask, so `OutputEdit::Unmaskable` refuses the output under every setting. Refusals: Bash and Read answer a minimal schema-valid output, other built-ins keep their shape, MCP gets the plain text. `tests/cli_hook_redaction.rs` checks shapes against a copy of those schemas; nothing here runs Claude Code. - **Replacing output depends on the harness.** Claude Code ignores an `updatedToolOutput` that does not match a built-in tool's output schema and then uses the original. `harness/claude.rs` therefore walks `tool_response` in any shape and masks strings in place. `SCHEMA_VALUES` lists the enum and literal values of the 87 `outputSchema` getters in Claude Code v2.1.314, as far as they have values to list (re-read it when a release adds tools): those exact values stay. Not resolved, because they exist only at run time: Workflow's `RUN_OP_STATUS` and `runOpOutputFields` and Artifact's `handlers` arms, all flag-gated, and Artifact's `reason`. Artifact's pattern fields and that `reason` are `ARTIFACT_PATTERN_FIELDS`: a secret there refuses. A secret elsewhere under those names or in a built-in's object key cannot take a mask, so `OutputEdit::Unmaskable` refuses the output under every setting. Refusals: Bash, Read and Artifact answer a minimal schema-valid output, other built-ins keep their shape, MCP gets the plain text. `tests/cli_hook_redaction.rs` checks shapes against a copy of those schemas, and `TOOL_ENUMS` there lists each tool's enums so that dropping a value fails a test; nothing here runs Claude Code.
- **Redaction limits.** A failed tool (`PostToolUseFailure`, including a Bash non-zero exit per the docs) cannot be rewritten by any hook and is not hooked. Values split across strings, encoded values, numbers and binary fields are not masked. Heuristics warn in `additionalContext` and do not mask. Full list: `docs/security-model.md`, "Known limits". - **The gate approves nothing.** `render_decision` answers `{}` for `Decision::Allow`, never `permissionDecision: "allow"`, which would skip Claude Code's permission prompt. `allow_prefixes` only skips fermata's own `ask` rules. `[policy.bash]` reaches Bash, PowerShell and Monitor.
- **Redaction limits.** The largest: a failed tool (`PostToolUseFailure`, including a Bash non-zero exit) cannot be rewritten by any hook and is not hooked, so `cat .env; false` reaches the model. Only a `[policy.bash] deny` pattern stops that, and only for the spelling it names. Also out of reach: Monitor's output and changed-file attachments. Values split across strings, encoded values, JSON numbers in a response and binary fields are not masked. Heuristics warn in `additionalContext` and do not mask. Full list: `docs/security-model.md`, "Known limits".
- **Errors never quote a file.** `ParseError::Format` and `SecretsConfigError::Parse` keep the format and line number and drop the parser's text, because it can quote the failing line. Patterns (`.botignore`, `[policy]`, `[files]`) can appear in messages: they are not values, and a deny reason names them too. - **Errors never quote a file.** `ParseError::Format` and `SecretsConfigError::Parse` keep the format and line number and drop the parser's text, because it can quote the failing line. Patterns (`.botignore`, `[policy]`, `[files]`) can appear in messages: they are not values, and a deny reason names them too.
- **Editor files never refuse.** A discovered vim swap file (`*.sw[a-p]`, `*.swx`), Kate's `*.kate-swp` or a `*~` that cannot be read or parsed is passed over silently under every `on_parse_error`, in the hooks and in Dirigent's channel filter (which forces `deny`). If it can be parsed its values stay known and are redacted, as before. `.bak`, `.orig` and `.env.gpg` keep today's rule, since a hand-made copy can hold live values. A `[[file]]` override is meant, whatever its name, and keeps the rule too. Files with no parser format (`secrets.toml~`, `#secrets.toml#`, `secrets.toml.bak`) were and are opaque: not read, no refusal, not redacted. - **Editor files never refuse.** A discovered vim swap file (`*.sw[a-p]`, `*.swx`), Kate's `*.kate-swp` or a `*~` that cannot be read or parsed is passed over silently under every `on_parse_error`, in the hooks and in Dirigent's channel filter (which forces `deny`). If it can be parsed its values stay known and are redacted, as before. `.bak`, `.orig` and `.env.gpg` keep today's rule, since a hand-made copy can hold live values. A `[[file]]` override is meant, whatever its name, and keeps the rule too. Files with no parser format (`secrets.toml~`, `#secrets.toml#`, `secrets.toml.bak`) were and are opaque: not read, no refusal, not redacted.
+4 -4
View File
@@ -68,13 +68,13 @@ Add both hooks in `.claude/settings.json`:
} }
``` ```
PostToolUse redacts declared secret values from the output of every tool, built-in and MCP, in the shape the tool returned it. PreToolUse blocks forbidden writes and dangerous commands. PostToolUse redacts declared secret values from the output of every tool, built-in and MCP, in the shape the tool returned it. PreToolUse blocks forbidden writes and dangerous commands. It is no permission approver: when no rule stops a call it answers nothing, and Claude Code's own prompts stay as they are.
Leave out `matcher`: both hooks must see every tool. `Grep`, `Glob`, `WebFetch`, `Agent` and MCP tools return file contents too, and a matcher that omits them leaves their output unredacted. PreToolUse answers with nothing for tools it has no rules for. Leave out `matcher`: both hooks must see every tool. `Grep`, `Glob`, `WebFetch`, `Agent` and MCP tools return file contents too, and a matcher that omits them leaves their output unredacted. PreToolUse answers with nothing for tools it has no rules for.
`"onFailure": "block"` (Claude Code v2.1.295 or later; older versions ignore it) stops a tool call when the hook cannot run, for example when `fermata` is not on `PATH`. Without it Claude Code carries out the call and every output passes unredacted. It belongs on PreToolUse because the tool has not run yet. On PostToolUse it cannot hold anything back: the tool has already run, and Claude still gets the original output. `"onFailure": "block"` (Claude Code v2.1.295 or later; older versions ignore it) stops a tool call when the hook cannot run, for example when `fermata` is not on `PATH`. Without it Claude Code carries out the call and every output passes unredacted. It belongs on PreToolUse because the tool has not run yet. On PostToolUse it cannot hold anything back: the tool has already run, and Claude still gets the original output. With it, a teammate without `fermata` on `PATH` is blocked at every tool by a committed `.claude/settings.json`, so per-user installs belong in `.claude/settings.local.json`. To recover, edit the settings by hand or set `"continue"`.
Redaction has limits. The largest: Claude Code sends the output of a failed tool, such as a Bash command with a non-zero exit code, down a path no hook can rewrite. See [docs/security-model.md#known-limits](docs/security-model.md#known-limits). Redaction has limits. The largest: Claude Code sends the output of a failed tool, such as a Bash command with a non-zero exit code, down a path no hook can rewrite. `cat .env; false` reaches the model unredacted. Only a `[policy.bash] deny` pattern stops it, and only for the spelling it names. See [docs/security-model.md#known-limits](docs/security-model.md#known-limits).
## How It Works ## How It Works
@@ -86,7 +86,7 @@ Agent wants to run a tool
PreToolUse ── .botsecrets [policy] / .botignore PreToolUse ── .botsecrets [policy] / .botignore
| write blocked? → deny | write blocked? → deny
| bash denied? → deny | bash denied? → deny
| otherwise → allow (including reads of .env!) | otherwise → no answer: Claude Code's permissions decide (reads of .env included)
| |
Tool executes Tool executes
| |
+2 -2
View File
@@ -232,12 +232,12 @@ patterns = [".claude/**", "vendor/**", "*.lock", "dist/**"]
#### `[policy.bash]` -- Command Execution Rules #### `[policy.bash]` -- Command Execution Rules
Controls which shell commands the agent can run. Controls which shell commands the agent can run, for Bash, PowerShell and Monitor.
| Field | Type | Description | | Field | Type | Description |
|-------|------|-------------| |-------|------|-------------|
| `deny` | `string[]` | Patterns that block commands outright. | | `deny` | `string[]` | Patterns that block commands outright. |
| `allow_prefixes` | `string[]` | Command prefixes always allowed. | | `allow_prefixes` | `string[]` | Command prefixes that skip the `ask` rules below. `deny` still applies. It approves nothing: fermata never answers `allow`, so Claude Code's own permission prompt stays. To approve a command, use its `permissions.allow`. |
| `ask` | `string[]` | Patterns requiring user confirmation. | | `ask` | `string[]` | Patterns requiring user confirmation. |
```toml ```toml
+24 -8
View File
@@ -58,7 +58,9 @@ fermata does not own this layer. It is provided by your container runtime, VM, o
## Design Principles ## Design Principles
**Fail-open for availability.** A parse error in `.botsecrets`, an unrecognized file format, or a scanner timeout does not block the agent from working. Redaction failures are logged, not fatal. The agent's productivity is not sacrificed for edge-case security failures. The exception is `on_parse_error = "deny"`: there the hooks refuse instead. **Fail-open for availability.** A parse error in `.botsecrets`, an unrecognized file format, or a scanner timeout does not block the agent from working. Redaction failures are logged, not fatal. The agent's productivity is not sacrificed for edge-case security failures. Two exceptions: under `on_parse_error = "deny"` the hooks refuse instead, and under `"onFailure": "block"` on PreToolUse a `fermata` that cannot run stops every tool.
**Not a permission approver.** PreToolUse can stop a call or ask, and otherwise says nothing. It never answers `allow`, because Claude Code would then skip its own permission prompt, and installing a guard must not remove one. `allow_prefixes` only skips fermata's own `ask` rules.
**No missed occurrence of a declared secret within a string.** If a value appears in the secret manifest (loaded from files matched by `.botsecrets`), it is redacted from every string of a successful tool's output, every time, or the output is refused. The Aho-Corasick automaton finds all occurrences in a single pass at memory-bandwidth speed. The [known limits](#known-limits) say what never reaches it. **No missed occurrence of a declared secret within a string.** If a value appears in the secret manifest (loaded from files matched by `.botsecrets`), it is redacted from every string of a successful tool's output, every time, or the output is refused. The Aho-Corasick automaton finds all occurrences in a single pass at memory-bandwidth speed. The [known limits](#known-limits) say what never reaches it.
@@ -76,24 +78,38 @@ The PostToolUse hook redacts what Claude Code hands it and accepts back. These a
**Not covered:** **Not covered:**
- **A tool that fails.** Claude Code sends a failed tool's text through `PostToolUseFailure`, whose hooks can only add a note. By its documentation that includes a Bash command with a non-zero exit code, whose error text holds the command's output, and an MCP error result. `cat .env; false` reaches the model unredacted. Fermata does not hook this event. Block reads of secret files with `[policy.read]` or `.botignore` where this matters. - **A tool that fails. This is the largest limit.** Claude Code sends a failed tool's text through `PostToolUseFailure`, whose hooks can only add a note. That includes a Bash command with a non-zero exit code, whose error text holds the command's output, and an MCP error result. `cat .env; false` reaches the model unredacted, and so does a failing `npm test` that prints its environment, `curl -v -f` with a token header on a 500, or any failing `set -x` script. Fermata does not hook this event and cannot rewrite it. Only a `[policy.bash] deny` pattern stops such a command, and only for the spelling it names: a deny on `cat .env` stops `cat .env; false` but not `cat ./.env; false`, `env; false` or `grep -r TOKEN .; false`. `[policy.read]` and `.botignore` guard the Read tool, not what a command prints.
- **Monitor's output.** Each line of a Monitor's command goes to the model as an event, and PostToolUse only sees `{taskId, timeoutMs}`. `tail -f server.log` passes logged tokens straight through. `[policy.bash]` applies to Monitor's and PowerShell's commands, with the same spelling limit.
- **A changed file's attachment.** After a Read, a file that changes on disk comes back to the model as an attachment with a snippet, which no tool call and no hook handles. Read `.env`, rotate the token, and the next turn carries the new value. `@`-mentions likely take the same route; that has not been traced.
- **A value split across strings.** Each string is scanned on its own. A value divided between `stdout` and `stderr`, between two MCP content blocks, or across the lines of a diff (a multi-line value in `structuredPatch`) does not match. - **A value split across strings.** Each string is scanned on its own. A value divided between `stdout` and `stderr`, between two MCP content blocks, or across the lines of a diff (a multi-line value in `structuredPatch`) does not match.
- **An encoded or altered value.** Base64, URL encoding, a reversed string or a value cut short does not match. See the [threat model](threat-model.md). - **An encoded or altered value.** Base64, URL encoding, a reversed string or a value cut short does not match. Spellings the value has in its own file are known: see [Spellings](#spellings). See the [threat model](threat-model.md).
- **Numbers and booleans.** Only strings are masked. A numeric secret in a JSON number passes. - **Numbers and booleans in the output.** Only strings are masked. A secret number that a tool returns as a JSON number passes, as text it is masked. Booleans in a secret file are not secrets. A number in a secret file under 6 characters is not one either: see [Spellings](#spellings).
- **Binary data.** `base64` in a built-in's output, `data` beside `type: image`, `audio` or `base64`, and Bash's image `stdout` stay as they are. A mask there would break the image and the next API request, and a short value can match inside base64 by chance. - **Binary data.** `base64` in a built-in's output, `data` of 64 or more base64 characters beside `type: image`, `audio` or `base64` in a content block at the top of a result, and Bash's image `stdout` stay as they are. A mask there would break the image and the next API request, and a short value can match inside base64 by chance.
- **Undeclared secrets.** The heuristic scanner warns beside the output, and leaves the match in place. - **Undeclared secrets.** The heuristic scanner warns beside the output, and leaves the match in place.
- **A run outside a project.** With no `.botsecrets` or `.botignore` above the working directory, there is nothing to load and the output passes. - **A run outside a project.** With no `.botsecrets` or `.botignore` above the working directory, there is nothing to load and the output passes.
### Spellings
A value has one manifest entry per spelling, so that a file read and a program's output both match:
- the decoded text, and the text as the file holds it (`\n` in a JSON string, a YAML block with its indentation, a TOML `\t`, a continued `.properties` line);
- its JSON-escaped form and its `\n`-escaped form, with and without the trailing line end;
- each line of a multi-line value of 8 characters or more, for a Read with a line range, a grep or a diff. PEM and base64 lines have 64 or 76 characters; below 8 sit words of ordinary text (`end`, `prod`), and a line matches everywhere. PEM armor (`-----BEGIN ...`) and lines with no letter or digit are left out, since scripts and docs hold them too. So the last line of a key shorter than 8 characters passes when read away from the rest of it;
- the text of a number in a JSON, TOML or YAML secret file, from 6 characters. Shorter numbers under a matching key are mostly settings (`CACHE_KEY_TTL = 3600`), and masking `3600` everywhere does more harm than a secret that short can suffer. A quoted value or a `.env` value keeps the general minimum of 4.
Overlapping matches become one mask, named after the longest. A multi-line value in a `.env` needs its closing quote at the end of a line. An opening quote without one is read as the plain value of that line.
**Places a mask cannot go.** Claude Code validates a replacement for a built-in tool and, if it fails, uses the original output. So: **Places a mask cannot go.** Claude Code validates a replacement for a built-in tool and, if it fails, uses the original output. So:
- A listed enum or literal value (`type: "text"`, `status: "completed"`, Bash's `gitOperation.commit.kind`) stays even if a secret equals it. It is one of the schema's fixed words and says nothing about the secret. `harness/claude.rs` holds the list. - A listed enum or literal value (`type: "text"`, `status: "completed"`, Bash's `gitOperation.commit.kind`) stays even if a secret equals it. It is one of the schema's fixed words and says nothing about the secret. `harness/claude.rs` holds the list.
- A secret anywhere else in such a field, or in an object key of a built-in, replaces the whole output with a refusal, under every setting. A short or common secret such as `file` can therefore refuse every output whose fields contain that word. The refusal names the secret's key, so change the value or leave its file out of `[files]`. The exception is AskUserQuestion's answers, keyed by question text: those keys are masked. - A secret anywhere else in such a field, or in an object key of a built-in, replaces the whole output with a refusal, under every setting. A short or common secret such as `file` can therefore refuse every output whose fields contain that word. The refusal names the secret's key, so change the value or leave its file out of `[files]`. The exception is AskUserQuestion's answers, keyed by question text: those keys are masked.
- An MCP tool's output has no schema. Its object keys are masked, and only a content block's `type` is kept. - An MCP tool's output has no schema. Its object keys are masked, and only a content block's `type` is kept.
- A later Claude Code can add an enum this list does not know. A secret inside such a value would make Claude Code reject the mask and use the original, which it reports as a hook error. - Fields of the Artifact tool's schema with a pattern (hashes, ids, versions, addresses) or an enum built at run time (`reason`) cannot be listed. A secret in one refuses the output.
- Two things stay unknown, and a secret inside either would make Claude Code reject the mask and use the original, which it reports as a hook error: a later Claude Code's new enum, and flag-gated fields whose values only exist at run time (`RUN_OP_STATUS` and `runOpOutputFields` of Workflow, the `handlers` arms of Artifact).
**Refusals under `on_parse_error = "deny"`.** The secrets are unknown then, so nothing can be masked. Bash and Read answer with a minimal output holding the refusal. Other built-ins keep their shape: strings replaced, lists cut to one item, listed enum values, numbers and booleans kept, answer records emptied. Their keys and numbers pass through, since none of those schemas has other free-text keys. An MCP result becomes the refusal text. **Refusals under `on_parse_error = "deny"`.** The secrets are unknown then, so nothing can be masked. Bash, Read and Artifact answer with a minimal output holding the refusal. Other built-ins keep their shape: strings replaced, lists cut to one item, listed enum values, numbers and booleans kept, answer records emptied. Their keys and numbers pass through, since none of those schemas has other free-text keys. An MCP result becomes the refusal text.
**When the hook does not run.** `"onFailure": "block"` on PreToolUse (Claude Code v2.1.295 or later) stops the tool if `fermata` cannot start, fails or times out. Without it the call goes ahead. On PostToolUse a hook failure cannot hold anything back, because the tool already ran: a `fermata` that crashes only there lets that output through. So does a matcher that leaves a tool out. **When the hook does not run.** `"onFailure": "block"` on PreToolUse (Claude Code v2.1.295 or later) stops the tool if `fermata` cannot start, fails or times out. Without it the call goes ahead. With it every tool stops, so the agent cannot repair this itself. A teammate without `fermata` on `PATH` is blocked by a committed `.claude/settings.json`, so per-user installs belong in `.claude/settings.local.json`. To recover, edit the settings by hand or set `"continue"`. On PostToolUse a hook failure cannot hold anything back, because the tool already ran: a `fermata` that crashes only there lets that output through. So does a matcher that leaves a tool out.
**Consequences of a mask.** The agent sees `*****`, not the value. If it writes what it read back to a file, it writes the mask over the real value, and an Edit whose `old_string` holds the mask fails. Guard secret files with `[policy.write]`. **Consequences of a mask.** The agent sees `*****`, not the value. If it writes what it read back to a file, it writes the mask over the real value, and an Edit whose `old_string` holds the mask fails. Guard secret files with `[policy.write]`.