Claude Code + Cursor · pure Python · zero dependencies

The architecture in your head, made a rule the agent respects.

The architectural seatbelt for coding with AI. Declare your layers in CLAUDE.md, AGENTS.md, or a dedicated ARCHITECTURE.md, and every edit the agent makes is checked against your rules — the instant a violation happens, still inside the loop.

Get Archlint — $20 See the concept
$ python3 archlint.py install
archlint report
# self-correction rate — this branch
drift caught       14
fixed same turn  12  86%
# verdicts
  ui → api     allowed
  ui ✗ db      blocked
  api ⇢ util   undeclared
  repo ⟳ svc   cycle
✗ ui ✗ db  blocked
in the same turn
Detects drift in Python· TypeScript / JavaScript· Go· Rust· Java· C#
/ the concept

Your layers are stacked panes of glass.

You declare the project's layers — ui, api, repo, db — and the dependency rules between them. Every allowed edge lets the light through; every forbidden edge is frosted glass.

Archlint reads the imports of each edit and checks them against the facade you drew. With no blueprint it does nothing — so it never breaks anyone's setup.

uisrc/ui/**
→ api
apisrc/api/**
→ repo
reposrc/repo/**
→ db
dbsrc/db/**
ui  ✗  db the ui never touches the database directly — blocked.
/ the difference is when it acts

A static analyzer runs in CI. Archlint runs in the agent's turn.

Without archlint

The analysis runs after the architecture has already rotted. Drift piles up across the 40 tool-calls of the session.

violation introduced … 40 tool-calls … failed in PR review, three weeks later
With archlint

The check runs on the spot — while fixing is still cheap. Drift never gets the chance to accumulate.

violation introduced blocked in the same turn agent fixes it and moves on
/ features

One script. Pure stdlib. Never breaks anyone's setup.

real-time
Drift, the moment it happens
Catches a layer violation the instant the agent writes it — across Python, TypeScript/JavaScript, Go, Rust, Java and C#, still inside the loop.
imports
Real-world import resolution
Resolves what actually exists: tsconfig aliases, Python src/ layout, Go modules, Rust crate:: paths, Java source roots, C# namespaces. No false positives.
two harnesses
Claude Code + Cursor
Per-edit feedback in Claude Code; end-of-turn in Cursor — honest about it: afterFileEdit is observational, so Cursor nags at stop.
init
archlint init
Drafts a blueprint from the structure you already have — layers from directories, edges from real imports. Review it in 30 seconds.
baseline
Baseline for legacy
Grandfathers a project's historical violations and flags only new drift. Adopt it today without refactoring the past first.
severity
lenient, strict, forbid!
Pick the rigor: lenient warns, strict blocks until fixed, and a per-rule forbid! is a hard block that always stops the edit.
cycles
Cycle detection
Finds the dependency cycles that quietly couple your layers — and names a concrete import in each loop, so it's fixable without grep.
leakage
Public-API leakage
Smells out imports that reach past a layer's public surface into its internals — the structural leak a name-based check misses.
graph
Layer graph
Emits the architecture as Mermaid or Graphviz DOT — allowed, forbidden and observed edges, cycles highlighted. graph --out layers.svg renders it.
report
Self-correction rate
archlint report reads the drift log and shows how often the agent fixed its own violation in the same turn.
sarif
GitHub code scanning
archlint check --format sarif emits SARIF 2.1.0; a workflow snippet uploads it so drift shows up as code-scanning alerts.
ci
The same engine in CI
archlint check runs in CI and pre-commit on the identical code as the live hook. One definition, two places, zero divergence.
/ how it works

Three steps. Thirty seconds of setup.

01
Generate the blueprint
archlint init reads the structure you already have — layers from directories, edges from real imports. You review it in 30s.
02
The agent edits
On every saved file, archlint reads the imports and checks them against the rules. Understands tsconfig aliases, src/, Go modules and crate::.
03
Warn or block
lenient warns; strict blocks until fixed. The same engine runs as archlint check in CI.
CLAUDE.md or AGENTS.md — blueprint
# archlint
layers:
  ui   src/ui/**
  api  src/api/**
  repo src/repo/**
  db   src/db/**
rules:
  ui  -> api
  api -> repo
  repo -> db
  forbid ui -> db   # soft block
  forbid! ui -> db/secrets # hard block
/ pricing

Open core. Pay once. A year of updates.

A free MIT lite core, public forever. Everything else ships in Pro — one developer, unlimited projects.

Lite
MIT
Free

The core that catches drift. Public on the marketplace.

Layers, forbid, archlint check + the live hook
Python, TypeScript/JavaScript, Go, Rust
Import resolution + blueprint diagnostics
Forbidden, undeclared and leakage findings
Pro
one-time
$20
/ pay once

One developer, unlimited projects. One year of updates. No subscription, no license keys, no LLM cost.

Everything in Lite, plus —
Layer graph viz — Mermaid / DOT / SVG
Cycle detection + forbid! hard blocks
archlint init, baseline, drift report
SARIF / GitHub code scanning
Cursor adapter + Java and C#
One-command install: python3 archlint.py install
Get Archlint — $20
PolyForm Internal Use 1.0.0 + commercial terms · details
Need a license for the team? Talk to us
/ faq

Frequently asked.

Which languages does it cover?+
Python, TypeScript/JavaScript, Go, Rust, Java and C# — six languages. Import resolution understands tsconfig aliases, the Python src/ layout, Go modules, Rust crate:: paths, Java source roots and C# namespaces, so the check matches what your project really imports.
Does it work outside Claude Code?+
Yes. Claude Code gets per-edit feedback; Cursor is supported too, and we're honest about the seam: Cursor's afterFileEdit hook is observational, so the feedback lands end-of-turn at stop. The same engine also runs as archlint check in CI and pre-commit, plus SARIF output for GitHub code scanning. One architecture definition serves every surface.
Do I have to configure much?+
No. archlint init reads the structure you already have and drafts a blueprint — layers from directories, edges from real imports. You review it in 30 seconds instead of writing it from scratch. And with no blueprint, archlint simply does nothing: it never breaks anyone's setup.
My legacy project is full of violations.+
Use the baseline. It grandfathers the historical violations and flags only new drift. You adopt archlint today, without refactoring the past first. The committed baseline.json is the one file meant to live in your repo.
Will it block my flow?+
You choose. In lenient mode it only warns; in strict it blocks until fixed; and a per-rule forbid! is a hard block that always stops the edit. Because it acts inside the agent's turn — while fixing is still cheap — the repair happens on the spot, not three weeks later in code review.
How is this different from a linter for my instruction files?+
Those check your prompt — the words you wrote for the agent in CLAUDE.md or AGENTS.md. Archlint checks the result — the imports the agent actually wrote, against the architecture you declared. It lints structure, not instructions: imports and globs, not guessing.
Is there an LLM cost or latency?+
None. Archlint is deterministic and structural — it analyzes imports and globs, with no LLM in the hot path. No per-call cost, no latency, no false positive of the "this name looks like another layer" kind. Pure stdlib, zero dependencies.
What's free, and what's in Pro?+
Archlint is open core. The MIT-licensed lite core — layers, forbid, archlint check, the live hook, import resolution, and the four core languages — stays public. Pro ($20, one-time) adds the graph viz, cycle detection, forbid! hard blocks, init, baseline, the drift report, SARIF, the Cursor adapter, Java and C#, and one-command install.

Stop reviewing architecture line by line.

One-command install: python3 archlint.py install. With no blueprint it does nothing — so it never gets in the way.

Get Archlint — $20
Deterministic · no LLM in the hot path · no latency
Docs Support Built by M. Kanhan