open source · pure rust · mit license

The sensor that closes
the feedback loop for
AI coding agents.

Your AI writes code at machine speed. Without structural governance, your codebase decays at machine speed too. sentrux is the governor.

Try it in your browser Install
quality signal
███████████████░░░░░ 7342 / 10000
sentrux live treemap — real-time architectural visualization

Live: Claude Code Opus 4.6 builds a FastAPI project. Quality lands at 6772.
Not because the agent can't do better — because without a sensor, it doesn't know what to improve.

// The problem nobody talks about

You start a project with Claude Code or Cursor. Day one is magic. The agent writes clean code, ships features fast.

Then something shifts. The agent starts hallucinating functions that don't exist. It puts new code in the wrong place. You're spending more time fixing the agent's output than writing it yourself.

Everyone assumes the AI got worse. It didn't. Your codebase did.

The code your AI writes today is the context it reads tomorrow. Every session silently degrades your architecture. Without a sensor, nobody notices until it's too late.

// 5 root cause metrics. One score.

Geometric mean of 5 independent graph-theoretic dimensions. Ungameable by design — Nash Social Welfare theorem (1950).

modularity
Newman 2004 · graph community detection
Do files cluster into independent modules? Replaces coupling, cohesion, and god file detection.
acyclicity
Martin 2003 · Acyclic Dependencies Principle
Are there circular dependencies? Tarjan's strongly connected component detection.
depth
Lakos 1996 · levelization
How deep are dependency chains? Deep chains amplify change propagation.
equality
Gini 1912 · inequality coefficient
Is complexity evenly distributed? God files are the #1 source of AI agent confusion.
redundancy
Kolmogorov 1963 · complexity theory
Dead or duplicate code. Every unnecessary line is noise for the AI agent.

// Install

  terminal
# macOS
brew install sentrux/tap/sentrux

# Linux
curl -fsSL https://sentrux.dev/install.sh | sh

# Windows
cargo install sentrux

# or build from source (any platform)
git clone https://github.com/sentrux/sentrux && cd sentrux && cargo build --release

// MCP integration

Your AI agent calls sentrux directly. The feedback loop closes automatically.

  mcp session
Agent: scan("/Users/me/project")
   { quality_signal: 7342, files: 139, bottleneck: "modularity" }

Agent: session_start()
   { status: "Baseline saved" }

  ... agent writes 500 lines of code ...

Agent: session_end()
   { pass: false, before: 7342, after: 6891 }
   "Quality degraded during this session"

Setup guide →    Claude Code · Cursor · Windsurf · any MCP client

// What you get

Live treemap
Every file visible. Dependency edges. Files glow on change.
Quality gate
sentrux check . — exit 0 or 1. Block bad merges in CI.
Rules engine
.sentrux/rules.toml — layers, boundaries, constraints.
Session diff
Before/after comparison. Catch degradation per agent session.
52 languages
Tree-sitter plugins. Zero language-specific code in the binary.
Pure Rust
Single binary. No runtime deps. macOS · Linux · Windows.

// 52 languages

BashCC++C#ClojureCOBOLCrystalCSSDartDockerfileElixirErlangF#GDScriptGoGroovyHaskellHCLHTMLJavaJavaScriptJSONJuliaKotlinLuaNimNixObj-CObject PascalOCamlPerlPHPPowerShellProtobufPythonRRubyRustScalaSCSSSoliditySQLSvelteSwiftTOMLTypeScriptVVueYAMLZig

// The feedback loop

sensor signal controller actuator system → ↺
sentrux quality_signal AI agent code changes codebase → ↺

Classical cybernetics (Wiener 1948, Tsien 1954). The loop converges naturally — like gradient descent. No artificial stopping point.

MIT Licensed · Open Source · 36K lines of Rust

See your codebase's skeleton.

Try in browser Install GitHub