Layer-7 Governance Engine
Decision as Infrastructure
The Layer-7 Governance Engine converts “actions” into a decision lifecycle that can be governed. It normalizes intent, applies policy gates, scores risk, routes authority, writes audit records, and produces an enforcement output.
What the Engine Does
The engine is the structural boundary where intent becomes governable. It does not execute the action. It produces a decision record that downstream gateways use to allow, deny, queue, or escalate execution.
Normalize
Convert raw inputs (agent plans, tool calls, requests) into a single auditable decision schema.
Govern
Attach policy gates, compute risk, and route authority requirements before execution is possible.
Finalize
Write immutable decision records and publish an enforcement outcome for gateways and orchestrators.
Decision Object (v1)
Every action entering Layer-7 becomes a decision object. This is the minimum envelope required for audit reconstruction. Fields may be extended, but must not remove or weaken governance semantics.
Required Fields (Audit Minimum)
These fields must be present for every decision. If any are missing, the engine must return deny or queue until the decision is complete.
| Field | Why it exists | If missing |
|---|---|---|
| context.actor | Authority and accountability are impossible without an actor identity. | Deny / require identity resolution. |
| context.environment | Risk and policy differ between dev/staging/production. | Deny / treat as production (conservative). |
| action.class | Risk thresholds and authority routing are class-driven. | Deny / unknown action class. |
| policy_version | Audit integrity requires pinned policy interpretation. | Deny / invalid governance state. |
| risk.band | Proportional controls require a risk outcome. | Queue / evaluate risk first. |
| authority.required | Encodes approvals needed before execution. | Deny / no authority route. |
Decision State Machine
The engine treats governance as a lifecycle, not a one-time check. State transitions are logged to enable reconstruction.
Transition rules
- draft → evaluated: only when required fields exist
- evaluated → pending_authority: if approvals required
- evaluated → authorized: if no approvals required
- authorized → executed: only after ledger confirmed + gateway executes
Terminal states
- denied: policy failure, authority failure, unsafe request
- expired: stale context; must re-evaluate
- cancelled: terminated by authorized actor
Governance Invariants (Non-Negotiable)
These invariants define Layer-7 as a structural layer rather than “best-effort governance.” Breaking them breaks the category claim.
Invariant 1
No valid authority. No execution.
Invariant 2
No ledger confirmation. No execution.
Invariant 3
No silent overrides.
Invariant 4 — Policy pinned per decision
The policy version used to evaluate a decision must be stored inside that decision. Governance must not reinterpret historical decisions under new rules.
Invariant 5 — Deny by default
When the engine cannot evaluate safely, it must deny or queue. “Unknown” does not map to “allow.”
Policy Version Pinning
Policy evolves. Audit integrity requires that decisions remain interpretable under the exact policy version used at evaluation time. Layer-7 treats policy like a dependency with strict versioning.
Rules
- Policy is immutable once published (no edits; only new versions).
- Decisions store policy_version used for evaluation.
- Re-evaluation creates a new decision linked to the prior decision.
- Environment pinning allows different versions per environment.
Why it matters
- Audit reconstruction remains valid months later.
- Compliance reviews see deterministic governance behavior.
- Incident response can replay the decision under historical rules.
- Prevents “policy drift” from rewriting accountability.