Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .claude/board/INTEGRATION_PLANS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2026-06-26 — ogar-sink-in + consumer-bridge removal (medcare-bridge → UnifiedBridge → delete)

Plan: `.claude/plans/ogar-sink-in-and-consumer-bridge-removal-v1.md`. **Codifies the sink-in layering + sequences the final bridge deletion.** Grounded finding: the migration is **~90% shipped** — all 6 per-consumer bridges (incl. `medcare_bridge.rs`) are already `#[deprecated] type FooBridge = UnifiedBridge<FooPort>` aliases over one generic harness; `docs/CONSUMER-BRIDGE-DEPRECATION.md` (OGAR#95) is the live doctrine ("nothing removed; deletion lands after consumers migrate"). **Sink-in decision (§2):** OGAR owns the *meaning* (PortSpec / codebook / ClassView / ActionDef / ontology); `lance-graph-contract` owns the zero-dep *wire* mirror (the parity guard, never a dep); `lance-graph-ontology` owns the OGIT registry; `lance-graph-rbac` owns grants keyed on the **shared lo-u16 concept** (render hi-u16 never gates RBAC — the CLASSID-RBAC-KEYSTONE-SPEC); `lance-graph-ogar` keeps only the `UnifiedBridge<P>` mechanism + `parity`. **medcare recast (§3):** the medcare domain dissolves into **reusable patterns** (the shared `HealthcarePort::class_id` / convergent codebook surface in OGAR) **+ domain-specific Ontology Schema enrichment** (Healthcare `0x09XX` / FMA-V3 `0x1000_0A01` / CPIC-V3 `0x1000_0E00` in OGIT) — never a bridge in the spine. **Deliverables:** D-SINK-1 ratify layering → D-SINK-2 migrate consumers off `MedcareBridge` (cross-repo, Iron Rule 5) → D-SINK-3 delete the 6 aliases (scope-lock tests ported first) → D-SINK-4 reconcile the two `WoaBridge` identities → D-SINK-5 sink the medcare ontology (the cross-repo codebook-mint arc, `ISS-OGAR-GENETICS-MIRROR-PENDING`). **Gated:** no deletion before consumers migrate (OGAR#95); intersects the operator-gated classid realign (D-OVC) + Canon:Custom. Extends CONSUMER-BRIDGE-DEPRECATION + ogar-vocab-contract-codebook-migration-v1; does not supersede them. Doc-only. PROPOSED.

## 2026-06-25 — soa-value-tenant-migration v2 SEQUENCING (operator-locked; identity→V3, then V3-tenants)

Plan: `.claude/plans/soa-value-tenant-migration-v2.md`. **Operator-locked ordering** for the migration the v1 BRIEF opened + the v1-HARVEST inventoried: **ONE migration, TWO ordered phases — Phase 1 identity→V3 (key-side), Phase 2 V3-shaped value tenants (value-side).** Identity-first is **forced, not chosen**: OGAR #128's envelope parser resolves `tail_variant` (key shape) UPSTREAM of `value_schema` (tenant shape), so the tenants cannot be shaped to a V3 geometry the key does not yet express (the key is the coordinate system; tenants are read *through* it; the Phase-2 `helix-place‖CAM-PQ` facet is a *reflection* of the V3 part_of/is_a key). **Phase 1** = OGAR-registry + envelope-parser wiring: a leading-`1` generation marker in the HIGH (custom) u16 → V3 `tail_variant`, canon `0xDDCC` low-u16 preserved (OSINT `0x0000_0700 → 0x1000_0700`; the earlier `0x1007` low-half form is **rejected** — it corrupts the domain byte, Codex-P1), **coexist-by-classid** (legacy zero-prefix classids keep their current tail — **V1** default or **V2** `new_v2`/`guid-v2-tail`-minted; RESERVE-DON'T-RECLAIM ⇒ zero V1/V2-corpus re-mint, layout-preserving), grade `[H]` gate **F-update**. **Phase 2** = the harvest (contained facet + 8 KEEP + 2 DEFER, F-1/F-code; the §5 body still gated on the two 5+3 panels). **Payoffs:** identity-first migrates the one shared `entity_type≡class_id` anchor to V3 *before* the A↔B reconciliation (Phase 2 reconciles in V3 coords, no redo), and dissolves the harvest's scope question (harvest = the Phase-2 input). **Watch:** Phase 1's substance IS the OGAR casing-miss gap (harvest §6.1) — the corrective `/home/user/{OGAR,MedCare-rs}` sweep gates Phase-1 start, not optional polish. Doc-only. On `claude/serene-mayer-1a09he` (rides with the harvest to main).
Expand Down
210 changes: 210 additions & 0 deletions .claude/handovers/2026-06-26-ast-address-to-next-session-capstone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
# Handover Capstone — AST-as-(part_of:is_a) / OGAR-ERP-stdlib arc → next session

> **From:** session on `claude/medcare-bridge-lance-graph-wmx76z` (2026-06-26)
> **To:** next session picking up the OGAR-ERP / V3 AST-address arc
> **Status of the arc:** CONJECTURE captured + carrier verified; ONE empirical
> probe converts it to FINDING. No V3 *migration* was performed this session.
> **Companion handover (READ ALONGSIDE THIS):** the parallel CPIC/genome session
> (session `01TzqvDqbFRzyx17EkLKBoZF`) owns the V3 *identity* + genome-aligned
> track (PRs #614/#615/#618, the `q2/cpic` NARS prototype, the CYP2D6
> activity-score falsifier). This handover owns the *"why" doc* track (#616/#617,
> ruff #29). Two halves of one arc — their CYP2D6 probe and my MedCare probe are
> complementary falsifiers of the SAME genome-/AST-as-address CONJECTURE.

---

## 0. TL;DR (read this, then the mandatory reads)

This session **did not write product code**. It (a) verified another session's
V3 alignment of a design doc, (b) consolidated a multi-layer architectural
thesis into one knowledge doc, and (c) scaffolded a C# harvester. The thesis:
**a transcode source's structural AST is stored AS the `(part_of:is_a)` GUID
address (shipped `FacetCascade`), making ERP construction in any consumer as
cheap as importing pre-minted OGIT class primitives + classaction pointers.**
The whole arc is CONJECTURE; the gate to FINDING is the **MedCare brick-3 probe**
(§6). Everything else is wiring, not research.

**Single most important correction to inherit:** the carrier and minter are
already SHIPPED/built. Do not re-design them. The remaining work is *wiring*
(mint imported OGIT → codebook; merge the minter branch; run the probe).

---

## 1. Mandatory reads to get up to speed (in order)

1. **`.claude/knowledge/ast-as-partof-isa-address.md`** — THE doc this arc
produced (merged via #616, extended via #617). The full thesis + the three
honest boundaries. Start here.
2. **`.claude/knowledge/guid-canon-and-prefix-routing.md`** — the V3 GUID canon.
3. **`crates/lance-graph-contract/src/facet.rs`** — the SHIPPED carrier
(`FacetCascade` = `facet_classid(4) | 6×(8:8) = 16 B`, content-blind,
`(part_of:is_a)` is one consumer projection). Four SIMD lanes.
4. **`crates/lance-graph-contract/src/canonical_node.rs`** — `TailVariant::V3`,
`mint_for`, `CLASSID_OSINT_V3 = 0x1000_0700` (the one wired V3 exemplar).
5. **`crates/lance-graph-contract/src/class_view.rs`** — the static-shape →
dynamic-ClassView → askama ladder (XML/XSD/XSLT analogy), C2/N3 invariants.
6. **`crates/lance-graph-contract/src/ogar_codebook.rs`** — the import surface
(`canonical_concept_id`, `render_classid_for_concept`).
7. **`.claude/knowledge/ogar-consumer-preflight.md`** + **`core-first-transcode-doctrine.md`**
— the pull-don't-reconstruct iron rule + the Core-first doctrine.
8. **OGAR repo:** `docs/OGAR-AST-CONTRACT.md` (the THINK arm `Class` / DO arm
`ActionDef`+`ActionInvocation`+`KausalSpec` IR) and
`vocab/imports/ogit/` (complete OGIT, ~1,940 TTL, IMPORTED).

---

## 2. What I shipped this session (all PRs)

| PR | Repo | State | Content |
|---|---|---|---|
| **#616** | lance-graph | **MERGED** | `ast-as-partof-isa-address.md` (the *what*) + I aligned another session's V3 correction onto it. Now on `main`. |
| **#617** | lance-graph | **OPEN** | The *why*: three-layer thesis + laws-as-patterns + OGIT-imported + DO-as-classaction-pointer + the 2 MB headline. Branch `claude/medcare-bridge-lance-graph-wmx76z`, HEAD `e34a7fa`. **Docs only**, safe to merge independently. |
| **#29** | ruff | **OPEN** | `ruff_csharp_spo` — Roslyn (.NET) C#→SPO harvester (brick-3 input). **CI-gated, not locally verified** (no .NET SDK here; proxy blocks workspace `cargo check`). |

**No code/contract surface was changed in lance-graph.** `#617`'s diff is one
knowledge file, +186 lines.

---

## 3. The thesis in one screen (so you don't re-derive it)

- **Layer 1 — rails-shaped semantic AST at *assembler* cost.** `facet.rs`'s four
SIMD lanes ARE the LSP ops (`definition`=`vpcmpeqd`+`vmovmskps`,
`typeHierarchy`=`lo_chain` `vpxor`+`tzcnt`, `documentSymbol`=`hi_chain`,
ancestry=GFNI Morton). Only the *declarative* (rails) class body flattens to
fixed-width tiles; an imperative syntax tree does not.
- **Layer 2 — static OGAR / dynamic ClassView / askama.** One ClassView projects
the `N × 6×(part_of:is_a)` SoA two ways: row→typed **view** (THINK→askama) AND
row→conditional **classaction** (DO→`ActionDef` under `KausalSpec` guard).
C2 (presence≠semantics) + N3 (append-only positions) = a row view that evolves
17 years (Redmine) without breaking persisted rows.
- **Layer 3 — OGAR as importable ERP-LAW primitives + lance as compiler.** The
primitives are *laws/regulations* (universal, reusable), not CRUD:
`ObjectView`=required fields, `ActionDef`/`KausalSpec`=rules. Content stays
with the consumer; only the pattern is shared. `ogar_codebook` is the import
surface. **DO in the consumer = a classaction POINTER** (`classid → ActionDef`
via `ActionInvocation` DTO) — exactly the OGAR consumer doctrine ("classid is
pure address; magic at the resolution target").
- **Headline (CONJECTURE):** OpenProject + Odoo as ~2 MB of GUID-encoded
`(part_of:is_a)` vs ~20 MB / ~250K LOC (~10×). Dimensional check: 16 B/node ⇒
2 MB ≈ 131K nodes — credible for both ERPs' structural skeleton.

---

## 4. V3 state — what EXISTS vs what I did (IMPORTANT, do not misattribute)

**I performed NO V3 migration this session.** I only *read/verified* the shipped
V3 surfaces to ground the docs. The V3 mints shipped in OTHER sessions
(#613/#614/#615, then **#618** which landed AFTER my #617 merged):

| domain | classid | status (as of #618, 2026-06-26) |
|---|---|---|
| **OSINT-V3** | `0x1000_0700` | wired (first exemplar, #613-615) |
| **FMA-V3** | `0x1000_0A01` | **wired** (#618 — `ReadMode::FMA_V3`) |
| **CPIC-V3** | `0x1000_0E00` | **wired** (#618 — Genetics domain `0x0E` operator-allocated; `ReadMode::CPIC_V3`) |

**#618 "Phase 1 V3 set complete"** — OSINT + FMA + CPIC all minted, Genetics
domain `0x0E` allocated. So CPIC/FMA/OSINT are ALL wired now (none by me).

The V3 marker lives in the **HIGH (custom) u16**; canon/domain in the **LOW u16**
(`classid_concept_domain` routes on the low half — a deliberate Codex-P1 fix; the
low-half `0x1007` alternative was rejected as domain `0x10`=Unassigned). **Open
operator decision: "Canon:Custom"** — whether to flip canon to the high half
(would require re-pointing `classid_concept_domain`). Not settled; flagged in the
doc, not hardened.

---

## 5. The minter (brick 2) — BUILT and verified, on an unmerged branch

- **`lance_graph_contract::facet_mint`** — `mint_facets(&[NodeDecl], facet_classid)
-> Result<Vec<FacetCascade>, MintError>`. Deterministic sibling ranking,
roundtrip-lossless, `MintError::{DuplicateId, UnknownParent, DepthOverflow(>6),
FanoutOverflow(>256), Cycle}`. `NodeDecl{id, part_of_parent, is_a_parent}` is
producer-agnostic (C++/C#/Ruby/Python harvests all fill it).
- **Branch `claude/serene-mayer-1a09he`, commit `360fc720`. NOT merged to main.**
- **I ran its 8 tests myself: 8 passed**, in the zero-dep `lance-graph-contract`
crate (no ndarray/burn needed).

---

## 6. THE critical path — brick 3 (the probe that converts CONJECTURE→FINDING)

`ruff_csharp_spo` harvest (MedCare C#) → `facet_mint` → lance SoA → `typeHierarchy`
/`definition` LSP query, **with `AdaWorldAPI/MedCareV2` as the parity oracle**.
It produces the first real numbers for: (a) bytes-of-(part_of:is_a) vs source LOC
(the 10× claim), (b) lossless round-trip of the class graph, (c) query-as-asm-op.

**Its gates are wiring, not research — in order:**
1. **Merge `serene-mayer` (`facet_mint`)** into main (verified green).
2. **Mint imported OGIT → `ogar_codebook`** — the source is ALREADY in OGAR at
`vocab/imports/ogit/` (~1,940 TTL incl. `NTO/{Audit,Compliance,Legal,Security}`
+ `SDF/Automation` = HIRO DO-arm source). The remaining step is the
**source→codebook wire** (`facet_mint` → publish), NOT harvesting.
3. **Reserve one `facet_classid`** in the value-tenant migration's codec selector
for the AST `6×(8:8 part_of:is_a)` reading (a ClassView reading, NOT a new
`ValueSchema` variant — see `soa-value-tenant-migration-v1-harvest.md §5.1`).
4. Then run the MedCare probe; needs a .NET 8 SDK to run the Roslyn harvester.

---

## 7. Honest caveats / corrections I made (inherit these — don't repeat them)

- **`burn` is NOT a build blocker.** An earlier claim ("workspace compile blocked
by proxy 403 on ndarray's `burn` submodule") was **wrong** — `burn` is an
*excluded* workspace member (`ndarray/Cargo.toml:375`) with zero code coupling.
The minter's crate (`lance-graph-contract`) is zero-dep and builds standalone.
- **The local `owl` repo is NOT W3C OWL.** It's camel-ai's "Optimized Workforce
Learning" multi-agent framework (arXiv:2505.23885). The operator's "OWL↔OGIT
bijective-lossless" result refers to W3C OWL (the ontology standard); I cited it
**attributed, not re-verified** (the converter is plausibly OGIT's
`bin/ogit-tools-jar-with-dependencies.jar`, unread).
- **Everything in the doc is CONJECTURE.** The carrier is shipped, but no
end-to-end measurement exists. Keep the label until the probe runs.
- **Sync-first discipline:** every PR this session verified `HEAD..origin/main`
empty + `diff --stat origin/main..HEAD` showing only intended files BEFORE
pushing (a prior arc orphaned commits by not doing this). Keep doing it.
- **Workspace iron rules in play:** OGAR — no model identifier in artifacts, no
German PII labels, no Bash grep/sed/tail/head/awk (use Grep/Read tools).
Consumer side — pull via `*Port::class_id` / `canonical_concept_id`, NEVER
construct a `*Bridge` or copy the codebook.

---

## 8. Concrete next actions (pick up here)

1. **Decide:** merge #617 (docs, safe) — or leave for review.
2. **Brick-3 wiring step 1:** merge `claude/serene-mayer-1a09he` (`facet_mint`).
3. **Brick-3 wiring step 2 (highest leverage):** mint OGIT-source→`ogar_codebook`.
The input (`OGAR/vocab/imports/ogit/`) is already in OGAR. **CAVEAT (per the
companion handover's `ISS-OGAR-GENETICS-MIRROR-PENDING` +
`E-CODEBOOK-MINT-IS-A-CROSS-REPO-ARC`): this is a CROSS-REPO arc, not a local
wire** — minting a concept moves OGAR `ogar-vocab` + the contract `CODEBOOK`
mirror + lance-graph-ogar `parity::domains_agree` *together*, in one coordinated
change. Don't push a half-mint. It still produces the first real byte-size
numbers for the 10× claim — just plan it as the cross-repo arc.
4. **Decide the open gate:** the "Canon:Custom" classid half-order. **Now
UNBLOCKED** (the full V3 set is minted, #618) but **must be done ONCE,
atomically, over the COMPLETE V3 set** (OSINT+FMA+CPIC) — a half-flipped corpus
mis-routes (`I-LEGACY-API-FEATURE-GATED`). Operator call; reuse-clustering
argues canon-high, but it collides with the shipped low-half domain routing.
5. **Board-hygiene debt (mine — owed):** #616/#617 shipped the knowledge doc +
findings WITHOUT the same-commit board updates the rule requires. Owed:
`EPIPHANIES.md` entry for the three-layer thesis + `PR_ARC_INVENTORY.md` rows
for #616/#617 + a `LATEST_STATE.md` Contract-Inventory line. **Fold into the
next PR** (the companion session also has #614/#615/#618 PR_ARC rows
outstanding — batch them) — do NOT push a standalone board commit to main.
6. **Optional:** verify ruff #29 in CI (needs network + .NET SDK).

---

## 9. Coordinates

- lance-graph branch: `claude/medcare-bridge-lance-graph-wmx76z` (HEAD `e34a7fa`,
synced FF to `main` which includes #616 at `b7eb02c`).
- minter: `claude/serene-mayer-1a09he` @ `360fc720` (unmerged).
- ruff branch: `claude/medcare-bridge-lance-graph-wmx76z` (PR #29, scaffold @ `0f463f2`).
- OGIT-in-OGAR: `OGAR/vocab/imports/ogit/` (~1,940 TTL).
- Operator note (not code): MedCare Railway deploy still binds `:3000` because a
Railway **PORT service variable** overrides `$PORT` — the operator must remove
it; the app correctly prefers `$PORT`.
Loading