classify_roles
Classifies symbols as Hub, Bridge, Leaf, or Sink by call graph position. Reveals architectural risk.
What it does
Classifies every symbol in the codebase into an architectural role:
| Role | Definition | Signal |
|---|---|---|
| Hub | Heavily depended upon, low coupling to others | Core utilities, critical paths |
| Bridge | Connects otherwise separate module communities | Potential coupling risk |
| Leaf | Used in one place, low coupling | Good candidate for inlining |
| Sink | Imports many things, exports few | Orchestration layer, potential god class |
Why this matters
Understanding role distribution reveals architectural risk. Too many Hubs without test coverage is a danger signal. An unexpected Bridge between security and UI modules is worth investigating.
No native equivalent.
Related tools
Benchmark note
This benchmark compares CodeSift against the closest practical native workflow an agent would use for the same task.
For some tools, that baseline is a direct shell equivalent such as rg or find.
For AST-aware, graph-aware, and LSP-backed tools, the baseline is a multi-step workflow rather than a strictly identical command.
Results should be read as agent-workflow comparisons: token cost, call count, and practical context efficiency.