Relationships
Entities rarely stand alone. Componecat connects them with relationships — the parent/child hierarchy, dependencies between services, and any custom connection your organization wants to model. Every relationship is directed and has a kind that governs how it behaves.
Relationship kinds
Section titled “Relationship kinds”Like entity kinds, relationship kinds are configurable. Componecat seeds a
hierarchical parent-of kind and dependency kinds such as depends-on, and you
can add your own. Each kind controls:
- Cardinality — one-to-many or many-to-many.
- Cycle policy — whether cycles are forbidden, allowed with a warning, or allowed outright.
- Delete policy — whether deleting one side is blocked, cascades, or is allowed while the relationship is dropped.
- Labels — the wording shown for each side (for example “depends on” / “is used by”).
- Hierarchy — whether the kind contributes to the catalog tree.
You can also restrict which entity kinds may participate on each side of a
relationship, so, for example, only a Component can depend on a Resource.
Hierarchy
Section titled “Hierarchy”The parent-of relationship builds the catalog tree: a System contains
Components, a Component contains sub-components, and so on. The tree view lets
you expand and collapse branches to navigate large catalogs, and a kind’s allowed
child kinds keep the hierarchy sensible.
Dependencies
Section titled “Dependencies”Dependency relationships (like depends-on) capture how your software actually
fits together — which service calls which, which component reads which datastore.
These edges are what make the catalog useful for reasoning about change.
Impact analysis
Section titled “Impact analysis”Because relationships are directed and stored uniformly, Componecat can answer “what depends on this?” and “what does this depend on?” quickly. Impact analysis walks the dependency graph so you can see everything a change to one entity might affect before you make it — and it’s one of the things AI agents can query over MCP.
Reachability (all ancestors, all dependents) is precomputed, so tree and impact queries stay fast even on a deep graph.
Declaring relationships
Section titled “Declaring relationships”You can add relationships from an entity’s page in the UI, declare them in a
componecat.yaml descriptor, or create them
through the APIs. In a descriptor, a relationship names the
kind and the target entity’s reference:
relationships: - kind: depends-on target: resource://datastores/payments-dbIf a descriptor references a target that doesn’t exist yet — common when several descriptors land in the same push — Componecat records the link and completes it automatically once the target appears, so the order of ingestion doesn’t matter.
