Containment
State: open/active · Aliases: nesting
Definition
Section titled “Definition”One node of a graph being part of another: a module inside a module in the structural graph, or a capability inside a capability in the capability graph. It gives a graph levels of depth, so each level is small enough to hold in mind.
Contrast
Section titled “Contrast”Not a dependency: one thing can rely on another without being part of it. Not a rule every node must satisfy.
The two graphs get their containment differently.
- Structural. Derived by scanning the code: a repository holds directories, which hold packages and crates. Nobody authors it.
- Capability. Authored, as
parent_keyon the inner capability. It is a modelling aid: a capability sits under another only when its own definition makes it part of that one. Several roots are normal, a capability can stay unnested, and nothing enforces a parent.
The two do not have to line up. A capability can contain capabilities realized in modules that sit far apart in the structure.