# Show HN: Archprint, infer architecture lint rules from your repo's import graph

> Source: <https://github.com/Tommkruix/archprint>
> Published: 2026-09-07 23:33:31+00:00

Every TypeScript architecture linter makes you write the rules by hand (dependency-cruiser, eslint-plugin-boundaries, Sheriff, ts-arch). Archprint does the opposite: it reads your repo's real import graph, finds the boundaries your code already respects, and turns the ones that pass a statistical confidence gate into ready-to-install lint rules, with the evidence attached (how many files conform, how many break it, how confident the inference is).

The framing that drove it: your CLAUDE.md / AGENTS.md is guidance; your lint rules are enforcement. Archprint generates the enforcement from patterns your codebase already demonstrates, so you adopt rules you can trust instead of hand-authoring them.

It's deliberately honest about what it will enforce unattended. The mechanical families (no import cycles, production must not import tests, no console in library code, no undeclared deps, import style, public-API barrels, DB/UI-in-a-server-entry) had zero false positives across an adversarial correctness audit, so those auto-generate. The structural families (layer/role boundaries, UI/data separation) infer a "layer" or "role" from paths, which can be wrong, so they're held for human review by default. One wrong enforced rule costs more than zero rules.

It emits into the tools you already use, ESLint (including a shareable one-file preset), dependency-cruiser, and ts-arch, so it complements your stack. Framework-aware across React, Angular, Vue, Svelte, Next, Nest, SvelteKit, Nuxt, and Remix.

Before posting I ran the full CLI workflow (scan, recommend, generate, wire, eject) across 92,861 real public TypeScript repositories: it completed on every one without a single crash, and the reversible install/uninstall round-trip held.

```
  npm install --save-dev archprint
  npx archprint scan .
```

Docs:
Early (0.x). Feedback very welcome, especially on the rules it infers for your repo.

Comments URL: [https://news.ycombinator.com/item?id=49604137](https://news.ycombinator.com/item?id=49604137)

Points: 1

# Comments: 0
