Open-Source Sentrux Catches AI Coding Agents Silently Breaking Your Architecture
Sentrux gives AI coding agents a real-time architectural score so they can self-correct before your codebase becomes ungovernable
ProTakeaways
- What it is: Sentrux is a real-time architectural sensor that scores codebase quality (0–10,000) and feeds that signal to AI agents via MCP.
- Core mechanic: Five graph-theoretic metrics (modularity, acyclicity, depth, equality, redundancy) combined as a geometric mean — ungameable by design.
- MCP integration: 9 tools let agents call scan/session_start/session_end to detect and fix architectural drift mid-session, not post-PR.
- Rules engine: Commit a
.sentrux/rules.tomlto enforce layer boundaries, zero-cycle constraints, and coupling limits in CI. - Pricing: Free and MIT-licensed for core features; Pro tier at $15/month adds diagnostics, per-function metrics, and what-if analysis.
- Tech: Pure Rust, single binary, 52 languages via tree-sitter plugins, runs on macOS, Linux, and Windows.
Sentrux is an open-source, pure-Rust tool that acts as a real-time architectural sensor for your codebase. It computes a single continuous quality score (0–10,000) by analyzing the dependency graph of your project, and exposes that score to AI coding agents via an MCP server so they can detect and fix architectural drift mid-session, not two weeks later when everything is broken.
The problem AI agents create without knowing it
There is a dirty secret to AI-assisted development that most teams only discover after the damage is done. When you write code yourself in an IDE, you build a mental model of the architecture: which module does what, how they connect, where things belong. You are the governor. Every edit passes through your understanding of the whole.
AI agents removed that governor. They modify dozens of files per session while you watch a stream of Modified src/foo.rs in a terminal. You lose spatial awareness. You do not see that a new file just created a circular dependency, or that three modules now depend on something that was supposed to be internal. The better the AI generates code, the faster the codebase becomes ungovernable.
Sentrux's framing is that this is a feedback loop problem. Compilers close a loop on syntax. Test suites close a loop on behavior. Linters close a loop on style. But architecture had no sensor and no actuator. Sentrux is the missing piece.
One score, five root causes
The core output is the Quality Signal: a single number from 0 to 10,000. It is the geometric mean of five independent, graph-theoretic metrics, each normalized to [0, 1]: