diff --git a/pkg/agentic/brain_seed_memory.go b/pkg/agentic/brain_seed_memory.go index 7de0ea7..c771572 100644 --- a/pkg/agentic/brain_seed_memory.go +++ b/pkg/agentic/brain_seed_memory.go @@ -237,7 +237,7 @@ func brainSeedMemoryFiles(scanPath string) []string { walk(next) continue } - if core.PathBase(next) == "MEMORY.md" { + if brainSeedMemoryFile(next) { add(next) } } diff --git a/pkg/agentic/brain_seed_memory_test.go b/pkg/agentic/brain_seed_memory_test.go index c64384c..b55d41b 100644 --- a/pkg/agentic/brain_seed_memory_test.go +++ b/pkg/agentic/brain_seed_memory_test.go @@ -50,12 +50,12 @@ func TestBrainSeedMemory_CmdBrainSeedMemory_Good(t *testing.T) { require.True(t, result.OK) output, ok := result.Value.(BrainSeedMemoryOutput) require.True(t, ok) - assert.Equal(t, 1, output.Files) - assert.Equal(t, 2, output.Imported) + assert.Equal(t, 2, output.Files) + assert.Equal(t, 3, output.Imported) assert.Equal(t, 0, output.Skipped) assert.Equal(t, false, output.DryRun) assert.Equal(t, projectsDir, output.Path) - require.Len(t, bodies, 2) + require.Len(t, bodies, 3) assert.Equal(t, float64(42), bodies[0]["workspace_id"]) assert.Equal(t, "virgil", bodies[0]["agent_id"]) @@ -66,6 +66,8 @@ func TestBrainSeedMemory_CmdBrainSeedMemory_Good(t *testing.T) { assert.Equal(t, "decision", bodies[1]["type"]) assert.Equal(t, []any{"memory-import"}, bodies[1]["tags"]) + assert.Equal(t, "convention", bodies[2]["type"]) + assert.Equal(t, []any{"notes", "memory-import"}, bodies[2]["tags"]) } func TestBrainSeedMemory_CmdBrainSeedMemory_Good_GlobPath(t *testing.T) { diff --git a/pkg/agentic/commands.go b/pkg/agentic/commands.go index 36fecbf..250f303 100644 --- a/pkg/agentic/commands.go +++ b/pkg/agentic/commands.go @@ -54,8 +54,8 @@ func (s *PrepSubsystem) registerCommands(ctx context.Context) { c.Command("brain:recall", core.Command{Description: "Recall memories from OpenBrain", Action: s.cmdBrainRecall}) c.Command("brain/remember", core.Command{Description: "Store a memory in OpenBrain", Action: s.cmdBrainRemember}) c.Command("brain:remember", core.Command{Description: "Store a memory in OpenBrain", Action: s.cmdBrainRemember}) - c.Command("brain/seed-memory", core.Command{Description: "Import markdown memories into OpenBrain from a project memory directory", Action: s.cmdBrainSeedMemory}) - c.Command("brain:seed-memory", core.Command{Description: "Import markdown memories into OpenBrain from a project memory directory", Action: s.cmdBrainSeedMemory}) + c.Command("brain/seed-memory", core.Command{Description: "Import markdown memories into OpenBrain from a project memory file or directory", Action: s.cmdBrainSeedMemory}) + c.Command("brain:seed-memory", core.Command{Description: "Import markdown memories into OpenBrain from a project memory file or directory", Action: s.cmdBrainSeedMemory}) c.Command("brain/list", core.Command{Description: "List memories in OpenBrain", Action: s.cmdBrainList}) c.Command("brain:list", core.Command{Description: "List memories in OpenBrain", Action: s.cmdBrainList}) c.Command("brain/forget", core.Command{Description: "Forget a memory in OpenBrain", Action: s.cmdBrainForget})