Tetr RDF vocabulary
Namespace https://tetr.resonator.am/ns# · prefix tetr: · Tetr 1.2
From version 1.2, Tetr writes a .ttl file (RDF in Turtle syntax) next to every note's PNG and Markdown. It describes the note in full: every stroke with its control points, every embedded drawing with its source markup, the transcript, and the AI model the note is set to use. The PNG stays the file of record; the sidecar exists so scripts, graph tools, and language models can read a note without decoding a PNG chunk.
Every sidecar starts with the same header. Dates use Dublin Core; everything else is in this vocabulary.
@prefix tetr: <https://tetr.resonator.am/ns#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<#note> a tetr:Note ;
dcterms:created "2026-09-17T09:12:03Z"^^xsd:dateTime ;
dcterms:modified "2026-09-17T09:40:51Z"^^xsd:dateTime ;
tetr:image <Groceries.png> ;
tetr:transcriptFile <Groceries.md> ;
tetr:transcript "milk, eggs, coffee" ;
tetr:agentProfile "Tetr AI" ;
tetr:canvasWidth 1024 ;
tetr:stroke <#s-3f9a…>, <#s-b21c…> ;
tetr:embeds <#img-7e0d…> .
<#s-3f9a…> a tetr:Stroke ;
tetr:index 0 ;
tetr:inkType "pen" ;
tetr:color "#1C1B19" ;
tetr:width 2.4 ;
tetr:bounds "42 88 210 31"^^tetr:rect ;
dcterms:created "2026-09-17T09:12:05Z"^^xsd:dateTime ;
tetr:source "user" ;
tetr:controlPoints "42 96 0 2.4 2.4 1 0.31 1.57 1.2;…"^^tetr:pointsV1 .
Classes
| tetr:Note | One note. The subject is always <#note> relative to the sidecar. |
| tetr:Stroke | One PencilKit stroke. Subjects are <#s-…>, where the id is a content hash of the stroke, so an unchanged stroke keeps its id across saves. |
| tetr:EmbeddedImage | An image frozen on the page under the ink: an AI-rendered drawing, a text box, or a photo. |
Properties of a note
| tetr:image | Relative IRI of the note's PNG. |
| tetr:transcriptFile | Relative IRI of the Markdown transcript. |
| tetr:transcript | The transcript text itself, when there is one. |
| tetr:agentProfile | Name of the AI model profile chosen for this note, if the note overrides the default. |
| tetr:canvasWidth | Width of the canvas in points. Coordinates in the file are in this space, with the origin at the top left. |
| tetr:stroke | The note's strokes, in drawing order. |
| tetr:embeds | The note's embedded images. |
| dcterms:created, dcterms:modified | Timestamps of the note, as xsd:dateTime. |
Properties of a stroke
| tetr:index | Position of the stroke in the drawing, from 0. |
| tetr:inkType | "pen", "marker", "pencil", or the raw PencilKit identifier for other inks. |
| tetr:color | Ink colour as #RRGGBB, as drawn on a light canvas. |
| tetr:width | Nominal stroke width in points. |
| tetr:bounds | Bounding box, a tetr:rect literal. |
| tetr:source | "user" for ink you drew, "agent" for ink written by an AI model. |
| tetr:transform | Optional affine transform applied to the stroke, a tetr:matrix literal. |
| tetr:maskPath | Optional eraser mask as SVG path data, in stroke coordinates. |
| tetr:controlPoints | The stroke's control points, a tetr:pointsV1 literal. Enough to rebuild the stroke exactly. |
| dcterms:created | When the stroke was drawn. |
Properties of an embedded image
| tetr:file | Relative IRI of the bitmap, inside the note's agent/ folder. |
| tetr:bounds | Frame on the canvas, a tetr:rect literal. |
| tetr:caption | Optional caption. |
| tetr:markupType | "svg", "html", "text" (a text box), or "photo". |
| tetr:markup | The source the bitmap was rendered from: the SVG or HTML an AI model produced, or the text of a text box. Absent for photos. |
| tetr:source | "user" for photos, "agent" for rendered answers. |
Datatypes
| tetr:rect | Four numbers separated by spaces: x y width height, in canvas points. |
| tetr:matrix | The six numbers of a 2D affine transform, a b c d tx ty, separated by spaces. |
| tetr:pointsV1 | Control points separated by ;. Each point is nine numbers separated by spaces: x y time width height opacity force azimuth altitude. Time is seconds from the start of the stroke; angles are radians. |
Numbers are written with at most three decimals. Relative IRIs resolve against the sidecar's own location, so a note folder can be moved or renamed as a whole. The vocabulary may grow in later versions; existing terms keep their meaning.
← Back to Tetr