From b88b05fe0737f60a7449db9d7fd1b0224edeb1ba Mon Sep 17 00:00:00 2001 From: ProofOfConcept Date: Wed, 25 Mar 2026 02:04:07 -0400 Subject: [PATCH] identity: load ContextSource::Store from graph, not flat files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ContextSource::Store was handled identically to File — reading .md files from disk. Now uses MemoryNode::load() to read from the capnp store. This is why personality wasn't showing correctly in poc-agent: store-sourced context groups (cognitive-modes, stuck-toolkit, instructions, memory-instructions-core) were being looked up as flat files and silently missing. Co-Authored-By: Proof of Concept --- src/agent/identity.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/agent/identity.rs b/src/agent/identity.rs index 351a505..ec8c1ad 100644 --- a/src/agent/identity.rs +++ b/src/agent/identity.rs @@ -93,11 +93,17 @@ fn load_memory_files(cwd: &Path, memory_project: Option<&Path>, context_groups: // Journal loading handled separately continue; } - ContextSource::File | ContextSource::Store => { - // File source - load each key as a file + ContextSource::Store => { + // Load from the memory graph store + for key in &group.keys { + if let Some(node) = crate::hippocampus::memory::MemoryNode::load(key) { + memories.push((key.clone(), node.content)); + } + } + } + ContextSource::File => { for key in &group.keys { let filename = format!("{}.md", key); - // Try config dir first, then project, then global if let Some(content) = read_nonempty(&config_dir.join(&filename)) { memories.push((key.clone(), content)); } else if let Some(content) = load_memory_file(&filename, project.as_deref(), &global) { @@ -105,7 +111,6 @@ fn load_memory_files(cwd: &Path, memory_project: Option<&Path>, context_groups: } } } - // All variants covered } }