cos_graph_centrality
Reveal hub nodes in a code graph to identify chokepoints, refactor priorities, or areas needing extra review. Rank nodes by degree or betweenness to focus attention where it matters.
Instructions
Hub detection — surface high-degree (or high-betweenness) nodes.
Use to identify chokepoints / refactor priorities / nodes that demand extra review.
Args: metric: "degree" (cheap, default) or "betweenness" (expensive). top: Max nodes returned (default 20). kind: Optional kind filter (e.g. "function", "class"). Empty = all.
Returns:
JSON envelope with nodes ranked by centrality score.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| kind | No | ||
| metric | No | degree |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |