Files
dotfiles/claude/memory/project-bmf-mempalace-connector-parked.md
T
David F GliddenandClaude Opus 4.8 3f9a89b00c chore(memory): Basic Memory trial begins — sync normalization baseline (283 files)
Basic Memory v0.21.6 first sync over the live memory dir (steward-authorized
live-dir trial, Option A 2026-06-06): adds permalink: to frontmatter, refolds
long YAML description lines, strips final newlines. Bodies untouched —
verified via full diff classification. From this commit forward, any diff in
claude/memory shows only what Basic Memory or the session writes.

Trial design: MemPalace untouched as incumbent; git status check on this dir
at every wrap; end-of-day evaluation (recall quality, sync robustness,
rebuild-from-files, malformed-file behavior).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 09:52:17 +02:00

144 lines
10 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: BMF–MemPalace Connector — project framework, PARKED until L1 reliability resolved
description: Architectural framework for a BMF connector that queries MemPalace's
verbatim deep-archive via MCP. Internal-only (steward + Seb). Preserves both systems'
design intent. Parked until BMF L1 reaches reliability per project-focus-april-may.md.
type: project
originSessionId: 597aba4e-942b-4f20-8a89-3d801b14c971
permalink: claude-memory/project-bmf-mempalace-connector-parked
---
# BMF–MemPalace Connector — Project Framework
**Status:** PARKED. Resume when BMF L1 reliability is resolved (per `project-focus-april-may.md`; not before end of May 2026 unless conditions change).
## Origin and framing
Steward 2026-05-01 (verbatim, after architectural discussion of MemPalace/BMF coexistence):
> *"Since I'll always be running both on my machine, it only makes sense to me that they can take advantage of each other..."*
The framework respects the operational fact that the steward will always have both systems running locally. Rather than treating one as the eventual replacement of the other, it designs for the steady-state where each does what it does best, and BMF can reach into MemPalace when interpretation needs to touch the verbatim archive.
## Use case bounds (load-bearing — keep the scope small)
The steward bounded this explicitly:
- **Internal-only.** Steward + Seb. Not for scaled systems, not for end users.
- **Two purposes:** (a) tool for steward + Seb to leverage L1/L2 development work; (b) substrate for ongoing inquiries (contamination problem, freeman problem, possible own-model work).
- **Not productized.** Not a feature of CapableMind for downstream consumers.
These bounds make the design dramatically simpler — no multi-tenancy, no auth complexity beyond what two trusted users need, no rate-limiting, no abuse protection.
## The architectural choice
**Shape A: BMF connector calls MemPalace MCP server.**
BMF's documented invariant (CapableMind-AI's CLAUDE.md): *"All external access through connectors. No peer directly accesses internal buses."* MemPalace already exposes MCP; BMF's connector pattern is the documented integration path. Both systems retain their own storage encapsulation.
**Rejected alternatives:**
| Alternative | Why rejected |
|---|---|
| Shared SQLite/ChromaDB filesystem access | Breaks MemPalace's encapsulation; concurrent-write risk |
| HTTP REST surface on MemPalace | More protocol than needed for two-user internal use |
| Bulk ingest of drawers into BMF blob+vector | Loses MemPalace's verbatim guarantee + AAAK index; logchain bloat (~250k+ events) |
| Double-ingest into both | Drift; double storage; double maintenance |
## What the spec would specify
When the eventual spec session arrives, structure it as a CapableMind L1 connector spec (kebab-case-spec.md, header version, the §-section sequence Seb's spec discipline uses):
**1. Drawer reference pattern.** Opaque ID `mempalace:<wing>/<room>/<drawer-id>`, embeddable in BMF events, ReasonChain entries, Insights. BMF stores *references*, never bodies. Verbatim always lives in MemPalace.
**2. Query modes (5).** All map to existing MemPalace MCP tools — connector is mostly a thin translator:
| Mode | Maps to |
|---|---|
| `semantic` (bge-m3 similarity) | `mempalace_search` |
| `entity` (KG lookup) | `mempalace_kg_query` |
| `verbatim` (exact / near-match) | `mempalace_search` (verbatim mode) |
| `temporal` (date range) | `mempalace_kg_timeline` |
| `recall` (fetch by ref) | `mempalace_get_drawer` |
**3. Response envelope.** Every response carries provenance (wing, room, drawer ID, source file + line range), score, verbatim text. **No summarization at the connector layer** — preserves MemPalace's design promise.
**4. Stateless connector.** No storage of its own. BMF may cache drawer *references* (for dedup + cite-back) but never bodies.
**5. Honest degradation.** If MemPalace MCP is unreachable (today's MCP-disconnect experience makes this concrete), connector reports degraded health and BMF reasoning proceeds *without* MemPalace context rather than failing. Honors BMF's existing degradation invariant.
**6. Non-goals (load-bearing for keeping it small):**
- Multi-tenant access
- Write operations into MemPalace (connector is read-only)
- Replacing MemPalace's own MCP for direct steward queries
- Caching drawer bodies in BMF (would duplicate MemPalace's role)
- End-user productization
- Cross-instance federation
## Use-case fit (why this is worth picking up later)
- **L1/L2 development context.** BMF reasoning can pull historical decision context, prior PENDING/REVIEWED entries, design conversations from MemPalace's vault wing. Today this is manual; the connector makes it native.
- **Contamination problem inquiry.** The contamination doc itself (`docs/thinking/David/methodology/contamination-problem.md` §3.4) calls for *longitudinal pattern analysis across many exchanges*. MemPalace's KG carries temporal `valid_from`/`valid_to` on entities + relations — exactly the shape that inquiry needs. A connector lets BMF reason against the longitudinal record without manual export.
- **Freeman problem inquiry.** Same shape — pattern analysis across the corpus of governed exchanges. Connector enables BMF to query the corpus of its own past behavior.
- **Own-model development.** MemPalace's drawers + bge-m3 embeddings are training-grade material. Connector enables BMF's training module to draw exemplars from the verbatim archive without re-ingestion.
- **Reliable transcript substrate** (the use already proven). Preserves MemPalace's role unchanged; the connector adds a *new* read path without disturbing the existing one.
## Honest tradeoffs
- **Coupling.** BMF gains a soft dependency on MemPalace being reachable. Today's MCP-disconnect experience makes this real. Mitigation: degraded-mode mandatory; BMF reasoning must continue (with reduced context) when MemPalace unavailable.
- **Latency.** MCP roundtrip adds ~10–50ms per query vs in-process retrieval. Fine for interactive reasoning; profile before batch fan-out.
- **Versioning.** MemPalace's MCP tool surface evolves (we have already seen this with the 502-commit catch-up on 04-29). Connector needs to track. Small maintenance tax with both as steward's tools.
- **Spec ownership.** This is a BMF L1 connector spec. Authoritative home is CapableMind-AI's `docs/specs/integration/` (Seb's architectural territory) — needs Seb's review before merge. Pre-spec proposal can live in `docs/thinking/David/connectors/` if/when steward begins drafting.
## Resumption conditions
This work is parked until **all** of the following are true:
1. **BMF L1 reliability resolved.** The current 1,349-index-segment pathology + earlier SurrealDB / replay / migration issues stabilized. Defined by Seb's "ready for anyone to use by end of May 2026" milestone (per `project-focus-april-may.md`).
2. **MemPalace transition complete.** bge-m3 + MPS migration done; all four wings (chamber-library, Obsidian vault, Claude transcripts, CapableMind thinking docs) under stable embeddings. As of 2026-05-01 the chamber-library mine is in flight.
3. **Steward has bandwidth.** Connector spec writing is structured 2-3 hour work; deserves focused session, not squeezed time.
If any condition is not true, this stays parked. No partial advancement.
## What to do when resuming
When all three resumption conditions are satisfied:
1. **Re-read this file in full** + read the related artefacts:
- `~/.claude/projects/-Users-davidglidden/memory/project-mempalace-role-as-instrumentation.md`
- `~/_Dev/CapableMind-AI/CLAUDE.md` (BMF invariants + connector pattern)
- `~/_Dev/CapableMind-AI/docs/specs/` (review existing connector specs for pattern fit)
- `~/_Dev/mempalace/mempalace/mcp_server.py` (current MCP tool surface)
2. **Confirm with Seb** that the L1 substrate is stable enough to add a connector against; surface architectural concerns + agree on placement of the spec (under `docs/specs/integration/` likely).
3. **Draft proposal** in `docs/thinking/David/connectors/mempalace-connector-proposal.md`. Surface decisions, alternatives, tradeoffs in proposal-form (steward-authored, executor-supported).
4. **After Seb's review,** promote to spec at `docs/specs/integration/mempalace-connector-spec.md` per BMF spec conventions.
5. **Implementation phase** is separate — likely a small TypeScript module in BMF's `src/connectors/mempalace/`. Not in scope for the spec session.
## What this is NOT
- Not a proposal to merge MemPalace into BMF.
- Not a step toward replacing MemPalace.
- Not a productization of MemPalace through BMF.
- Not a multi-instance federation design.
- Not a near-term build.
## Canonical artifact
The durable framework document for steward+Seb consumption lives in the playbook:
`~/_Dev/CapableMind-AI/docs/thinking/David/architecture/mempalace-connector-framework.md`
This memory file mirrors that document for executor session-continuity. When updating the framework, update the playbook artifact first; this file is the index/pointer.
## Cross-references
- **Canonical:** `~/_Dev/CapableMind-AI/docs/thinking/David/architecture/mempalace-connector-framework.md`
- `project-mempalace-role-as-instrumentation.md` — MemPalace's current role as L1 stand-in
- `project-mempalace-mps-transition-pending.md` — current MemPalace transition state (in flight)
- `project-focus-april-may.md` — L1-primary-focus framing; defines "L2 parked"
- `feedback-arc-territory-steward-and-claude-code-only.md` — Seb is L1/BMF only; MemPalace is steward-only territory; this connector lives at the boundary between those territories and is the one place they intersect
- BMF: `~/_Dev/BetterMemories.io/CLAUDE.md` (L1 architecture overview)
- BMF: `~/_Dev/CapableMind-AI/CLAUDE.md` (full L1+L2 invariants and connector pattern)
- MemPalace: `~/_Dev/mempalace/CLAUDE.md` (verbatim mission and design principles)
- MemPalace MCP tool surface: `~/_Dev/mempalace/mempalace/mcp_server.py`
- Contamination problem: `~/_Dev/CapableMind-AI/docs/thinking/David/methodology/contamination-problem.md` (§3.4 longitudinal analysis use case)