Skip to content

Commit 947802b

Browse files
authored
Merge pull request #244 from AdaWorldAPI/claude/read-claude-md-jh51O
plan: VSA precision tiers, father-grandfather compression, DU-4/DU-5 shipped
2 parents c6e69c4 + 7a60c42 commit 947802b

33 files changed

Lines changed: 3477 additions & 2426 deletions

.bumpversion.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.bumpversion]
2-
current_version = "0.5.3"
2+
current_version = "0.5.4"
33
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(-(?P<pre_label>alpha|beta|rc)\\.(?P<pre_n>\\d+))?"
44
serialize = [
55
"{major}.{minor}.{patch}-{pre_label}.{pre_n}",

.claude/board/EPIPHANIES.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,68 @@ stay as historical references.
6565

6666
## Entries (reverse chronological)
6767

68+
## 2026-04-22 — E-DEPLOY-1 — Supabase-shape thinking extension: trojan-horse A2A training surface over DN-addressed metadata bus, backed by lance-graph, BBB-preserved by blackboard mediation
69+
70+
**Status:** FINDING (deployment doctrine — the nine-dimension shape that makes everything we've built earn its own product)
71+
72+
**One line:** the callcenter crate is not a Supabase clone; it is a Supabase-dialect thinking extension that trains itself on A2A agent traffic while the BBB holds at the blackboard.
73+
74+
**Nine compounding dimensions, one coherent deployment:**
75+
76+
1. **A2A agents ARE the training surface.** crewai-rust / n8n-rs / openclaw / LangGraph / AutoGen all generate traffic autonomously. Every seed lands with an `ExternalRole` tag; every commit (F<0.2) or FailureTicket (F>0.8) is a labeled training example — no human-in-the-loop, no labeling budget, no cold-start data problem. Per-ecosystem specialization emerges because persona AriGraph subgraphs diverge per family (`CrewaiAgent`-flavored codec cards differ from `N8n`-flavored codec cards after enough traffic).
77+
78+
2. **Supabase shape = adoption surface.** Any A2A consumer already knows PostgREST filter DSL, Realtime channels, JWT auth. They write a standard RAG integration. They never know there is a cognitive substrate behind it.
79+
80+
3. **Metadata IS the address bus.** `cognitive_event` Arrow rows carry `(external_role, faculty_role, expert_id, dialect, scent)` as typed columns. Queries against this metadata ARE dispatch — there is no separate "router." `SELECT … WHERE external_role=3` returns rows whose identity tuple is the execution target. Five dialects view the same bus: SQL tabular / Cypher graph-path / GQL / NARS truth-filter / qualia fuzzy-family.
81+
82+
4. **REST + DataFusion backs it** (ladybug-rs prior art). DataFusion 51 is the query engine for every dialect; Arrow 57 is the wire format; Lance 2 is the durable store. No PostgREST. No Postgres wire protocol in the hot path.
83+
84+
5. **DN-addressed URL hierarchy** replaces Redis flat keys: `/tree/{ns}/heel/{h}/hip/{h}/branch/{b}/twig/{t}/leaf/{l}` parses deterministically into a metadata predicate. URL path = routing predicate; body content = seed.
85+
86+
6. **Address = scent (1 byte via codec chain)**. Full path 16Kbit → ZeckBF17 48B → Base17 34B → CAM-PQ 6B → Scent 1B, ρ=0.937. One compressed object serves four uses: route / retrieve / similar / frame. Scent pulls context (AriGraph triples, episodic ±5..±500 window, persona trust, qualia signature) BEFORE the shader reads the body. The answer is grounded in cognitive-substrate state, not in lexical document vectors.
87+
88+
7. **Body content = external seed** enters the blackboard as `BlackboardEntry { capability: ExternalSeed }`. Never touches BindSpace directly. The round boundary on the blackboard IS the anti-corruption boundary.
89+
90+
8. **Polyglot front end, one IR, many tongues.** Cypher / GQL / Gremlin / SPARQL already shipped in lance-graph-planner. Adding NARS (native typed cognitive queries with f,c constraints), Redis (flat KV that auto-hydrates to DN), and Spark (bulk analytics + structured streaming) extends the existing `PolyglotDetect` pattern. Dialect-as-signal: the dialect itself is a feature on the seed's metadata row (tells the router which cognitive faculty the consumer is exercising).
91+
92+
9. **Agent cards + faculties + external roles = one identity space.** `ExpertId = stable_hash_u16(card_yaml)` collapses internal A2A experts, external agents, YAML cards into one register. Faculties (`ReadingComprehension`, `Voice`, `Reasoning`, `Empathy`) carry asymmetric inbound/outbound `ThinkingStyle` and `ToolAbility` sets. Full three-coordinate provenance: `(ExternalRole family, FacultyRole function, ExpertId card)` on every metadata row.
93+
94+
**BBB invariant — the iron rule that makes the whole thing safe:**
95+
96+
Every dimension lives in BOTH representations:
97+
- **External (metadata columns)** — Arrow scalars, safely cross the BBB, queryable by the five dialects, projected via `CollapseGate` on every commit.
98+
- **Internal (VSA role-bindings)**`RoleKey` slot addresses for Markov ±5 braiding, never cross the BBB, produced stack-side via deterministic metadata → slot mapping.
99+
100+
Same identity, two faces, one direction of flow: metadata IN (translate via RoleKey at the stack side) → VSA braiding (the substrate reasons) → metadata OUT (project back via `CollapseGate`). Supabase refactor only ever sees Arrow columns; the blackboard only ever sees role-tagged entries. No path exists where an external payload touches `Vsa10k`, `RoleKey`, `SemiringChoice`, or `NarsTruth` as a type — the compiler rejects it (Arrow's type system enforces it at `RecordBatch` column level).
101+
102+
**What the consumer experiences vs. what actually happens:**
103+
104+
| Consumer sees | Substrate does |
105+
|---|---|
106+
| POST /tree/.../leaf/utterance with Cypher body | URL → DN → 1-byte scent → pulls AriGraph subgraphs + episodic ±5..±500 + persona trust |
107+
| Response JSON with matched rows | Shader cycle ran: bind → braid with pulled context → unbind against AriGraph prior → F descent → Commit writes new SPO triple keyed on scent |
108+
| "This RAG is weirdly good" | The next query at nearby scent pulls richer context because the last query trained this persona's subgraph |
109+
110+
**Cross-refs:**
111+
- `.claude/plans/callcenter-membrane-v1.md` §§ 10.1 – 10.13 (full architectural spec)
112+
- `contract::external_membrane``ExternalRole`, `ExternalEventKind`, `CommitFilter`, `ExternalMembrane` trait
113+
- `contract::a2a_blackboard``ExpertCapability::{ExternalSeed, ExternalContext}` (the inbound BB entry types)
114+
- `contract::persona``PersonaCard`, `RoutingHint` (identity-as-metadata + four routing modes)
115+
- `contract::faculty``FacultyRole`, `FacultyDescriptor`, `ToolAbility` (internal cognitive-function identity)
116+
- `crates/lance-graph-planner/src/serve.rs` — Axum REST + OpenAI-compatible (extend here for DN + polyglot)
117+
- `crates/lance-graph/src/graph/arigraph/` — persona memory home (consumer-side AriGraph subgraph integration)
118+
119+
**Litmus test** (from plan § 10.9 iron rule, restated for this deployment):
120+
121+
Before any PR touches the callcenter crate or the metadata bus, answer three questions:
122+
1. Can I name the role, the place, and the translation for every byte crossing the gate?
123+
2. Does the external surface only see Arrow-scalar columns (no Vsa10k/RoleKey/semiring)?
124+
3. Does the internal substrate only see role-tagged blackboard entries (no raw external payload)?
125+
126+
If any answer is no, the code is leaking external ontology inward (or internal ontology outward) — reject.
127+
128+
---
129+
68130
## 2026-04-21 — AriGraph/episodic/SPO/CAM-PQ are thinking tissue, not storage — this is why it becomes AGI
69131

70132
**Status:** FINDING (the final piece that closes the architecture)

.claude/board/INTEGRATION_PLANS.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,34 @@
3636

3737
---
3838

39+
## v1 — Unified Integration: PersonaHub × ONNX × Archetype × MM-CoT × RoleDB (authored 2026-04-23)
40+
41+
**Author:** main-thread session 2026-04-23
42+
**Scope:** Integrate four upstream systems (PersonaHub compression, ONNX persona classifier @ L4/L5, Archetype ECS adapter, MM-CoT stage split) into the lance-graph cognitive substrate without adding new architectural layers — each maps onto existing contract types.
43+
**Path:** `.claude/plans/unified-integration-v1.md`
44+
**Deliverables:** DU-0 PersonaHub 56-bit compression, DU-1 ONNX persona classifier (replaces Chronos proposal), DU-2 Archetype ECS bridge crate, DU-3 RoleDB DataFusion VSA UDFs, DU-4 MM-CoT `rationale_phase: bool` in `CognitiveEventRow`, DU-5 board hygiene.
45+
46+
**Status (2026-04-23):** Active. No deliverables shipped yet. Plan written and committed (commit `468357d`). Architectural ground truth in `callcenter-membrane-v1.md` §§ 15–17.
47+
48+
**Confidence (2026-04-23):** CONJECTURE — all integration mappings grounded in repo evidence and upstream docs; no code shipped beyond plan.
49+
50+
**Correction (2026-04-23):** Chronos (Amazon) proposal superseded by ONNX classifier for DU-1. Chronos predicts 1D style scalar; ONNX classifier predicts full 288-class `(ExternalRole × ThinkingStyle)` product. ONNX infra already justified by Jina v5 ONNX on disk.
51+
52+
---
53+
54+
## v1 — Callcenter Membrane: Supabase-shape over Lance + DataFusion (authored 2026-04-22)
55+
56+
**Author:** main-thread session 2026-04-22
57+
**Scope:** Assimilate the design and ergonomics of the Supabase callcenter surface into a new crate (`lance-graph-callcenter`) that sits entirely outside the canonical cognitive substrate, backed by Lance + DataFusion, enforcing the BBB (blood-brain barrier) at compile time via the Arrow type system — Phoenix channel realtime + PostgREST query surface without PostgreSQL.
58+
**Path:** `.claude/plans/callcenter-membrane-v1.md` (254 lines)
59+
**Deliverables:** DM-0 `ExternalMembrane` + `CommitFilter` in contract, DM-1 callcenter crate skeleton, DM-2 `LanceMembrane::project()` + compile-time leak test, DM-3 `CommitFilter → DataFusion Expr`, DM-4 `LanceVersionWatcher`, DM-5 `PhoenixServer`, DM-6 `DrainTask`, DM-7 `JwtMiddleware + RLS rewriter`, DM-8 `PostgRestHandler`, DM-9 end-to-end test.
60+
61+
**Status (2026-04-22):** Active. DM-0 and DM-1 shipped in this session. DM-2 through DM-9 queued.
62+
63+
**Confidence (2026-04-22):** CONJECTURE on the full architecture (grounded in Arrow BBB analysis + repo evidence; no DM-2+ implementation shipped). DM-0/DM-1 are working stubs; Arrow compile-time BBB enforcement verified structurally, awaiting DM-2 compile-time leak test.
64+
65+
---
66+
3967
## v1 — Categorical-Algebraic Inference (authored 2026-04-21)
4068

4169
**Author:** main-thread session 2026-04-21

.claude/board/STATUS_BOARD.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,50 @@ superseded files into an `archive/` subdirectory. Estimate ~200
225225
LOC of meta work, ~2 hours of reading. **Not urgent**; useful
226226
before the next major planning session.
227227

228+
---
229+
230+
## callcenter-membrane-v1 — Supabase-shape over Lance + DataFusion
231+
232+
External callcenter membrane crate. BBB enforced by Arrow type system at
233+
compile time. Plan: `.claude/plans/callcenter-membrane-v1.md`.
234+
235+
### DM-0 / DM-1 — Shipped in this session
236+
237+
| D-id | Title | Status | PR / Evidence |
238+
|---|---|---|---|
239+
| DM-0 | `ExternalMembrane` trait + `CommitFilter` in `lance-graph-contract/src/external_membrane.rs` | **Shipped** | session 2026-04-22 — `pub mod external_membrane` added to contract lib.rs |
240+
| DM-1 | `lance-graph-callcenter` crate skeleton: `Cargo.toml` (feature gates) + `src/lib.rs` (stub + UNKNOWN markers) | **Shipped** | session 2026-04-22 — added to workspace members |
241+
242+
### DM-2 through DM-9 — Queued
243+
244+
| D-id | Title | Status | PR / Evidence |
245+
|---|---|---|---|
246+
| DM-2 | `LanceMembrane: ExternalMembrane` impl with `project()` + compile-time BBB leak test | **Queued** | Resolve UNKNOWN-1 (ShaderSink overlap?) first |
247+
| DM-3 | `CommitFilter` → DataFusion `Expr` translator (`[query]` feature) | **Queued** ||
248+
| DM-4 | `LanceVersionWatcher` — tails Lance version counter, emits Phoenix `postgres_changes` (`[realtime]`) | **Queued** ||
249+
| DM-5 | `PhoenixServer` — minimal WS server, Phoenix channel subset (`[realtime]`) | **Queued** | Resolve UNKNOWN-2 (which consumers need Phoenix wire?) first |
250+
| DM-6 | `DrainTask``steering_intent` Lance read → `UnifiedStep``OrchestrationBridge::route()` | **Queued** ||
251+
| DM-7 | `JwtMiddleware` + `ActorContext``LogicalPlan` RLS rewriter (`[auth]`) | **Queued** | Resolve UNKNOWN-3 (pgwire?) + UNKNOWN-4 (actor_id type) first |
252+
| DM-8 | `PostgRestHandler` — query-string → DataFusion SQL → Lance scan → Arrow response (`[serve]`) | **Queued** | Confirm PostgREST compat needed (§ 8 stop point 4) before building |
253+
| DM-9 | End-to-end test: shader fires → `LanceMembrane::project()` → Lance append → Phoenix subscriber receives event | **Queued** | Depends on DM-2 through DM-6 |
254+
255+
---
256+
257+
## unified-integration-v1 — PersonaHub × ONNX × Archetype × MM-CoT × RoleDB
258+
259+
Plan: `.claude/plans/unified-integration-v1.md`. Session 2026-04-23.
260+
261+
| D-id | Title | Status | Notes |
262+
|---|---|---|---|
263+
| DU-0 | PersonaHub 56-bit compression: `(atom_bitset: u32, palette_weight: u8, template_id: u16)` offline extraction from 370M HF parquet rows | **Queued** | Runs offline; no code deps. Output: `personas.bin` + `sigs_dedup.bin` + `templates/*.yaml` |
264+
| DU-1 | ONNX persona classifier @ L4/L5 — 288-class `(ExternalRole × ThinkingStyle)` product prediction; `style_oracle: Option<&OnnxPersonaClassifier>` in Think struct | **Queued** | Needs ~10K labeled cycles from Lance internal_cold (DM-2 must ship first); replaces Chronos proposal |
265+
| DU-2 | Archetype ECS bridge crate `lance-graph-archetype-bridge``ArchetypeWorld → Blackboard`, `ArchetypeTick → UnifiedStep`, `project() → DataFrame component` adapters | **Queued** | Needs DM-2 (ExternalMembrane impl) before adapter can be built |
266+
| DU-3 | RoleDB DataFusion VSA UDFs: `unbind`, `bundle`, `hamming_dist`, `braid_at`, `top_k` — registers in DataFusion session | **Queued** | Fingerprint column type decision needed first (FixedSizeBinary vs FixedSizeList); see open question in plan § 5 |
267+
| DU-4 | MM-CoT stage split: add `rationale_phase: bool` to `CognitiveEventRow`; surface `FacultyDescriptor.is_asymmetric()` in projected RecordBatch | **Shipped** (2026-04-23, commit `a05979e`) | Phase A stub: `rationale_phase: false` in `project()`. Phase B: wire from `FacultyDescriptor::is_asymmetric()`. |
268+
| DU-5 | Board hygiene: DU-0 through DU-4 registered; INTEGRATION_PLANS.md + LATEST_STATE.md updated | **Shipped** (2026-04-23, commit `a05979e`) | Plan corrections + precision-tier §18 + father-grandfather concept committed in follow-up. |
269+
270+
---
271+
228272
## Update protocol
229273

230274
When a deliverable ships:

0 commit comments

Comments
 (0)