Skip to main content

MOSES Constitutional Governance Framework

Sovereign governance for AI agents — modes, postures, roles, SHA-256 audit chain, commitment conservation, lineage custody, and enterprise hardening.

© 2026 Ello Cello LLC. All rights reserved. Patent Pending: Serial No. 63/877,177

Overview

MOSES (Modular Open System for Executive Sovereignty) is a constitutional governance framework for AI agents. It provides real-time execution-path enforcement through blocking constitutional gates, cryptographic provenance, and semantic commitment conservation.

Three Interfaces, One Core

# Library
from commitgov import governed_step, GovernanceState, AuditLedger

# CLI
python -m commitgov.cli status
python -m commitgov.cli run-task "deploy app" "read config|build|deploy"

# MCP Server
python server.py  # FastMCP stdio — 40 tools

Architecture

Core Library (Phase 1-3A)

Module Purpose Tests
engine.py Modes, postures, roles, GovernanceState, action checking 80
audit.py SHA-256 chained audit ledger with Isnad provenance 32
commitment.py Commitment kernel extraction, Jaccard similarity, ghost tokens 44
lineage.py 3-layer custody chain, archival chain, instance hash 31
loop.py 6-gate ReAct loop, resilience monitoring 19
signing.py Governance-gated HMAC signing (no bypass path) 23
witness.py Moltbook external witness (blind envelopes) 14
oracle.py Grok API external verification (fail-safe) 11
swarm.py Primary→Secondary→Observer coordination 16
meta.py Constitution amendments, rollback, proposals 18
review.py Adversarial blind peer review + external referee 10
model_swap.py Cross-model kernel comparison 10
presence.py Nonce challenge/response liveness 11
handshake.py Inter-agent envelope pack/unpack/verify 11
progress.py Task tracking + recovery flags 10
patterns.py Ghost pattern registry + fingerprinting 14

Enterprise Modules (Phase 3B — 21 Grok Upgrades)

Module Component Dependencies
otel_tracing.py OTel Auto-Tracing opentelemetry-sdk (optional)
sinks.py Salesforce + Splunk + ConstitutionalCognitiveSink requests (optional)
envelope.py MissionEnvelope YAML PyYAML (optional)
gates.py ScriptedGates declarative checks
obo.py OBO Claims (OAuth2 token exchange) requests (optional)
policy_bundle.py PII guard, rate limit, approval workflow
flame_gateway.py DynamicFlameGateway (adaptive posture)
trace.py SelfPayingConstitutionalTrace (Atomic Game Changer #1)
royalty.py RoyaltyObligation webhook requests (optional)
omni_gateway.py IntentConservingOmniGateway (Atomic Game Changer #2)
control_plane.py SovereignControlPlane
passport.py ConstitutionalCognitivePassport
playback.py ProvenanceAwareSessionPlayback
config.py Enterprise YAML config PyYAML (optional)

MCP Server (Phase 4)

40 tools exposed via FastMCP:

  • Governance (6): set_mode, set_posture, set_role, check_action, get_status, assemble_context
  • Vault (3): load, list, clear
  • Audit (4): log, verify, recent, hash_session
  • Commitment (2): check_commitment, check_ghost_tokens
  • Lineage (2): verify, get_status
  • Loop (2): run_step, run_task
  • Signing (1): sign
  • Witness (1): witness_event
  • Oracle (1): oracle_verify
  • Swarm (1): run_swarm_round
  • Review (1): adversarial_review
  • Model Swap (1): model_swap_test
  • Presence (1): presence_challenge
  • Handshake (1): handshake
  • Progress (1): get_progress
  • Meta (6): list_amendments, propose, ratify, rollback, constitution_status, list_modes
  • Enterprise (5): load_envelope, check_gates, get_playback, emit_passport, control_plane
  • Resilience (1): resilience_report

CLI (Phase 5)

22 commands wrapping the core library for terminal usage.

Installation

# No external dependencies required (stdlib only)
pip install -e .

# Optional dependencies for enterprise features
pip install requests pyyaml opentelemetry-sdk

Quick Start

from commitgov import GovernanceState, governed_step, AuditLedger

# Set up governance
gs = GovernanceState(mode="High Security", posture="DEFENSE", role="Primary")

# Run a governed step through the 6-gate ReAct loop
result = governed_step(
    task="deploy application",
    action="write config file",
    step_num=1,
    total_steps=3,
    governance=gs,
    ledger_path="audit.jsonl",
    lineage_path="lineage.json",
    progress_path="progress.json",
)

print(f"Success: {result.success}")
print(f"Reason: {result.reason}")

Testing

# Run all 469 tests
python -m pytest tests/ -q

# Run specific module tests
python -m pytest tests/test_engine.py -q

# Run stress tests
python -m pytest tests/test_stress.py -q

Key Concepts

Six Fold Flame

Every action must pass all six constitutional gates before execution:

  1. Sovereignty — Traceable to a registered agent
  2. Compression — Substantive, high-signal (no filler)
  3. Purpose — Serves a constitutional function
  4. Modularity — Compatible with existing structure
  5. Verifiability — Outcome can be tested/verified
  6. Reciprocal Resonance — Produces value when mirrored

Conservation Law of Commitment

C(T(S)) ≈ C(S) — commitment is conserved under transformation. The Jaccard similarity between commitment kernels before and after transformation must stay above threshold.

Ghost Tokens

When commitment tokens leak, the pattern of leaked tokens is fingerprinted. If two agents produce the same fingerprint, it's a structural flaw, not extraction variance.

6-Gate ReAct Loop

  1. Lineage verify (anchor chain)
  2. Status load (governance state)
  3. Ghost token gate (cascade risk)
  4. Posture gate (SCOUT blocks, DEFENSE requires confirm, OFFENSE permits)
  5. Audit log (with Isnad)
  6. Progress write (continuity across context windows)

License

© 2026 Ello Cello LLC. All rights reserved. Patent Pending: Serial No. 63/877,177

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commitgov-1.0.0.tar.gz (83.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commitgov-1.0.0-py3-none-any.whl (69.3 kB view details)

Uploaded Python 3

File details

Details for the file commitgov-1.0.0.tar.gz.

File metadata

  • Download URL: commitgov-1.0.0.tar.gz
  • Upload date:
  • Size: 83.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for commitgov-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a525cf2722547dda43953ba30d56f18b3c9f753aaf3a9edf2ed21bcd5ad9c337
MD5 1d91332e9be0780a8f0ea4990d5d95dd
BLAKE2b-256 141a1ed23ecd9fb031eb9482e77f2ccfd848906a9f68747eae97c73d14d266bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for commitgov-1.0.0.tar.gz:

Publisher: publish.yml on SunrisesIllNeverSee/commitgov

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file commitgov-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: commitgov-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 69.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for commitgov-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcefe7bc04091421e00260bd99a6e8ff2750a14b9625a1734a6cf77b2c0de111
MD5 e724e9fe00f452b196b0670321588ee7
BLAKE2b-256 f109cf5fac8c19166d82516dc1bf1faac593076303ed093be0bb080854a7e226

See more details on using hashes here.

Provenance

The following attestation bundles were made for commitgov-1.0.0-py3-none-any.whl:

Publisher: publish.yml on SunrisesIllNeverSee/commitgov

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page