ArchitectureSnapshot

data class ArchitectureSnapshot(val modules: List<String> = emptyList(), val edges: List<String> = emptyList(), val cycles: List<String> = emptyList(), val entryPoints: List<String> = emptyList(), val layers: Map<String, String> = emptyMap(), val metrics: MetricSnapshot = MetricSnapshot(), val aalekhVersion: String = "")(source)

A compact, committable record of a project's architecture at one point in time.

Deliberately not the whole graph. A snapshot exists to be committed to the repository and compared against on every pull request, so it has to stay small enough to review and stable enough that an unrelated change does not rewrite it: module paths, dependency pairs, and the handful of numbers worth ratcheting. Everything derivable is left out and recomputed on demand.

All fields default, so a snapshot written by an older plugin version still deserializes and simply reports less.

Parameters

modules

Module paths, sorted.

edges

Production dependency pairs as "from>to", sorted. The arrow form keeps the file diffable line by line, which is the point of committing it.

cycles

Module paths that sit inside a production dependency cycle, sorted.

entryPoints

Modules nothing depends on, sorted.

layers

Declared layer name per module, for the modules a layer claims.

metrics

The structural numbers worth watching over time.

aalekhVersion

The plugin version that wrote this snapshot.

Constructors

Link copied to clipboard
constructor(modules: List<String> = emptyList(), edges: List<String> = emptyList(), cycles: List<String> = emptyList(), entryPoints: List<String> = emptyList(), layers: Map<String, String> = emptyMap(), metrics: MetricSnapshot = MetricSnapshot(), aalekhVersion: String = "")

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

True when nothing was recorded - a snapshot file that is absent or empty.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard