Claude Memory Framework
Turn Claude Code into your business assistant — open source and free
黃志弘 Leo
Published 2026-03-31 · Updated 2026-10-07
!Problem
Claude Code has memory, but the AI decides how to sort it
Claude Code already ships CLAUDE.md, auto memory and session resume. Auto memory now has its own structure too, a MEMORY.md index plus one file per memory, but the AI still decides what to store and how to sort it. Use it long enough and it often remembers your code conventions and forgets your business goals.
Solution
Put a layer of structure on top of the native memory
Four template types (User / Feedback / Project / Reference) plus YAML frontmatter plus an index a human keeps tidy. You decide what gets remembered, and how the AI uses it.
7memory types
Core principles
Who the AI assistant is and how it works. Quality first, honest and transparent, solves things on its own, checks the facts, keeps learning.
Example: "Before you hand it over, ask yourself: will they be happy with this?"
User memory
Who you are, your role, your skills, your preferences, how you talk. Claude adjusts how it answers to fit your background.
e.g. "runs on a Mac mini M4, prefers Telegram for messages"
Feedback memory + business playbook
Your corrections and your approvals, pricing rules, the traps you fell into, the tactics you tested and proved.
Example: "Build a demo before you quote" "The free resources page is the best traffic driver"
Projects + clients + status
Goals, priorities, client management, the daily handover log.
Example: "Q2 goal is 30K monthly revenue" "Client A's quote is waiting on confirmation"
Content schedule
Posting times, platform rules, the approaches you tested and proved.
Example: "Post the tutorial at 8:00 every day" "Tool intro + real experience = high engagement"
Tools and services
Where the tools are, how the services connect, where the APIs live. No hunting for it again every time.
Example: "Database: Supabase" "Deploy: Vercel"
Automation
Memory loads itself when a session starts, progress saves itself when it ends. Nothing to manage by hand.
Pure Node.js, no extra packages to install
vsCompared with the alternatives
| Aspect | Native auto memory | + this framework |
|---|---|---|
| Structure | A MEMORY.md index plus one file per memory, sorted by the AI | 7 types + YAML frontmatter |
| Index | Written by the AI | Kept tidy by a human |
| What it stores | Code patterns, debug notes | + your preferences, feedback, business context |
| Who controls it | Mostly the AI | Mostly you |
| Feedback loop | Implicit | Explicit (Why + How to Apply) |
| Automation | None | Session hooks read and write it |
1Install in three steps
Step 1 — Create the folder
mkdir -p ~/.claude/projects/-/memoryStep 2 — Copy the templates
git clone https://github.com/HUANGCHIHHUNGLeo/claude-memory-framework.git
cp claude-memory-framework/templates/* ~/.claude/projects/-/memory/Step 3 — Add the boot instruction to CLAUDE.md
## Boot setup
After every session starts:
1. Read: ~/.claude/projects/-/memory/MEMORY.md
2. Load the memory files relevant to the current task★How I actually use it
Threads / IG / Facebook auto-posting + comment rounds
Claude remembers each platform's tone rules, posting schedule and hashtag strategy. On a comment round it reads accounts in the same space, learns from the posts that worked, and replies to every comment under our own posts.
No re-explaining client context
Claude remembers each client's requirements, quote and progress. Switching clients needs no new brief, it already remembers.
5 products maintained at once
Every product's architecture, bug log and technical decisions live in memory. Jump to a different project and Claude switches context on its own.
The whole of leoaido.com + AEO
Claude remembers the site structure, the SEO state of every page, the visitor data. It knows what needs updating better than I do.
There are 3 products running right now, and the top post has passed 19K views.