rust-cargo-governor
Governance and release automation tooling for Rust Cargo workspaces.
Version 2.0.0 introduces a versioned machine contract for CLI output,
an application-layer API, and agent-facing documentation and MCP support.
Overview
cargo-governor provides governance and release automation for Rust
projects:
owners— Declarative crate ownership management throughCargo.tomlrelease— Automated versioning, changelog generation, and publishing
Define ownership, release policies, and quality gates as code directly
in your Cargo.toml files. All policies are version-controlled, reviewed
through code review, and enforced in CI.
Installation
Then authenticate with crates.io once:
Usage
Owners
Manage crate ownership declaratively:
# Show computed owner list
# Sync with crates.io
# Check for drift
Release
Normal release UX:
# 1. Make changes
# 2. Commit them with Conventional Commits
# 3. Preview the full release
# 4. Let cargo-governor do the rest
Advanced commands remain available for inspection or recovery:
cargo-governor now refuses the confusing workflow where versions are
pre-bumped in manifests before release, and mutating release commands
also require a clean working tree by default.
CHANGELOG.md is generated from Conventional Commit messages since the
last release tag, so release notes follow the same commit range and
semantic analysis as the version bump itself.
Coding Agents
cargo-governor now ships a machine-readable agent contract and MCP
adapter:
# Load agent context
# Generate repo-local agent docs and schemas
# Serve read-only and dry-run tools over MCP stdio
Recommended agent flow:
Configuration
Workspace defaults
[]
= ["org-bot"]
[]
= ["alice", "github:myorg:core-team"]
= ["bob", "carol", "github:myorg:maintainers"]
Package configuration
[]
= ["alice", "bob"]
= ["github:myorg:core-team"]
[]
= ["core", "maintainers"]
Conventional Commits
Version bump detection follows conventional commits:
feat:→ minor bumpfix:→ patch bumpfeat!:orBREAKING CHANGE:→ major bump
CI/CD Integration
- name: Release
run: cargo-governor --dry-run release plan --format json
For mutating CI release jobs, gate release bump, release publish, and
release full behind explicit approval.
No token needed — uses credentials from cargo login.
Development
Project Structure
crates/
├── cargo-governor/ # CLI, presenters, MCP transport, composition root
├── governor-application/ # Use cases and machine contracts
├── governor-cargo/ # Cargo metadata, command, changelog adapters
├── governor-core/ # Domain model and port interfaces
├── governor-cratesio/ # crates.io registry adapter
├── governor-git/ # Git adapter
├── governor-checkpoint/ # Checkpoint/resume adapter
└── governor-owners/ # Owners domain and policies
License
MIT OR Apache-2.0