Reference
.gram syntax
The current source envelope, identifiers, fields, blocks and literal escaping.
Explore as .gram
Current source
A current document begins with @gram 2, a doc <id> owner, and zero or more typed records. Current writer files end in a Core-owned @gram-history 6 trailer. The trailer is not authored article content.
@gram 1 remains a readable legacy source version; it is not the current writer format. IDs are stable document-local identifiers using letters, digits, hyphens or underscores. A record begins with a type code and ID, such as K local-search or T review-index. IDs are not derived from titles.
Fields and values
A field is one line: key value. The value is the rest of that line and remains text; the format does not coerce a date, number, status or color. Common keys include t (title), d (description), x (status), s (scope), p (priority), owner, tag, source, ref, view and motion. t is required on the document and known records. Singleton fields cannot repeat; tag and source may repeat.
Blocks
A literal block starts with ::kind and ends at a line exactly equal to ::end. Payload is data, not executable code; block bodies do not nest. Unknown block kinds are retained. When a payload line itself equals ::end, escape it as \::end; the reader removes the escape.
Minimal valid source
@gram 2
doc index-notes
t Index notes
K lookup
t Keep query boundaries explicit
::reason
The index is a derived view, not canonical document content.
\::end
::endThe escaped line is literal payload; final ::end closes ::reason.
See Records for type/field conventions and Relations for edge direction. Source grammar and validation are defined by the linked Core format specification.
Source
r3 · · Portal-reference-finalize
The current source envelope, identifiers, fields, blocks and literal escaping.
Source3
sha256:aa34061bb91a48045cce1b24a9ca763d747f94429d8a4e82dad11076ae909451@gram 2
doc portal-reference-syntax-guide
t .gram syntax
d The current source envelope, identifiers, fields, blocks and literal escaping.
view document
::rich
# .gram syntax
## Current source
A current document begins with `@gram 2`, a `doc <id>` owner, and zero or more typed records. Current writer files end in a Core-owned `@gram-history 6` trailer. The trailer is not authored article content.
`@gram 1` remains a readable legacy source version; it is not the current writer format. IDs are stable document-local identifiers using letters, digits, hyphens or underscores. A record begins with a type code and ID, such as `K local-search` or `T review-index`. IDs are not derived from titles.
## Fields and values
A field is one line: `key value`. The value is the rest of that line and remains text; the format does not coerce a date, number, status or color. Common keys include `t` (title), `d` (description), `x` (status), `s` (scope), `p` (priority), `owner`, `tag`, `source`, `ref`, `view` and `motion`. `t` is required on the document and known records. Singleton fields cannot repeat; `tag` and `source` may repeat.
## Blocks
A literal block starts with `::kind` and ends at a line exactly equal to `::end`. Payload is data, not executable code; block bodies do not nest. Unknown block kinds are retained. When a payload line itself equals `::end`, escape it as `\::end`; the reader removes the escape.
## Minimal valid source
```text
@gram 2
doc index-notes
t Index notes
K lookup
t Keep query boundaries explicit
::reason
The index is a derived view, not canonical document content.
\\::end
\::end
```
The escaped line is literal payload; final ::end closes ::reason.
See Records for type/field conventions and Relations for edge direction. Source grammar and validation are defined by the linked Core format specification.
::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