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

# Policy Builder

> Write, test, and manage access policies for your agents.

The **Policy Builder** is where you define what your agents are allowed to do.

## AI Policy Assistant

Describe what you want in plain English:

> *"Allow this agent to read customer data from Stripe, but only during business hours and only if the agent has the 'payment-processor' tag"*

Anti AI generates:

```rego theme={null}
package oculus.authz

default allow = false

allow {
    input.action == "stripe:customer:read"
    "payment-processor" in input.subject.tags
    input.subject.status == "active"
    hour := time.clock(time.now_ns())[0]
    hour >= 9
    hour < 17
}
```

## Raw Rego Editor

Write Rego directly with syntax highlighting, real-time validation, and line numbers.

## Shadow Mode

Run a new policy in production without enforcing it. Watch the audit log to see what decisions it would have made, then activate when confident.

1. Toggle **Shadow Mode** on
2. Monitor the audit log for 24 hours
3. Click **Activate** when ready

## Policy Simulation

Test any policy against a mock request before assigning it to an agent. The simulator shows the exact rule and line number that made the decision.

## Version History

Every policy change is saved as a version. Browse history, view exact content, and roll back with one click.
