Kali Standard Envelope Schema

The Kali Standard Envelope Schema defines the contract between external governance engines (such as May I AI) and the BaseLayerOS deterministic substrate. Any envelope must conform to this schema before BaseLayerOS will validate, enforce invariants, and execute or refuse it.

Schema Overview

At a high level, a Kali envelope describes:

Core Fields

envelope_id — Unique identifier for the envelope instance.
actor_id — Identity of the requesting actor (user, system, agent).
roles — Roles or entitlements associated with the actor.
action_slug — Canonical identifier for the requested action or capability.
policies — References to governance policies applied to this envelope.
invariants — Invariant assertions that must hold before execution.
constraints — Additional limits (sector, jurisdiction, risk, scope).
payload — Structured metadata describing tools, data, or workflows involved.
execution_plan — Ordered steps or operations the substrate will perform if allowed.
timestamp — Time at which the envelope was issued.
routing_seal — Cryptographic binding used to anchor the envelope to audit traces.

Validation & Enforcement

BaseLayerOS performs deterministic validation of Kali envelopes before any state transition:

If validation or invariant checks fail, the substrate refuses the envelope and records a deterministic refusal trace. If all checks pass, the execution plan is applied as a deterministic state transition.

Extensions

The schema supports extensions for sector‑specific and organization‑specific needs without breaking the core contract:

BaseLayerOS can ignore unknown extensions while still enforcing the core deterministic physics.