Skip to content

Relations

Atoms are nodes. Edges are typed and named. AtomPRD ships 20 relation types grouped into nine families:

FamilyRelations
Hierarchyparent_of
Data semanticsuses_entity, uses_rule, rendered_by, renders_feature
APIexposes_endpoint, returns_entity
RBACrequires_permission, granted_to_role, scoped_to_resource
UI flownavigates_to
State machinetransitions_to, owned_by
C4 architecturecontains, uses_container, uses_tech
Cross-cuttingdepends_on, blocks, verifies
Attributionmined_from

A typed edge:

  • Validates against the kind pair. verifies is criterion → feature, never entity → criterion. The validator catches the wrong shape.
  • Drives Pattern C inference. The cloud’s behaviors.service.ts walks specific relation types per atom kind to deterministically synthesise Layer 2.
  • Powers MCP query_relations. An agent can ask for verifies edges only, getting back the criterion ↔ feature graph without scanning every atom.

See RFC-001 — Relation kind enforcement for the full type-pair matrix.

The handful you’ll see most often in practice:

RelationFrom → ToPurpose
parent_ofmodulefeature, feature → blockHierarchy. The block tree is built from these edges, not nested fields.
verifiescriterionfeatureA criterion verifies that a feature works. Drives Pattern C criterion ↔ feature inference.
rendered_byentityui_viewThis entity is shown in this view. Drives Pattern C ui_view template selection.
uses_entityfeatureentityThis feature reads / writes this entity.
uses_rulefeatureruleThis feature applies this rule. Drives Pattern C rule.enforced_at.
depends_onfeaturefeature / integrationCross-cutting dependency.
blockstasktaskSequencing in a sprint.
mined_fromany → anyThis atom was extracted from that other atom (e.g. a criterion mined from a feature description).

The deterministic inference logic per atom kind (cloud-side, but the rules are spec-fixed):

KindWalks edgesPulls into
featureverifies reverse → criteriabefore_after.api_callscall steps. state_diffsetState steps.
ui_viewrendered_by → entityApply viewType template (list → 3-screen, form → 1-screen, detail → 1-screen, custom → stub) over the entity’s fields.
ruleuses_rule reverse → featuresEmit pre_call enforced_at entries.
criterionverifies → featurePull feature’s behavior.steps (call, setState) into before_after.api_calls + state_diff.
fixturemetadata.linked_criteriaPull each criterion’s before_after into before/after/api_calls.

Without these edges Pattern C cannot run — it falls back to Pattern D (LLM) or Pattern B (convention default). If your inferred Layer 2 looks empty, check the relation graph first.