sentrux logo

sentrux

Visit

Real-time architectural sensor that closes the feedback loop for AI coding agents. Pure Rust, one binary, 52 languages, five root-cause metrics rolled into one quality score.

Share:

sentrux is a pure-Rust architectural sensor that watches your codebase in real time and turns structural health into one 0-10000 quality score. It appeared in the For You feed as the "live map" that keeps a project from collapsing as AI agents rewrite it: it scans files and dependency chains, folds five root-cause metrics into a single score, and exposes that signal to agents through MCP. Its pitch is simple. Agents write code at machine speed, so without a sensor, codebases rot at machine speed too.

Key Features

  • One score, five root causes: modularity, acyclicity, depth, equality, and redundancy are combined with a geometric mean, which the author argues is hard to game.
  • Live treemap: sentrux opens a GUI that updates as the agent writes, instead of showing diffs or terminal output.
  • MCP integration: nine MCP tools let Claude Code, Cursor, Codex, or OpenCode query the score and gate on degradation.
  • Rules engine: .sentrux/rules.toml encodes layers, boundaries, and constraints, great for turning architectural intent into machine-readable grades.
  • Session gate: sentrux gate --save before a session and sentrux gate after, to catch degradation per agent run.
  • CI-friendly: sentrux check . exits 0 or 1 so you can block bad merges.
  • 52 languages: all language knowledge lives in plugin.toml plus tags.scm query files, so adding a language needs zero Rust code.

Use Cases

Who Should Use This Tool?

  • Team leads running long Claude Code / Codex sessions who lose trust in a codebase after a week of agency.
  • Platform engineers who want a quality gate in CI that is about structure, not just tests.
  • Refactoring planners who need to see coupling, cycles, and god-files before they start.
  • Anyone adopting vibe coding who still wants an exit ramp before the architecture becomes unreadable.

Problems It Solves

  1. Context rot without a feedback loop: the agent does not know when code stops fitting the system, so it cannot self-correct.
  2. Spec-first workarounds produce mountains of markdown with zero visibility into what actually shipped.
  3. Test suites catch behavior, not architecture: no tool was closing the loop on whether a change fits the growing system.

Pricing

sentrux is free and open source under the MIT license. There is no paid tier; you pay only for your compute.

Piece Price Notes
sentrux binary $0 MIT, single binary, macOS/Linux/Windows
Language plugins $0 52 in the standard set, or custom via plugin init

Advantages & Unique Selling Points

  1. Pure Rust, single binary: no runtime dependencies, easy to drop into a repo or a container.
  2. Language-agnostic by design: all language logic is data-driven, so extending it is not a compiler change.
  3. Differentiator versus context-rot tools: instead of managing the context window, sentrux gives the agent an external source of truth about the codebase's health.

User Reviews

"It's the difference between an agent guessing why the code feels off and giving it a target: get your redundancy score below 1000. That directness saves tokens and makes the self-improvement loop actually go somewhere." — Independent contractor, per community write-ups

"The 0-10000 score is ungameable by design. Whether that holds up under adversarial pushing is the thing to watch." — Practitioner note from an MCP roundup

Getting Started

  1. Install: brew install sentrux/tap/sentrux (macOS), curl installer (Linux), or a release binary (Windows).
  2. Open the GUI: sentrux or sentrux /path/to/project.
  3. Save a baseline: sentrux gate --save . before an agent session.
  4. Compare after: sentrux gate ., or enforce in CI with sentrux check ..
  5. Connect the agent: point your MCP client at the sentrux server so the agent sees the live score.

First-party resources: sentrux.dev, the sentrux GitHub repo, and its MCP integration docs.

Frequently Asked Questions

Does sentrux run tests or check functionality?

No. It measures structure (dependencies, file organization, architecture) through static analysis. Correctness is still the job of a test suite, so use both.

Can it be used without an AI agent?

Yes. Run sentrux to visualize, sentrux check in CI to enforce rules, and sentrux gate to track quality over time.

What do the 52 languages really mean?

Language ability comes from tree-sitter plugins referenced in plugin.toml. The binary itself is generic, which is why adding a language needs no Rust code.

What drives the score?

The five metrics are combined via a geometric mean, which is less susceptible to one inflated metric carrying the whole result.

Alternatives

  • LangGraph: for orchestrating agentic workflow logic, a different layer than code-structure sensing.
  • CrewAI: for building multi-agent teams, not for measuring a codebase.
  • OpenCode: an agent CLI that sentrux can feed structural feedback into.

Tips & Best Practices

  1. Set a baseline first: gate --save before your agent session is what makes gate after meaningful.
  2. Write rules for your stack: default constraints may be too permissive or too strict; the rules engine is where your architecture intent belongs.
  3. Do not skip functional tests: sentrux is structural only, so pair it with a real test suite.

Conclusion

sentrux is the sensor that gives machine-speed coding a machine-speed governor. It does not replace planning or tests, it closes the gap neither of them could. If your codebase is being reshaped daily by agents, one score plus one MCP hook is a cheap way to stop the drift before it becomes a rewrite.

Comments

No comments yet. Be the first to comment!