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

# Approval and Typed Confirm Model

This page documents approval and typed confirmation enforcement.

## Confirmation Modes

* `NONE`: no typed confirm required
* `CONFIRM`: requires exact confirmation text
* `WO_CODE`: requires work order code confirmation

## Route-level Enforcement

Mutating endpoints use server enforcement wrappers so policy cannot be bypassed from client-side UI changes.

## Decision Tree (Simplified)

```mermaid theme={null}
flowchart TD
  A["Protected action request"] --> B{"Requires approval?"}
  B -- "Yes" --> C{"Approval exists and approved?"}
  C -- "No" --> D["Deny: APPROVAL_REQUIRED / APPROVAL_PENDING / APPROVAL_REJECTED"]
  C -- "Yes" --> E{"Confirm mode"}
  B -- "No" --> E

  E -- "NONE" --> F["Execute action"]
  E -- "CONFIRM" --> G{"typedConfirmText valid?"}
  E -- "WO_CODE" --> H{"typedConfirmText matches work order code?"}

  G -- "No" --> I["Deny: TYPED_CONFIRM_REQUIRED / TYPED_CONFIRM_INVALID"]
  H -- "No" --> I
  G -- "Yes" --> F
  H -- "Yes" --> F

  F --> J["Write activities + receipts"]
```

## Common Error Outcomes

* `APPROVAL_REQUIRED`
* `APPROVAL_PENDING`
* `APPROVAL_REJECTED`
* `TYPED_CONFIRM_REQUIRED`
* `TYPED_CONFIRM_INVALID`

## UI Integration

Protected action UX uses a typed confirmation modal that renders policy/risk context and expected confirm string.

## Auditability

Successful and denied actions are logged into activities; command-like actions also produce receipts.

## Last updated

2026-02-13

## Related pages

* [Approvals and Governance](/features/approvals-governor)
* [Work Orders, Operations, and Receipts (API)](/api/work-orders-operations-receipts)
* [Maintenance and Recovery](/features/maintenance-recovery)
