AI Agent Hub
Back to skills
Dual-Brain Memory Guardian icon

Dual-Brain Memory Guardian

AI Agent Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Install @user_4baa9e94/dual-brain-memory-guardian according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem: Rules and Experience Drift Apart

AI agents often repeat the same mistakes across long conversations or recurring tasks. A user correction may not influence the next attempt, completed work may lack structured reflection, and past pitfalls are usually retrieved by brittle keywords instead of fuzzy semantic matching. At the same time, high-confidence behavior constraints must not be overwritten by noisy recall.

How It Works: Rule Brain + Experience Brain

Dual-Brain Memory Guardian uses a dual-brain contract:
- Left brain (Markdown): stores explicit rules, durable preferences, and behavior constraints in files such as SKILL.md, operations.md, learning.md, and boundaries.md.
- Right brain (Pinecone): stores corrections, reflections, and task experience, with semantic recall using PINECONE_API_KEY and multilingual-e5-large.

Key trigger points include memory:session-start, memory:auto-session-start, memory:on-correction, memory:on-task-complete, and memory:mark-promoted. The session starts by loading relevant memory, corrections are captured as events, non-trivial tasks end with a reflection, and only then may experience be promoted into rules according to learning.md.

Boundaries and Notes

The skill keeps rule memory under ~/dual-brain-memory-guardian/ and stores experience memory in Pinecone. The conflict order is fixed: project Markdown > domain Markdown > global Markdown > Pinecone recall; vector recall should not outrank explicit contracts. It requires Node.js 20+, npm, and the Pinecone SDK, and it should not store sensitive secrets or perform destructive rewrites of uncertain content.

Use Cases

  • Load relevant rules and experience at session start before handling constrained user requests.
  • Capture user corrections as events and write them to experience memory for later recall.
  • Generate post-task reflections after complex work and decide whether to promote experience into Markdown rules.
  • Recall similar past pitfalls by fuzzy semantic matching to answer constrained recurring questions.

Best For

  • Engineers maintaining AI-agent behavior constraints need auditable rules distilled from user corrections.
  • Developers building conversational agents need structured post-task reflection and promotion decisions.
  • Agent developers using Pinecone need semantic recall of past pitfalls to inform later answers.
  • Leaders managing agent memory boundaries need Markdown contracts to outrank vector recall.