SPB Git

spb/air Public MIT

AIR — The Language of Accounting.

Python 100%
2.1 KB · 44 lines markdown
Rendered Raw Blame History
1<!--2Projet : AIR — Accounting Intermediate Representation3Auteur : Simon-Pierre Boucher4Contact : contact@spboucher.ai5Fichier : 0002-economic-event-model.md6-->78# ADR 0002 — AIR adopts the REA economic-event model; existing standards are import/export mappings910- **Status**: Accepted — 2026-08-0511- **Context**: docs/research/accounting-data-standards.md surveyed XBRL-GL,12  UBL/Peppol, ISO 20022 camt, OFX, plain-text accounting, REA (ISO 15944-4)13  and ValueFlows.1415## Decision16171. **AIR's core is an REA-style economic event** (Resources–Events–Agents,18   McCarthy 1982; ISO/IEC 15944-4): AIR records that value moved between19   agents — debits and credits are *derived views* computed by the compiler.20   This is exactly AIR's thesis, so we adopt REA's conceptual vocabulary21   (events, agents, resources; commitments planned for delivery/performance22   obligations per IFRS 15).232. **No existing wire format becomes the IR.** XBRL-GL is journal-level (too24   late in the pipeline — it encodes the *output* of the decisions AIR wants25   to compile), UBL is document-level (an *input*), camt.053 is bank-side26   (an *input*), plain-text accounting is single-entity journal syntax.273. **Standards become frontends and backends**: UBL/Peppol invoices and28   camt.053 statements are ingestion frontends; XBRL-GL, UBL, and a29   beancount/hledger text export are backend targets (the latter is30   near-free and ideal for golden-test diffing).314. **Perspective-neutrality** (from ValueFlows): one AIR event is32   simultaneously the seller's sale and the buyer's purchase; which journal33   is produced depends on the compiling entity's policy set.3435## Consequences3637- `EconomicEvent` (core/events.py, schemas/air-0.1.schema.json) carries38  parties/items/payment/delivery/tax/fx/meta — no account codes, no39  debit/credit anywhere in AIR itself.40- EN 16931's "one semantic model, multiple syntaxes" pattern guides the41  backend layer: one CompiledJournal, many target payloads.42- A commitments field (REA duality/fulfillment) is planned for AIR v0.2 to43  carry pending deliveries and revenue-recognition obligations.44