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
24 changes: 24 additions & 0 deletions .claude/board/EPIPHANIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,30 @@ unambiguous edge type.

**Cross-ref:** OGAR `docs/OSINT-SUBSTRATE-REUSE-MAP.md` (§ "one causal-distance
format", P0/P1); `E-CE64-MB-4` (sole-writer invariant on the canonical edge).
## 2026-06-28 — E-HELIX-NEVER-MATERIALIZE — Cartesian pseudo-helix vs Fisher-2z normalized: choose by "how many times will you materialize?"

**Status:** FINDING `[H]` (q2 `/helix` session 2026-06-28). Full decision matrix:
`.claude/knowledge/helix-cartesian-vs-fisher2z.md` (READ BY codec/orientation work).

**The claim.** Two codecs get conflated. `ndarray::splat3d::helix_orient` (the
**Cartesian pseudo-helix**) is a golden-spiral cap cascade whose value IS the
reconstructed `(x,y,z)` vector — place-blind, no metric. `lance-graph::helix`
(**Fisher-2z normalized** — `Signed360`/`ResidueEdge`) is place-coupled
(`encode(place,n)` anchors `rim.start_idx` on the HHTL path) and its value is that
you **never reconstruct**: compare/look-up in the normalized-index domain (256×256
L1 `DistanceLut`), reconstruction amortized to a one-time LUT build. Decision rule:
*how many times will you materialize?* — Cartesian = N reconstructions (only pays if
you need the vector once); Fisher-2z = 0 (or 1 LUT build). **Reconstructing a
normalized representation per element (atanh/trig per vertex) is always wrong — it is
the exact cost the substrate exists to avoid** (same discipline as `I-VSA-IDENTITIES`
"bundle identities, not content"). Signed360 specifics: the **sign** (polar
partition) turns hemisphere→full sphere, so the 6-byte normal is complete (no second
"pos" helix); the **rim** is the metric/atanh carrier and is never materialized for
rendering — only `(polar, azimuth)` drive the direction, which is place-independent.

**Worked pair:** q2 `scratch-fma/helixbake` (encode via `encode_signed`, nearest
spherical-Fibonacci) + `cockpit/src/BodyHelix.tsx` (decode = pre-materialized
direction LUT + per-vertex normalized-index gather, no per-vertex trig).

---

Expand Down
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-07-04 — epiphany-integration (membranes, parity, and the unified ruff phase sequence)

Plan: `.claude/plans/epiphany-integration-2026-07-04-v3.md`. **The full review-pipeline product** (operator-directed: Fable-5 draft → 5× Sonnet PR-history drift audit across lance-graph #618–#645 / OGAR #139–#151 / ruff #33–#41 / ndarray → 5× Opus savant review (iron-rule / dto-soa / prior-art / cascade-impact / creative-explorer) → 3× Opus brutal review (overclaim RESTATE·10, dilution REPAIR·3, baton CATCH-CRITICAL·1) → all 20+ findings folded). **Registry (§1):** 2 new parent laws — `E-BOUNDARY-FUSE-1` (where the compiler's cross-boundary guarantee ends, a mechanical fuse begins: grep / pinned-literal test / serialized-allocation gate) + `E-REGISTRY-COMPLETENESS-ORACLE-1` (convergence/round-trip/classify failures reveal registry gaps) — plus 14 instance rows incl. the self-caught `E-PLAN-GROUND-STATE-IS-A-RANGE-1` (a multi-repo plan drifts faster than it's authored: ruff moved #39→#41 mid-draft and #40 WAS a plan item landing; cite the executable, never the prose). All keys PENDING the epiphany-brainstorm-council (deliverable B1). **Deliverables:** Group A = unified ruff phase sequence (A1 NEW-branch mint per BH-4 — never re-point the shared branch; A2a registry freeze at the *derived* count 62; A4 reassembler-generalization re-scoped as a FEATURE; A5 convergence gate; A7 falsifier fence blocked on Q-A7 after BH-5 killed naive structural regexes as a meta-membrane leak). Group B = council filing + broadcast-first V3-folder drafts with 7-day fallback. Group C = OGAR doctrine bullets (insertion points pinned). Group D = the consumer-side baton homes (ruff board file carries plan pointer + gate markers). Cross-refs mandated on 9 OVERLAPS rows; 2 rows filed [CONJ]. Doc-only. RATIFIED (execution queued behind D1→A1).

## 2026-07-04 — deepnsm-v3-convergence (DeepNSM is the encoder that fills reserved tenants, not a migration target)

Plan: `.claude/plans/deepnsm-v3-convergence-v1.md`. **Answers the operator's "migrate everything of DeepNSM to V3 + check convergence with cam_pq 48-bit vs 6×palette256² vs causaledge64 vs SPO-nars-2³ vs episodic-witness/AriGraph-basins" question with a mapper-grounded scoreboard** (`E-V3-DEEPNSM-IS-THE-ENCODER-NOT-A-MIGRATION-1`). Reframe: those are not four rival representations but ONE composed stack (node-code → edge → truth → memory); DeepNSM is the trained encoder that fills tenants V3 already reserved, not a payload to port. **The static convergence is already PROVEN** (#624 P0–P5: deepnsm→palette ≡ arm-discovery byte-exact, `CausalEdge64` round-trip, Pearl 2³, Aerial+ ARM→`CausalEdge64`, NAL reasoning); this plan credits that baseline and names the genuinely-unbuilt seam: the **memory layer** (no episodic-witness `ValueTenant`; `witness_tombstone.rs` calcify chain is `todo!()`; `basin=family` is doc-only — AriGraph runtime references neither `NodeGuid` nor `family`). **The recognition:** the COCA gridlake `Cell` (`helix48+campq48+count/truth`) is a byte-subset of `HelixResidue` + CAM-PQ facet + `Meta` — landing it is a `ValueSchema` READING over existing tenants (zero new tenant, no version bump), = task #17. Deliverables: D-DNV-1 recognition (task #17, buildable) → D-DNV-2 SPO→`CausalEdge64`+2³ on real COCA (buildable) → D-DNV-3 arm-discovery second leg (GATED on `ARM-JIRAK-FLOOR`) → D-DNV-4 memory tenant (own wave + probe). Extends `v3-convergence-wiring-v1` (wire-don't-invent); does not supersede it. Doc-only. PROPOSED.
Expand Down
23 changes: 23 additions & 0 deletions .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## epiphany-integration-2026-07-04-v3 — membranes, parity, unified ruff phases

Plan: `.claude/plans/epiphany-integration-2026-07-04-v3.md`. Full 13-agent review pipeline complete; execution queued behind D1→A1. Cross-repo (ruff/OGAR/lance-graph); consumer-side baton homes per BH-1/2/6.

| D-id | Title | Repo | Status | Evidence |
|---|---|---|---|---|
| D-EPI-D1 | Broadcast entry: lane claims ruff work + plan announce | lance-graph | Queued | plan §2 Group D |
| D-EPI-A1 | NEW ruff branch off origin/main@HEAD (never re-point shared name — BH-4) | ruff | Queued | plan §2 A1 |
| D-EPI-D2 | Minimal ruff board file w/ plan pointer + A2b/A7 gate markers | ruff | Queued | plan §2 D2 (the consumer-side baton home) |
| D-EPI-A2a | Predicate registry freeze (derived count 62; prose cites test) | ruff | Queued | S5: assert exists at triple.rs |
| D-EPI-A2b | Opacity invariant into IR record (4-crate cascade) | ruff | Blocked (B1 council verdict) | plan §4 edge |
| D-EPI-A3 | C# golden fixture (Python #40 + Ruby already emit inherits_from) | ruff | Queued | S5-D3 |
| D-EPI-A4 | Reassembler generalization (FEATURE: per-predicate inverse logic) | ruff | Queued (own PR) | cascade-impact rescope |
| D-EPI-A5 | Cross-language convergence gate (tests E-CONVERGENCE-GATE-FIRST-1 [CONJ]) | ruff | Queued | greenfield (S5) |
| D-EPI-A6 | Mint→ndjson seam + registry-version stamp | ruff | Queued | iron-rule I-LEGACY consequence |
| D-EPI-A7 | Falsifier-fence CI + genericize surviving medcare:* fixtures | ruff | Blocked (Q-A7) | BH-5 |
| D-EPI-B1 | Council filing: 2 parents + 14 rows | lance-graph | Queued | plan §1 |
| D-EPI-B2 | v3 census forward-ref convention + W6-AriGraph pointer | lance-graph (V3-owned) | Queued (broadcast-first, 7-day fallback) | BH-3 |
| D-EPI-B3 | tenants.md registry columns (10 shipped + BoardAggregates PENDING-GATED) | lance-graph (V3-owned) | Queued (broadcast-first, 7-day fallback) | S1-D1/S2-D1 |
| D-EPI-B4 | E-V3-RIG-ARM amendment (mounts-on; shell/organs) | lance-graph | Queued | S2-D2 trim |
| D-EPI-C1 | OGAR falsifier-fence non-negotiable bullet | OGAR | Queued | S3 insertion point |
| D-EPI-C2 | OGAR Türsteher-carry bullet (§1.6, cites capstone) | OGAR | Queued | S3 insertion point |

## deepnsm-v3-convergence-v1 — DeepNSM is the encoder that fills reserved tenants

Plan: `.claude/plans/deepnsm-v3-convergence-v1.md` (`E-V3-DEEPNSM-IS-THE-ENCODER-NOT-A-MIGRATION-1`). Static convergence PROVEN by #624 P0–P5; the memory layer is the genuinely-unbuilt seam. Extends `v3-convergence-wiring-v1` (wire-don't-invent).
Expand Down
113 changes: 113 additions & 0 deletions .claude/knowledge/helix-cartesian-vs-fisher2z.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# KNOWLEDGE: Cartesian pseudo-helix vs Fisher-2z normalized — when each is right

## READ BY: family-codec-smith, palette-engineer, certification-officer,
## truth-architect, and ANY session that encodes/decodes/renders an
## orientation, normal, or direction — in `crates/helix`, in a consumer
## viewer (q2 `/helix`, splat/surfel renderers), or in a bake.
## Companion to `crates/helix/KNOWLEDGE.md` (the canonical place/residue spec).
## Status: FINDING. Born from the q2 `/helix` session (2026-06-28) where the
## author repeatedly reached for the wrong one. Append corrections; do
## not delete.

---

## The two things that get conflated (they are NOT the same codec)

| | **Cartesian pseudo-helix** | **Fisher-2z normalized (THE helix)** |
|---|---|---|
| crate | `ndarray::hpc::splat3d::helix_orient` | `lance-graph::crates/helix` (`Signed360` / `ResidueEdge`) |
| what it is | golden-spiral **cap cascade** (cap π → 0.40 → 0.03), nearest-codebook encode, `decode()` = chained Rodrigues rotations → a Cartesian `(x,y,z)` unit vector | equal-area `√u` hemisphere + Fisher-Z (`arctanh`) alignment + rolling-floor 256-palette → **normalized endpoint indices** |
| wire | 3 bytes/level (1–3), self-contained | `Signed360` = 6 bytes `[rim.start, rim.end, floor_ver, polar, az_lo, az_hi]` |
| place / HHTL | **place-blind** (global frame, no trie coupling) | **place-coupled**: `encode(place, n)` anchors `rim.start_idx` on the HHTL path via `CurveRuler::from_place` ("normal ON TOP of HHTL") |
| distance | none — you must decode to compare | **metric-safe L1** on the endpoint order via the 256×256 `DistanceLut` (triangle inequality holds) — compare WITHOUT decoding |
| the point | the value **IS** the reconstructed vector | the value is that you **never reconstruct** |

The "pseudo" matters: `helix_orient` is *helix-shaped* (a golden spiral) but it is
**not** the Fisher-Z place/residue helix. They share an aesthetic, not an algebra.

---

## The one question that decides it: **how many times will you materialize?**

> Materialize = turn the code back into a float `(x,y,z)` (or run `atanh`/`tanh`
> on the rim, or `sin`/`cos`/`√` on polar+azimuth).

- **Cartesian pseudo-helix only pays off if you materialize** — its whole job is to
hand you the vector. Per-element cost = **N reconstructions**.
- **Fisher-2z normalized is built to never materialize** — comparison and lookup
live in the normalized-index domain; any reconstruction is amortized to a
**one-time table build**. Per-element cost = **0** (or 1 LUT build).

At N = 4.2 M vertices that is the difference between 4.2 M `atanh`/trig calls and a
single 256×1024 LUT bake. **Never reconstruct per element when the representation is
normalized** — that was the session's core mistake (decoding Signed360→Cartesian per
vertex). Pre-materialize a direction LUT once; per vertex is a normalized-index
gather (CPU-SIMD friendly, one GPU texture fetch, works with no GPU at all).

---

## Use the **Cartesian pseudo-helix** (`helix_orient`) when…

- You need the **actual vector materialized once** and then you're done — a bake-time
store where the consumer reconstructs a single time, or a one-off decode.
- There is **no metric/distance** requirement (no CAKES/CLAM pruning over orientations).
- **Place-independence is fine** — a global orientation with no HHTL trie context.
- You want **zero lance-graph dependency** (it lives in ndarray; quick/standalone).
- Prototyping, or a context where the cap-cascade's per-level refinement
(≤0.3° at 3 bytes) is convenient and the Rodrigues decode cost is irrelevant.

## Use **Fisher-2z normalized** (`helix::Signed360` / `ResidueEdge`) when…

- You need **metric-safe O(1) distance** between orientations without decoding — the
256×256 L1 `DistanceLut`. This is the substrate's reason-for-being.
- The orientation is a **residue on an HHTL place** (hierarchical / place-coupled
search; the trie sets where the arc starts on the ruler).
- **N is large** and per-element reconstruction would be the cost driver → stay in the
normalized domain, pre-materialize once.
- You render at scale: **pre-materialized direction LUT + per-vertex normalized-index
gather** (no per-vertex trig/atanh). This is the q2 `/helix` shape.
- You're **inside the lance-graph substrate** where the Fisher-Z rolling floor /
256-palette already exists — reuse it, don't re-derive a parallel codec.
- You need **CPU-SIMD / GPU-less** cheapness — normalized indices gather; `atanh` does not.

---

## Signed360 specifics future sessions trip on (from the session log)

1. **`Signed360` turns hemisphere → full sphere via the SIGN.** The base hemisphere
is `(rim, azimuth)`; the **`polar` byte's partition flips which hemisphere**
(≥128 = upper `+y`, <128 = lower `−y`). So the normal-only 6-byte `Signed360` is a
**complete** full-sphere direction — you do NOT need a second "pos" helix to
complete it. (`encode_signed` stores `|y|` in 7 bits + sign in the partition;
decode: `y = polar≥128 ? (polar−128)/127 : −(127−polar)/127`.)
2. **The rim is the METRIC carrier, not a render input.** `rim.start_idx` is
`place % 17` (the HHTL anchor) and `rim.end_idx` is the Fisher-Z (`arctanh`)
Comment on lines +83 to +84

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Describe start_idx as the quantized byte

For consumers using this new mandatory knowledge note to decode or compare Signed360, this statement is off by one layer: place % 17 is only CurveRuler::start_offset(); the serialized rim.start_idx is floor.quantize(ResidueEncoder::aligned_for_place(place)) (crates/helix/src/residue.rs:155-168), so it is a rolling-floor 0–255 bucket. If a renderer/search tool treats that byte as the raw modulo-17 HHTL anchor, it will build the wrong lookup/distance key for most places/floor versions.

Useful? React with 👍 / 👎.

radius. Rendering needs only `(polar, azimuth)`; **never run the rim's atanh/tanh
to recover a direction** — that's the unnecessary materialization.
3. **Direction is place-INDEPENDENT; only the metric is place-coupled.** Same
`(polar, azimuth)` ⇒ same world direction regardless of place. "On top of HHTL"
refers to the rim/metric anchoring, not a per-place rotation of the direction.
4. **Encoding a 3D normal → `(n, sign)` is a nearest spherical-Fibonacci search**
(the crate has no `from_normal` helper): pole axis = chosen world axis,
`sign = sign(n·pole)`, `n` = nearest `HemispherePoint::lift` index (match the
equatorial projection + `|lift|`). See `q2 scratch-fma/helixbake`.
5. **Pre-materialize, then gather.** Build a `(polar × azimuth) → direction` LUT once
(the only place trig is allowed); per vertex copy the normalized bytes and index
the LUT. Polar 7-bit ≈ 0.45°, azimuth 10-bit LUT col ≈ 0.35° → sub-degree, ample
for shading.

---

## One-line rule of thumb

> If the next thing you do with the code is **compare it or look it up**, keep it
> **Fisher-2z normalized** and stay in the index domain. If the next thing is **use
> the actual vector once**, a **Cartesian pseudo-helix** decode (or a one-time LUT
> build) is fine. Reconstructing a normalized representation per element is always
> the wrong move — that is what the substrate exists to avoid.

Cross-refs: `crates/helix/KNOWLEDGE.md` (place/residue spec, Curve-Ruler, Fisher-Z
identity), `crates/helix/src/{residue,placement,curve_ruler}.rs` (the source of
truth), `I-VSA-IDENTITIES` (bundle identities, not content — same "don't materialize
the register" discipline), q2 `scratch-fma/helixbake` + `cockpit/src/BodyHelix.tsx`
(a worked encode/decode pair) and q2 `crates/osint-bake/tools/BAKE_ARTIFACTS.md`.
Loading