Zerum
Zerum is a Rust-native, deterministic-first code governance tool for Python — Credo for Python.
v0.2.0 delivers roughly 75 native checks (ZR001–ZR510) with explainable findings, human and json output, and no dependency on external linters or LLMs.
Zerum is not a Ruff replacement. It focuses on maintainability, consistency, architecture boundaries, and deterministic AI-slop patterns.
Install
Requires Rust 1.70+ (see rust-version in Cargo.toml).
Quick start
zerum init writes zerum.toml from zerum.toml.example.
Exit codes (check)
| Code | Meaning |
|---|---|
| 0 | No issues |
| 1 | Issues found |
| 2 | Operational error (missing path, parse/read failure on all files, CLI error) |
Rule categories (v0.2.0)
| Range | Category |
|---|---|
| ZR001–015 | Readability |
| ZR101–110 | Consistency |
| ZR201–210 | Design |
| ZR301–315 | Refactor |
| ZR401–415 | Warning |
| ZR501–510 | AI (deterministic) |
Run zerum list-checks for the full catalog. Use zerum explain ZR### for rationale, false positives, tradeoffs, and remediation.
Output formats
SARIF, Markdown, review, and external checker orchestration are out of scope for v0.2.0.
Tutorial
Educational material lives under docs/tutorial/:
- 00 — Introduction
- 01 — Static analysis basics
- 02 — Parsing Python in Rust
- 03 — Building a rule engine
- 04 — Writing checks
- 05 — Explain mode and configuration
- 12 — Roadmap
Development
CI runs lint, tests, coverage, and regression suites on push/PR (see .github/workflows/ci.yml).
Category fixtures: consistency_project, refactor_project, design_project, ai_slop_project, warning_project.
Changelog
See CHANGELOG.md. Release notes: v0.1.0 · v0.2.0. Publishing: docs/RELEASING.md.
License
MIT — see LICENSE.