SPB Git

spb/air Public MIT

AIR — The Language of Accounting.

Python 100%
2.1 KB

# ADR 0002 — AIR adopts the REA economic-event model; existing standards are import/export mappings

  • Status: Accepted — 2026-08-05
  • Context: docs/research/accounting-data-standards.md surveyed XBRL-GL, UBL/Peppol, ISO 20022 camt, OFX, plain-text accounting, REA (ISO 15944-4) and ValueFlows.

# Decision

  1. AIR's core is an REA-style economic event (Resources–Events–Agents, McCarthy 1982; ISO/IEC 15944-4): AIR records that value moved between agents — debits and credits are derived views computed by the compiler. This is exactly AIR's thesis, so we adopt REA's conceptual vocabulary (events, agents, resources; commitments planned for delivery/performance obligations per IFRS 15).
  2. No existing wire format becomes the IR. XBRL-GL is journal-level (too late in the pipeline — it encodes the output of the decisions AIR wants to compile), UBL is document-level (an input), camt.053 is bank-side (an input), plain-text accounting is single-entity journal syntax.
  3. Standards become frontends and backends: UBL/Peppol invoices and camt.053 statements are ingestion frontends; XBRL-GL, UBL, and a beancount/hledger text export are backend targets (the latter is near-free and ideal for golden-test diffing).
  4. Perspective-neutrality (from ValueFlows): one AIR event is simultaneously the seller's sale and the buyer's purchase; which journal is produced depends on the compiling entity's policy set.

# Consequences

  • EconomicEvent (core/events.py, schemas/air-0.1.schema.json) carries parties/items/payment/delivery/tax/fx/meta — no account codes, no debit/credit anywhere in AIR itself.
  • EN 16931's "one semantic model, multiple syntaxes" pattern guides the backend layer: one CompiledJournal, many target payloads.
  • A commitments field (REA duality/fulfillment) is planned for AIR v0.2 to carry pending deliveries and revenue-recognition obligations.