Reference

.gram syntax

The current source envelope, identifiers, fields, blocks and literal escaping.

Download r1 source
Explore as .gram

Download exact selected revision source

Source
r1 · Now
Text
# .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 ``` See Records for type/field conventions and Relations for edge direction. Source grammar and validation are defined by the linked Core format specification.
r1 · Now

r1 · · Portal-reference-contracts

The current source envelope, identifiers, fields, blocks and literal escaping.

0Needs attention

Source2

.gram language specification
Current History/6 specification