Layers
packages/ — CORE
packages/ — CORE
Changes need a
decisions.md entry first.engine/— the orchestrator (analyzeRepository()). Everything else depends on this.repository/— the domain model (Repository,ModuleInfo).shared/—types.tsis the shape of everything. Adding fields is fine; changing or removing needs adecisions.mdentry.
packages/ — CORE-ADJACENT
packages/ — CORE-ADJACENT
Care needed, but not a full stop.
indexer/— resolves imports into aRepository. New resolver passes (routes, components, etc) are fine to add. ChangingbuildIndex.ts’s pass order needs care — later passes depend on earlier ones.graph/— turns aRepositoryinto aDependencyGraph. New graph variants (buildCallGraph,buildImportGraph) are extensions. ChangingbuildDependencyGraph.ts’s core shape is not.impact/— consumer/dependent tracing.
packages/ — EXTENSION POINTS
packages/ — EXTENSION POINTS
Safe to add to without discussion.
parser/— new language support, one subfolder per language, implementsLanguageParser.detectors/— each detector is independent, takes aRepository, returns findings. SeedetectAmbiguousSymbolResolution.tsfor the pattern.cache/— additive by nature. A cache miss should always fall back to the uncached path.rules/— one subfolder per framework, independent convention checks.
packages/ — MOSTLY STUB
packages/ — MOSTLY STUB
search/— seeprogres/status-*.mdfor current state before assuming this is the place to add semantic search, embeddings, or RAG. See Where intelligence layers go below.
packages/ — FOUNDATION, NOT WIRED IN YET
packages/ — FOUNDATION, NOT WIRED IN YET
watcher/,incremental/— seedecisions.md. Don’t build on top of these until they’re actually connected toengine/pipeline.ts.
apps/ — SURFACES
apps/ — SURFACES
Consume
packages/, no business logic here.cli/— consumesengine/.web/— consumesengine/via API routes. Graph rendering (SVG/d3-force) lives here, not inpackages/graph/.
Where intelligence & AI layers go
ARCLUX’s job is building an accurate structural model of a codebase: parse → index → graph → impact → detect. It is deliberately not trying to be a semantic search engine, a RAG system, an agent-facing MCP server, or an embeddings/reranking pipeline — those are legitimate problems, but they consume a structural model, they don’t belong inside one.Adding semantic search, graph RAG, agent tool-calling, embeddings, LSP bridging, or self-healing behavior? It belongs in a new top-level package (e.g.
packages/intelligence/), consuming DependencyGraph/Repository/AnalyzeRepositoryResult as inputs — not woven into graph/, detectors/, or engine/. Treat ARCLUX the way you’d treat a library you don’t maintain: depend on its stable outputs, don’t reach into its internals.Definition of “done” for anything non-trivial
Not done until all five:- Implemented — the code exists and typechecks
- Tested — verified against a real fixture or repo, not just
tsc --noEmit(see TOOLING.md’s verification standard) - Integrated — actually called from somewhere real (
engine/pipeline.ts, a detector registry, an API route) — seeprogres/bugs.md’s manifest-parser and cache entries for what “implemented but never wired in” costs if skipped - Verified — for anything touching
apps/web, confirmed visually in-browser, not just assumed from code review - Documented — a
progres/*.mdentry exists (status, decision, or bug depending on what it is) — see TOOLING.md section 1
Changing this file
This file describes boundaries, not the current implementation state (that’s whatprogres/status-*.md is for) and not package-by-package descriptions (that’s packages/README.md). If a layer’s boundary genuinely needs to move — not just “someone wants an exception” — log the reasoning in decisions.md first, then update this file to match.