@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 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 @gram-history 6 @rev 0 2026-10-12T13:11:21.855Z - 512c0ba7a0c9ba449022e9802e9d07ea37d2a0f0617bfce470e837e77627570e @rev 1 2026-10-12T13:11:21.856Z portal-reference-contracts agent=developer-doc-generator req=portal-reference-relations-guide-3f436430a32a4f1feef88166 dig=d0602afe0e378f5f kind=SourceImported 96766256d4f0c98361c82628d9ae0dc0e1838a91e4cbbd1f7c51373a425e0181 @@ 38 1 0 @@ 40 0 2 t .gram language specification @@ 41 1 0 @@ 43 0 1 t Current History/6 specification @rev 2 2026-10-12T13:39:13.129Z portal-reference-finalize agent=developer-doc-generator req=portal-reference-relations-guide-2c5d31b5fd7f2bebafc7ac2e dig=5b5d2216cc12203f kind=SourceImported f9b09264b906646e3aacde3bd47da216a07a987cfa578b7a79da1c6215715ff2 @@ 4 2 1 ::body @@ 41 3 0 @rev 3 2026-10-12T13:42:23.330Z portal-reference-finalize agent=developer-doc-generator req=portal-reference-relations-guide-593df449f21a2fc0438c7e41 dig=ea9707282ec4598c kind=SourceImported 3c74be614632a56167dfd3873b74b03d6df439c4f1351d95b091ea64cfa9b7f6 @@ 27 2 0 @rev 4 2026-10-12T23:17:37.948Z portal-reference-finalize agent=developer-doc-generator req=portal-reference-relations-guide-r3-fc866aa45323c2eb2bac7d67 dig=e453509b503ca819 kind=SourceImported 51c252c3f14a4866b8dac170572d274cf109157bb066c85d18c3edf220cc14f2 @@ 26 0 1 source verification