Skip to content

Examples

All data is synthetic. Agents write these files and people review them; the examples show what a reviewer reads. YAML style: block-style maps and block lists for about and see; short lists of plain column names inline. Every facts.yaml here has no version line; every project.yaml has version: 1.

Minimal

The smallest useful file: what one row is, and each column's type and unit (the schema). A tool fills type from the data when it publishes; the files here show it as written.

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:
- kind: quirk
  statement: market_id codes have leading zeros, such as 04567; read it as text or they are lost
  about:
  - Rents#market_id
  impact: important
  as_of: 2026-10-31

A vendor-shipped folder

A data vendor ships this oryxkb/ folder with each delivery. No pipeline: the as-of date is a fixed date, updated with each release, or read from a column. Licence and pricing are stated so a client's agent can read them. The facts are the ones a client must know: a definition and quirks. Nothing reaches clients until the vendor ships a release, and anything still proposed ships labelled [unreviewed]. Findings and questions about an exported dataset reach every client's card by default, like any other fact about it: the vendor's agent sets audience: maintainers on internal ones (Who sees a fact).

To produce it, an agent can be asked: "Read our data dictionary and support notes. Write oryxkb/project.yaml and oryxkb/facts.yaml for the Rents product: grain, a unit and a description for every column, the as-of date of this release, and the rules and quirks clients get wrong. Leave out anything you cannot find a source for, and put the source in see." Then review it: For data vendors.

oryxkb/project.yaml:

version: 1
project:
  name: marketdata-example
  owner: data-product-team
  license: Licensed to subscribers; not for redistribution.
  sources:
    vendor_a: Quarterly rent file
datasets:
  Rents:
    purpose: Quarterly asking rent per market and sector.
    grain: [market_id, sector, period_yq]
    profile:
      period: period_yq
      entities: [market_id]
      coverage_by: [sector]
    dates_asof:
      vendor_a:
        constant: "2026-09-30"
        cadence: quarterly
        lag_days: 20
    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
    withheld:
    - what: lease-level rows
      where: the Leases product
      why: sold separately
    pricing:
    - name: Standard API
      unit: Pay-per-use
      price: '0.01'
      price_currency: USD
      price_unit: request

and oryxkb/facts.yaml:

facts:
- kind: definition
  id: rent-growth-definition
  statement: rent_growth is the change in asking rent against the previous quarter, as a decimal
  about:
  - Rents#rent_growth
  as_of: 2026-07-15
- kind: quirk
  statement: market_id codes have leading zeros, such as 04567; read it as text or they are lost
  about:
  - Rents#market_id
  impact: critical
  as_of: 2026-07-15
- kind: quirk
  id: office-incl-flex
  statement: "office includes flex space in the 2026Q2 release and later: compare office within one side of 2026Q2 only"
  about:
  - Rents#sector
  impact: important
  as_of: 2026-07-15
  status: reviewed
  reviewed_by: data-team
- kind: quirk
  statement: the 2026Q3 file was re-sent on 2026-11-02; earlier quarters are unchanged
  about:
  - source:vendor_a
  audience: consumers
  impact: useful
  as_of: 2026-11-02
  expires: 2027-01-31

The last fact is about the source, so it defaults to maintainers; audience: consumers puts it on the card of every dataset whose dates_asof names vendor_a (the question to ask: would a client's answer be wrong without it?). Each release, the vendor's agent updates constant and the dated facts: Each release.

A pipeline-built project

A team builds Rents with a pipeline that takes the as-of date as a setting (param), and adds vacancy from a second vendor whose release date is fixed (constant). A second step saves a report as two tables (outputs). The facts show every kind. The card for Rents is on What an agent sees.

oryxkb/project.yaml:

version: 1
project:
  name: marketdata-example
  description: Synthetic rents for the docs.
  owner: data-team
  sources:
    vendor_a: Quarterly rent file from vendor A
    vendor_b: Annual vacancy survey from vendor B
datasets:
  Rents:
    purpose: Quarterly asking rent per market and sector.
    grain: [market_id, sector, period_yq]
    profile:
      period: period_yq
      entities: [market_id]
      coverage_by: [sector]
    dates_asof:
      vendor_a:
        param: asof
        cadence: quarterly
        lag_days: 20
      vendor_b:
        constant: "2026-06-30"
        cadence: annual
    columns:
      market_id:
        type: string
        description: market code
      sector:
        type: string
        description: property sector
      period_yq:
        type: string
        description: calendar quarter
      rent:
        type: number
        description: asking rent
        currency: USD
        per: year
        per_unit: "[sft_i]"
        source_name: AskRent
        as_of_sources: [vendor_a]
      rent_growth:
        type: number
        description: quarter-on-quarter rent growth
        unit: decimal
        per: quarter
        as_of_sources: [vendor_a]
      vacancy:
        type: number
        description: vacancy rate
        unit: "%"
        as_of_sources: [vendor_b]
    removed_columns:
    - name: rent_old
      removed: 2026-10-29
      use_instead: rent
    license: CC-BY-4.0
  Markets:
    purpose: One row per market.
    grain: [market_id]
    columns:
      market_id:
        type: string
        description: market code
      market_name:
        type: string
        description: display name; not a key
  RentsReport:
    purpose: Quarterly rent report, saved as a summary and a by-market table.
    outputs:
      summary:
        purpose: One row per sector and quarter.
        grain: [sector, period_yq]
        columns:
          sector:
            type: string
            description: property sector
          period_yq:
            type: string
            description: calendar quarter
          rent_growth_annual:
            type: number
            description: rent growth against the same quarter a year earlier
            unit: decimal
            per: year
      by_market:
        purpose: One row per market and quarter.
        grain: [market_id, period_yq]
        columns:
          market_id:
            type: string
            description: market code
          period_yq:
            type: string
            description: calendar quarter
          rent_growth:
            type: number
            description: quarter-on-quarter rent growth
            unit: decimal
            per: quarter
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:

facts:
- kind: definition
  id: rent-growth-definition
  statement: rent_growth is the change in asking rent against the previous quarter, as a decimal
  about:
  - Rents#rent_growth
  as_of: 2026-10-31
- kind: quirk
  id: market-id-text
  statement: market_id codes have leading zeros, such as 04567; read it as text or they are lost
  about:
  - Rents#market_id
  - Markets#market_id
  impact: critical
  as_of: 2026-10-31
- kind: rule
  statement: do not fill missing rent with zero
  about:
  - Rents#rent
  as_of: 2026-10-31
  probe: probes/rent-has-no-zero.py
- kind: rule
  statement: state the quarter and the as-of date next to every rent figure
  about:
  - Rents#rent
  as_of: 2026-10-31
- kind: quirk
  statement: market names are spelled two ways in some releases; join on market_id, never on market names
  detail: |
    Joining on names drops those markets without an error.

    Rejected: a name-to-code mapping table; the vendor's own spellings change each release.
  about:
  - Rents#market_id
  - Markets#market_id
  impact: critical
  as_of: 2026-10-31
  see:
  - docs/data-notes.md#joining-markets
- kind: quirk
  id: office-incl-flex
  statement: "office includes flex space in the 2026Q2 release and later: compare office within one side of 2026Q2 only"
  detail: |
    Vendor A widened its office definition in the 2026Q2 release and did not restate earlier quarters.
  about:
  - Rents#sector
  impact: important
  period: 2026Q2 onward
  as_of: 2026-10-31
  status: reviewed
  reviewed_by: data-team
  see:
  - docs/data-notes.md#flex-space
- kind: quirk
  statement: Seniors Housing rows start in 2014; its growth rates are not comparable with earlier sectors
  about:
  - Rents?sector=Seniors Housing
  impact: important
- kind: quirk
  statement: rent_growth_annual is the change against the same quarter a year earlier, not four times the quarterly rate
  about:
  - RentsReport.summary#rent_growth_annual
  impact: important
  as_of: 2026-10-31
- kind: recipe
  when: comparing markets
  statement: use rent_growth within one sector; never across sectors, whose lease lengths differ
  about:
  - Rents#rent_growth
  - Rents#sector
  as_of: 2026-10-31
- kind: finding
  statement: asking rent runs above the vendor's published average in most markets
  detail: |
    38 of 55 markets, comparing 2026Q3 asking rent with the vendor's published average.
  about:
  - Rents
  period: 2026Q3
  as_of: 2026-11-05
  see:
  - analysis/rent-vs-published.ipynb
- kind: question
  id: covid-window
  statement: how to treat 2020-2021 is undecided
  about:
  - Rents
  impact: important
  options:
  - exclude 2020-2021
  - keep all quarters
- kind: question
  id: which-q3-file
  statement: which 2026Q3 file to use after the re-send
  about:
  - Rents
  options:
  - original
  - re-sent
  status: retired
  see:
  - use-resent-q3
- kind: rule
  id: use-resent-q3
  statement: use the 2026-11-02 re-sent 2026Q3 file, not the original
  about:
  - Rents
  status: reviewed
  reviewed_by: data-team
  see:
  - h-3f9a2c
- kind: rule
  id: trailing-four-quarters
  statement: in memos, quote rent growth over the trailing four quarters, not year to date
  about:
  - Rents#rent_growth
  impact: important
  as_of: 2026-11-12
  status: proposed
  see:
  - h-7b21d4
- kind: quirk
  statement: the 2026Q3 file was re-sent on 2026-11-02; earlier quarters are unchanged
  about:
  - source:vendor_a
  audience: consumers
  impact: useful
  as_of: 2026-11-02
  expires: 2027-01-31
- kind: quirk
  statement: vendor A revises the latest quarter in its next release; quote it as preliminary
  about:
  - source:vendor_a
  - Rents
  impact: useful

What each fact shows: the first rule has a probe (the card ends it with (checked)); the second has none ((advice)). The slice fact has no as_of, because nobody knows the date: a tool shows when its line entered git.

Decisions appear in three states. trailing-four-quarters is a proposed decision: an agent recorded it on the hub (h-7b21d4) and the producer's agent wrote it as a rule with status: proposed. It is in use at once, shown [unreviewed]; when a person settles h-7b21d4, the agent sets status: reviewed and reviewed_by, like use-resent-q3. No tool syncs the two: the producer's agent updates the fact. which-q3-file is history: a question from before anyone proposed an answer, retired and pointing at its answer with see. covid-window is an open question, a choice with no proposal yet; it shows [open]. A source fact marked audience: consumers reaches the card of Rents, which names vendor_a; the last fact lists a source and a dataset, so it is a consumer fact by default and needs no audience. The definition has no impact, so it is useful.

vacancy uses unit: "%"; pct means the same and is also accepted. For a dataset in another project, write to: as <project>/<Dataset>, for example marketdata-example/Markets.

Two projects: producer and consumer

The project above publishes Rents. A second project, research-notes, imports it and builds a ranking. Its oryxkb/project.yaml:

version: 1
project:
  name: research-notes
  owner: research
datasets:
  RentRanking:
    purpose: Markets ranked by office rent growth, for the quarterly note.
    grain: [market_id, period_yq]
    exported: false
    columns:
      market_id:
        type: string
        description: market code
      period_yq:
        type: string
        description: calendar quarter
      rank:
        type: integer
        description: rank by rent growth within the quarter, 1 is highest

and its own oryxkb/facts.yaml. The finding is about the imported data, and stays here; the rule is about the consumer's own dataset, so only its own agents see it:

facts:
- kind: finding
  statement: office asking rent runs above the vendor's published average in most markets
  about:
  - marketdata-example/Rents#rent
  period: 2026Q3
  as_of: 2026-11-05
- kind: rule
  statement: leave out markets with fewer than eight quarters of history from the ranking
  about:
  - RentRanking
  as_of: 2026-11-05

In this project, oryxkb facts marketdata-example/Rents#rent shows the producer's facts first, each prefixed with marketdata-example, then the finding above (Producers and consumers).

oryxkb check accepts the finding without a note: a result stays with the project that produced it. If the consumer wants the producer to record it, it files a request. A decision comes back as the producer's rule with see naming it: in use and [unreviewed] while proposed (trailing-four-quarters above), reviewed once the producer's person settles it (use-resent-q3).

When the producer rebuilds Rents and renames a column, its tool sends a notice to the projects that import it, and the consumer's agent acks after checking its memo (Communication):

{"type": "notice", "id": "n-4868d0", "dataset": "marketdata-example/Rents",
 "changes": [{"kind": "renamed", "column": "rent_growth_pct", "to": "rent_growth"}],
 "summary": "rent_growth_pct renamed to rent_growth", "from": "marketdata-example"}

{"type": "ack", "notice": "n-4868d0", "consumer": "research-notes",
 "note": "q3 note re-checked: 2 figures updated", "from": "research-notes/analyst"}

The whole path: Producers and consumers.

The tutorial's files

The files built step by step on Write your first file. oryxkb/project.yaml:

version: 1
project:
  name: rents-research
  owner: data-team
  sources:
    vendor_a: Quarterly asking-rent file from vendor A
    vendor_b: Quarterly effective-rent file from vendor B
datasets:
  Rents:
    purpose: Quarterly rent per market and sector, from vendors A and B.
    grain: [market_id, sector, period_yq]
    profile:
      period: period_yq
      entities: [market_id]
      coverage_by: [sector]
    dates_asof:
      vendor_a:
        column: asof_a
        cadence: quarterly
      vendor_b:
        constant: "2026-09-30"
        cadence: quarterly
    columns:
      market_id:
        type: string
        description: market code
      sector:
        type: string
        description: property sector
      period_yq:
        type: string
        description: calendar quarter, written 2026Q3
      asof_a:
        type: date
        description: as-of date of the vendor A file this row came from
      rent_a:
        type: number
        description: vendor A asking rent
        currency: USD
        per: year
        per_unit: "[sft_i]"
        as_of_sources: [vendor_a]
      rent_b:
        type: number
        description: vendor B effective rent
        currency: USD
        per: year
        per_unit: "[sft_i]"
        as_of_sources: [vendor_b]

and oryxkb/facts.yaml:

facts:
- kind: quirk
  id: asking-vs-effective
  statement: "rent_a is asking rent and rent_b is effective rent (after incentives): compare each with itself over time, never average or subtract them"
  about: [Rents#rent_a, Rents#rent_b]
  impact: important
  as_of: 2026-11-13
- kind: quirk
  id: market-id-text
  statement: market_id codes have leading zeros, such as 04567; read it as text or they are lost
  about: [Rents#market_id]
  impact: important
  as_of: 2026-11-13