Give Claude a memory that outlasts sessions — and grows smarter the longer you use it.
Every time you open a new Claude Code session, Claude starts fresh. It doesn't know your codebase conventions, the decisions you made last sprint, or the business rules your team has built up over months. You end up re-explaining the same context, over and over.
This system fixes that. It stores project knowledge as plain markdown files in your repo — readable by Claude at session start, browsable in Obsidian, trackable in git, shareable with your team.
1. Your git history — When you run /memorise, Claude reads your recent commits, extracts what changed and why, and writes structured entries to memory/code-changes/. It also updates memory/context/ with any decisions, new tools, or domain terms it spots in commit messages and diffs.
2. Your conversations — /memorise reads Claude Code's saved session files on disk (~/.claude/projects/) to extract domain knowledge from your past conversations — decisions explained, business rules discussed, constraints agreed on. It tracks which sessions have already been processed, so re-running never double-captures. This works even if you closed the terminal without running /memorise first.
3. Your codebase — On the very first /memorise run, Claude scans your project root (package.json, go.mod, pyproject.toml, etc.) and README to pre-populate tech-stack.md and project.md. You get a head start instead of blank files.
memory/
├── INDEX.md ← Navigation map, loaded at session start
├── code-changes/
│ └── YYYY-MM-DD.md ← Daily log: what changed, why, what was learned
├── context/
│ ├── project.md ← Project goals and constraints
│ ├── industry.md ← Card index: domain terms, one line each
│ ├── tech-stack.md ← Card index: tools and conventions, one line each
│ └── decisions.md ← Card index: architectural decisions, one line each
├── decisions-log/
│ └── YYYY-MM.md ← Full decision detail, partitioned by month
├── tech-stack-log/
│ └── YYYY-MM.md ← Full tech-stack detail, partitioned by month
├── industry-log/
│ └── YYYY-MM.md ← Full domain detail, partitioned by month
├── people/
│ └── people.md ← Team and stakeholders
└── preferences/
└── preferences.md ← Coding and workflow preferences
All files are plain markdown. No database, no external services — just files you can read, edit, and commit.
At the start of every session, Claude reads memory/INDEX.md only — a compact navigation map that fits in a few hundred tokens. Context files are loaded on demand when a question makes them relevant. Nothing is pre-loaded speculatively.
Ask Claude in plain language:
- "Any conflicts with adding Redis caching?"
- "Have we made decisions about authentication before?"
- "What does 'idempotency key' mean in our system?"
Claude reads the relevant card index, scans the one-liners, and pulls full detail from the monthly log only for entries that match. No manual searching — just ask.
How is this different from Claude's built-in memory? Claude Code's built-in memory stores personal preferences across all your projects — it's per-user, not shareable. This system is project-level: it captures decisions, domain knowledge, and code history tied to a specific repo, committed to git so your whole team benefits.
Navigate to your project root, then run:
npx github:gorttham/project-context-memoryThe installer adds the memory files and the /memorise command to your project. It never overwrites files that already exist, and it appends to your CLAUDE.md rather than replacing it.
Requires Node.js 16+. Works on macOS, Linux, and Windows natively.
# Clone the template somewhere outside your project
git clone https://github.com/gorttham/project-context-memory.git ~/memory-template
# Navigate to your project root
cd /path/to/your/project
# Run the installer
bash ~/memory-template/install.sh .macOS and Linux only. Windows requires WSL or Git Bash.
/memorise # capture the past 24 hours (default)
/memorise 48h # capture the past 48 hours
/memorise 7d # capture the past 7 days
/memorise 2026-04-01 # capture since a specific date
Run it whenever you want to save what was done. Claude mines your git history, reads any past sessions it hasn't processed yet, and reviews the current conversation — then updates the memory files. You don't need to remember to run it before closing.
bash tests/verify.sh37 checks: required files present, CLAUDE.md correctly configured, valid Obsidian frontmatter, entry schema in place, git repo detected.
Point Obsidian's vault at either:
memory/— focused, memory-only vault- Your project root — whole project as a vault
All wikilinks, callouts, and tags work natively.
When a new version releases:
npx github:gorttham/project-context-memory --updateRefreshes only .claude/commands/memorise.md and tests/verify.sh. Never touches your memory/ files. If you've customised memorise.md locally, it will show you a diff before asking whether to overwrite.
To re-detect your tech stack after a major change:
rm memory/.memory-versionThe next /memorise run will re-scan and re-populate tech-stack.md and project.md.
rm -rf memory/
rm .claude/commands/memorise.md
rm tests/verify.sh
# Open CLAUDE.md and delete from "## Memory System" to the end of that section- Claude Code (any version with slash command support)
- Node.js 16+ (for the npx installer — not needed after install)
- Git (for history mining — gracefully skipped if absent)
- Obsidian (optional, for visual navigation)