TemporalCouplingAnalyzer

Derives temporal (change) coupling from a window of recent commits.

Where com.aalekh.aalekh.analysis.graph.GraphAnalyzer reasons about the declared structure, this analyzer reasons about how the code actually evolves: which modules keep changing together. It surfaces three signals a static graph cannot:

  • Hotspots - the modules that churn the most (TemporalCouplingReport.churn).

  • Hidden coupling - pairs that co-change strongly but declare no dependency.

  • Dead structure - declared edges whose endpoints both changed yet never co-changed.

The analysis is a pure function of (graph, commits): deterministic, no I/O, no wall-clock.

Properties

Link copied to clipboard

Default coupling degree at or above which an undeclared pair counts as hidden coupling.

Link copied to clipboard

Default minimum shared commits for a pair to be reported at all.

Functions

Link copied to clipboard
fun analyze(graph: ModuleDependencyGraph, commits: List<CommitChange>, minSharedCommits: Int = DEFAULT_MIN_SHARED_COMMITS, hiddenCouplingThreshold: Double = DEFAULT_HIDDEN_COUPLING_THRESHOLD): TemporalCouplingReport

Analyses temporal coupling for graph over commits.