Architecture overview: Louvain community detection discovers hidden modules #13
DeusData
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
get_architecturetool has aclustersaspect that runs Louvain community detection on the call graph. It groups functions that call each other frequently into communities — even across package boundaries.On a medium Go project (~1000 nodes), it found 8 communities. Most aligned with packages as expected, but two were interesting:
A cluster that spanned
handlers/,services/, andrepository/— all related to order processing. These functions called each other heavily but were spread across 3 packages by convention (handler → service → repo).A cluster of utility functions from 4 different packages that all related to date/time formatting. Nobody planned a "datetime" module, but the call graph revealed they form a coherent functional unit.
This is useful for:
The clustering uses CALLS, HTTP_CALLS, and ASYNC_CALLS edges, so it captures both direct function calls and cross-service communication patterns.
What patterns are you seeing in your codebases?
Beta Was this translation helpful? Give feedback.
All reactions