# CAIN VIGIL — Architecture

**VIGIL = Predictive Autonomy Viability & Containment Fabric.**

AUTHORITY IS NOT A CONSTANT. AUTHORITY IS A DYNAMIC RELEASE BOUNDARY CONDITIONED ON CURRENT EVIDENCE.

VIGIL answers **"IS AUTONOMOUS EXECUTION STILL VIABLE RIGHT NOW?"** — beyond static authorization, continuous
assurance, governance compilation, effect verification and federation. It adds no new moat and builds no second CAIN.

## Position

```
ORGANIZATIONAL INTENT → HERMES → ATLAS → ARGUS → VIGIL (autonomy viability) → AUTHORITY RELEASE →
IRONCLAD → CAIN DECISION → MCPGATE → EXTERNAL EFFECT → OBSERVATION → VERIFIED EFFECT → EVIDENCE →
HERMES COVERAGE → VIGIL REASSESSMENT → CONTINUE/RESTRICT/PAUSE/REVOKE → ATLAS ASSURANCE UPDATE
```

## Core invariants

NO VIABLE STATE → NO AUTONOMOUS AUTHORITY · NO SUFFICIENT OBSERVABILITY → AUTHORITY CONTRACTS ·
UNCERTAINTY ABOVE BOUND → CONTRACTS · CONSEQUENCE ABOVE VERIFIED CAPABILITY → CONTRACTS ·
WORLD-STATE CONFIDENCE BELOW THRESHOLD → CONTRACTS · BEHAVIORAL DRIFT ABOVE THRESHOLD → CONTRACTS ·
CAPABILITY GROWTH WITHOUT ASSURANCE GROWTH → NO EXPANSION · UNKNOWN CRITICAL STATE → FAIL CLOSED ·
LOSS OF VIABILITY → RESTRICT/PAUSE/REVOKE/QUARANTINE.

## Modules (`cain/vigil/`)

state · envelope · budgets (uncertainty, observability) · release (+ curve) · drift · worldstate · predict
(+ capability/assurance velocity) · containment · population (fleet + physical SIMULATED) · evaluator ·
hosted_stages · properties9 · lab.

## Collision matrix (what existed, not duplicated)

| Existing | Where | VIGIL difference |
|---|---|---|
| Continuous reauthorization + behavioral authority envelope | `cain/argus/` | VIGIL evaluates *viability* of a release region, not step authority |
| Authority drift (dimension-based) | `cain/argus/drift.py`, `cain/continuum/drift.py` | VIGIL is *distributional* behavioural drift (JS divergence, change point) |
| Continuous assurance state | `cain/argus/assurance.py` | VIGIL consumes assurance as one input, adds uncertainty/observability/world-state |
| Effect contract + verification | `cain/ironclad/` | VIGIL decides whether authority may be released *before* an effect |
| Governance coverage + drift | `cain/hermes/` | HERMES governs intent→enforcement; VIGIL governs the runtime release boundary |
| Federation assurance | `cain/atlas/` | ATLAS is cross-org; VIGIL is per-agent runtime viability (and fleet) |

## Status
See `VIGIL_PUBLIC_TRUTH.md`. Same-project tests only; physical AI SIMULATED; no third-party validation.
