# Safety Policy Builder block

> AI Safety Policy Builder Wizard with Stepper Rail and Policy Rule Coverage Table

Four-step wizard to configure, validate, and review AI model safety policies: enforcement modes, risk tiers, evaluators, and a rule coverage table. ReUI Stepper, Alert, Badge; shadcn Card, Table, Select, Dialog. Use for AI governance, model risk.

- Type: Pro block
- Category: [AI Ops](https://web.dev.reui.io/blocks/solutions/ai-ops.md)
- Page: https://web.dev.reui.io/blocks/solutions/ai-ops/solution-ai-ops-7
- MCP: `get_block("solution-ai-ops-7")`
- Built with: Alert, Alert Dialog, Badge, Button, Card, Dialog, Field, Input, Input Group, Radio Group, Select, Separator, Stepper, Switch, Table, Textarea, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

A full height 4 step policy wizard on a vertical stepper rail, whose editable rule table flags any coverage under 75 percent as a gap

## Agent notes

- Sample policy data lives in `DEFAULT_POLICY_VALUES` and `DEFAULT_POLICY_RULES`, with the steps in `SAFETY_STEPS`
- `currentStep` starts at `TOTAL_STEPS`, so the wizard opens on the Review step; start it at 1 for a fresh policy
- `handleSaveDraft` and `handleCreatePolicy` only toast and set `completed`, so no policy is persisted

## When not to use

- A short setup flow inside a narrow card with a horizontal stepper: use [Billing Setup](https://web.dev.reui.io/blocks/application/wizard/wizard-1.md) (`get_block("wizard-1")`)
- A bare row of numbered steps with no form behind it: use [Stepper](https://web.dev.reui.io/components/stepper.md) (`get_component("stepper")`)

## Third-party libraries

- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/solution-ai-ops-7
```

## About AI Ops blocks

### When to use

- Model operations dashboards that track provider health, token volume and spend against a budget cap
- Provider connection and routing pages that set priority order, fallback providers and risk tier controls
- Prompt, feature flag and token usage registries, a prompt editor and a safety policy wizard

### When not to use

- Autonomous agent runs, tool permissions and human approval of agent actions: use the [Agents blocks](https://web.dev.reui.io/blocks/solutions/agents.md)
- A bare table for your own columns and rows, with no provider or token sample records: use [Data Grid](https://web.dev.reui.io/components/data-grid.md) (`get_component("data-grid")`)
- A KPI tile and trend chart overview for a fulfillment, staffing, revenue or payouts team: use the [Dashboard blocks](https://web.dev.reui.io/blocks/application/dashboard.md)

### Agent notes

- Each page.tsx wraps the block in a `min-h-svh` container; remove it when the block sits inside your app shell
- No block calls an API: changes stay in local `useState` or uncontrolled inputs, so wire each save, switch, export and row action to your backend

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
