Skip to content

Commit 2a563be

Browse files
committed
plan(v3-migration): §7 — AST-as-address arc as the self-programming payoff
Integrate the now-merged AST-as-(part_of:is_a)-address arc (#616 "what" + V3 alignment, #617 "why") and the facet_mint rank-minter brick into the V3 value-tenant migration plan (soa-value-tenant-migration-v2.md), as first-class roadmap rather than a side thread. §0–§6 stay operator-locked and untouched. New §7 records the *application* the two-phase sequencing exists to serve: - The why beneath §0's what: once identity is V3 (Phase 1) and the value tenants are the V3-shaped contained facet (Phase 2), a transcode source's structural AST IS its address — so minting an ERP in any consumer collapses to importing pre-minted OGIT class primitives + wiring classaction pointers; the low-code platform self-programs at assembler cost instead of re-transcoding ~500K LOC per consumer. - The arc IS this plan's (part_of:is_a) structure axis made literal — the shipped FacetCascade read as hi_chain=part_of / lo_chain=is_a is the "shadow the V3 key casts" §1 already names; downstream of BOTH phases. - The brick chain mapped onto the phases + gates: brick 1 (slot allocation) LOCKED by the shipped FacetCascade; brick 2 (facet_mint rank-minter) BUILT (360fc72); brick 3 (MedCare ruff_csharp_spo -> mint -> SoA -> typeHierarchy probe, MedCareV2 oracle) PENDING = the single CONJECTURE->FINDING gate. - Canon:Custom is ONE lock shared with §2.2: the minter's facet_classid is a parameter, so resolving canon(hi):custom(lo) settles both the Phase-1 classid entries and the minter's row-0 ordering in one decision. Arc stays [S]->[H] CONJECTURE; gate F-code via brick 3. Header pointer added; cross-refs extended (ast doc, facet_mint, ruff #29). Board: LATEST_STATE note prepended (2026-06-26). Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_01TANd15SECEb1Gm4cpaRVD9
1 parent ba86573 commit 2a563be

2 files changed

Lines changed: 80 additions & 0 deletions

File tree

.claude/board/LATEST_STATE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
1111
---
1212

13+
## 2026-06-26 — IN PR (`claude/serene-mayer-1a09he`) — V3 migration plan absorbs the AST-as-address arc (§7 — the self-programming payoff)
14+
15+
`soa-value-tenant-migration-v2.md` gains **§7** — the *application* the two-phase V3 sequencing exists to serve, folding the now-merged #616 ("what" + V3 alignment) / #617 ("why") arc into the plan as first-class roadmap. **§0–§6 stay operator-locked and untouched.** §7 records: (1) the one-line why — once identity is V3 (Phase 1) + tenants are the V3-shaped contained facet (Phase 2), a transcode source's structural AST **IS its address**, so minting an ERP collapses to *importing* OGIT class primitives + wiring classaction pointers (the low-code platform **self-programs** at assembler cost, vs re-transcoding ~500K LOC/consumer); (2) the arc IS this plan's `(part_of:is_a)` structure axis made literal — the shipped `FacetCascade` read as `hi_chain`=part_of/`lo_chain`=is_a is the "shadow the V3 key casts" §1 already names, downstream of BOTH phases; (3) the brick chain mapped onto the phases — **brick 1** (slot alloc) LOCKED by shipped `FacetCascade`, **brick 2** (`facet_mint` rank-minter) BUILT (`360fc720`), **brick 3** (MedCare `ruff_csharp_spo`→mint→SoA→`typeHierarchy` probe, MedCareV2 oracle) PENDING = the single CONJECTURE→FINDING gate; (4) **Canon:Custom is ONE lock shared with §2.2** — the minter's `facet_classid` is a parameter, so resolving canon(hi):custom(lo) settles both the Phase-1 classid entries and the minter's row-0 ordering in one decision. Arc stays `[S]`→`[H]` CONJECTURE; gate F-code via brick 3. Header pointer added; cross-refs extended (ast doc, `facet_mint`, ruff #29).
16+
1317
## 2026-06-26 — IN PR (`claude/serene-mayer-1a09he`) — `contract::facet_mint` — the deterministic `(part_of:is_a)` rank-minter (brick 2 of `ast-as-partof-isa-address`)
1418

1519
**NEW** `lance_graph_contract::facet_mint` (zero-dep): turns a finite AST's two structural hierarchies — `part_of` (membership) + `is_a` (typing) — into SHIPPED [`facet::FacetCascade`] addresses, **exact + roundtrip-lossless** by deterministic sibling ranking (NOT learned PQ centroids). `mint_facets(&[NodeDecl], facet_classid) -> Result<Vec<FacetCascade>, MintError>`: per node walks root→node in each hierarchy, packs coarse→fine own-ranks into the 6 tiers (`hi` = part_of → `hi_chain`, `lo` = is_a → `lo_chain`). **Order-independent** (sibling ranks by sorted id). `NodeDecl{id, part_of_parent, is_a_parent}` is **producer-agnostic** — ruff C++ SPO, the new Roslyn C# harvester, or any front-end populates it. **Exact-or-error, never silent aliasing:** `MintError::{DepthOverflow(>6 tiers), FanoutOverflow(>256 sibs), UnknownParent, DuplicateId, Cycle}` surface the finite-AST bounds (ref-escape/escalation is future work). `I-VSA-IDENTITIES` clean (encodes identity *positions*, never bundles content). The `facet_classid` (row 0) is a **parameter** — the classid `(part_of:is_a)` half-order stays the orthogonal still-open Canon:Custom decision, not baked in. Writes into the existing `facet` tiers — invents no type, no layout, no value-slab offset (LOCKED 480 B untouched). **8 facet_mint tests green** (determinism/order-independence, orthogonal-crossing corpus, sibling-prefix sharing, byte roundtrip, the 4 bound errors, empty); clippy `-D warnings` + fmt clean. **Verification note:** the zero-dep module was built+tested in isolation — the whole-workspace compile is currently blocked by the proxy 403 on `ndarray`'s `burn` submodule fetch (pre-existing, unrelated to this additive change). Refs: `.claude/knowledge/ast-as-partof-isa-address.md` (brick 2), follows #613/#614 (`facet`) + #615 (V3 mint).

.claude/plans/soa-value-tenant-migration-v2.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
> `soa-value-tenant-migration-v1-harvest.md` (the filled §4 inventory = the
1313
> Phase-2 input), `substrate-unification-thesis.md` §8, OGAR #128 (the
1414
> producer-side envelope parser).
15+
>
16+
> **§7 (added 2026-06-26)** records the *application* this sequencing unlocks —
17+
> AST-as-(part_of:is_a)-address, the self-programming low-code elixir (#616/#617
18+
> **merged**) + the `facet_mint` rank-minter brick (commit `360fc720`) — the "why"
19+
> beneath §0's "what." It touches none of the operator-locked §0–§6.
1520
1621
## 0. The lock, one line
1722

@@ -192,7 +197,78 @@ the V3 `tail_variant` without reading that producer side.
192197
| **1** | identity → V3 | key | OGAR registry + envelope parser; high-u16 `0x1000_xxxx` gen-marker → V3 `tail_variant`; coexist-by-classid | `[H]` | F-update | OGAR/MedCare-rs corrective sweep |
193198
| **2** | V3-shaped tenants | value | ClassView reading: contained facet + 8 KEEP + 2 DEFER | `[H]`/`[S]` | F-1 + F-code | Phase 1 **+** 5+3 panels |
194199

200+
## 7. The payoff this sequencing unlocks — AST-as-(part_of:is_a)-address (the self-programming low-code elixir)
201+
202+
> Added 2026-06-26. **§0–§6 are operator-locked and unchanged**; this section names
203+
> the *application* the two phases exist to serve and records its brick status. Full
204+
> design: `.claude/knowledge/ast-as-partof-isa-address.md` (#616 "what" + V3
205+
> alignment, #617 "why", both **merged**). Status: **CONJECTURE**; the brick-3 probe
206+
> is the single promotion gate.
207+
208+
**Why this migration matters, in one line.** Once identity is V3 (Phase 1) and the
209+
value tenants are the V3-shaped contained facet (Phase 2), a transcode source's
210+
**structural AST IS its address**. Minting an ERP in any consumer then collapses to
211+
*importing* pre-minted OGIT class primitives + wiring classaction pointers — the
212+
low-code platform **self-programs** (composes and mints its own programs as
213+
addresses, at assembler cost) instead of re-transcoding ~500K LOC per consumer.
214+
That economic end is what the two-phase sequencing is *for*; §0 is the "what," this
215+
is the "why beneath it."
216+
217+
**It IS this plan's structure axis, made literal.** §1 already names structure
218+
(HHTL = `(part_of:is_a)`) as a key-side axis and calls the Phase-2 contained facet
219+
(`helix-place(6) ‖ CAM-PQ(6)`) "a reflection of that same part_of/is_a split … a
220+
shadow the V3 key casts." The AST-as-address arc makes that shadow concrete: the
221+
shipped content-blind `facet::FacetCascade` (`facet_classid(4) | 6×(8:8)`,
222+
#613/#614) read as `hi_chain()` = part_of, `lo_chain()` = is_a — **the shadow is the
223+
source AST's structure.** So the arc is **downstream of both phases**: it needs the
224+
V3 key (Phase 1 carries `(part_of:is_a)`) AND it produces the V3-shaped facet
225+
(Phase 2 homogenizes HelixResidue → that same 16-byte facet). The migration is the
226+
substrate; AST-as-address is the first application that proves the substrate
227+
self-programs.
228+
229+
**The three-layer economic ladder** (each backed by shipped contract code; full
230+
treatment in the knowledge doc):
231+
1. *rails-shaped semantic AST at assembler cost* — each LSP/semantic query is one
232+
`FacetCascade` SIMD lane (`definition` = row `vpcmpeqd`; `documentSymbol` =
233+
`hi_chain` tile; `typeHierarchy` = `lo_chain` prefix `vpxor`+`tzcnt`). Only the
234+
**declarative THINK arm** flattens to the fixed-width tiles — not an imperative
235+
syntax tree.
236+
2. *static OGAR shape · dynamic ClassView · askama row-view* — view and action are
237+
two projections of one ClassView; **DO is a classaction *pointer* (`classid →
238+
ActionDef`), not re-implemented logic** (OGAR consumer doctrine).
239+
3. *OGAR as importable ERP-primitive stdlib · lance as the compiler* — import a
240+
primitive (`canonical_concept_id`), customize (`render_classid_for_concept`),
241+
compile (`classid → ClassView → askama`). Headline CONJECTURE: OpenProject+Odoo
242+
as **~2 MB GUID-encoded `(part_of:is_a)`** vs ~20 MB / ~250K LOC (~10×) — the
243+
*per-consumer marginal* footprint over a shared, once-minted primitive library
244+
(the importable primitive is **law-as-pattern** — OGIT `NTO/{Audit, Compliance,
245+
Legal}` — minted once; content stays with the consumer per `I-VSA-IDENTITIES`).
246+
247+
**Bricks, mapped onto the phases + gates:**
248+
249+
| brick | what | phase tie | status |
250+
|---|---|---|---|
251+
| **1 — slot allocation** | the 6-pair / 12-slot layout | = Phase-2's contained facet (`FacetCascade`) | **LOCKED (shipped #613/#614)** — only the classid half-order (Canon:Custom, below + §2.2) stays open, orthogonal to per-tier packing |
252+
| **2 — rank-minter** | SPO graph → `(po_rank, ia_rank)` per tier → `FacetCascade` | the **producer** of Phase-2 facets | **BUILT 2026-06-26**`contract::facet_mint` (commit `360fc720`); `mint_facets(&[NodeDecl], facet_classid)`; exact + roundtrip-lossless; producer-agnostic `NodeDecl` (ruff C++ + Roslyn C# `ruff_csharp_spo`, ruff #29); 8 tests green |
253+
| **3 — MedCare probe** | `ruff_csharp_spo` harvest → mint → SoA → `typeHierarchy`/`definition`, MedCareV2 oracle | the F-gate over both phases on a real corpus | **PENDING** — the single step that promotes the arc + the 2 MB/10× headline CONJECTURE → FINDING |
254+
255+
**Canon:Custom is ONE lock shared with §2.2, not two.** The minter's `facet_classid`
256+
(row 0) is a *parameter* — it bakes in no half-order — so brick 2 is unblocked. But
257+
the classid `(part_of:is_a)` ordering is the SAME open decision §2.2 carries on the
258+
V3 classid entries: the shipped `0x1000_0700` is custom(hi):canon(lo); the
259+
operator's Canon:Custom correction flips it to canon(hi):custom(lo) so the prefix
260+
sorts by shared concept, not render skin. Resolving Canon:Custom settles BOTH the
261+
Phase-1 classid entries (§2.2) AND the minter's row-0 ordering in one decision.
262+
263+
**Grade / gate.** The arc is **`[S]``[H]`** (CONJECTURE; the carrier + mechanism
264+
are shipped, the economic claim is unmeasured); gate **F-code** via the brick-3
265+
probe. It changes none of the §6 sequencing — it is the application that the
266+
sequencing delivers, and the reason identity-first / value-second is worth doing.
267+
195268
## Cross-references
269+
- `.claude/knowledge/ast-as-partof-isa-address.md` (the §7 arc — what+why, #616/#617 **merged**; the three-layer thesis + three honest boundaries + brick chain).
270+
- `crates/lance-graph-contract/src/facet_mint.rs` (brick 2, the rank-minter, commit `360fc720`) over `src/facet.rs` (`FacetCascade`, the shipped carrier #613/#614).
271+
- ruff #29`ruff_csharp_spo` Roslyn harvester (the brick-3 producer; `NodeDecl` is producer-agnostic so ruff C++ and Roslyn C# fill the same shape).
196272
- `soa-value-tenant-migration-v1.md` (brief — §2 where-to-read, §3 gates, §6 5+3).
197273
- `soa-value-tenant-migration-v1-harvest.md` (the filled inventory = Phase-2 input).
198274
- `substrate-unification-thesis.md` §8 (the facet as a reflection of the V3 key).

0 commit comments

Comments
 (0)