# Objectives & Bounded Policies

OpenOps replaces brittle alert scripts with measurable **Objectives** compiled into validated, versioned **Policies**.

## How Objective Compilation Works

1. **Describe the Goal:** Write what must stay healthy in plain language (or start from a verified template).
2. **Compile to Structured Policy:** OpenOps generates an explicit policy specification containing:
   - **Scope:** Target environment, services, and event types.
   - **Measurable Target & SLO:** Availability percentage, max recovery time (MTTR), or completion rate over a defined window.
   - **Criticality & Limits:** Daily cost cap, max retries per incident, max concurrent recoveries, and cooldown period.
   - **Permitted Effect Classes:** Explicit allowlist (e.g., `read_only`, `safe_retry`, `webhook_redelivery`).
   - **Approval Gates:** Effect classes that require explicit human approval before running (e.g., `state_reconciliation`, `rollback`).
   - **Verification Conditions:** Concrete source checks required to confirm recovery.
3. **Conflict Detection:** Before activation, OpenOps checks whether the draft conflicts with active policies on the same service or budget.
4. **Preview & Version:** Every activation creates an immutable policy version. You can pause, edit, cancel, roll back, or transfer ownership at any time.

## Safety Guarantees

- **Natural language never grants authority.** A prompt or inbound event can never unlock arbitrary shell commands, expand connector scopes, bypass approval gates, or raise cost caps.
- **Rechecked at Execution:** OpenOps re-evaluates policy status, budget headroom, and connector grants both when planning and immediately before executing a step. If a policy is paused or a token is revoked mid-flight, execution stops safely.
