The spec¶
A project describes its data in YAML files in an oryxkb/ folder at the project root. The files declare what each
dataset means. A checker reads them, compares them with the data,
and reports mistakes. An agent writes and updates the files; a person reviews them. Facts apply as soon as they are written
(how review works). oryxkb check with no path checks
the whole folder: project, split files and facts.
How to read these pages. Each page has a short purpose, an example, often a "Fields explained" section in plain words, then a Definitions table. The Type, Required and Check columns are normative; the prose explains them. New words are in the Glossary.
Priority (Critical, Important, Useful, None) says what happens to an agent's answer when the field is missing; see What to write first. It is not the same as Required: Required says what the checker needs for the file to be valid; Priority says what the field does for answers. Sub-keys take their parent's tier unless the table says otherwise. Priority is guidance, not a check.
File layout¶
The declarations live in an oryxkb/ folder at the project root. The folder takes its name from the first
implementation, oryxkb; a fixed, specific name means it cannot collide with other tools'
folders (models/, model/). Files generated by a tool are written elsewhere, never into it.
<project root>/
oryxkb/
project.yaml # what the data is: project info, sources, datasets, columns, relationships
facts.yaml # what an agent must know: every fact, one list (see Facts)
datasets/
<Name>.yaml # optional: one dataset moved out of project.yaml
relationships.yaml # optional: the relationships moved out of project.yaml
facts/ # optional: several fact files by topic, instead of facts.yaml
- A facts-only
oryxkb/(facts.yamlorfacts/, noproject.yaml) is a valid project; its name defaults to the folder name. oryxkb/project.yamlholds the project, datasets and relationships by default; facts are always in their own file (facts.yaml, orfacts/*.yaml, never both).- When it grows, move a dataset to
oryxkb/datasets/<Name>.yaml. The file holds that one dataset's entry (the contents ofdatasets.<Name>, without the name). Move the relationships tooryxkb/relationships.yaml. - A tool merges these files when it reads them. The result is the same as one file with all the keys.
- Declaring one dataset in both
project.yamlandoryxkb/datasets/<Name>.yamlis an error. - Agents usually read the declarations through a tool, as a card or
through a command such as
oryxkb facts, so the split is invisible to them.
The rest of the spec shows the keys as they appear in oryxkb/project.yaml.
YAML style. Write maps in block style, one key per line; avoid {...} flow maps (a writer convention for readability: a checker accepts flow style without a warning). Short lists of column names
may stay inline: grain: [market_id, sector]. An agent writing the files quotes any text that contains : or #.
Named things (datasets, columns, as-of sources, relationships) are maps keyed by name. Statements, the facts, are a
list. grain, options, about and see are plain lists. pricing is the one named thing that is a list, with a
name: on each plan, because that is the ODPS shape.
Minimal example¶
version: 1
project:
name: marketdata-example
datasets:
Rents:
purpose: Quarterly asking rent per market and sector.
grain: [market_id, sector, period_yq]
columns:
market_id:
type: string
description: market code
period_yq:
type: string
description: calendar quarter, written 2026Q3
rent:
type: number
description: asking rent
currency: USD
per: year
Facts go in their own file, oryxkb/facts.yaml (Facts), which has no version line. The column names with
their type and unit are the dataset's schema. A tool fills type from the data when it publishes, for undeclared
columns such as sector too (Columns).
More: Examples. Step by step, as the person reviewing what an agent writes: Write your first file.
Definitions¶
| Key | Type | Required | Priority | Check | Description |
|---|---|---|---|---|---|
version |
integer, must be 1 |
yes | None | error if missing; error if not 1 |
File format version. |
project |
Project | no | Important | - | Project name, owner, licence and the named as-of sources. |
datasets |
map of name to Dataset | no | Critical | - | One entry per dataset, keyed by the dataset's name. A dataset written with no body is allowed. May be split into oryxkb/datasets/<Name>.yaml. |
relationships |
map of name to Relationship | no | Critical | error unless the key matches [A-Za-z0-9_.-]+ |
Join rules between datasets. May be split into oryxkb/relationships.yaml. |
Pages¶
In nav order: Project, Datasets, Columns, As-of dates, Facts, Communication (how agents of different projects keep each other current: imports, change notices, acks, requests, decisions; they are exchanged through a shared service, not written in the file), Relationships, Pricing, Extensions and Schema changes (when a dataset changes shape or meaning).
Schema. A dataset's schema is its column names, each column's type (filled
from the data by a tool) and physical_type, its unit, the columns' aliases and the dataset's
removed_columns.
Versions¶
There are two version numbers. Spec draft 0.1 (this site) defines file format version 1 (the version: 1 line
in the file).
version: 1 is required. A file with another version value is rejected with a message that names the supported
version. Within version 1, new optional keys may be added; a tool that does not know a key reports it as an
unknown key (see below). A breaking change to a key (for example a rename) is announced in the
changelog.
Errors and warnings¶
Keys are strict: an unknown key at any level is an error, unless it starts with x- (see
extensions). The Check column in these pages uses three values:
- error: a mistake in the file. The message starts with
ERRORand carries the file line. A strict run (for CI) fails on it; a normal run reports it and carries on. A value that does not fit its type, or breaks a rule listed on the page, is an error. - warning: reported, never blocks. A hint (advice, such as "declare a grain") is a kind of warning.
- -: the key is carried and shown, but no check looks at it.
A file that cannot be read at all (broken YAML, a top level that is not a mapping) is reported as an error and
nothing else is checked. A facts, do_not or use_cases key in project.yaml or a split file is an error whose
message points to facts.yaml.
"In the data" in a Check column means: among the columns of the dataset's data as stored. Those checks need the data itself, not only the file; a checker runs them when it can read the data.
What a checker also reports¶
These are checker behaviours, not part of the format. They are listed so the warnings do not surprise you.
- Hand-typed counts. Descriptive text (purpose, descriptions, fact statements) is scanned for counts and spans
such as "12,000 rows" or "from 2015", which go stale. The checker warns and suggests letting the tool generate them
(they belong in the generated coverage) or tying a statement to a release with
periodandexpires. This is marked "prose lint" in the Check columns. - Long entries. A dataset entry longer than about 80 lines gets a warning: move narrative into facts.
- Booleans. Only
trueandfalseare booleans (YAML 1.2), so an unquotedonstays text.