CodeGraph/docs
Section 6.5

Fan-In Health & RMS (14%)

Measuring incoming relationship concentration using Root Mean Square (RMS) to quantify the blast radius of central hub entities.

Source: server/src/analytics/health/fan-in/calculateFanInHealth.ts

Incoming Concentration & Hub Fragility

High fan-in indicates that many components depend on a single file or symbol. While foundational utilities naturally have high fan-in, extreme incoming concentration makes modifications high-risk.

Similar to Fan-Out, CodeGraph computes Root Mean Square Fan-In:

server/src/analytics/health/fan-in/calculateFanInHealth.ts
1
2
3
4
5
const averageFanIn = totalFanIn / nodeIds.length; const rootMeanSquareFanIn = Math.sqrt(squaredFanIn / nodeIds.length); const normalizedRisk = 0.5 * rootMeanSquareFanIn; const score = 100 / (1 + normalizedRisk);