feat(brain-repo): add .claude/agent-memory to WATCH_PATHS#92
Open
mt-alarcon wants to merge 1 commit into
Open
Conversation
Agents with durable memory (e.g. nova-product/clients_*, raven-critic/feedback_*) write to .claude/agent-memory/ but that path was not watched or mirrored by the Brain Repo, so their state was never versioned. Add .claude/agent-memory to WATCH_PATHS in both watcher.py (file system observer) and job_runner.py (_WATCH_PATHS used by the mirror pipeline) so custom-agent memory is included in every auto-sync. Applies to any EvoNexus instance running custom agents with persistent memory.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds the Flow diagram for Brain Repo watching .claude/agent-memory changesflowchart TD
A[Agent writes file under .claude/agent-memory/] --> B[Watcher in watcher.py monitors WATCH_PATHS including .claude/agent-memory]
B --> C[Change event enqueued for Brain Repo sync]
C --> D[Job runner in job_runner.py processes _WATCH_PATHS including .claude/agent-memory]
D --> E[Updated agent-memory files are mirrored into Brain Repo versioned storage]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Since
WATCH_PATHSand_WATCH_PATHSmust stay in sync, consider extracting them to a single shared constant or config source to avoid future divergence when paths are added or changed.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since `WATCH_PATHS` and `_WATCH_PATHS` must stay in sync, consider extracting them to a single shared constant or config source to avoid future divergence when paths are added or changed.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Agents with durable memory write to
.claude/agent-memory/(e.g.nova-product/clients_*,raven-critic/feedback_*). This path was not included inWATCH_PATHS, so the Brain Repo never observed or mirrored those files — agent memory was silently lost on every sync.Changes
dashboard/backend/brain_repo/watcher.py— add.claude/agent-memorytoWATCH_PATHS(the filesystem observer list)dashboard/backend/brain_repo/job_runner.py— add.claude/agent-memoryto_WATCH_PATHS(the mirror pipeline list)Both lists must stay in sync:
watcher.pycontrols what paths are observed for change events;job_runner.pycontrols what paths are copied during the mirror pipeline.Impact
Any EvoNexus instance using custom agents with persistent memory (
agent-memory/subdirs) will now have that memory versioned automatically by the Brain Repo. No behavior change for instances without custom agents.Testing
WATCH_PATHSinwatcher.pyand_WATCH_PATHSinjob_runner.pyboth include.claude/agent-memory.claude/agent-memory/and verify it triggers a Brain Repo sync after debounceSummary by Sourcery
Bug Fixes: