ARCLUX Complete Tutorial
Learn ARCLUX end to end — from first install to daemon, detectors, rules, and CI gating. Every command and output in this tutorial was verified against a real open-source repository (Flask, 83 modules). Where output is shown, it is the actual output ARCLUX produced, so you know what to expect before you run it.Part 1 — What ARCLUX is
ARCLUX builds an accurate structural model of a codebase:- Which files depend on which? (
graph) - What breaks if I change file X? (
impact) - Where are circular dependencies, dead code, orphan files? (
doctor) - Does this repo follow framework conventions? (
verify) - Did the architecture change between two commits? (
diff)
Part 2 — Install & setup
Requirements: Node 20+, pnpm.Part 3 — Your first analysis
Point ARCLUX at any repository on disk (it needs no network for local analysis):- modules indexed — how many files made it into the model
- Scan: X parsed, Y skipped — the population guard. If a repo has
files in a language without a parser yet, they are counted as
skipped, not silently dropped.
0 skippedmeans the whole repo got into the graph. - nodes / edges — the size of the dependency graph
- Detectors — a first-pass summary of what
doctorwill report in detail
Part 4 — Working with the graph
The dependency graph can be printed or saved as JSON:packages/graph/:
buildDependencyGraph— module-level import graph (whatgraphprints)buildImportGraph— same shape, import edgesbuildCallGraph— which module’s functions are actually called, edge weight = distinct call sitesbuildExportGraph— export/re-export chainsbuildFolderGraph— folder-level tree (used by the web dashboard)
Part 5 — Impact analysis
The killer feature: what is affected if this file changes?src/flask/app.py:
impact traces both directions — direct consumers (importers) and, on
the web side, the full affected-files tree. Use it before any refactor:
change the file, know exactly who breaks.
Part 6 — Doctor: 20 detectors
doctor runs the full detector suite and normalizes every finding to
checkId + severity + message:
Part 7 — Verify: the CI gate
verify runs detectors + framework rules and gives a single
PASS/FAIL verdict — this is the command to gate CI on:
frameworks checked: none detected and
only detectors matter.
Part 8 — Diff: architectural change between refs
Part 9 — Diagnose
diagnose runs the wired diagnostic adapters (circularDependency,
deadCode, ambiguousSymbolResolution) with impact context and fix
suggestions — not just “what”, but “who it affects”:
Part 10 — Config
Part 11 — The daemon (always-on analysis)
The daemon watches a repo and re-analyzes on every change:GET /analysis— current analysisGET /events— SSE stream (analysis,diagnosticsevents)GET /diagnostics— last diagnostics run
apps/vscode-extension/) connects to a
running daemon: Problems-panel diagnostics + status-bar module count.
Part 12 — Platform commands
Commands that work on a workspace model (the kernel process/service/job registry):Part 13 — The web dashboard
- Interactive dependency graph (SVG + d3-force physics layout)
- Graph variants: import / call / folder views, expand-on-demand
- Impact halo — hover a node, see who is affected
- Search across the repo (fuzzy filename + export-name matching)
- Detector findings and route/component resolution
Part 14 — CI / team workflow
Gate CI on the structural truth:- Keep PRs scoped to one package or one concern
mainis protected — everything goes through a PR- Run
arclux doctorbefore opening a PR; fix at least theerrorseverity findings
Part 15 — Troubleshooting
- Ports shift / zombie node processes — before debugging weird web
responses, check
ps aux | grep nodeand confirm the port you’re hitting matches theLocal:line of the dev server. - Empty analysis on local dirs — local-path analysis never caches by design (stale results mid-edit would be worse). Re-run if results feel stale.
- Files skipped, not parsed — check the
Scan:line.skipped (no parser)means the language isn’t supported yet, not that ARCLUX broke. - Termux/Android — no
/tmp; ARCLUX uses~for scratch space. The web app uses Webpack, not Turbopack.
That’s the whole tool. The shortest useful loop:
analyze to look,
impact before you change, doctor to find, verify to gate,
daemon to stay current.