Package-level declarations

MetricsEngine and the derived architecture metrics — Lakos coupling, the main-sequence distance, and the graph statistics that power the report's KPI tiles and trend sparklines.

Types

Link copied to clipboard

Computes every structural metric Aalekh derives from the dependency graph, in one pass.

Link copied to clipboard
data class GraphMetricSet(val modules: Map<String, ModuleGraphMetrics>, val project: ProjectGraphMetrics)

The complete metric set for a graph: per-module and whole-project, computed together.

Link copied to clipboard
data class HealthComponent(val label: String, val penalty: Int, val maxPenalty: Int, val detail: String)

One penalty applied to the whole-project health score, with the reason it fired.

Link copied to clipboard

Computes a 0–100 architecture health score for each module.

Link copied to clipboard

Computes each module's position relative to Robert Martin's main sequence - the line A + I = 1.

Link copied to clipboard
data class MetricBands(val fair: Double, val poor: Double, val higherIsWorse: Boolean)

How to read a metric's value - the boundary between "fine", "worth a look", and "act on this".

Link copied to clipboard

The single definition of every metric Aalekh reports.

Link copied to clipboard
data class MetricDefinition(val id: String, val name: String, val unit: String, val formula: String, val question: String, val interpretation: String, val action: String, val bands: MetricBands?, val provenance: Provenance, val perModule: Boolean)

One metric's definition, in the words a developer needs to act on it.

Link copied to clipboard

A single structural metric that a quality gate can ratchet on. For every gate, higher is worse, so it fails when the current value exceeds the baseline. The key is the stable, kebab-case token used in the DSL and serialized task input; it is a public contract and must not change.

Link copied to clipboard

Compares the current graph's metrics against a committed baseline and reports any that regressed.

Link copied to clipboard

Computes architecture health metrics for a ModuleDependencyGraph.

Link copied to clipboard
data class ModuleGraphMetrics(val path: String, val fanIn: Int, val fanOut: Int, val instability: Double, val transitiveDependencies: Int, val blastRadius: Int, val blastRadiusPercent: Double, val influence: Double, val betweenness: Double, val depthFromEntry: Int, val apiSurfaceRatio: Double, val isArticulationPoint: Boolean, val isEntryPoint: Boolean, val isFoundation: Boolean)

Everything Aalekh knows about one module's position in the dependency graph.

Link copied to clipboard
data class ModuleMetrics(val modulePath: String, val fanIn: Int, val fanOut: Int, val instability: Double, val transitiveDepCount: Int)

Architecture metrics for a single module. Stored in the JSON baseline.

Link copied to clipboard
data class ProjectGraphMetrics(val moduleCount: Int, val fanInGini: Double, val maxDepth: Int, val entryPoints: List<String>, val foundation: List<String>, val articulationPoints: List<String>, val stabilityViolations: List<StabilityViolation>)

Whole-graph metrics that describe the shape of the project rather than any one module.

Link copied to clipboard
data class ProjectHealth(val score: Int, val band: String, val components: List<HealthComponent>)

The whole-project architecture health score and the penalties that produced it.

Link copied to clipboard
data class ProjectMetrics(val totalModules: Int, val totalEdges: Int, val averageInstability: Double, val averageFanOut: Double, val hasCycles: Boolean, val moduleMetrics: List<ModuleMetrics>)

Project-wide aggregate metrics snapshot. One per build in the baseline store.

Link copied to clipboard
data class StabilityViolation(val from: String, val to: String, val fromInstability: Double, val toInstability: Double)

A dependency that points the wrong way along the stability gradient.