Skip to content

Commit f716b49

Browse files
committed
docs(identity): ratify OGAR mirror + north-star template ClassId model
Two architecture decisions for the identity arc (plan + epiphany; no code): 1. Ontology-cache home = OGAR, a one-way mirror of OGIT (+ OWL / Wikidata class-backbone / HHTL) with an append-only immutable ClassId space (protobuf-field-number discipline). Chosen for ownership + dissolving the upstream dependency, NOT as a drift fix -- content-drift for existing entities does not exist once the cache is mapped from a source; the mirror buys ownership, and pre-production immutable ClassIds make NodeGuid stable-forever rather than stable-within-an-OGIT-version. 2. The ClassId space is a shared north-star template spine, not a flat domain x shape explosion: entity_type/NiblePath is the DOLCE-rooted shape (reused across domains), namespace:u8 is the domain. Reuse a template by default (switch namespace, inherit field-set); specialize via NiblePath descent + FieldMask delta; mint new only for a genuinely novel shape. This is the intended reading of the existing octet split + FieldMask inherit/delta + NiblePath ancestry -- mechanism exists, the curated template ontology is the OGAR/Phase B content. Frugal (shape encoded once, reused 256 ways) and composes with immutability (templates ARE the immutable spine). Plan: identity-architecture DECISION-2 + north-star guard + Phase B row. Epiphany: E-OGAR-NORTHSTAR-1. Board: AGENT_LOG. https://claude.ai/code/session_014A4JuRCqKP2yNENrQ9Ha7H
1 parent fe58dfc commit f716b49

3 files changed

Lines changed: 49 additions & 1 deletion

File tree

.claude/board/AGENT_LOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2026-06-09 — D-IDENTITY decisions: OGAR mirror (ratified) + north-star template model
2+
3+
**Main thread (Opus).** Recorded two architecture decisions for the identity arc (no code; plan + epiphany): (1) ontology cache = OGAR one-way OGIT mirror, append-only immutable ClassIds (ratified via decision-gate) — ownership, not drift-prevention; (2) ClassId space organized as a shared north-star template spine (`entity_type`/`NiblePath` = DOLCE-rooted shape reused across domains; `namespace` = domain), realized by the existing octet split + FieldMask inherit/delta + NiblePath ancestry. Plan: identity-architecture DECISION-2 + north-star guard + Phase B refinement. Epiphany: E-OGAR-NORTHSTAR-1. Rides in PR #481.
4+
15
## 2026-06-09 — D-IDENTITY-1 review-fix (#480 CodeRabbit) + CI badges
26

37
**Follow-up PR** off merged `main`. Addressed CodeRabbit #480: `from_packed` edge-case test (depth>MAX, high-bit reject, `(0,0)` sentinel, MAX_DEPTH `>>64`-guard boundary, `packed∘from_packed` identity); stale "open DECISION" line → RESOLVED; AGENT_LOG SHA (`947c1e4`); MD040/MD058 in the two plan docs. **Skipped** MD028 (LATEST_STATE) — the blank-between-entries IS the append-only style. Added the **no-content-drift-for-existing** invariant to the plan (sole drift surface = ontology cache not mapped from its authoritative source). Native CI badges (rust-test/style/build) → README. 600 contract lib tests (+1), clippy/fmt clean.

.claude/board/EPIPHANIES.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
## 2026-06-09 — E-OGAR-NORTHSTAR-1 — ontology cache = OGAR mirror with a reusable north-star template spine (namespace specializes, entity_type is shared)
2+
3+
**Status:** DECISION (OGAR mirror RATIFIED via decision-gate; north-star template model = recommended organizing principle, realized by existing substrate)
4+
**Confidence:** High (OGAR mirror) / Medium-High (north-star model — strongly aligned, pending first OGAR build)
5+
6+
**Two decisions, one architecture.**
7+
8+
(1) **OGAR mirror (ratified).** The ontology cache's source of truth is OGAR — a one-way mirror of OGIT (+ OWL / Wikidata class-backbone / HHTL) with an append-only immutable ClassId space (protobuf-field-number discipline: mint once, never renumber, tombstone deprecations). Chosen for OWNERSHIP + dissolving the upstream dependency — and, pre-production, immutable ClassIds upgrade NodeGuid from "stable within an OGIT version" to "stable forever." Explicitly NOT a drift fix: content-drift for existing entities does not exist once the cache is mapped from a source (Stefan's correction, twice). The mirror buys ownership, not drift-immunity.
9+
10+
(2) **North-star template spine (recommended model).** The ClassId space is NOT a flat domain×shape explosion. `entity_type`/`NiblePath` is a SHARED, DOLCE-rooted SHAPE template (small spine, reused across domains); `namespace:u8` selects the domain (healthcare / Odoo / WoA-rs / OpenProject-nexgen-rs / OWL / Wikidata). A domain reuses a template by default (switch namespace, inherit the field-set), specializes via NiblePath-descent + FieldMask delta, and mints a new ClassId only for a genuinely novel shape.
11+
12+
**It's the intended reading of the NodeGuid octet split, not new machinery.** `namespace:u8 | entity_type:u16 | kind:u8` already separates domain from shape; `FieldMask + inherit` (parent-OR-delta, class_view.rs) already IS template-reuse-with-delta; `NiblePath::is_ancestor_of` already IS template→specialization ancestry; `dolce_category_id` already roots the spine. The mechanism exists; the curated template ontology + domain→template mappings are the OGAR / Phase B content.
13+
14+
**Frugality is double:** (a) the ClassId space is shape-sized (templates), not domain×shape-sized — fits u16 with room; (b) the shape codebook / palette / shape_hash is encoded ONCE per template and shared 256 ways, and cross-domain alignment is free (same entity_type ⇒ same shape). Reusable templates compose WITH immutability (they ARE the immutable spine) — frugality and stability reinforce, they don't trade off. Per-domain precision is preserved by the FieldMask delta, so "lazy" here is DRY, not sloppy; the only real cost is curation (the template boundaries), which is OGAR's editorial job.
15+
16+
**Phase B becomes:** stand up OGAR as the OGIT mirror + north-star template registry; seed entity_type↔NiblePath from it; the build-time round-trip proves the bijection. The surrealdb-coords blocker (N8 / Phase H) is unrelated and remains.
17+
18+
**Cross-ref:** identity-architecture plan DECISION-2 + the north-star guard; E-IDENTITY-WHITEBOX-1 (NodeGuid composition); I-VSA-IDENTITIES (closed template vocabulary interns; Wikidata's open instance mass stays content, never a ClassId).
19+
120
## 2026-06-09 — E-IDENTITY-WHITEBOX-1 — structured identity + round-trip converts the substrate from black-box to CI-falsifiable
221

322
**Status:** FINDING (Phase A landed: `identity::NodeGuid` composed, 15 tests green)

.claude/plans/identity-architecture-exists-vs-needs-v1.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ content), never VSA-bundled.
175175
| Phase | Gap | Crate | Deliverable | DoD | Dep |
176176
|---|---|---|---|---|---|
177177
| **A** | N1 | contract | `NodeGuid`/`EdgeGuid` as composition of existing fields + layout version | byte-decompose round-trips to `SchemaPtr`/`NiblePath`/`StructuralSignature`/`local`; UUIDv8 validates; zero-dep; clippy/fmt ||
178-
| **B** | N2 | ontology | wire `StructuralSignature``RegistryClassView` (enumerate field-set from `MappingRow`) | `shape_hash(class_id)` returns a stable signature; the deferred D-CLS field-enum closed | A |
178+
| **B** | N2 | ontology (OGAR) | OGAR = one-way OGIT mirror; mint **immutable append-only ClassIds** over a shared **north-star template spine** (DOLCE-rooted shapes reused across domains via `namespace` + `FieldMask` inherit/delta); seed `entity_type ↔ NiblePath` from it; wire `StructuralSignature``RegistryClassView` | bijection round-trips at build time; `shape_hash(class_id)` stable; ClassId never renumbers (protobuf-field-number discipline); D-CLS field-enum closed | A |
179179
| **C** | N3 | shader-driver | `impl SoaEnvelope for MailboxSoA<N>` (zero-copy) | `as_le_bytes().as_ptr()==backing`; `verify_layout()` green ||
180180
| **D** | N4 | lance-graph | cognitive-write `TripletProjection` + `roundtrip_eq` over the identity graph | passes the `account.move` fixture; corrupt-pack fails; (f,c) within 1/1023 | A, C |
181181
| **E** | N5 | callcenter | `project_graph` (node/edge emitter) through `commit_event`+gate | committed cycle queryable as `NodeGuid` nodes + `EdgeGuid` edges; version ticks; RBAC applies | A, D |
@@ -200,6 +200,18 @@ content), never VSA-bundled.
200200
- **[DECISION] RESOLVED (Phase A):** carry BOTH — `entity_type:u16` is the exact
201201
canonical class; the `NiblePath` prefix is the bijective *derived* routing view
202202
(full statement in the "DECISION — RESOLVED" block above). Landed in `NodeGuid`.
203+
- **[DECISION-2] RATIFIED (2026-06-09):** the ontology cache's home is **OGAR**,
204+
a *one-way mirror of OGIT* (+ OWL / Wikidata class-backbone / HHTL) with an
205+
**append-only immutable ClassId** space — chosen for **ownership + dissolving
206+
the upstream dependency**, NOT as a drift fix (drift is already contained by
207+
map-as-source; see the guard below). The ClassId space is organized as a
208+
**shared north-star template spine**: `entity_type`/`NiblePath` is the DOLCE-
209+
rooted *shape* (small, reused across every domain); `namespace:u8` selects the
210+
domain (healthcare / Odoo / WoA-rs / OpenProject-nexgen-rs / OWL / Wikidata).
211+
Domains REUSE a template by default (switch `namespace`, inherit the field-set);
212+
specialize only via `NiblePath` descent + `FieldMask` delta; mint a new ClassId
213+
only for a genuinely novel shape. The surrealdb-coords blocker (N8/Phase H) is
214+
unrelated and remains.
203215

204216
## Guards (iron rules this plan must not violate)
205217

@@ -216,6 +228,19 @@ content), never VSA-bundled.
216228
`NodeGuid` guards. ⇒ the registry MUST treat the authoritative ontology as its
217229
mapped source (the Phase B bijection is *seeded from* that source, never from a
218230
hand-filled cache).
231+
- **North-star templates — reuse is the default, mint-new is the exception.**
232+
`entity_type`/`NiblePath` is a *shared* DOLCE-rooted shape spine: the same
233+
template ClassId is reused across domains, disambiguated by `namespace:u8`.
234+
Reuse via `FieldMask` inherit (parent-OR-delta) where a domain shape aligns;
235+
`NiblePath`-descent + delta where it specializes; a new template ClassId ONLY
236+
for a genuinely novel shape. DRY-frugal (the shape codebook / `shape_hash` is
237+
encoded once, reused 256 ways; cross-domain alignment is free — same
238+
`entity_type` ⇒ same shape) AND composes with immutability — reusable templates
239+
ARE the immutable spine, not a relaxation of it. Reuse ≠ drift: sharing a
240+
template across domains is intended, not the cache-provenance drift surface.
241+
NB: the *mechanism* (octet split + inherit/delta + ancestry + `dolce_category_id`)
242+
exists today; the *content* (the curated template ontology + domain→template
243+
mappings) is the OGAR / Phase B build.
219244
- **Compose, don't parallel (Agent A #2):** N1 MUST subsume `SchemaPtr` +
220245
`EdgeRef`, not re-pack ns/class/family beside them.
221246
- **I-LEGACY-API-FEATURE-GATED:** N6's string→identity layout reclaim needs a

0 commit comments

Comments
 (0)