Skip to content

Add memory-search and memory-write MCP tools for project memory#852

Draft
pushpak1300 wants to merge 3 commits into
mainfrom
add-project-memory-tools
Draft

Add memory-search and memory-write MCP tools for project memory#852
pushpak1300 wants to merge 3 commits into
mainfrom
add-project-memory-tools

Conversation

@pushpak1300

Copy link
Copy Markdown
Member

Currently there's no durable way for agents to record project knowledge between sessions. They rediscover decisions, hit the same gotchas, and can't build on work from a previous run.

This adds two MCP tools backed by committed markdown files in .ai/memory/:

// Record a decision so future agents don't relitigate it
memory-write(glob: "app/Http/Controllers/**", type: "decision",
             title: "Always scope queries to tenant", note: "...")

// Retrieve everything recorded for a file you're about to touch
memory-search(path: "app/Http/Controllers/OrderController.php")

Notes are stored as markdown with YAML frontmatter (applies_to globs). The MemoryRepository routes writes to area files and matches searches via fnmatch. Both tools normalize paths so absolute and relative inputs work the same way.

Disabled by default for teams who don't want it: set BOOST_MEMORY_ENABLED=false. The tools unregister entirely via shouldRegister() when off.

The three entry types are decision, gotcha, and rule. Open to adjusting these or the file layout before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant