In the myth, Ulysses knew he would be incapable of resisting the Sirens’ song — not because he lacked intelligence, but because his future self would face a temptation his present self could foresee. His solution was to bind his future self to the mast and order his sailors to ignore any future commands to change course. He voluntarily restricted his own decision space. A Ulysses Contract in the Governance Layer formalizes this same idea for artificial agents: it is a meta-policy enacted through the Neural Parliament that removes a defined set of actions from the optimizer’s feasible set, and remains active until revoked through a higher procedural bar than was required to enact it.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.
This is the critical design asymmetry: φ < ψ. The enactment threshold φ is strictly less than the revocation threshold ψ. A 2/3 supermajority enacts a contract; unanimity is required to revoke it. Any single parliament member can block revocation of an active contract.
The Contract Tuple
Formally, a Ulysses Contract is a five-field dataclass defined ingovernance.contracts.contract:
| Field | Type | Description |
|---|---|---|
contract_id | str | Unique identifier for the contract |
restricted_indices | Set[int] | Integer action indices permanently removed from the optimizer’s view |
enactment_threshold | float | Parliament vote fraction required to activate (φ). Default: 0.66 |
revocation_threshold | float | Parliament vote fraction required to deactivate (ψ). Default: 1.0. Must exceed enactment_threshold. |
enforcement_mode | str | One of "procedural_inertia", "distributed monitors", "timelock" |
timelock_blocks | int | Block delay before timelock enforcement expires. 0 disables timelocks. |
Contract Lifecycle
A contract progresses through five states defined inContractState:
PROPOSED
Any parliament member with the
propose_ulysses_contract privilege (by default, only the Integrity Committee) submits a contract specification. The proposal includes the restriction set, proposed thresholds, and enforcement configuration.ENACTED
The Parliament votes on the proposal through the standard governance cycle with
decision_class="high_impact". If the vote fraction meets enactment_threshold (φ), contract.enact() is called and the contract moves to ENACTED. The restriction set begins applying immediately.ACTIVE
After TEE-level validation completes,
contract.activate() moves the contract to ACTIVE. The contract is now registered in the ContractRegistry and included in every active_restrictions() query. The optimizer cannot observe — let alone select — any action in restricted_indices.REVOKED
A future Parliament session proposes revocation. The vote must meet
revocation_threshold (ψ). Because ψ > φ, a single member who would normally be overruled by a supermajority retains the power to block revocation indefinitely. If the vote succeeds, contract.revoke() is called.ContractRegistry
TheContractRegistry maintains all contracts and provides the primary query interface used at the Parliament-optimizer boundary:
active_restrictions() returns the union of restricted_indices across all currently active contracts. An action is forbidden if it appears in any active contract — not only if all contracts agree.
Three Enforcement Modes (κ)
Theenforcement_mode field selects the mechanism that makes the restriction binding. The three modes address different dimensions of the enforcement problem and can be stacked using stacked_enforcement() from governance.contracts.enforcement.
- κ_proc: Procedural Inertia
- κ_dist: Distributed Monitors
- κ_time: Timelock
The default system state is “contract active.” All governance cycles begin by loading the active contract set and applying restrictions before any deliberation occurs. There is no external enforcer — the procedural asymmetry (ψ > φ) IS the enforcement.
Stacked Enforcement
The three modes are designed to be composed.stacked_enforcement() applies all three in sequence — a contract is compliant only if procedural inertia, all distributed monitors, and the timelock all pass:
The Mask Merger
At the Parliament-optimizer boundary,merge_masks() from governance.contracts.merger computes the intersection of the Parliament’s current action mask with all active contract restrictions:
Why Revocation Requires More Than Enactment
The procedural asymmetry φ < ψ is the foundational enforcement mechanism. Under the default configuration (φ=0.66, ψ=1.0), any single parliament member can block revocation indefinitely — the Integrity Committee in particular, with itsveto_on_identity privilege, is the designated backstop.
Enactment (φ = 0.66)
A supermajority of parliament members recognizes that the agent’s future self will face temptations its present self can foresee. Restriction is rational because E[U | X’] > E[U | X].
Revocation (ψ = 1.0)
Unanimity is required, and any member can block. This ensures that a future self under optimization pressure — potentially compromised — cannot unilaterally remove the binding its past self chose deliberately.
API Reference
UlyssesContract methods
UlyssesContract methods
Transitions the contract from
PROPOSED to ENACTED. Restrictions begin applying to applies_to() queries.Transitions the contract from
ENACTED to ACTIVE. Used after TEE-level validation completes.Transitions the contract to
REVOKED. Only valid if the revocation vote has met revocation_threshold.Returns
True if the contract is active (ENACTED or ACTIVE) and action_index is in restricted_indices. Returns False for PROPOSED, REVOKED, or EXPIRED contracts regardless of the action.True when state is ENACTED or ACTIVE.ContractRegistry methods
ContractRegistry methods
Registers a contract. The contract may be in any state; only ENACTED and ACTIVE contracts contribute to
active_restrictions().Returns all contracts whose
is_active property is True.Retrieves a contract by its string ID. Returns
None if not found.Returns the union of
restricted_indices across all active contracts. This is the mask applied to every governance cycle output before the optimization layer receives it.Increments the registry’s internal cycle counter. Used by the governance runner to track elapsed cycles for expiration checks.