> ## Documentation Index
> Fetch the complete documentation index at: https://cofounder.appeeky.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Policy Rules

> Plain rules that control what the agent may DO — block an action, force it through approval, or just log it.

# Policy Rules

[Autopilot levels](/concepts/modes) decide *how much* the agent may execute on
its own. Policy rules are the complementary control on *what* it may do — a
guardrail you write, evaluated in the actor gate before any action executes.

## Effects

Each rule has one effect (strongest wins when several match):

* **Block** — the action is never executed. It's marked `rejected` with the
  policy reason and shows up in the [Actions](/api/actions) queue.
* **Require approval** — the action is never auto-approved, even at a high
  autopilot level. It lands in the review queue for you to approve manually.
* **Log** — allowed through, just recorded.

## Matching

A rule matches an action when **both** conditions hold:

* **Action types** — one of the selected types (e.g. `asc_review_reply`,
  `revenuecat_experiment`). Empty = any type.
* **Keywords** — at least one keyword appears in the action's title/rationale
  (case-insensitive). Empty = any.

Matching is deterministic — no LLM, so it's predictable and cheap.

## Setup

**Settings → Policy rules.** Add a rule, pick an effect, scope it to action
types and/or keywords. Examples:

* *"Never auto-reply to reviews"* → **Block**, type `asc_review_reply`
* *"Pricing changes need my sign-off"* → **Require approval**, keywords `price, paywall, trial`
* *"Track every metadata change"* → **Log**, type `asc_metadata_update`

## API

Rules live on preferences:

```
PUT /v1/cofounder/preferences
{
  "policyRules": [
    {
      "id": "…",
      "label": "Never auto-reply to reviews",
      "effect": "block",
      "actionTypes": ["asc_review_reply"],
      "keywords": [],
      "enabled": true
    }
  ]
}
```

## See also

* [Modes](/concepts/modes) — agent mode + autopilot levels
* [Actions API](/api/actions) — the queue where blocked/gated actions surface
