spb/air Public MIT
AIR — The Language of Accounting.
Python 100%
1<!--2Project : AIR — Accounting Intermediate Representation3Author : Simon-Pierre Boucher4Contact : contact@spboucher.ai5File : accounting-standards.md6-->78# Research: Accounting Standards as AIR Compilation Targets910**Date of research:** 2026-08-0511**Method:** 4 targeted web searches (revenue recognition, leases, foreign currency, ASPE) with follow-up on primary standard-setter sources.12**Purpose:** Ground the design of AIR backend "target profiles". In AIR, each accounting framework (IFRS, US GAAP, ASPE) is treated as a **compilation target**: the same `EconomicEvent` compiles to different journal entries depending on the selected standard profile, exactly as LLVM IR compiles to different machine code per target triple.1314---1516## 1. Revenue recognition — IFRS 15 / ASC 6061718IFRS 15 *Revenue from Contracts with Customers* (IASB) and ASC 606 (FASB) are converged standards built on the **same five-step model**:19201. **Identify the contract** with a customer.212. **Identify the performance obligations** — promises to transfer *distinct* goods or services (distinct = capable of being sold separately, or distinct in the context of the contract).223. **Determine the transaction price** (including variable consideration, subject to constraint).234. **Allocate the transaction price** to the performance obligations (relative standalone selling prices).245. **Recognize revenue when (or as) each performance obligation is satisfied** — i.e., when **control** of the good or service transfers to the customer, *not* when payment is received.2526### Why this matters for AIR2728AIR's `Sale` event carries a `delivery: {status: pending, expected: ...}` field. Under IFRS 15/ASC 606, a sale that is *paid* but *not delivered* has **not** satisfied its performance obligation:2930- **Cash received, delivery pending** → the compiler must post a **contract liability / deferred revenue** (Dr Cash, Cr Deferred Revenue), not revenue.31- **On delivery** (a later `Delivery`/`Fulfillment` event referencing the original event in the provenance graph) → Dr Deferred Revenue, Cr Revenue.32- **Delivered, not yet invoiced/paid** → contract asset / unbilled receivable.3334Design consequences:35- The AIR schema must model **performance obligations as first-class line-item state** (satisfied / unsatisfied / partially satisfied over time), because revenue timing is a function of obligation satisfaction, not of the cash or invoice event.36- Multi-element sales (e.g., hardware + support contract) require **transaction-price allocation** in the compiler's revenue pass — allocation ratios are policy/target-profile data, never LLM output.37- Revenue timing rules belong to the **target profile** (IFRS vs ASPE differ; see §4), so the same `Sale` AIR event can legally compile to different entries per target.3839Sources (consulted 2026-08-05):40- IFRS Foundation — IFRS 15 Revenue from Contracts with Customers: https://www.ifrs.org/issued-standards/list-of-standards/ifrs-15-revenue-from-contracts-with-customers/41- FASB — Revenue Recognition (Topic 606): https://www.fasb.org/revenue42- Certinia — ASC 606 and IFRS 15: 5 steps: https://www.certinia.com/resources/industry-101/complying-with-asc-606-and-ifrs-15/43- DataStudios — IFRS 15 / ASC 606 rules, performance obligations, variable consideration: https://www.datastudios.org/post/revenue-recognition-ifrs-15-and-asc-606-rules-performance-obligations-variable-consideration-and44- GAAP Dynamics — Revenue recognition resources (ASC 606 & IFRS 15): https://www.gaapdynamics.com/insights/accounting-topics/revenue-recognition-accounting-resources-for-asc-606-and-ifrs-15/4546---4748## 2. Leases — IFRS 16 / ASC 842 (brief)4950Both standards put leases **on the balance sheet** for lessees: at commencement the lessee recognizes a **right-of-use (ROU) asset** and a **lease liability**, both measured at the present value of future lease payments (discounted at the rate implicit in the lease, else the incremental borrowing rate).5152Key divergences (they are *not* fully converged, unlike revenue):5354| Aspect | IFRS 16 | ASC 842 |55|---|---|---|56| Lessee classification | Single model — every lease → depreciation + interest (front-loaded) | Dual model — **finance** vs **operating**; operating lease → single straight-line lease cost |57| Low-value asset exemption | Yes (in addition to short-term) | No (short-term only) |58| Index/rate-linked payment changes | Remeasure the liability | No remeasurement; variable lease cost in period |59| Restoration/dismantling costs | Included in ROU asset | Separate ARO under ASC 410-20 |6061### Why this matters for AIR6263A single AIR `Lease` event compiles to **structurally different entries** per target profile — this is the strongest argument that AIR targets are genuine "backends", not just chart-of-account mappings. Lease compilation also requires the compiler to do **present-value math deterministically** (fixed decimal, documented rounding). Depth of lease support can wait for a later phase; the target-profile abstraction must accommodate it from day one.6465Sources (consulted 2026-08-05):66- IFRS Foundation — IFRS 16 Leases: https://www.ifrs.org/issued-standards/list-of-standards/ifrs-16-leases/67- FASB — Leases (Topic 842): https://www.fasb.org/leases68- KPMG — Lease accounting: IFRS Accounting Standards vs US GAAP: https://kpmg.com/us/en/articles/2025/lease-accounting-ifrs-standards-us-gaap.html69- insightsoftware — Differences between ASC 842 & IFRS 16: https://insightsoftware.com/blog/what-are-the-differences-between-asc-842-ifrs-16/70- Deloitte DART — IFRS/US GAAP comparison, Leases: https://dart.deloitte.com/USDART/home/publications/deloitte/additional-deloitte-guidance/roadmap-ifrs-us-gaap-comparison/chapter-5-broad-transactions/5-7-leases7172---7374## 3. Foreign currency — IAS 21 (drives AIR's FX pass)7576IAS 21 *The Effects of Changes in Foreign Exchange Rates* (US GAAP analogue: ASC 830) defines the rules the AIR **FX pass** must implement:77781. **Initial recognition:** a foreign-currency transaction is recorded in the entity's **functional currency** using the **spot rate at the transaction date** (the date the transaction first qualifies for recognition).792. **Subsequent measurement at each reporting date:**80 - **Monetary items** (cash, receivables, payables, loans — fixed/determinable currency amounts) are **remeasured at the closing rate**; differences go to **profit or loss** (unrealized FX gain/loss).81 - **Non-monetary items at historical cost** keep the historical transaction-date rate — no retranslation.823. **Settlement:** exchange differences arising on settlement of monetary items (rate at settlement vs rate at initial recognition / last remeasurement) are recognized in profit or loss — the **realized** FX gain/loss.8384### Why this matters for AIR8586- Every AIR `Money` value must carry its **currency**, and the FX pass attaches `{rate, rate_source, rate_date}` provenance nodes when converting to functional currency — the SSA-style provenance graph makes each converted amount traceable to a dated rate.87- The compiler must distinguish **three moments**: transaction-date translation (booking), period-end remeasurement of open monetary balances (unrealized), and settlement (realized). These are three distinct pass behaviors producing distinct, reversible entries.88- Realized vs unrealized gains post to **separate accounts**; period-end remeasurement entries are natural candidates for automatic reversal on the next period open (fits AIR's incremental compilation / contra-entry model).89- The functional currency is a **target/entity profile parameter**, never inferred by the LLM.9091See companion note `fx-handling.md` for rate sources (Bank of Canada Valet API) and CRA rules.9293Sources (consulted 2026-08-05):94- IFRS Foundation — IAS 21 The Effects of Changes in Foreign Exchange Rates: https://www.ifrs.org/issued-standards/list-of-standards/ias-21-the-effects-of-changes-in-foreign-exchange-rates/95- IFRScommunity — Changes in Foreign Exchange Rates (IAS 21): https://ifrscommunity.com/knowledge-base/ias-21-effects-of-changes-in-foreign-exchange-rates/96- Moore Global — IAS 21 overview: https://www.moore-global.com/services/ifrs/ias-21-the-effects-of-changes-in-foreign-exchange-rates/97- DataStudios — Foreign currency under ASC 830 and IAS 21: https://www.datastudios.org/post/foreign-currency-transactions-and-translation-adjustments-under-u-s-gaap-asc-830-and-ias-219899---100101## 4. Canadian ASPE — Accounting Standards for Private Enterprises102103**What it is:** ASPE is the Canadian GAAP framework for **private enterprises**, issued by the Accounting Standards Board (AcSB) and published in Part II of the CPA Canada Handbook – Accounting. Canadian **publicly accountable** enterprises must use IFRS (Part I); private enterprises may **choose** ASPE or IFRS. ASPE is recognized only in Canada.104105**Who uses it:** the vast majority of Canadian private companies (SMBs and larger private firms not seeking public/foreign capital), because it is simpler and cheaper to apply than IFRS.106107**Key high-level differences vs IFRS:**108- **Revenue:** ASPE (Section 3400) is a simpler, more flexible model — no mandatory IFRS 15-style five-step framework, though deferral of unearned revenue still applies.109- **Leases:** ASPE (Section 3065) retains the old capital/operating lease distinction — operating leases stay **off balance sheet**, unlike IFRS 16.110- **Goodwill:** ASPE allows amortization / impairment-on-indication; IFRS requires annual impairment testing without amortization.111- **Financial instruments:** ASPE permits cost-based measurement in many cases; IFRS leans on fair value.112- **PP&E:** ASPE is cost model only; IFRS permits revaluation.113- **Disclosures:** substantially lighter under ASPE.114115### Why this matters for AIR116117ASPE confirms the **target-profile** design: a Canadian SMB target (ASPE) and an IFRS target compile the *same* AIR events differently (leases and revenue timing being the clearest cases). Given AIR's initial CA-QC focus, the **ASPE profile is a natural first "real" standards target** alongside the generic CSV backend, with IFRS and US GAAP profiles layered on the same interface.118119Sources (consulted 2026-08-05):120- CPA Canada — Summary comparison of ASPE and IFRS: https://www.cpacanada.ca/en/business-and-accounting-resources/financial-and-non-financial-reporting/accounting-standards-for-private-enterprises-aspe/publications/summary-comparison-of-aspe-and-ifrs121- FRAS Canada (AcSB) — Accounting Standards for Private Enterprises: https://www.frascanada.ca/en/aspe122- BDO Canada — ASPE–IFRS: A Comparison series: https://www.bdo.ca/insights/accounting-knowledge-center/aspe-ifrs-a-comparison123- BDC — Accounting Standards for Private Enterprises (ASPE) glossary: https://www.bdc.ca/en/articles-tools/entrepreneur-toolkit/templates-business-guides/glossary/accounting-standards-for-financial-enterprises124125---126127## 5. Decisions / follow-ups128129- **D1:** Model standards (IFRS / US GAAP / ASPE) as **target profiles** consumed by the posting pass; profile choice is entity configuration, never event data. → Feed into ADR on backend architecture.130- **D2:** AIR `Sale` must separate cash/invoice events from performance-obligation satisfaction (delivery) to support deferred revenue under all profiles.131- **D3:** FX pass implements IAS 21 semantics (spot at transaction date; monetary remeasurement at close; realized on settlement) with full rate provenance.132- **Follow-up:** golden tests for (a) paid-but-undelivered sale → deferred revenue, (b) unpaid FX receivable across a period end → unrealized then realized gain/loss, (c) same lease under ASPE vs IFRS profiles.133