Tools

Structure

Architecture rules that fail the build when an import crosses a line.

An agent asked to fix a bug takes the shortest path, and the shortest path often runs straight through a layer it shouldn't touch. Write the boundaries down once and these tools enforce them on every change. A module boundary is a standard, and rule 19 says machines enforce those.

Architecture and boundaries

  • Start here

    ArchSpec

    Declares Ruby and Rails components and boundaries in one file, and checks every change against them.

    Built for code agents write, and the check is plain static analysis, so a pass means the same thing every run.

    Ruby Open source, MIT247 starsLatest release Aug 2026Source

  • Start here

    ArchUnit

    Writes Java architecture rules as unit tests covering layers, slices, cycles and naming.

    A change that breaks a layer fails the build with a clear message, so the rule holds without a reviewer.

    Java/JVM Open source, Apache-2.03.9k starsLatest release Sep 2026Source

  • Start here

    ArchUnitNET

    C# port of ArchUnit that runs architecture rules inside your .NET test framework.

    The same test-based boundary checks for .NET, so a stray reference fails the build.

    .NET Open source, Apache-2.01.4k starsLatest release Aug 2026Source

  • Start here

    Boundary

    Mix compiler that limits which Elixir modules may call each other and which libraries they may use.

    Violations show up as compile warnings, so every build tells an agent where it crossed a line.

    Elixir/Erlang Open source, MIT999 stars

  • Start here

    cargo-deny

    Checks Rust dependencies for banned crates, duplicate versions, advisories and license rules.

    A ban list stops a second HTTP client or an unwanted crate from slipping in unnoticed.

    Rust Open source, Apache-2.02.4k starsLatest release Jul 2026Source

  • Start here

    dependency-cruiser

    Checks JavaScript and TypeScript imports against dependency rules and flags circular imports.

    An import across a line you drew fails the build, and the tool draws the graph so the damage is visible.

    JavaScript/TypeScript Open source, MIT7.3k starsLatest release Sep 2026

  • Start here

    Deptrac

    Defines architectural layers in PHP and fails when code depends across them in forbidden ways.

    Layer rules live in a YAML file and run in CI, so agent-written PHP stays inside its layers.

    PHP Open source, MIT3k starsLatest release Sep 2026Source

  • Start here

    go-arch-lint

    Maps Go packages to components in a YAML file and fails when dependencies break the declared layers.

    One YAML file describes the layers, and CI checks every import against it.

    Go Open source, MIT588 starsLatest release Sep 2026

  • Start here

    Harmonize

    Swift architecture and convention rules written as unit tests, in the style of Konsist.

    Swift has few architecture-test options, and this one keeps layer rules in the test suite.

    Swift/iOS Open source, Apache-2.0340 starsLatest release Sep 2026

  • Start here

    import-linter

    Lets you declare allowed imports between Python packages and fails CI on violations.

    Contracts live in config and fail CI the moment an agent adds a forbidden import.

    Python Open source, BSD-2-Clause1.2k starsSource

  • depguard

    Go linter that allows or denies imports per package using lists and file globs.

    Banning a package or blocking one layer from importing another takes a few lines of golangci-lint config.

    Go Open source, GPL-3.0203 starsLatest release Mar 2023

  • eslint-plugin-boundaries

    ESLint plugin that classifies files into elements and checks which elements may import which.

    Boundary breaks appear as lint errors in the editor and in CI, right where the agent is working.

    JavaScript/TypeScript Open source, MIT997 starsLatest release Aug 2026Source

  • Konsist

    Kotlin static analyzer where architecture and convention rules are written as JUnit or Kotest tests.

    Naming and layer rules for Kotlin and Android code get checked on every test run.

    Java/JVM Open source, Apache-2.01.7k starsLatest release Dec 2024Source

  • lintel

    One arch.yaml for dependency rules across Go, TypeScript and Python.

    A repo with several languages can keep all its dependency rules in a single file.

    A very young project, at version 0.1.0.

    Python, JavaScript/TypeScript, Go Open source, MITLatest release Jul 2026Source

  • Nx module boundaries

    Nx's enforce-module-boundaries ESLint rule limits which workspace projects may depend on which, using tags.

    Inside an Nx monorepo this check already exists, so agents meet it on every lint run.

    JavaScript/TypeScript Open source, MITPart of NxLatest release Sep 2026Source

  • Packwerk

    Shopify's Ruby tool that enforces package boundaries and privacy in Rails apps.

    A violation shows up the moment an agent reaches into another package's internals in a modular monolith.

    Ruby Open source, MIT1.9k starsLatest release Aug 2026

  • PHPArkitect

    Architecture rules for PHP written as plain PHP: namespaces, naming, inheritance and types.

    Rules read like code, and baselines let a legacy project adopt them a step at a time.

    PHP Open source, MIT934 starsLatest release Sep 2026

  • PHPat

    PHPStan extension for architecture tests, written in readable rule objects.

    It runs inside PHPStan, so the pipeline gains no extra step.

    PHP Open source, MIT1.3k starsLatest release Sep 2026Source

  • pks

    Rust implementation of Packwerk from the Ruby at Scale toolchain.

    A compiled checker stays cheap enough to run after every agent edit.

    Its authors mark it as work in progress.

    Ruby Open source, MIT10 starsLatest release Sep 2026

  • PyTestArch

    ArchUnit-style architecture rules for Python, written as pytest tests.

    Rules sit beside the other tests, so the team has one place to look.

    Python Open source, Apache-2.0175 starsLatest release Aug 2025

  • Sheriff

    Enforces module boundaries in TypeScript projects through barrel files and tag-based dependency rules.

    A small set of tag rules covers Angular and plain TypeScript, with CLI and ESLint modes.

    JavaScript/TypeScript Open source, MIT323 starsLatest release Sep 2025Source

  • Sonargraph

    Architecture checker with a rule language for layers and cycles, plus a free build tool for quality gates.

    The rule file lives in version control and can fail the build.

    Python, Java/JVM, .NET, C/C++ Paid

  • Spring Modulith

    Spring Boot library that verifies module structure and generates module documentation.

    One verify call fails the tests when a module reaches into another module's internals.

    Java/JVM Open source, Apache-2.01.2k starsLatest release Aug 2026Source

  • Tach

    Rust-based tool that enforces module boundaries and public interfaces in Python projects.

    It runs fast enough for pre-commit and adds public-interface checks to the import rules.

    Python Open source, MIT2.8k starsLatest release Oct 2026Source

Gone quiet 4

These tools are archived or shut down, or nobody has released or committed to them in two years. Some still work fine. Read the note before you adopt one.

  • JDepend

    Old Java package metrics tool for coupling, stability and cycles.

    It still turns up in older Java builds, and ArchUnit now covers the same ground with tests.

    Dormant since 2020.

    Java/JVM Open source, MIT702 starsLast change Apr 2020

  • madge

    Draws module dependency graphs and finds circular dependencies and orphan modules in JavaScript.

    Its circular check works as a quick CI gate against the tangles agents create.

    Dormant since 2024. dependency-cruiser does more.

    JavaScript/TypeScript Open source, MIT10k starsLast change Aug 2024

  • NetArchTest

    Fluent .NET library for enforcing architecture rules inside unit tests.

    Older .NET suites still use it for layer checks written as plain tests.

    Dormant since 2024. ArchUnitNET is the maintained alternative.

    .NET Open source, MIT1.8k starsLast change Jul 2024

  • Structure101

    Commercial tool that shows code structure as a map and checks architecture rules against it.

    Large legacy codebases can see their tangles here before anyone sets rules.

    No longer for sale. Existing customers keep support while features fold into Sonar products.

    Java/JVM, .NET, C/C++ Paid

Missing a tool that belongs here? Suggest it.

Every tool here was checked against its GitHub repository or its own site on 6 October 2026. Stars and dates come from GitHub on that day.