Relative visibility

Also known as: RV · visibility

What it is

Relative Visibility measures what fraction of a package's compiled JVM classes are public. A value of 1.0 means every JVM class represented for the package in the metric model carries the public modifier; 0.0 means none of them do. Values in between describe the breadth of the JVM-public surface, not whether the package exposes the right classes.

Why it matters

A public JVM class can become a contract for code outside its package. The more classes a package makes available, the more places accidental coupling can take hold. RV gives you a quick way to find broad surfaces, then Composition, Fan-in/Fan-out, source navigation, and Topology help you decide whether the exposure is deliberate.

What a high value usually means

High Relative Visibility means most of the package's JVM classes are public. That can be exactly right for an API, DTO contract, facade, generated contract, integration boundary, or plugin extension point. In a package intended to hide implementation, it is a useful candidate for checking which public classes have real callers and which ones merely happen to be reachable.

What a low value usually means

Low Relative Visibility means most JVM classes in the package are not public. That often fits an implementation package, but it is not an automatic quality score. A narrow surface can still expose the wrong class, and a package meant to publish contracts may legitimately need a broader one.

When not to overinterpret it

RV does not measure members, methods, fields, API quality, or whether callers use every public class. It also reads compiled JVM visibility. Kotlin source-level internal is not a separate state in this metric and may still appear JVM-public. Use the class markings and actual dependency evidence before deciding that anything should change.

Where AtlasArc shows it

As a heatmap colour overlay on the Topology Graph, Package Matrix, and Composition view. As a bubble dimension in the Subsystems view using the Visibility Surface preset. In the Metrics sidebar when any package is selected.

How AtlasArc computes it

RV = public JVM classes / all JVM classes in the package. AtlasArc computes this from ArchUnit's bytecode model, where a class is visible when it carries the JVM PUBLIC modifier. ARV averages package RV values with equal package weight; GRV divides all public JVM classes by all JVM classes across the graph.