Skip to main content

Generate and maintain governance documentation for AI agents.

Project description

autogovern

Generate and maintain enterprise-grade governance documentation for AI agents, directly from the agent's codebase.

Install

# With uv (recommended)
uv tool install autogovern

# With pipx
pipx install autogovern

# Or with pip
pip install autogovern

One-line installers (install uv first if needed, then the tool):

# POSIX (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/ashborn-systems/autogovern/main/install/install.sh | sh

# Windows (PowerShell)
irm https://raw.githubusercontent.com/ashborn-systems/autogovern/main/install/install.ps1 | iex

A hosted install page with copy-button tabs is on the roadmap; the scripts above are committed in install/ and work from any stable URL.

Quickstart

Vanilla mode (no init required)

export AUTOGOVERN_API_BASE=https://openrouter.ai/api/v1
export AUTOGOVERN_MODEL=anthropic/claude-3.5-sonnet
export AUTOGOVERN_API_KEY_ENV=OPENROUTER_API_KEY
export OPENROUTER_API_KEY=your-key-here

autogovern generate /path/to/agent-repo

Docs are generated into governance/. They are generic because no organisational context was provided. The more context you give it, the better the docs.

Enhanced mode (with init)

autogovern init          # wizard: config, context, hooks, CI
autogovern scan          # build the AgentProfile and AgentCard
autogovern generate      # write the governance document set
autogovern check         # verify docs are current

init writes .autogovern/config.yaml (provider settings) and .autogovern/context.yaml (organisational context: risk appetite, oversight model, jurisdictions, owner). It also installs a pre-commit hook and writes forge-appropriate CI configuration.

Commands

autogovern init          # wizard: config, context, hooks, CI
autogovern scan          # build and print the AgentProfile
autogovern generate      # full or incremental doc generation
autogovern diff          # show which sections would change and why
autogovern check         # CI gate: report stale docs; --fix regenerates
autogovern explain <doc> # plain-language provenance for a document
autogovern hook install  # re-install hooks manually
autogovern hook run      # heuristic impact check (pre-commit entrypoint)

Global flags

The inspection and generation commands (scan, generate, diff, check, explain) accept:

  • --json — machine-readable JSON output
  • --config <path> — alternate config file
  • --model <id> — override the configured model for one run
  • --strict — treat advisory scores as failures (check only)

Headless mode

# Generate from a profile JSON without scanning a repo
autogovern generate --profile agent-profile.json

# Check against a headless profile
autogovern check --profile agent-profile.json

Configuration

.autogovern/config.yaml:

model_provider:
  api_base: https://openrouter.ai/api/v1
  model: <model-id>
  api_key_env: OPENROUTER_API_KEY
  temperature: 0
watched_paths:
  - CLAUDE.md
  - .mcp.json
  - prompts/**
  # ...
thresholds:
  material: 80
  immaterial: 20
documents:
  system-card: true
  risk-assessment: true
  # ...

The API key is read from the named environment variable at runtime and never written to disk.

CI setup

autogovern init detects your forge from the git remote and writes CI configuration:

  • GitHub.github/workflows/autogovern.yml
  • Forgejo.forgejo/workflows/autogovern.yml
  • Bitbucketbitbucket-pipelines.yml
  • Other — prints the command to add

In CI, run:

autogovern check --json --strict

For auto-fix mode (commits regenerated docs):

autogovern check --fix
git add governance/ && git commit -m "autogovern: regenerated docs"

How it works

  1. Scan reads the repo (instruction files, MCP configs, model config, dependencies, prompts) and builds an AgentProfile with provenance on every field.
  2. Generate writes the governance document set from the profile plus the organisational context. Each section receives only its declared inputs (token-efficient). Incremental: only sections whose inputs changed are regenerated.
  3. Check rebuilds the profile, diffs against governance/profile.lock, and scores the change. Material changes (new tool, model swap, autonomy change) are detected deterministically without an LLM. Prompt content changes go to a semantic scorer.
  4. Idempotent — a second generate with no changes writes nothing.

Documentation

  • docs/SPEC.md — the full build specification
  • docs/BUILDPLAN.md — the phased build plan
  • docs/BUILDLOG.md — the build log, one line per phase

Roadmap

  • Hosted install page (tabbed install commands) on ashbornsystems.com
  • Standalone binaries (PyInstaller) and an npm wrapper for JS-native teams
  • Homebrew tap

License

Apache-2.0

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

autogovern-0.1.1.tar.gz (86.9 kB view details)

Uploaded Source

Built Distribution

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

autogovern-0.1.1-py3-none-any.whl (114.9 kB view details)

Uploaded Python 3

File details

Details for the file autogovern-0.1.1.tar.gz.

File metadata

  • Download URL: autogovern-0.1.1.tar.gz
  • Upload date:
  • Size: 86.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for autogovern-0.1.1.tar.gz
Algorithm Hash digest
SHA256 699117856bab70a391bca7b080a2ecfff210941c9b10fac41a3fbec9129147ac
MD5 58e58a01cd81c59565f6400b3e84ad3e
BLAKE2b-256 3778754a9c88497cc4699b13e9b2f884bbeef25b1023d16e816c44294ca655ff

See more details on using hashes here.

File details

Details for the file autogovern-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: autogovern-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 114.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for autogovern-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52b3c1cb7643dc576e39daeb017c076a7271243b1bf9dbb2f9e8f07a38a9903f
MD5 06d158c7f2e076555f79ca39f01bf84c
BLAKE2b-256 c49649b5ca5812bf4c82dda7d025027111e22d04cad2044af5ad52d3bd66f489

See more details on using hashes here.

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