Archlint checks every edit your AI agent makes against the layer rules you declared — the instant a violation happens, still inside the loop. One Python script, stdlib only, no LLM in the hot path.
The thing that kept biting me with Claude Code wasn't bugs — it was architectural drift.
The agent adds an import that quietly couples two layers (UI reaching straight into the DB, say), the diff looks fine, tests pass, it ships. I'd have caught it in review if I were
reading every line — but not reading every line is the point of running an agent.
So I made Archlint: a PostToolUse/Stop hook that checks it in the loop. You declare your
layers in a fenced ```archlint block inside your CLAUDE.md / agent.md (which layers may import which), and after every edit the agent makes, it checks that file's imports against the rules and surfaces the violation right there — while the file's still open and fixing is cheap.
Lenient by default (hands the agent a note, and it usually self-corrects); strict mode
blocks.
- One Python file, stdlib only — no pip install, no LLM in the hot path, deterministic.
- Zero new config: rules live in the CLAUDE.md the agent already reads.
- Also a CLI (`archlint check`) for pre-commit/CI.
- Structural, not semantic — it reads the import graph, it doesn't "understand" the code. That's the deliberate limit.
Hope it helps, love to hear some feedback.
Report
Drop-in install, zero deps, and the violation feedback is instant which is exactly what my agent loops needed. Wish I'd had this a few weeks ago when I was hunting down a circular import by hand.
Report
How does it actually know what counts as a valid layer rule vs just my best guess at the time, especially if I tweak boundaries as the codebase grows.
Report
No reviews yetBe the first to leave a review for Archlint
Drop-in install, zero deps, and the violation feedback is instant which is exactly what my agent loops needed. Wish I'd had this a few weeks ago when I was hunting down a circular import by hand.
How does it actually know what counts as a valid layer rule vs just my best guess at the time, especially if I tweak boundaries as the codebase grows.