@gram 2 doc portal-reference-syntax-guide t .gram syntax d The current source envelope, identifiers, fields, blocks and literal escaping. ::body # .gram syntax ## Current source A current document begins with `@gram 2`, a `doc ` 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 ``` 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 ref https://github.com/clab-one/thegram-format/blob/main/spec/language.md t .gram language specification SRC format-history6 ref https://github.com/clab-one/thegram-format/blob/main/spec/source-history-render.md t Current History/6 specification