Ord - Outline and Relational Data

A simple and powerful markup language for note-taking and structured information.

Ord: full syntax reference

Ord is a plain-text outline format: one line is one node, indentation makes the tree, and key:: value lines make the outline structured data. This file holds Ord in brief, followed by Parts 1 and 2 of the Ord specification, version 0.7.0-draft, without the tests.

Ord in brief

Version 0.7.0-draft, 2026-11-22.

Ord is a plain-text outline format. One line is one node, indentation makes the tree, and key:: value lines make the outline structured data. Files are UTF-8 text, usually .txt in a workspace (a folder with an Ord.workspace file) or .ord anywhere. This page is enough to read and write Ord correctly.

Lines and the tree

Project Apollo
	Plan the launch
		Book the venue
		Send invitations
	Budget

Fields

Invoice Acme +invoice
	period:: 2026-Q3
	rate:: 1200
	Project lead:: Anna
	contact::
		email:: anna@example.com

Marks on a node line

Marks are shorthand for system fields, whose keys start with _. They can be written anywhere on the line; a formatter moves them into this order: list marker, state, label, inline fields, types, ID. Tags, links, URLs and formulas are part of the label and stay where they are written.

Mark Meaning Same as
[ ] [-] [?] [x] state: new, in progress, waiting, done. Only at the start of the line [_state:: done]
+task type [_types:: task]
#urgent, #project/apollo tag, nested with / [_tags:: urgent]
[#Ord notes] a tag that is more than a name [_tags:: Ord notes]
^t9x1 ID, one per node [_id:: t9x1]
[[Label]], [[t9x1]], [[Label^t9x1]] link to another node by label, ID or both [_link:: [[Label]]]
https://…, ./file.pdf, [text](url) link to a URL or file [_url:: …]
=(net * 1.25) a computed value [_result:: =(net * 1.25)]
@ Label, @ Label^t9x1 a mirror: shows that node here. Only at the start of the line [_mirror:: Label]
? +task [ ] a search, the only way to write one. Only at the start of the line the type search and query:: +task [ ], never written so
[x] Send mapping draft to [[Anna]] #urgent [due:: 2026-10-10] +task ^t9x1

State done, label Send mapping draft to [[Anna]] #urgent, field due, type task, tag urgent, ID t9x1.

Types and references

A type is defined by a +_type node with a name field, in any file, usually the workspace file. Its fields:: list the type's fields, and a field whose options name a type, as +person, holds references to nodes of that type: a plain value is enough.

Task +_type
	name:: task
	fields::
		owner::
			options:: +person
Anna +person
Call the venue +task
	owner:: Anna

owner:: Anna refers to the node Anna +person. Without options:: +person, it would be text.

Mirrors and searches

Monday
	@ Send mapping draft^t9x1
	? +task [ ] #urgent
Apollo +project
	[ ] Send mapping draft #urgent +task ^t9x1

Value forms

A field value that is exactly one of these forms reads as that type. Labels are never read this way.

Form Examples Stays text
number 1200, -12, 9.5, 1e3 007, +46, .5
boolean true, False yes, no
date 2026-10-15 2026-02-30 (with a warning)
datetime 2026-10-15T14:30, 2026-10-15 14:30, 2026-10-15T12:30Z 2026-10-15T24:00
week 2026-W42 2026-W54
month 2026-10 2026-13

Quote a value to keep it text: "2026-10-15".

JSON

Ord maps to JSON and back. What is under a node in Ord is under its label in JSON.

Ord JSON
fields on the root {"client": "Acme", "hours": 6}
lines on the root ["Call Anna", "Book room"]
a node with fields and lines {"Kickoff": [{"date": "2026-12-01"}, "Book room"]}
tags:: a; b "tags": ["a", "b"]
address:: with city:: Lund under it "address": {"city": "Lund"}
a rows:: line per record, its fields under it "rows": [{"a": 1}, {"a": 3}]
index fields 0::, 1::, for arrays nothing else holds ["a", {"b": 2}]
_json:: 5, as a file's only line 5

Turning syntax off

Rules for writing Ord

  1. Indent with tabs, one per level.
  2. Notes, comments and prose about a node are added as child lines under it.
  3. Use fields for data points, attributes you would filter or compare on, references, and other structured information that is repeated on several nodes.
  4. Write a node's fields before its child nodes.
  5. Keep marks in order on the node line: state first, then the label with its #tags, then inline fields, +types, ^id.
  6. Refer to another node with [[Label]], or with a plain value in a field whose definition has options:: +type. To list a node in a second place, use a mirror line @ Label, not a line that is only [[Label]].
  7. Quote values that contain ; or start or end with spaces.
  8. Don't use Markdown headings or bold for structure; use nesting.

Right and wrong

Prose as a field:

Wrong:
Meeting with Anna
	note:: Ask about the budget
Right:
Meeting with Anna
	Ask about the budget

A colon is not a field:

Wrong (a node, not a field):
	Due: 2026-10-15
Right:
	due:: 2026-10-15

:: in prose:

Wrong (a field line with the key "Use std"):
	Use std::vector here
Right:
	Use `std::vector` here

Ord specification 0.7.0-draft, Parts 1 and 2

Part 1: Core Ord

1. Data model

Reading turns a file into this model, and writing turns the model back into text. The rest of Part 1 says how.

Node      label     Text, empty, or absent (anonymous node)
          children  ordered list of Field and Node

Field     key       text
          items     ordered list of Item
          list      true or false (C16)

Item      Text or Node

Text      value     the text, with any quotes removed (C21)
          quoted    true or false

A label or item records whether it was quoted, since Part 2 reads only unquoted text (L1) and writers treat its trailing whitespace differently (C34).

Every model read from text follows C38 to C40. A writer may reject a model that breaks them, since no text expresses it.

2. File

A no-break space is read as a space: in the indent, around :: and ;, and in text.

3. Reading order

So a quote and a bracket can hide :: and ; (both come before the separator), but neither hides a block's delimiters (blocks come first).

4. Blocks
5. Quoting and spans
6. Line
7. Tree
8. Fields and nodes
9. Items in a field's value
10. Writing
10a. Writing conventions (non-normative)

These are recommendations for writers and editors. A file that doesn't follow them is still valid.

11. Diagnostics
Code Severity Given when Position
C3.1 warning A whitespace character other than space or tab starts a line's text, after the indent that character
C3.2 warning A whitespace character other than space or tab is next to a :: outside spans, or separated from it only by spaces and tabs that character
C22 warning A backslash in " quotes is not followed by an escape character the backslash
C29 warning A block has no closing line and runs to the end of the file the opening line's first character after the indent
C49 warning A line holds bytes that aren't valid UTF-8, once per line the first character read from them

Part 2: Label syntax

A field can be written in three ways: as a field line (key:: value, Part 1), as an inline field in a label ([key:: value]), or as a trigger, a shortform for an inline field. Part 2 reads inline fields and triggers out of labels and items, and value forms, such as numbers and dates, out of items. It doesn't change Core: labels and items stay strings there, and Part 2 can be applied to them at any time. What the fields mean (single-valued fields, merging, types, references) is in Semantics.

12. Scope
13. Inline fields
14. Triggers
Field Trigger Read as Value
_types +task [_types:: task] a type name
_id ^t9x1 [_id:: t9x1] an ID
_link [[Node label]], [[anna-47xu]], [[Node label^anna-47xu]] [_link:: [[Node label]]], [_link:: [[anna-47xu]]] a node's label or ID, or both
_state [ ], [x] [_state:: new], [_state:: done] a state name
_result =sum(x), =(a + b) [_result:: =sum(x)], [_result:: =(a + b)] an expression
_tags #blue, #project/apollo, [#Ord notes] (L29) [_tags:: blue], [_tags:: project/apollo], [_tags:: Ord notes] ordinary text
_url https://example.com, ./spec.pdf [_url:: https://example.com], [_url:: ./spec.pdf] a URL or a path
15. Start of a label
16. Literal text
16a. Formatting
17. Label and items
18. Value forms
19. Diagnostics

Codes, severities and positions work as in section 11.

Code Severity Given when Position
L8 error A label has more than one _id trigger each _id trigger after the first
L10 warning A [[ has no closing ]] the [[
L11 warning A state marker that no type defines the [
L12 warning A formula has an ( that is never closed the =
L26 warning Text has the digits and separators of a date, datetime, week or month, but a part out of range the text's first character

L11 needs the types' custom markers (Semantics M27). A reader without type definitions takes them as an option.