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.