Memory-librarian skill + stuck detector hook for Claude Code integration #748
Replies: 1 comment
-
|
The stuck detector concept is interesting — tracking Grep/Glob call counts as a search frustration signal and switching to semantic queries is a real pattern. We've seen similar behavior in our agents: repeated grep attempts on the same directory often mean the index needs a fresh mine pass, not more searching. The memory-librarian skill approach (dedicated context prepend from palace on session start) maps directly to how we use the One question about the engram integration: when you do the pre-session palace query, are you using the raw drawer content or running it through AAAK compression first? We've found that AAAK-compressed content in the context window is more useful for agents because it preserves relationships that a direct chunk might miss — but it does rely on AAAK expand working correctly at search time. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey Mila love what you built with mempalace. The palace metaphor is brilliant and the 96.6% LongMemEval score is no joke.
I built engram, a set of hooks and tools that give AI coding assistants human-like memory. It's backend-agnostic and already has first-class mempalace support. Thought some of these patterns might be useful for the project:
What engram does that could help mempalace users
1. Stuck detector (
graph_stuck_detector.sh)A Claude Code
PreToolUsehook that counts Grep/Glob calls and escalates. After 5 searches it says "stop grepping, usemempalace search." It already detects.mempalace/and suggests the right command. Saves tokens and teaches the AI to reach for memory instead of brute-forcing.2. Context watchdog (
context_watchdog.py)Audits graph staleness, ghost nodes (dead references), and token budget. Could adapt to audit mempalace's ChromaDB state — you claim ~170 tokens at wake-up, this tool could verify that.
3. Memory-librarian skill (
memory-librarian.md)A graduated retrieval protocol (5 levels from 0 tokens to unbounded). The idea: don't dump everything into context. Try
mempalace searchfirst (~500 tokens). Only escalate to reading source files if memory doesn't have the answer. Like how humans actually remember things.What I'd contribute
Happy to open a PR adding:
.agents/plugins/hook (already works, just needs mempalace-specific paths)All stdlib Python, no new dependencies. 49 tests passing.
FROM ONE STRONG WOMAN TO ANOTHER WITH LOVE <3.
Thank you for open-sourcing this. The community needs more tools like mempalace.
— h3
Beta Was this translation helpful? Give feedback.
All reactions