* feat: connect project purpose, next actions and research in Memory * test: resolve superseding essays through the real dynamic route
4.0 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
src/lib/knowledge-map/model.ts: versioned JSON contract and focused Markdown handoff. No database or React.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.src/components/memory/KnowledgeMap.tsx: shared SearchKit and ChatKit search, a project-first overview, canonical ecosystem roles, purpose, next action and focused detail drawers with history. Infrastructure is secondary. Search and directory pagination operate on the snapshot; no unbounded DOM graph.src/lib/knowledge-map/projects.ts: recorded project relationships are separate from package intersections. Shared code is technical reuse, never inferred integration or ownership. Next actions prefer the project profile, then the latest development report, then an active linked goal.src/lib/knowledge-map/programme.ts: projects the two active work tracks from canonicalROADMAP.md, also shipped in standalone output. Public rationale and verification articles are reachable from the workspace and its exports.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. A second product consuming the map experience should first extract the pure contract, navigation and renderer into a fleet 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 initial neighborhood view proved too technical in owner feedback; project purpose and action now lead. 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.