Skip to content
Glossary

Community (cluster)

Graphify glossary

A group of nodes densely connected to each other and only loosely connected to the rest of the graph — usually a real subsystem like auth or billing.

A community (or cluster) is a group of nodes that are densely connected to each other and only loosely connected to the rest of the graph. Communities aren't declared by anyone — they emerge from the structure. When the graph is built, some regions turn out to be tightly knit: lots of calls and imports among themselves, few crossing out. Those regions are communities.

The useful property is that communities usually correspond to real subsystems — the auth stack, the billing pipeline, the ingestion path — even when the folder structure doesn't say so. Code organized by framework convention (models here, controllers there) can hide the fact that five files across five directories are really one feature. Community detection finds that feature by following the edges instead of the directory tree, which makes it one of the fastest ways to see a codebase's actual architecture rather than its filing system.

Graphify uses communities in two places. GRAPH_REPORT.md summarizes the codebase community by community, so the written brief reads like a tour of subsystems instead of a list of files. And graphify prs uses them to flag merge-conflict risk: two open PRs that touch the same community are likely to interact even if they don't touch the same files — a signal plain file-overlap checks miss entirely.

For an AI assistant, communities are also a context budget tool. 'Summarize the auth subsystem' is answerable from one community's nodes and edges instead of the whole repository — a scope that fits in a context window and stays on topic. The same scoping is useful to humans on day one of a new codebase: read the community list before the directory tree.

Related terms

  • God nodeA node with a disproportionate number of edges — the module everything imports — where changes carry the most risk.
  • NodeA single entity in the graph — a function, class, file, table, or doc page — carrying attributes like name, path, and kind.
  • Blast radiusEverything transitively affected by a change — the callers of a function, their callers, and the configs and tests that reference them.

Go deeper

← All glossary terms