What to write first¶
You do not need every field. This page ranks them by one question: what happens to an agent's answer when the field is missing?
| Tier | Without it |
|---|---|
| Critical | Answers are wrong. |
| Important | Answers are wrong for some questions, or the agent has to guess. |
| Useful | Answers are better and easier to trust, but not right versus wrong. |
| None for accuracy | Commercial or admin terms. They matter, but not for whether the answer is right. |
A judgment, not a measurement
This order is a judgment drawn from the failure types seen in real projects. It has not been measured yet. A benchmark that drops one tier at a time and compares agents' answers is planned.
Every Definitions table in the spec has a Priority column with these tiers. Priority is not the same as Required: Required says what the checker needs for the file to be valid; Priority says what a field does for answers.
Critical¶
Answers are wrong without these.
| Field | Why it is critical | Failure it prevents |
|---|---|---|
grain |
Without it an agent cannot tell what one row is, what a sum means, or which joins are safe. | 3. Grain and keys, 4. Join rules |
columns.*.unit (or currency + per; unit_from or unit_by when the unit varies by row) |
A number with no unit is read at the wrong scale: 0.012 as 0.012% instead of 1.2%. | 1. Units and scale |
columns.*.description |
Without it the agent guesses what a column measures from its name. | 7. Meaning of derived metrics |
dates_asof |
Without it the agent cannot say which release it used, and calls an old one "latest". | 2. As-of dates and restatements |
Facts with impact: critical, of any kind |
By definition: ignore it and the answer is wrong, a wrong number that looks right. Few facts qualify; see the rule of thumb. | 4. Join rules, 8. Vendor method quirks, 13. Undated statements |
relationships, for keys that look joinable but are not |
Names instead of ids, codes that lose a leading zero, a mapping table in between: the join runs and silently loses or repeats rows. For other joins, the grain is usually enough. | 4. Join rules |
Important¶
Wrong for some questions, or the agent guesses.
| Field | Why it is important | Failure it prevents |
|---|---|---|
purpose |
Tells the agent which dataset serves which question. | 5. Which dataset to use |
recipe facts (when, statement, detail; impact defaults to important) |
The right way to do a common task, and what goes wrong the obvious way. | 5. Which dataset to use, 8. Vendor method quirks |
columns.*.per_unit |
What money or a count is per (square foot, room-night). Without it USD per year could be per building or per square foot. | 1. Units and scale |
profile.period, profile.coverage_by |
Shows coverage gaps, for example a sector that starts later, before the agent averages over them. | 6. History spans and gaps |
Facts with impact: important |
Wrong for some uses only, such as comparing across a definition change. | 9. Undocumented decisions |
removed_columns, dataset and project aliases, retired_names, removed_datasets |
After a rename, queries break or keep reading a stale copy, often silently. See Schema changes. | 11. Renames that break consumers |
project.sources |
Names each vendor feed once, so as-of dates and citations point at the right one. | 2. As-of dates and restatements, 10. The same fact copied |
Useful¶
Better answers and more trust, not right versus wrong.
| Field | Why it is useful | What it helps with |
|---|---|---|
profile.entities, profile.series |
Counts of markets and series in the profile. series usually defaults correctly. |
6. History spans and gaps |
Facts with impact: useful (the default for definition, finding and question) |
Background; ignoring it does not make an answer wrong. | |
withheld |
Says what is deliberately missing and where to get it, so the agent does not hunt or guess. | |
columns.*.source_name |
The column's name in the vendor file, for a column renamed on the way in. | |
columns.*.type |
How each value is stored (number, text, date). A tool fills it from the data on every build, so an agent rarely writes it; it lets a tool flag a type change between builds and a unit on a text column. It is not Critical because the agent can read the stored type from the data itself. |
11. Renames that break consumers |
cadence, lag_days |
Display only today. | |
Fact id (optional) |
Stable citation ids: an agent or a reviewer can audit which fact a number relied on. | 10. The same fact copied |
see, probe, reviewed_by |
see says where the explanation is; probe (a script that passes or fails) and reviewed_by keep facts true over time. This is how critical facts stay correct. A rule with a probe is shown as checked; without one, as advice. |
13. Undated statements |
None for accuracy¶
| Field | Why |
|---|---|
license |
Whether the agent may use the data, not whether the answer is right. See 14. Licensing. |
pricing |
What the data costs, not whether the answer is right. |
columns.*.physical_type |
The storage type as the engine names it (int64); a tool keeps the build's value. |
display, checks, identity_only_params |
Admin and implementation details. |
x- extensions |
Team conventions; no meaning in the spec. |
Your minimum file¶
The Critical tier, for a dataset of rents and a dataset of markets. It passes oryxkb check with no errors or
warnings. The facts are a separate file, which has no version line. An agent writes both; a person reviews them.
version: 1
project:
name: marketdata-example
sources:
vendor_a: Quarterly rent file
datasets:
Rents:
grain: [market_id, sector, period_yq]
dates_asof:
vendor_a:
constant: "2026-09-30"
columns:
market_id:
type: string
description: market code
sector:
type: string
description: property sector
period_yq:
type: string
description: calendar quarter, written 2026Q3
rent:
type: number
description: asking rent per square foot
currency: USD
per: year
rent_growth:
type: number
description: quarter-on-quarter rent growth
unit: decimal
Markets:
grain: [market_id]
columns:
market_id:
type: string
description: market code
market_name:
type: string
description: display name; spelled differently across vendors
relationships:
rents_to_markets:
from: Rents
to: Markets
from_columns: [market_id]
to_columns: [market_id]
ai_context: Markets has one row per market_id, so the join does not repeat Rents rows
and oryxkb/facts.yaml, with one critical fact in four, so the check has nothing to say about impact:
facts:
- kind: quirk
statement: market names are spelled differently across vendors; join on market_id, never on market_name
about:
- Rents#market_id
- Markets#market_id
impact: critical
- kind: quirk
statement: market_id codes have leading zeros, such as 04567; read it as text or they are lost
about:
- Rents#market_id
as_of: 2026-11-13
- kind: rule
statement: state the quarter and the as-of date next to every rent figure
about:
- Rents#rent
as_of: 2026-11-13
- kind: definition
statement: rent_growth is the change in asking rent against the previous quarter, as a decimal
about:
- Rents#rent_growth
The type lines are Useful, not Critical: a tool fills them from the data when it publishes. With the column names,
units, aliases and removed_columns, they make up the dataset's schema (Columns,
Schema changes).
Next, the Important tier: a purpose line per dataset, project.sources, and a profile with period and
coverage_by. A step-by-step version, with the review: Write your first file.
You do not type these files: give your agent the data dictionary and the data, let it write them (oryxkb declare
fills project.yaml from the data), and review the card (For data vendors).