You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query-builder.js # Lightweight SQL builder for common filtered queries
672
672
repository/
673
673
index.js # Barrel re-export
@@ -775,9 +775,9 @@ Reduced `index.js` from ~190 named exports (243 lines) to 48 curated exports (57
775
775
776
776
> **Removed: Decompose complexity.js** — Subsumed by 3.1. The standalone complexity decomposition from the previous revision is now part of the unified AST analysis framework (3.1). The `complexity.js` per-language rules become `ast-analysis/rules/complexity/{lang}.js` alongside CFG and dataflow rules.
777
777
778
-
### 3.8 -- Domain Error Hierarchy
778
+
### 3.8 -- Domain Error Hierarchy ✅
779
779
780
-
Replace ad-hoc error handling (mix of thrown `Error`, returned `null`, `logger.warn()`, `process.exit(1)`) across 50 modules with structured domain errors.
780
+
Structured domain errors replace ad-hoc error handling across the codebase. 8 error classes in `src/errors.js`: `CodegraphError`, `ParseError`, `DbError`, `ConfigError`, `ResolutionError`, `EngineError`, `AnalysisError`, `BoundaryError`. The CLI catches domain errors and formats for humans; MCP returns structured `{ isError, code }` responses.
- ✅ CLI top-level catch formats domain errors for humans
795
+
- ✅ MCP returns structured error responses
796
+
- ✅ Domain errors adopted across config, boundaries, triage, and query modules
794
797
795
798
**New file:**`src/errors.js`
796
799
797
-
### 3.9 -- Builder Pipeline Architecture
800
+
### 3.9 -- Builder Pipeline Architecture ✅
798
801
799
-
Refactor`buildGraph()`(1,355 lines) from a mega-function into explicit, independently testable pipeline stages. Phase 2.7 added 4 opt-in stages, bringing the total to 11 core + 4 optional.
802
+
Refactored`buildGraph()` from a monolithic mega-function into explicit, independently testable pipeline stages. `src/builder.js` is now a 12-line barrel re-export. `src/builder/pipeline.js` orchestrates 9 stages via `PipelineContext`. Each stage is a separate file in `src/builder/stages/`.
**Affected files:**`src/builder.js` → split into `src/builder/`
828
830
829
831
### 3.10 -- Embedder Subsystem Extraction
830
832
@@ -852,49 +854,70 @@ The pluggable store interface enables future O(log n) ANN search (e.g., `hnswlib
852
854
853
855
**Affected files:**`src/embedder.js` -> split into `src/embeddings/`
854
856
855
-
### 3.11 -- Unified Graph Model
857
+
### 3.11 -- Unified Graph Model ✅
856
858
857
-
Unify the four parallel graph representations (structure.js, cochange.js, communities.js, viewer.js) into a shared in-memory graph model.
859
+
Unified the four parallel graph representations into a shared in-memory `CodeGraph` model. The `src/graph/` directory contains the model, 3 builders, 6 algorithms, and 2 classifiers. Algorithms are composable — run community detection on the dependency graph, the temporal graph, or a merged graph.
> **Phase 2.7 progress:**`parent_id` column, `contains` edges, `parameter_of` edges, and `childrenData()` query now model one-level parent-child relationships. This addresses ~80% of the use case.
894
+
> **Phase 2.7 progress:**`parent_id` column, `contains` edges, `parameter_of` edges, and `childrenData()` query now model one-level parent-child relationships.
886
895
887
-
Remaining work -- enrich the node model with deeper scope information:
896
+
Node model enriched with `qualified_name`, `scope`, and `visibility` columns (migration v15). Enables direct lookups like "all methods of class X" via `findNodesByScope()` and qualified name resolution via `findNodeByQualifiedName()` — no edge traversal needed.
Enables queries like "all methods of class X" without traversing edges. The `parent_id` FK only goes one level -- deeply nested scopes (namespace > class > method > closure) aren't fully represented. `qualified_name` would allow direct lookup.
- ✅ `insert-nodes.js` computes qualified_name and scope during insertion: methods get scope from class prefix, children get `parent.child` qualified names
909
+
- ✅ Visibility extraction for all 8 language extractors:
910
+
- JS/TS: `accessibility_modifier` nodes + `#` private field detection
911
+
- Java/C#/PHP: `modifiers`/`visibility_modifier` AST nodes via shared `extractModifierVisibility()`
0 commit comments