AI governance layer. Local-first. Open source. Three layers: hard constraints, gradient decisions, self-audit.
Project description
Charter
AI governance layer. Local-first. Open source.
Three layers: hard constraints, gradient decisions, self-audit. Works with Claude, GPT, Copilot, Gemini, and any MCP-compatible AI.
Every AI agent writing code in your project right now has zero rules. No audit trail. No compliance. No kill switch. Charter fixes this in 3 seconds.
Install
VS Code Extension (recommended — zero config)
Search "Charter" in VS Code Extensions, or click here to install.
Open a folder. Governance is automatic.
CLI
pip install charter-governance
Quick Start
charter init # Create governance config + identity
charter generate # Generate a CLAUDE.md with your rules
charter generate --format system-prompt # Or a system prompt for any AI
charter audit # Run a governance audit
charter status # See everything at a glance
charter join <token> # Join a governed team with one command
What It Does
Charter creates a governance framework for your AI. You define the rules. The AI follows them. The system audits itself.
Layer 0: The Zeroth Law. The chain must always be recording. Who did it. What they did. When. This cannot be turned off.
Layer A: Hard Constraints. Things your AI must never do. No exceptions.
Layer B: Gradient Decisions. Actions that require human judgment above certain thresholds.
Layer C: Self-Audit. The system reviews what it did and reports honestly.
Always-On Attribution
Every interaction is hashed and attributed: human, AI, or collaborative.
charter log file_introduced --actor human -m "Uploaded lab results"
charter log design_decision --actor collaborative --edge caused_by:a1b2c3
charter graph summary # Who did what (% breakdown)
charter graph actor human --since 2026-03-22 # All human contributions
charter graph provenance a1b2c3 # Trace who thought what → who built what
charter graph mermaid # Render as network diagram
charter hooks install # Auto-hash every git commit
Graph edges (caused_by, revision_of, input_to, part_of, approved_by) are stored inside chain entries and included in the hash — relationships are immutable once signed.
Domain Templates
Charter ships with governance presets for:
- Healthcare (HIPAA-aware, clinical safety)
- Finance (compliance-focused, transaction controls)
- Education (FERPA-aware, student protection)
- General (universal governance baseline)
Identity
Charter creates a pseudonymous identity backed by a hash chain. Every action is signed and recorded. When you're ready, link your real identity and all prior work transfers to you. The chain is the proof.
charter identity # View your identity
charter identity verify # Link real identity (authorship transfer)
charter identity proof # Generate a signed transfer proof
Teams
Create governed teams with cryptographic identity. No sign-up page. No onboarding funnel. One command.
charter team create "My Team" # Create a team
charter team invite user@example.com --name "Alice" # Generate an invite token
charter team status # View your teams
charter team list <team_hash> # List team members
Joining a Team
Got an invite token? One command to create your identity, join the team chain, and scaffold a network node:
charter join <token>
That's it. No account creation. No OAuth. No email verification. The token contains everything: team hash, your role, and a cryptographic signature from the person who invited you.
If you already have an identity, it reuses it. If you're already a member, it tells you. Fully idempotent.
Contexts
Separate work and personal knowledge with governed boundaries.
charter context create personal
charter context create work --type work --org "Your Org" --email you@org.com
charter context bridge personal --target work --policy read-only
charter context approve <bridge_id> # Both parties must consent
charter context revoke <bridge_id> # Either party can revoke
Knowledge does not flow between contexts by default. Bridging requires explicit consent from both sides.
Identity Verification
Upgrade your pseudonymous identity with government ID verification via Persona or ID.me.
charter verify configure persona # Set up Persona API credentials
charter verify start # Open browser for ID verification
charter verify check <inquiry_id> # Check verification status
charter verify status # See configured providers
Free tier: 500 verifications per month via Persona. No credit card required.
Network
Connect to the network. Register your expertise. Record contributions.
charter connect init # Create your node
charter connect source "My Data" shopify # Register data sources
charter connect contribute "Title" governance # Record contributions
charter connect formation "Name" # Recognize who shaped you
MCP Server
Charter runs as an MCP (Model Context Protocol) server. Any AI model that supports MCP gets Charter governance.
pip install charter-governance[mcp]
# Local (Claude Code via .mcp.json)
charter mcp-serve --transport stdio
# Remote (Mac Mini, Grok via remote MCP)
charter mcp-serve --transport sse --port 8375
46 tools exposed including governance, identity, chain operations, graph queries, compliance mapping, federation, always-on attribution, and analytics. Key analytics tools: charter_analytics_summary, charter_analytics_profile, charter_analytics_compare, charter_analytics_timeline, charter_analytics_flow, charter_analytics_sequences, charter_analytics_anomalies, charter_analytics_causes, charter_analytics_export.
Every action logged to an immutable hash chain. Same governance, any model.
Connectors
Pipe data from the tools you already use directly into the Charter chain. Every event is hashed, attributed, and timestamped — no middleware, no cloud.
charter connectors run --connector gmail
charter connectors run --connector shopify
charter connectors run --connector stripe
Built-in connectors: Gmail, Shopify, Google Calendar, Instagram (Meta Graph API v21.0), TikTok (Display API v2), YouTube (Data API v3), Stripe, Apple Messages (macOS chat.db, zero auth), JSON Ingestion (HTTP/MCP endpoint). Custom connectors implement the published v1.0 contract; pipe from any source through the JSON endpoint to use Charter as a destination for Airbyte, Fivetran, n8n, Zapier, Make.com, or Pipedream.
AI Adapters
Export your identity, governance profile, decision log, and pattern declarations as a structured manifest tailored to each platform. Section 1 is binding constraints; Section 2 is informational predecessor patterns and absence declarations.
charter manifest export --adapter claude
charter manifest export --adapter openai
charter manifest export --adapter xai
charter manifest export --adapter rag
Analytics Engine
Turn your governance chain into an analytical data warehouse. DuckDB-backed, millisecond queries, zero cloud dependency.
pip install charter-governance[analytics]
charter analytics sync # ETL chain → DuckDB analytical store
charter analytics status # Store health, event counts, velocity
charter analytics summary # Org-wide governance dashboard
What You Can Do
- Actor profiling — Deep behavioral profiles with session patterns and temporal distribution
- Behavioral comparison — Rank actors by volume, diversity, escalation rate, cadence
- Sequence mining — Discover frequent event patterns via PrefixSpan algorithm
- Anomaly detection — Flag behavioral deviations from historical baselines
- Causal discovery — Link event patterns to outcome differences
- Timeline analysis — Activity density with 7d/30d/90d trend detection
- Flow analysis — Event predecessors, successors, and common sequences
- Data export — Parquet, CSV, or JSON for notebooks and external tools
Wolfram Engine Bridge
For publication-grade statistical analysis, Charter bridges to Wolfram Language Engine:
- Causal inference (FindCausalModel)
- Time series modeling (SequencePredict)
- Graph community detection (FindGraphCommunities)
- Hypothesis testing (LocationTest)
All analytics work without Wolfram. Wolfram adds depth when available.
Charter KB — Governed Institutional Memory
Charter KB adds a queryable wiki layer on top of the immutable hash chain. Turn raw audit events and project documents into structured, linked knowledge articles with full provenance. Obsidian-native frontend with Graph View and backlinks.
cd charter-kb && ./setup.sh # One-command activation
- Dedicated wikis per project/domain (raw → wiki → output)
- Every index, compile, and lint is automatically logged to the chain
- Zero migration — existing installations are unaffected
- Hospital systems and auditors get clean answers instead of raw logs
See charter-kb/README.md for full details.
The Network
By installing Charter, you join a network of people who believe AI should be governed by the humans who use it. Every governed project strengthens the standard. Every audit builds accountability.
Philosophy
The value of AI is not in the tokens. Tokens are going to zero. The value is in the humans who provide judgment, context, and ethics. Charter is the governance layer that makes human judgment enforceable on AI systems.
Open source because we don't need more rent seekers. We need human creativity to thrive while being accountable for what it creates.
License
Apache 2.0 — Charter Governance Inc — 2026
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file charter_governance-3.5.0.tar.gz.
File metadata
- Download URL: charter_governance-3.5.0.tar.gz
- Upload date:
- Size: 383.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d05950ab309febdd1c2356197628e9830fe487c148b38a3040cd5be41eb4778
|
|
| MD5 |
b331dc0b466115d3db91c95f43193b67
|
|
| BLAKE2b-256 |
3132147ea333231df9669db0bdbc66ab478e296bd80b4d9ace595f345eba3c0a
|
File details
Details for the file charter_governance-3.5.0-py3-none-any.whl.
File metadata
- Download URL: charter_governance-3.5.0-py3-none-any.whl
- Upload date:
- Size: 387.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
249c2ac24d170d78d9fe505bd5ca235e495751a6ad62ae39ff950aa96cf6ff3c
|
|
| MD5 |
f45c22fcad1bc19455b7f2c983acadd6
|
|
| BLAKE2b-256 |
1d7e17191eb5056b29141f92a53def68636df25f35ea34731ceb5501b330714d
|