Problem
Conversations saved to memory/ are loaded on startup but NOT merged into the main graph.json. select_context queries only graph nodes, missing conversation nodes in structural queries.
Solution
On startup, merge conversations from memory/ directory into the loaded graph before building the index. After N mutations, write the enriched graph back to graph.json.
Startup flow:
- Load graph.json
- Load all conversations from memory/
- Merge conversation nodes + edges into graph
- Build index from enriched graph
- Start MCP server with enriched state
Snapshot policy:
- Every 10 mutations: write graph.json atomically
- On SIGTERM/SIGINT: force snapshot
- On explicit snapshot MCP command: force snapshot
Acceptance Criteria
Files to Modify
- src/Graphos/Infrastructure/Server/MCP.hs — merge conversations on startup
- src/Graphos/UseCase/Export.hs — add snapshot function
- src/Graphos/UseCase/Conversation.hs — add mergeConversationsToGraph
Effort: 1 day
Priority: Critical (depends on #5)
See: docs/proposals/memory-agent/02-gap-analysis.md (Gap 6)
Problem
Conversations saved to memory/ are loaded on startup but NOT merged into the main graph.json. select_context queries only graph nodes, missing conversation nodes in structural queries.
Solution
On startup, merge conversations from memory/ directory into the loaded graph before building the index. After N mutations, write the enriched graph back to graph.json.
Startup flow:
Snapshot policy:
Acceptance Criteria
Files to Modify
Effort: 1 day
Priority: Critical (depends on #5)
See: docs/proposals/memory-agent/02-gap-analysis.md (Gap 6)