Skip to main content

Module semantic

Module semantic 

Source
Expand description

Semantic code intelligence on top of the tree-sitter structure.

Tree-sitter is the always-available baseline: it extracts symbols, imports and call sites, and resolves callees within the caller’s scope. Where that is not enough — an ambiguous name, or a name only unique project-wide — a local semantic backend (language server or live JetBrains IDE, via crate::lsp::router) is asked where the call actually goes. Its answer becomes EdgeEvidence on the property-graph edge, which ranking and impact analysis weight by grade.

Guarantees: local only (no network, no source leaves the machine); no automatic installs; semantic_mode = "auto" never starts a server in the background; every target is confined to the indexed project; without any backend the graph is exactly the structural graph.

Re-exports§

pub use enrich::Escalation;
pub use enrich::EscalationBudget;
pub use enrich::EscalationStats;
pub use enrich::SemanticVerdict;
pub use enrich::escalate_calls;
pub use evidence::EdgeEvidence;
pub use evidence::EvidenceGrade;
pub use evidence::EvidenceOrigin;

Modules§

coverage
Per-language semantic coverage: how many of a language’s file-level call edges are verified, and whether a language server for it can run here. Shared by ctx_graph status, lean-ctx doctor and the dashboard legend.
enrich
Semantic escalation for call edges structure cannot settle.
evidence
Typed evidence attached to graph edges (Edge.metadata).
relations
Symbol-level relations from a semantic backend, lifted to file edges:
resolve
Asking a semantic backend where a call goes, and mapping the answer back onto the project graph.

Functions§

status_line
One-line evidence summary of the file-level graph, e.g. Semantic: mode=auto | calls 120 verified · 340 resolved · 45 heuristic | implements 12 · extends 3 · references 40. Edges without typed evidence (older graphs, other producers) are counted as unannotated only when present.