Ratchets: a Rust tool that polices style violations with a flexible budget Imbue AI released Ratchets, a Rust-based progressive lint enforcement tool that allows codebases to contain existing violations while preventing new ones through a budgeted, ratcheting mechanism. The tool supports region-based budgets, regex and AST rules, and agent-friendly JSONL output, aiming to monotonically decrease technical debt. Ratchets is a progressive lint enforcement tool that allows codebases to contain existing violations while preventing new ones. Unlike traditional linters that enforce binary pass/fail, Ratchets permits a budgeted number of violations per rule per region. These budgets can only decrease over time the "ratchet" mechanism , ensuring technical debt monotonically decreases. Progressive enforcement : Allow existing violations while preventing new ones Region-based budgets : Set different limits for different parts of your codebase Regex and AST rules : Match patterns via text or tree-sitter queries Agent-friendly : JSONL output, deterministic results, clear exit codes Fast : Parallel execution, lazy parser loading, Rust performance Install from source using the installation script: curl -sSf https://raw.githubusercontent.com/imbue-ai/ratchets/main/install.sh | sh This will automatically build and install ratchets to ~/.cargo/bin/ . Requires Rust/Cargo to be installed. Initialize Ratchets in your repository: ratchets init This creates: ratchets.toml — Configuration file ratchet-counts.toml — Violation budgets ratchets/ — Directory for custom rules Optionally, drop a .ratchetignore file at any depth in the tree to exclude paths from ratchet enforcement. Syntax matches .gitignore per-directory, nested files compose, negation supported with ; these files are checked in alongside source. Run checks: ratchets check Verify that violations are within budget: ratchets check Check all files ratchets check --format jsonl Machine-readable output ratchets check src/ Check specific path ratchets check --since main Only files changed since the main ref --since