# 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. ## Install Save in your project root: ## Quick Use ```bash # 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 ``` ```bash # 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: ```bash sentrux watch ./src --rules complexity,coupling,naming ``` Output: ``` [WARN] src/auth/handler.rs:45 — Cyclomatic complexity 23 (threshold: 15) [WARN] src/api/routes.rs:12 — Module coupling score 0.89 (threshold: 0.7) [INFO] src/db/queries.rs — Clean, no issues detected ``` ### Agent Feedback Loop Feed Sentrux output directly into your AI agent for self-improvement: ```bash # 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 ```toml # 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](https://github.com/sentrux). Licensed under MIT. > > [sentrux](https://github.com/sentrux/sentrux) — ⭐ 800+ Thanks for building the feedback loop AI coding agents need. --- ## 快速使用 ```bash cargo install sentrux sentrux watch ./src ``` --- ## 简介 Sentrux 是一个用纯 Rust 编写的实时架构质量传感器,GitHub 800+ stars。它监控代码库的架构模式、复杂度和代码异味,将结构化反馈送回 AI 编码 Agent,实现代码质量的递归自我改进。适合在生产中使用 AI Agent 并希望代码质量不退化的团队。 --- ## 来源与感谢 > Created by [Sentrux](https://github.com/sentrux). Licensed under MIT. > > [sentrux](https://github.com/sentrux/sentrux) — ⭐ 800+ --- Source: https://tokrepo.com/en/workflows/89c31522-d20b-4d5b-87da-c0cadc371239 Author: AI Open Source