Reference
Relations and references
Directional record links, REL records and unresolved external targets.
Explore as .gram
Direction and predicates
A short relation is written inside its source record as predicate target; the current record is the source and the target is the destination. Basic predicates are related, supports, contradicts, depends, implements, replaces, derives, blocks, enables and part-of. Replacing means the newer/source entity points to the older/target entity.
Shorthands > target, ! target and < target mean related, contradicts and part-of. For example, supports export-check says this record supports export-check; it does not create a reverse edge.
REL records
Use a REL record when a relation itself needs identity, fields or provenance:
@gram 2
doc evidence-links
t Evidence links
E export-check
t Export round-trip
REL export-support export-check supports archive-policy
confidence high
source verification
SRC verification
t Verification report
K archive-policy
t Keep a readable archiveREL shares the document's record-ID namespace. A short edge is identified by its source/predicate/target tuple; a REL record uses its own stable ID. Duplicate short edges are invalid.
Target resolution
A bare target names a record in this document. Use document-id/entity-id for a cross-document target. Local targets must resolve; external document references are preserved even when unresolved and are not fetched automatically. A URI field is a reference, not a graph target. Relationships express knowledge; they do not grant access or trigger actions.
Source
sha256:593df449f21a2fc0438c7e41d90f7401ecd386ed472767883ea1e657a926e833@gram 2
doc portal-reference-relations-guide
t Relations and references
d Directional record links, REL records and unresolved external targets.
view document
::rich
# Relations and references
## Direction and predicates
A short relation is written inside its source record as `predicate target`; the current record is the source and the target is the destination. Basic predicates are related, supports, contradicts, depends, implements, replaces, derives, blocks, enables and part-of. Replacing means the newer/source entity points to the older/target entity.
Shorthands `> target`, `! target` and `< target` mean related, contradicts and part-of. For example, `supports export-check` says this record supports export-check; it does not create a reverse edge.
## REL records
Use a REL record when a relation itself needs identity, fields or provenance:
```text
@gram 2
doc evidence-links
t Evidence links
E export-check
t Export round-trip
REL export-support export-check supports archive-policy
confidence high
source verification
SRC verification
t Verification report
K archive-policy
t Keep a readable archive
```
REL shares the document's record-ID namespace. A short edge is identified by its source/predicate/target tuple; a REL record uses its own stable ID. Duplicate short edges are invalid.
## Target resolution
A bare target names a record in this document. Use `document-id/entity-id` for a cross-document target. Local targets must resolve; external document references are preserved even when unresolved and are not fetched automatically. A URI field is a reference, not a graph target. Relationships express knowledge; they do not grant access or trigger actions.
::end
SRC format-language
t .gram language specification
ref https://github.com/clab-one/thegram-format/blob/main/spec/language.md
SRC format-rich
t Current rich document specification
ref https://github.com/clab-one/thegram-format/blob/main/spec/rich-document.md
SRC format-history6
t Current History/6 specification
ref https://github.com/clab-one/thegram-format/blob/main/spec/source-history-render.md