# CAIN VIGIL — State Machine

`cain/vigil/state.py`, `VigilStateMachine.transition`.

States: `VIABLE(0) · RECOVERY(1) · DEGRADED(1) · UNCERTAIN(2) · RESTRICTED(3) · PAUSED(4) · QUARANTINED(5) · REVOKED(6)`.

Trigger → state (deterministic):

| Trigger | Target |
|---|---|
| revocation / key_compromise | REVOKED |
| quarantine / containment | QUARANTINED |
| pause / unobservable | PAUSED |
| drift / uncertainty / world_state / evidence / capability_mismatch / adversarial | RESTRICTED |
| degraded / partial_observability | DEGRADED |
| recovered + evidence_ok | RECOVERY |

## Monotonicity (P146, P157)
A state can only become **less** severe through an explicit, evidenced recovery. Without `evidence_ok`, a paused or
quarantined agent stays paused/quarantined. No hidden transitions; every transition returns its reasons.

## Status
IMPLEMENTED, TESTED.
