orchestrata_ultimate.governance
Reference › orchestrata_ultimate › governance
Orchestrata Governance — policy engine, escalation, audit, constitutional enforcement.
The governance package is the policy engine of Orchestrata, built over Prolog. It decides whether an agent may do what it is about to do, records the decision, trips a safe mode when violations come too fast, and escalates contested cases. Rules are Prolog files (constitution, ethics, resources, agents, PAM, completion and policy layers); the Python code asks them questions through one bridge and turns the answers into typed results. The hand-written story is the curated governance page.
How messages and intents meet it:
- At runtime the kernel pipeline holds a PrologGate.
submit_intentcallsmay_executeforHUMANbefore an intent is routed to the first volk, and approval callsmay_completebefore a task is closed. - The kernel dispatcher and policy_evaluator evaluate routing policy for a sender, recipient and message type, using the loader and strict flag from here. The postman has its own authority checks in postman governance.
- Going the other way, handler sends an
escalationCXP packet to each authority through a route callback.
Parts, by role:
- Decision core: policy_engine runs the pipeline of safe mode, cache, constitutional, ethical, policy_layers and Prolog; prolog_client, verdict and volk_facts support it; resource_access and dynamic_policy are specialised users of the client.
- Evidence and safeguards: cache, audit, monitoring, violations and safe_mode.
- Shared definitions: types, interfaces, exceptions, constants and _strict, which makes errors deny by default.
- Escalation: the escalation_handler subpackage and the event-publishing wrapper event_emitting_policy_engine.
Entry points are PolicyEngine.evaluate and PrologGate.may_execute and may_complete. Start reading at policy_engine, then prolog_client.
Curated narrative
The hand-written story of this package: orchestrata_ultimate.governance.
28 modules, 6,865 lines of code.
Subpackages
| Package | Modules | LOC |
|---|---|---|
escalation_handler |
6 | 1,610 |
Modules
| Module | Summary | LOC |
|---|---|---|
__init__ |
Orchestrata Governance — policy engine, escalation, audit, constitutional enforcement. | 113 |
_strict |
Fail-closed strictness seam for governance error handling (P0.3). | 32 |
audit |
Governance audit trail for Orchestrata. | 238 |
cache |
Multi-tier governance cache for Orchestrata. | 276 |
constants |
Governance constants for Orchestrata. | 71 |
constitutional |
Constitutional enforcer for Orchestrata governance. | 331 |
dynamic_policy |
Dynamic policy management for Orchestrata governance. | 253 |
ethical |
Ethical boundary enforcement for Orchestrata governance. | 215 |
event_emitting_policy_engine |
Event-emitting wrapper for PolicyEngine governance decisions. | 93 |
exceptions |
Governance exception hierarchy for Orchestrata. | 58 |
interfaces |
Governance interfaces for Orchestrata. | 173 |
monitoring |
Governance monitoring for Orchestrata. | 213 |
policy_engine |
Central governance policy engine for Orchestrata. | 411 |
policy_layers |
Python client for the SPEC-033 B27 defeasible policy layering scheme. | 179 |
prolog_client |
Governance-specific Prolog client for Orchestrata. | 1093 |
prolog_gate |
Prolog governance gate — may_execute and may_complete predicates. | 324 |
resource_access |
Resource access control for Orchestrata governance. | 256 |
safe_mode |
Safe mode management for Orchestrata governance. | 209 |
types |
Governance type definitions for Orchestrata. | 191 |
verdict |
Verdict provenance for governance enforcement surfaces (W1-P6). | 217 |
violations |
Violation tracking for Orchestrata governance. | 205 |
volk_facts |
The governance:volk_* facts may_execute/2 needs, in one place. |
104 |