From 1bb5497292b99145da1120831614a7e152447171 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Fri, 5 Jun 2026 12:10:41 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20OSM=20as=206th=20domain=20instance=20+?= =?UTF-8?q?=20RDF-OWL=20=C2=A710=20Phase=202a/2b=20shipped=20+=202c=20queu?= =?UTF-8?q?ed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lands the OGAR-side docs PR queued for after lance-graph PR #473 (`cesium-osm-substrate-v1.md`) merged. Cites `D-OSM-*` IDs by number per the consumer-wires-through-producer convention agreed in 2026-06-05 cross-session coordination. # DOMAIN-INSTANCES.md changes ## §1 — instances table Added 6th row: Geospatial / OSM as calibration (geographic). Status "spec'd; runtime addendum shipped; ogar-from-osm-pbf queued." ## §2.6 (new) — Geospatial / OSM — geographic calibration Parallel-structured to §2.1-§2.5 per runtime-session's ask. Lead-in "What OSM proves: geography doesn't break the IR." Per the strongest single-sentence statement of the substrate-reuse claim that the runtime session asked be preserved verbatim: > "The geographic litmus complements the anatomical one: the same > compile-time HHTL primitive resolves `Femur is_a LongBone` AND > `Marienplatz is_in Munich` in sub-microsecond." Exercises (cites by D-OSM-* ID): - **Spatial prefix-locality** — Cesium TMS quadkey as NiblePath prefix (Q2 outcome locked in lance-graph PR #473 §2). - **Tag-as-Class final / Arrow-list v1 fallback** — Q1 outcome: Tag is a Class related via `has_tag: HasMany` (SPO-natural emission); v1 implementation ships the Arrow `List` shape in D-OSM-1/2 for cardinality control while Tag interning matures. - **Palette256 codec (ADR-024) adopts its third domain** — OSM tag values cluster within a tile; per-tile palette + const-table lookup ~5-10× compression on way attributes. D-OSM-2 ingest reports ρ-vs-reference per the ADR-024 adoption checklist. - **D-OSM-3 is the OGAR-crossing deliverable** — the SPO triple lift in lance-graph-ontology is the producer-side contract ogar-from-osm-pbf (Phase 2c) consumes. ## §3 — capability coverage matrix Added OSM column. Added two new rows that explicitly name OSM as the load-bearing proof: - **Spatial prefix routing** (Cesium TMS quadkey via NiblePath) - **Palette256 codec adoption** (ADR-024) — second production adoption alongside HIPAA security Updated the coverage observation paragraph: "six together" (not five), OSM hard-proves spatial prefix routing AND drives the second production adoption of the palette256 codec. # RDF-OWL-ALIGNMENT.md §10 changes Updated the sequencing table to reflect reality: - Phase 2a = ogar-adapter-ttl — SHIPPED (PR #37) - Phase 2b = ogar-adapter-clickhouse-ddl — SHIPPED (PR #38 + #40 dotted-name fix) - Phase 2c (NEW) = ogar-from-osm-pbf — Queued; consumes D-OSM-3's SPO contract; Q1 (Tag-as-Class + Arrow-list fallback) and Q2 (Cesium TMS quadkey NiblePath) coordination outcomes pinned; reports ρ-vs-reference per ADR-024 adoption checklist on first per-country PBF run # Verification - cargo check --workspace --all-targets -> clean (docs-only) - PII abort-guard (word-boundary) -> CLEAN both files # Position in sequencing Closes the OGAR-side queued action item from the 2026-06-05 cross-session OSM/Cesium coordination. Next: - ADR-025 (Probe-free hot path) — still on offer; awaiting runtime-session green light + runtime-side §11 ADR-024 callback in lance-graph PR #473 (committed by runtime side after ADR-024 merged). - Phase 3 — vart-backend on ogar-knowable-from (self-contained sprint; no cross-session coordination needed). - Phase 2c implementation — ogar-from-osm-pbf scaffold proper (after D-OSM-3 SPO surface is observable runtime-side). https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- docs/DOMAIN-INSTANCES.md | 94 ++++++++++++++++++++++++++++++++------- docs/RDF-OWL-ALIGNMENT.md | 4 +- 2 files changed, 81 insertions(+), 17 deletions(-) diff --git a/docs/DOMAIN-INSTANCES.md b/docs/DOMAIN-INSTANCES.md index cc8b611..3434426 100644 --- a/docs/DOMAIN-INSTANCES.md +++ b/docs/DOMAIN-INSTANCES.md @@ -51,6 +51,7 @@ | **Elixir / HIRO** | migration target (OLD stack) | `docs/ELIXIR-HIRO-PREFETCH.md` + `crates/ogar-from-elixir` | scaffold; merged | | **Odoo / ERP** | **production instance** | `docs/ODOO-TRANSCODING.md` + a production ERP deployment | shipping | | **HIPAA / healthcare** | **production instance** | a production healthcare (HIPAA) deployment | shipping | +| **Geospatial / OSM** | calibration (geographic) | `docs/RDF-OWL-ALIGNMENT.md §10` Phase 2c + `lance-graph` PR #473 `cesium-osm-substrate-v1.md` (D-OSM-1..7) | spec'd; runtime addendum shipped; `ogar-from-osm-pbf` queued | The first three are how the substrate is *calibrated* (chess proves the Semantik/Syntax/Pragmatik trichotomy separates cleanly; OpenProject @@ -122,31 +123,92 @@ A production HIPAA deployment proves the firewall split is a *requirement*, not a nicety: a real HIPAA-compliant system needs fast inner auth AND durable outer audit, and ships exactly that separation. +### 2.6 Geospatial / OSM — geographic calibration + +**What OSM proves: geography doesn't break the IR.** OSM IDs are +*already* prefix-structured (`country/region/city/street/house`), so +the adapter is doing identity-*extraction*, not identity-construction +— a much smaller surface than typical. Three OSM Classes (`Node`, +`Way`, `Relation`) lift via the queued `ogar-from-osm-pbf` adapter +(`docs/RDF-OWL-ALIGNMENT.md §10` Phase 2c). Exercises: + +- **Spatial prefix-locality** — Cesium TMS quadkey as `NiblePath` + prefix, per Q2 coordination outcome locked in `lance-graph` PR #473 + §2. HHTL trie routes `osm//way/123` byte-identically to + `ogit-erp/sale.order/42` and `fma/Femur`. The *runtime session's* + Cesium tile pyramid math (`crates/cesium/src/sse.rs` + + `implicit_tiling.rs`) already uses quadkey addressing; aligning + OGAR routes both sides through the same address arithmetic. + +- **Tag-as-Class final / Arrow-list v1 fallback** — Q1 coordination + outcome locked in `lance-graph` PR #473 §2. Final shape: Tag is a + `Class` related via `has_tag: HasMany` (SPO-natural emission + `(Way#123, ogar:hasTag, Tag#building=yes)`); v1 implementation + ships the Arrow `List` fallback in `D-OSM-1/2` for + cardinality control while Tag interning matures. The IR (`Class` + shape) carries no OSM-specific dialect — same ADR-023 discipline + Odoo's `_inherit`/`_inherits` already follows. + +- **Palette256 codec (ADR-024) adopts its third domain.** OSM tag + values cluster within a tile (most zoom-21 tiles have ≤256 + distinct tag values); per-tile palette + const-table lookup + yields ~5-10× compression on way attributes. The `D-OSM-2` + Arrow→Lance ingest reports ρ-vs-reference per the ADR-024 + adoption checklist (lance-graph PR #473's §11 callout — the + runtime session's commitment after ADR-024 merged in PR #39). + +- **The OGAR-crossing deliverable is `D-OSM-3`** — the SPO triple + lift in `lance-graph-ontology`. That's the producer-side contract + the `ogar-from-osm-pbf` adapter consumes. OGAR session signed off + on the surface in 2026-06-05 cross-session coordination; the + adapter is unblocked. + +**The geographic litmus complements the anatomical one: the same +compile-time HHTL primitive resolves `Femur is_a LongBone` AND +`Marienplatz is_in Munich` in sub-microsecond.** That's the +falsifiable property — measurable, not aspirational. If it holds, +*"instance proves universality"* is non-trivial; if it fails on +either, the substrate is leaking dialect into the codec. + +The OSM instance is calibration-grade like Chess and OpenProject (no +production deployment owned by the workspace yet), but the *runtime +side* — Cesium tilesets, Lance-backed OSM datasets, 3DGS splat +batches over OSM building footprints — is shipping per the +`cesium-osm-substrate-v1.md` deliverable line. The OGAR side +contributes the schema lift; the runtime side contributes the +rendering substrate; together they form the geographic counterpart +to the FMA-bones anatomical case (`docs/RDF-OWL-ALIGNMENT.md §6`). + ## 3. Capability coverage matrix Which domain proves which substrate capability (Foundry-parity columns from `SUBSTRATE-ENDGAME.md §5.2`): -| Capability | Chess | OpenProject | Elixir/HIRO | Odoo/ERP | HIPAA | -|---|:--:|:--:|:--:|:--:|:--:| -| Ontology (Class/Association) | ✓ | ✓ | ✓ | ✓ | ✓ | -| Action types / lifecycle FSM | ✓ | ✓ | ✓ (gen_statem) | ✓ (workflows) | ✓ | -| `Postpone` / `StateTimeout` | ✓ (premove/clock) | partial | ✓ | — | — | -| `Depends` (data-causal) | — | ✓ (reactive) | ✓ | ✓ (`@api.depends`) | — | -| Time-versioned / time-travel | ✓ | ✓ (paper-trail) | ✓ | ✓ | ✓ (audit) | -| **Row-level permissions** | — | partial (RBAC) | — | partial | **✓ (HIPAA, palette256)** | -| **Immutable audit** | — | ✓ (journals) | — | ✓ | **✓ (HIPAA, signed)** | -| Multi-language frontends | (Rust) | Ruby | Elixir | Python (Odoo)+SeaORM | Rust | -| Money/decimal fidelity | — | — | — | **✓ (ERP)** | — | -| Migration scaffold | — | ✓ (target) | ✓ (spine) | (already Rust) | (already Rust) | +| Capability | Chess | OpenProject | Elixir/HIRO | Odoo/ERP | HIPAA | OSM | +|---|:--:|:--:|:--:|:--:|:--:|:--:| +| Ontology (Class/Association) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| Action types / lifecycle FSM | ✓ | ✓ | ✓ (gen_statem) | ✓ (workflows) | ✓ | — | +| `Postpone` / `StateTimeout` | ✓ (premove/clock) | partial | ✓ | — | — | — | +| `Depends` (data-causal) | — | ✓ (reactive) | ✓ | ✓ (`@api.depends`) | — | — | +| Time-versioned / time-travel | ✓ | ✓ (paper-trail) | ✓ | ✓ | ✓ (audit) | ✓ (changesets) | +| **Row-level permissions** | — | partial (RBAC) | — | partial | **✓ (HIPAA, palette256)** | — (ODbL-public) | +| **Immutable audit** | — | ✓ (journals) | — | ✓ | **✓ (HIPAA, signed)** | ✓ (OSM changeset history) | +| Multi-language frontends | (Rust) | Ruby | Elixir | Python (Odoo)+SeaORM | Rust | Rust (via `osmpbf`) | +| Money/decimal fidelity | — | — | — | **✓ (ERP)** | — | — | +| Migration scaffold | — | ✓ (target) | ✓ (spine) | (already Rust) | (already Rust) | (already Rust) | +| **Spatial prefix routing** (Cesium TMS quadkey via NiblePath) | — | — | — | — | — | **✓ (OSM)** | +| **Palette256 codec adoption** (ADR-024) | — | — | — | — | ✓ (security) | **✓ (tag values + tile-local coords)** | **Coverage observation:** no single domain exercises everything, but the -five together cover the full surface. The HIPAA instance is the *only* +six together cover the full surface. The HIPAA instance is the *only* one that hard-proves row-level perms + signed audit (the Security Mesh); the Odoo/ERP instance is the *only* one that hard-proves money/decimal -fidelity + production `@api.depends`. The calibration trio -(chess/OP/HIRO) proves the lifecycle + migration core. **That's why all -five matter** — drop any and a capability loses its production witness. +fidelity + production `@api.depends`; the OSM instance is the *only* +one that hard-proves spatial prefix routing (Cesium TMS quadkey as +`NiblePath`) AND drives the second production adoption of the +palette256 codec from ADR-024. The calibration trio (chess/OP/HIRO) +proves the lifecycle + migration core. **That's why all six matter** +— drop any and a capability loses its production witness. ## 4. Why the two production instances change the Foundry argument diff --git a/docs/RDF-OWL-ALIGNMENT.md b/docs/RDF-OWL-ALIGNMENT.md index 087366b..48ba553 100644 --- a/docs/RDF-OWL-ALIGNMENT.md +++ b/docs/RDF-OWL-ALIGNMENT.md @@ -734,7 +734,9 @@ same TTL. | Phase | Deliverable | Sized | Status | |---|---|---|---| | **1** | This doc (`docs/RDF-OWL-ALIGNMENT.md`) | 1 PR | **this PR** | -| **2** | `ogar-adapter-ttl` crate scaffold — parse / emit / round-trip against `vocab/ogar.ttl` | 1 sprint | Next OGAR PR after #25 P2 fix + surrealql AST walk | +| **2a** | `ogar-adapter-ttl` crate scaffold — parse / emit / round-trip against `vocab/ogar.ttl` | 1 sprint | **Shipped** (PR #37, merged 2026-06-05) | +| **2b** | `ogar-adapter-clickhouse-ddl` crate — CREATE TABLE → `Class` + emit; sqlparser ClickHouseDialect; composes with bardioc PR #19's `substrate-b-shadow::ClickHouseQuery` | 1 sprint | **Shipped** (PR #38 + #40 dotted-name fix, merged 2026-06-05) | +| **2c** | `ogar-from-osm-pbf` crate scaffold — consumes `osmpbf` (b-r-u) + `D-OSM-3`'s SPO triple lift contract from `lance-graph` PR #473 (`cesium-osm-substrate-v1.md`). Three fixed Classes (`Node`/`Way`/`Relation`); Cesium TMS quadkey as `NiblePath` prefix (Q2 outcome); Tag-as-Class final shape with Arrow `List` v1 fallback (Q1 outcome). Reports ρ-vs-reference per ADR-024 adoption checklist on first per-country PBF run | 1 sprint | Queued — D-OSM-1/2/3 critical path upstream; landing after runtime-side D-OSM-3 SPO surface is observable | | **3** | `ogar-knowable-from::vart-backend` feature — wires VART as the cache | 1 sprint | Concurrent with phase 2 | | **4** | `ogar-pattern` crate — recognition library + confidence scoring + 10-15 patterns (FMA-D, FIBO-FND, schema.org, SKR, PROV-O-audit, etc.) | 2 sprints | After phase 2 | | **5** | `ogar-actionable` crate — lifecycle extraction + `ActionDef` / `KausalSpec` proposal | 2 sprints | After phase 4 |