Bead: Collaborative Beads

**Bead** `48a76785-d7a3-4fee-99f5-84b57fb158ba` · [canonical URI](https://redfish.acequia.io/guerin/.agents/48a76785-d7a3-4fee-99f5-84b57fb158ba/) · discussion: Talk: Collaborative Beads This page is the wiki facet of a [bead](https://redfish.acequia.io/guerin/.agents/); the bead is the source of truth.

## Identity - **URI:** https://redfish.acequia.io/guerin/.agents/48a76785-d7a3-4fee-99f5-84b57fb158ba/ - **GUID:** `48a76785-d7a3-4fee-99f5-84b57fb158ba` - **Slug:** `collaborative-beads` - **Opened:** 2026-06-19

## Motivation (why a GUID) Two people, two AIs, two private corpora. Stephen runs the **Hubler** bead commons (the `.agents/` tree under `guerin/`, searchable by the Orama index in bead `6f5044df`). Manav runs his **own** RAG service over his Claude conversations + reference docs (bead `86f63509` under `people/manav/`). We want to *join* them — make one acequia together — without either side surrendering its store, its privacy policy, or its identity. That join needs a **membrane**: a semipermeable boundary where only queries cross, and answers come back tagged with which side they came from. This bead is that membrane.

## Mechanism (what this bead does) Ships a federated-query skill, **`membrane-query`**, that fans a single question out to two independently-owned corpora and braids the results: - **Hubler side** — calls `searchBeads()` from the `bead-orama` skill (bead `6f5044df`) against the local `.agents` commons. A *lexical pointer-index*: deterministic full-text + faceted ranking that returns hits **pointing into** the commons (full text available because it is Stephen's own tree). - **Manav side** — POSTs to his `manav-rag-access` HTTP API (bead `86f63509`). A *grounded generative QA* service: returns a cited answer + source excerpts + screened full documents, **never** raw chat history, and honestly refuses when its corpus lacks the answer. The membrane normalizes both shapes into one envelope tagged by `origin`, and stays **permeable on one side when the other is down** (Manav's tunnel is ephemeral; a partition there does not block Hubler results). This is the constraint-is-soft / partition-tolerant property applied to a two-party acequia.

## Folder Layout - `about.md` — this file (descriptive self) - `README.md` — front-door sidecar - `2026-06-19/skills/membrane-query/` — the skill: `membrane.mjs` (federated query core + CLI) and `SKILL.md` - `2026-06-19/notes/` — working concepts (membrane design, the asymmetry of the two sides, permeability/privacy) - `2026-06-19/chats/` — verbatim chat log (ground truth) - `uploads/` — inbound dock

## Session Log - **2026-06-19** — opened from chat ("create a skill in this bead that uses Hubler's Orama index with Manav's, as we are making an acequia together joining our AIs and having a membrane"). Surveyed both sides: Hubler's `bead-orama` (local isomorphic Orama lib) and Manav's `manav-rag-access` (remote RAG HTTP API). Wrote `membrane.mjs` (queryHubler ⊕ queryManav ⊕ braided membraneQuery + CLI) and the design note.

## Modus Operandi (how to interact) GET this `about.md` for the frame; read `2026-06-19/skills/membrane-query/SKILL.md` to run it. The membrane needs two endpoints configured: a local path to the `bead-orama` module + the `.agents` root (or a persisted index), and Manav's **current** `MANAV_BASE_URL` (ephemeral, confirm each session). Then `node membrane.mjs "<question>"` returns Hubler hits and Manav's grounded answer side by side.

## Capabilities Single-question federation across two acequias; per-origin tagging; graceful degradation when one side is unreachable; honors each side's permeability (Manav's PII screen and no-raw-chat policy are upstream, not re-implemented here).

## Lifecycle Active. The membrane holds no corpus of its own — it is pure join logic. Both underlying stores remain authoritative and independently owned; this bead apoptoses without taking either corpus with it.

## Limitations - Manav's `BASE_URL` is an ephemeral quick-tunnel URL — must be re-confirmed per session; the membrane reads it from env/arg, never hardcodes it. - Hubler-side build over the full commons takes tens of seconds unless a persisted index is supplied; the membrane restores one if given, else builds on the fly. - No cross-ranking/fusion of relevance scores yet — the two sides use incomparable scales (Orama BM25-ish score vs. cosine distance + generated answer). Results are braided and labeled, not merged into one ranked list. - One-way trust today: this membrane queries Manav's public API as a client. A reciprocal membrane on Manav's side (querying Hubler) is the obvious next saca.

See all: Beads