Region
constructor(id: String, name: String, modules: List<String>, internalEdges: Int, externalEdges: Int, cohesion: Double, subRegions: List<Region> = emptyList())(source)
Parameters
id
Stable identifier, used as a node id in the aggregated graph.
name
Display name.
modules
Module paths in this region, sorted.
internalEdges
Production edges with both ends inside the region.
externalEdges
Production edges with exactly one end inside it.
cohesion
internal / (internal + external), in [0, 1]. High cohesion means the region is a real boundary; low cohesion means the grouping cuts across how the code actually depends.
subRegions
Sub-groups, present only when the region is too large to read as one list. A declared layer can legitimately hold hundreds of modules - a :feature:** layer over 120 features - and collapsing that to a single card says nothing. Splitting it one level deeper turns the region map into a drill-down: project → region → sub-region → module.