Community measurements (Leiden partition)
codetopo_communitiesPartitions an indexed code dependency graph into Leiden communities, returning community sizes, internal and cut edge counts, modularity, and node assignments to reveal code clusters.
Instructions
The Leiden partition of the dependency graph (Traag et al. 2019; modularity quality, resolution 1.0, fixed published seed) over the undirected CODE_SCHEMA section 9 projection weighted by edge multiplicity: community count, the partition's modularity Q (absent when the graph has no edges), per-community sizes and internal/cut edge counts, and node assignments (limit caps the assignment list; summaries are always full and truncation is stated). Measurements with a stated method - no thresholds, no verdicts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum assignments to return. Default 20. | |
| db_path | Yes | Path to the index database. |