Skip to main content

Reusable multi-agent governance infrastructure (hooks + proposal + wrap-up + constitution iteration) extracted from agent-core (P-0059).

Project description

governance-core

PyPI License: MIT

Reusable multi-agent governance infrastructure for Claude Code projects.

Drop-in package providing a complete governance layer (constitution clauses, safety hooks, proposal workflow, wrap-up discipline, cross-clone sync) so you can focus on your project's business logic instead of re-inventing multi-agent coordination from scratch.

What you get

Install this package + run governance-core install in a new project, and your project immediately has:

  • 5 safety hooks (PreToolUse + PostToolUse): scope-guard, edit-write-guard, session-boundary-guard, command-guard, sensitive-data-guard — all configurable via .governance/config.json
  • Proposal workflow (/proposal skill): classify gate, draft / submit / approve / complete / archive state machine with audit trail
  • Wrap-up discipline (/wrap-up skill): STATE.md + git + knowledge publishing + skill learning in one command
  • Constitution iteration (/iterate-constitution skill): structured constitutional change workflow with red-line audit
  • Cross-clone coordination (/sync-infra, /sync-repos): physical-files sync + cross-repo git operations
  • 17 constitution clauses (art_00..art_16 + appendix) covering ritual, config management, contracts, scope governance, test/prod unification, git discipline, artifacts, constitutional protection, wrap-up discipline, memory staleness, etc.

Quick start

This package is one half of a 2-piece distribution. The other half is multi-agent-template — a cookiecutter template + bootstrap CLI that generates a new project skeleton.

Typical workflow:

# One-time setup (per machine)
pip install cookiecutter
pip install governance-core
pip install multi-agent-bootstrap

# Per-project: one-line bootstrap
multi-agent-bootstrap new my-project \
    --agents core,data \
    --ritual-phrase "Acknowledged"

# Verify
cd ~/workshop-claude/my-project
governance-core doctor --project-root .

See docs/architecture.md for the full picture (generic vs business boundary, config injection mechanism, upgrade flow, cross-clone coordination).

Standalone CLI usage

You can also install governance-core directly into an existing multi-agent project (without cookiecutter):

cd /path/to/your/project
pip install governance-core

# Write .governance/config.json with your project config
mkdir -p .governance
cat > .governance/config.json <<EOF
{
  "project_name": "my-project",
  "ritual_phrase": "OK",
  "core_agent_name": "core",
  "agents": [
    {"name": "core", "branch": "master", "clone_dir": "agent-core"}
  ]
}
EOF

# Render clauses + install hooks/skills
governance-core install --project-root .

# Validate
governance-core doctor --project-root .

Subsequent updates: git pull this repo, pip install -e . --upgrade, then governance-core upgrade --project-root /path/to/your/project (this preserves your .governance/config.json but refreshes clauses/hooks/skills).

Example content disclaimer

Some clauses and knowledge docs in this package contain examples drawn from the upstream project where governance-core was first developed (domain terminology, pipeline names, broker/API references, agent name conventions). These are explanatory examples, not requirements. Your project's .governance/config.json supplies its own agent names, ritual phrase, and clause keywords; the package's logic is project-agnostic.

A v1.0 release will template-ize all example tables; v0.1.0 ships with disclaimers attached to mixed clauses and methodology docs.

Project status

v0.1.0-alpha (2026-05):

  • API may break between minor versions (0.1.x)
  • Stable from 1.0.0 onwards
  • Bug reports + PRs welcome

License

MIT — see LICENSE.

Related

  • multi-agent-template — companion cookiecutter template + bootstrap CLI
  • Trade Agent (the project where this package was first developed) — private

Project details


Download files

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

Source Distribution

governance_core-0.1.4.tar.gz (306.8 kB view details)

Uploaded Source

Built Distribution

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

governance_core-0.1.4-py3-none-any.whl (377.0 kB view details)

Uploaded Python 3

File details

Details for the file governance_core-0.1.4.tar.gz.

File metadata

  • Download URL: governance_core-0.1.4.tar.gz
  • Upload date:
  • Size: 306.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for governance_core-0.1.4.tar.gz
Algorithm Hash digest
SHA256 890f0f0b5e48cc07432e412b190a2c3db9371f1baebaaa88bcdcae9d2b2627f3
MD5 5d97f7899f0701670eb7e20fad7d612b
BLAKE2b-256 79b6a31716a0e46be43345eea6cdff924fcc14f44ef359d6be67e45fad68d3ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for governance_core-0.1.4.tar.gz:

Publisher: release.yml on napheir/governance-core

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

File details

Details for the file governance_core-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: governance_core-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 377.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for governance_core-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 35a355c2faba6d558738d2c88574628d60a294f0aa28fad226b4fe7d8d98d7a1
MD5 cbef4f2f7d7e28d309159c9f3d1aff38
BLAKE2b-256 8d81a217fffb79a961c5227f44a284f7bce1eb26c7452ddbbe902f23073bc0f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for governance_core-0.1.4-py3-none-any.whl:

Publisher: release.yml on napheir/governance-core

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page