ArchLens

•

Empowers AI coding agents and human developers with architecture awareness to prevent structural code degradation.

ArchLens serves as an Architecture Context Layer, providing AI coding agents with vital architectural rules and context *before* they generate code. It addresses the common problem of AI agents producing functional code that inadvertently erodes codebase structure by violating boundaries or creating "god objects." By integrating with the Model Context Protocol (MCP), ArchLens allows agents to proactively check architectural constraints, ensuring code integrity. For human developers, it offers CLI reports, PR comments, and CI/CD integration to monitor and enforce architectural standards, making architectural drift visible and preventable through deterministic, AST-based analysis.

主要功能

01Architecture rules defined as version-controlled config-as-code (`.archlens.yml`).
02Deterministic, AST-based static analysis with zero code egress.
03Detection of 'god nodes' (modules with excessive incoming dependencies).
04Calculates the 'blast radius' to show transitive impact of code changes.
05Proactive boundary checking for AI agents before code generation.
060 GitHub stars

使用案例

01Guide AI coding agents to write architecturally compliant code.
02Generate comprehensive architecture reports for human developers and code reviews.
03Integrate into CI/CD pipelines to prevent architecture drift in pull requests.