Expand description
Community detection on the code graph.
A hardened Leiden engine (leiden) clusters files into cohesive modules,
with robustness passes for super-hubs and oversized/low-cohesion communities
(hardening) and stable ids across rebuilds (stable_ids). The
engine is storage-agnostic: it runs on the PropertyGraph (SQLite) and on any
GraphProvider, so ctx_architecture and the dashboard graph view share
one implementation and report identical community ids.
Structs§
Functions§
- detect_
communities - Detect communities on the PropertyGraph (ids are deterministic but not
remapped to a previous run). Prefer
detect_communities_stablewhen a project root is available. - detect_
communities_ for_ provider - Detect communities on any
GraphProvider(PropertyGraph or graph index) with stable ids. This is the entry point for the dashboard graph view. - detect_
communities_ stable - Detect communities on the PropertyGraph with ids kept stable across rebuilds (remapped to, and persisted alongside, the project’s previous assignment).