3.3 KiB
Memory map
The authenticated /memory page projects existing owned records into a graph.
It inherits the private layout's session and private-zone PIN boundary. It is
not the public fleet map and does not grant access across a connection.
Layers
@bitbaum/knowledge-map: versioned JSON contract, neighborhood layout and Markdown handoff helpers. The root entry is framework independent.src/lib/knowledge-map/build.ts: allowlisted projection, identity resolution and endpoint ownership checks. Runtime projects and their remembered entity appear once. No database writes or automatic relationship inference.src/db/queries/knowledge-map.ts: owner-scoped, bounded reads. Every package observation is joined to an owned active project. Both relationship endpoints must survive the owned entity projection. Bounds are disclosed in the map.@bitbaum/knowledge-map/react: renderer, styles, search ranking, navigation and export controls.src/components/memory/KnowledgeMap.tsx: Loki's adapter for ChatKit dictation, existing UI controls and usage tracking.src/lib/knowledge-map/facts.ts: the same recorded project, goal and package connections as grounded agent facts. Relational questions enable this through the existing project source, for both seed retrieval andlist_projects.
Database failures propagate rather than becoming invented empty neighborhoods. Snapshot generation is a read, not a scan trigger. Package observation dates are shown; a manifest observation does not claim a version is deployed or current. Development-log tests are explicitly reported, not independent verification.
Sharing and continuity
The project handoff includes only its purpose, latest reported work and direct project/goal/package links. It omits contacts, resources, notes and raw metadata. Prose may itself be private: the interface asks the owner to review before sharing. A deliberate JSON download exports the private snapshot, including remembered personal entities, with an explicit disclosure before download. Neither export publishes a URL or changes access.
A future public or investor map needs an independently allowlisted projection of published project records, not a client-side filter over this private graph. The renderer and graph contract are in the knowledge-map workspace package. Loki retains data and authorization adapters. The current bounds are a first snapshot limit; larger workspaces should gain server-side search and cursor-based neighborhoods before raising those limits. This first slice does not claim arbitrary graph scale.
Design references
Obsidian's Graph view documents local graphs and interactive filtering. The local neighborhood informs the focus view here. React Flow's performance guidance recommends memoization, collapsing large trees and simple node/edge styles. The renderer uses those principles without adding a diagram editor dependency.
Run the real-component preview with
node scripts/preview/build-knowledge-map-preview.mjs; the interactive browser
check is node scripts/preview/test-knowledge-map.mjs after rendering. Synthetic
preview records are explicitly examples, not claims about the owner's projects.