ovecc metrics
Per-component architecture metrics: fan-in/out, coupling, Martin instability I,
abstractness A, distance from the main sequence D = |A + I − 1|, aggregate
complexity, and churn — plus the repository-wide coupling density. These are the
trendable numbers behind diagnose.
Usage: ovecc metrics [OPTIONS]
Example
$ ovecc metrics
Metrics: 6 component(s), coupling density 23.33%
src/core
files 2, fan-in 3, fan-out 0, coupling 3, instability 0.00
abstractness 1.00, distance 0.00, complexity 2, churn 2
src/routes
files 1, fan-in 1, fan-out 2, coupling 3, instability 0.67
abstractness 0.00, distance 0.33, complexity 1, churn 1
src/services
files 2, fan-in 1, fan-out 2, coupling 3, instability 0.67
abstractness 1.00, distance 0.67, complexity 2, churn 2
...
Scope to one component:
$ ovecc metrics --target services
Metrics: 1 component(s), coupling density 35.00%
src/services
files 5, fan-in 2, fan-out 2, coupling 4, instability 0.50
abstractness 1.00, distance 0.50, complexity 42, churn 10
Reading the numbers
| Metric | Meaning | Healthy direction |
|---|---|---|
| fan-in | Components that depend on this one | high = responsibility; protect it |
| fan-out | Components this one depends on | lower = more self-contained |
| instability I | fan-out / (fan-in + fan-out) | stable (≈0) for foundations, unstable (≈1) for leaves |
| abstractness A | Share of abstract/type-only surface | should rise with fan-in |
| distance D | |A + I − 1| — distance from the "main sequence" | near 0; near 1 is the zone of pain (rigid + concrete) or zone of uselessness |
| complexity | Aggregate cognitive complexity of the component | lower |
| churn | Commits touching the component | context for the rest |
Options
| Option | Effect |
|---|---|
--target <substr> | Scope to a single file or module |
Plus the global options.
Related
diagnose— turns these into named smellshistory— trendcoupling_densityand friends over time- Metrics reference — the full metric catalog