Intelligence is not solely the ability to optimize decisions — it also requires the ability to govern the process by which decisions are made. The Governance Layer is an architectural specification and reference implementation built on that hypothesis. It introduces three interlocking mechanisms — the Neural Parliament, Ulysses Contracts, and the Identity Layer — that sit above an agent’s raw optimization engine and take responsibility for resolving competing objectives, constraining future choices, and anchoring a persistent identity across time.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/xcoder-es/governance-layer/llms.txt
Use this file to discover all available pages before exploring further.
Why a Governance Layer?
Modern AI has made extraordinary progress on capability — reasoning, planning, tool use, and long-horizon tasks. What it has not solved is the higher-order problem that arises once capability is sufficient: which objectives should guide the decision, and how should conflicts between them be resolved? Current governance mechanisms — system prompts, reward functions, constitutional rules — are predominantly external to the intelligence itself. Engineers define the constraints; the model optimizes within them. As systems become more autonomous, the gap between external governance and internal behavior becomes a structural risk. The Governance Layer addresses that gap by making governance an internal cognitive capability. Rather than asking only “What action should be taken?”, a governed agent also asks:- Which of my objectives should take precedence right now?
- Should I voluntarily restrict my future choices to protect a commitment I made?
- Does this proposed action remain coherent with who I am?
The Four-Layer Architecture
The framework is organized as a four-level stack, with a simulated Trusted Execution Environment (TEE) at the base:| Layer | Role |
|---|---|
| Neural Parliament | Seven specialized members deliberate over proposals, apply budgets and vetoes, and reach a weighted consensus via the Speaker state machine |
| Ulysses Contracts | Pre-committed constraints the agent voluntarily locks before entering a high-stakes context, preventing self-amendment under pressure |
| Identity Layer | A four-tier ontology of core commitments, values, and behavioral dispositions that must remain coherent across decisions |
| TEE Enclave | Simulated hardware isolation that seals governance operations behind a gradient barrier and cryptographic audit log |
The governance Package
The reference implementation lives in the governance Python package (Python 3.10+). Every layer of the formal specification maps directly to a module:
governance.speaker— the Neural Parliament Speaker state machinegovernance.committee— seven Parliament member implementationsgovernance.contracts— Ulysses Contract lifecycle and enforcementgovernance.identity— ontology, commitments, tiers, and cryptographic keysgovernance.tee— simulated enclave, watchdog, and Merkle batching
governance package includes: SpeakerStateMachine, ParliamentMember, the seven example member classes (ExampleRewardMember, ExampleSafetyMember, ExampleIntegrityMember, ExampleCuriosityMember, ExamplePlanningMember, ExampleSocialMember, ExampleMemoryMember), UlyssesContract, ContractRegistry, IdentityCore, CoreCommitment, TieredMutability, MutabilityTier, Proposal, GovernanceDecision, PriorityTag, and Action.
Quickstart
Install the package, run your first governance cycle, and explore the Streamlit dashboard in under five minutes.
Architecture
Deep-dive into the four-layer stack — Speaker, Parliament, Contracts, Identity, and TEE — with annotated diagrams.
Neural Parliament
Seven members, weighted voting, proposal budgets, veto thresholds, and SDoS-resistant agenda management.
Ulysses Contracts
Pre-committed constraints, three κ enforcement modes, and cryptographic sealing against self-amendment.