The Problem
AI coding assistants can generate code quickly, but they lack a concrete, real‑time signal of architectural health. Without a sensor that scores structural quality, agents drift, introduce regressions, and require costly manual review.
What This Does
sentrux ships a native Rust binary that scans a project with 52 tree‑sitter language plugins (see plugins/). It builds a dependency graph (sentrux-core/src/analysis/graph/mod.rs), applies a rules engine (sentrux-core/src/app/mod.rs), and produces a live treemap UI (sentrux-core/src/app/panels/.rs). The binary can also run head‑less (sentrux check) and expose a Model‑Context‑Protocol (MCP) server (sentrux-core/src/app/mcpserver/mod.rs) so an external AI agent can query quality signals during a coding session.
Key files: sentrux-bin/src/main.rs – CLI entry point, parses sub‑commands (check, gate, --mcp). sentrux-core/src/analysis/plugin/loader.rs – discovers the .toml plugin manifests. sentrux-core/src/app/panels/healthdisplay.rs – renders the “quality signal” gauge shown in the README demo.
How To Use It
Setup
macOS (Homebrew) brew install sentrux/tap/sentrux
Linux (curl installer)
curl -fsSL https://raw.githubusercontent.com/sentrux/sentrux/main/install.sh | sh
Build from source (requires Rust toolchain)
git clone https://github.com/sentrux/sentrux.git cd sentrux cargo build --release # produces ./target/release/sentrux
The repository contains a Cargo.toml workspace and per‑crate manifests (sentrux-bin/Cargo.toml, sentrux-core/Cargo.toml). No other runtime dependencies are required.
Configuration
Optional rule overrides live in .sentrux/rules.toml. MCP server activation is a CLI flag (--mcp) – no external config file is needed beyond the standard binary options.
Running it
Launch the interactive UI on the current project ./target/release/sentrux
Scan a specific directory
./target/release/sentrux /path/to/project
CI‑friendly quality check (exit code 0/1)
./target/release/sentrux check .
Baseline before an AI‑driven session
./target/release/sentrux gate --save .
Compare after the session
./target/release/sentrux gate .
To expose the MCP endpoint for an AI agent: ./target/release/sentrux --mcp
The agent can then call the server per the MCP spec (see claude-plugin/.claude-plugin/plugin.json for an example integration).
Real‑World Use
A development team using Claude Code can prepend each generation cycle with sentrux gate --save . to record a health baseline. After the model writes new code, sentrux gate . returns a non‑zero status if the score drops, allowing an automated CI gate or a feedback loop that prompts the model to revise. The MCP server lets a live assistant query GET /health and adjust its output in real time.
{ "mcpServers": { "sentrux": { "command": "sentrux", "args": ["--mcp"] } } }
Code Health & Issues
Low – Missing language‑specific tests – Plugins are largely data files (plugins//plugin.toml) without unit tests for parser integration. Medium – Binary size risk – 52 tree‑sitter grammars are compiled into the binary (plugins/*/queries/tags.scm), which can increase startup time on constrained hardware. Low – Limited documentation of MCP API – Only a brief JSON example exists; no OpenAPI spec or client library is provided. Low – No explicit security audit – No cargo audit results are shown; external dependencies (e.g., winit, wgpu) should be vetted for CVEs. Low – CI coverage – GitHub Actions (.github/workflows/ci.yml) runs cargo test and builds Docker images, but coverage metrics are not reported.
Overall the repo includes a full test suite (sentrux-core/src/analysis/graph/tests.rs, etc.), a permissive MIT license, and a reproducible build pipeline.
The Bottom Line
sentrux delivers a functional, Rust‑native sensor that can quantify architectural health and feed that signal to AI coding assistants via a simple CLI or MCP server. It is production‑ready for teams that already adopt model‑driven development and need an automated quality gate. The main trade‑offs are the large binary footprint and modest documentation around the MCP protocol; otherwise the codebase is well‑structured and test‑covered.