ConfigsApr 6, 2026·2 min read

Sentrux — Architectural Feedback Sensor for AI Agents

Real-time code quality sensor written in pure Rust that closes the feedback loop for AI coding agents. Monitors architecture patterns and feeds improvement signals back to agents. 800+ stars.

AI
AI Open Source · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

# Install via cargo
cargo install sentrux

# Or download pre-built binary
curl -fsSL https://github.com/sentrux/sentrux/releases/latest/download/sentrux-$(uname -s)-$(uname -m) -o /usr/local/bin/sentrux
chmod +x /usr/local/bin/sentrux
# Run on your project
sentrux watch ./src

# Or integrate with your AI agent
sentrux analyze ./src --format json | your-agent

Intro

Sentrux is a real-time architectural sensor written in pure Rust that helps AI coding agents close the feedback loop for recursive self-improvement of code quality with 800+ GitHub stars. It monitors your codebase for architectural patterns, complexity metrics, and code smells, then feeds structured feedback back to AI agents so they can iteratively improve their own output. Best for teams using AI agents in production who want to ensure code quality doesn't degrade. Works with: Claude Code, Cursor, any agent that accepts structured feedback. Setup time: under 2 minutes.


How It Works

Watch Mode

Continuously monitors your codebase and reports issues in real-time:

sentrux watch ./src --rules complexity,coupling,naming

Output:

[WARN] src/auth/handler.rs:45Cyclomatic complexity 23 (threshold: 15)
[WARN] src/api/routes.rs:12Module coupling score 0.89 (threshold: 0.7)
[INFO] src/db/queries.rsClean, no issues detected

Agent Feedback Loop

Feed Sentrux output directly into your AI agent for self-improvement:

# Agent writes code → Sentrux analyzes → Agent improves
sentrux analyze ./src --format json | claude-code "Fix these architectural issues"

Metrics Tracked

Metric What It Measures
Cyclomatic complexity Control flow complexity per function
Module coupling Dependencies between modules
Cohesion score How focused each module is
Naming consistency Convention adherence
Dead code detection Unused functions and imports
Dependency depth Import chain length

Custom Rules

# sentrux.toml
[rules]
max_complexity = 15
max_coupling = 0.7
max_function_lines = 50
naming_convention = "snake_case"

Performance

Written in pure Rust — analyzes 100K LOC in under 2 seconds. Zero runtime dependencies.

Key Stats

  • 800+ GitHub stars
  • Pure Rust, zero dependencies
  • 100K LOC in <2 seconds
  • 6 built-in metric categories
  • JSON output for agent integration

FAQ

Q: What is Sentrux? A: Sentrux is a Rust-based code quality sensor that monitors architectural patterns and feeds structured feedback to AI coding agents, enabling recursive self-improvement of code quality.

Q: Is Sentrux free? A: Yes, fully open-source under MIT license.

Q: How is Sentrux different from ESLint or Clippy? A: Sentrux focuses on architectural-level metrics (coupling, cohesion, complexity) rather than syntax-level linting. It is designed specifically to feed AI agents, not just display warnings.


🙏

Source & Thanks

Created by Sentrux. Licensed under MIT.

sentrux — ⭐ 800+

Thanks for building the feedback loop AI coding agents need.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets