Skip to content

Repository files navigation

My Code, My Rules banner

CI Publish PyPI Python Docs Coverage

Warning MCMR is early 0.0.x software. Its rules and command line may still change.

Installation

MCMR requires Git and Python 3.14 or newer. Use standard CPython for the simple PyPI install.

pip install mcmr
mcmr check .

Use uv tool install mcmr for an isolated command line installation.

MCMR also runs on free-threaded Python 3.14t+. Polars does not yet publish a compatible PyPI runtime wheel, so use the source environment described in the install guide for that interpreter.

What it is

MCMR is a policy engine for whole repositories. A Rust kernel reads source once into typed fact tables. Python rules query the shared evidence and report exact findings with source locations.

  • Deterministic rules are local, fast, and enabled by default.
  • Contextual rules use a configured model only when you enable them.
  • External rules can join repository facts with systems such as DataHub.
  • Safe repairs are kept only after MCMR reparses the edit and reruns the rule.
  • Plugins can add rules and evidence providers through public entry points.

MCMR reads Python, Rust, TypeScript, C, C++, and CUDA.

Usage

mcmr check . --format concise
mcmr check . --repair preview
mcmr check . --repair apply
mcmr check . --contextual --external

Write every verdict to DataHub, then read the history before the next agent changes the code.

mcmr check . --external --writeback
mcmr history .

Demo

The repository includes a deliberately messy MCP server. Run every enabled rule without changing the demo.

mcmr check demo/ --contextual --external --writeback --report-only

See the documentation, the rule reference, and the recorded DataHub examples. SYSTEM.md documents the architecture. The docs also cover contextual setup and rule controls.

MCMR is licensed under Apache 2.0.

About

My Code, My Rules. Define and enforce the engineering rules that make your code yours.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages