Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

Memory Palace — Reproduction Guide

A persistent context system for Claude using Obsidian, based on the ancient Method of Loci technique. All conversations across Claude Code (CLI) and Claude Desktop are stored in a structured vault so Claude maintains consistent context across sessions.


How It Works

Concept Metaphor Maps To
Wing A wing of the palace Top-level domain (Projects, People, Learning)
Hall A corridor in the wing Category within a domain (POC, Active-Work)
Room A room in the hall One topic/project that accumulates over time

Claude loads the Briefing section of a room first (token-efficient), then dives into details on demand. Sessions append to rooms — rooms are topics, not sessions.


Prerequisites

Tool Purpose Install
Obsidian Local markdown vault (the palace) Download from obsidian.md
uv Python package runner (needed for uvx) curl -LsSf https://astral.sh/uv/install.sh | sh
mcp-obsidian MCP server that lets Claude read/write the vault via uvx (no install needed, just configure)
Claude Code CLI Claude in the terminal npm install -g @anthropic-ai/claude-code
Obsidian Local REST API plugin Required by mcp-obsidian to talk to the vault Install from Obsidian community plugins

Step 1 — Set Up the Obsidian Vault

Create the vault folder structure. You can place the vault anywhere — update paths accordingly.

Claude-vault/
├── Master Index.md
├── Templates/
│   ├── room-template.md
│   ├── hall-index-template.md
│   ├── wing-lobby-template.md
│   └── claude-md-template.md
└── Wings/
    ├── Projects/
    │   ├── _lobby.md
    │   ├── POC/
    │   │   └── _hall-index.md
    │   └── Active-Work/
    │       └── _hall-index.md
    ├── People/
    │   └── _lobby.md
    └── Learning/
        └── _lobby.md

Master Index.md

---
type: master-index
created: YYYY-MM-DD
last_updated: YYYY-MM-DD
---

# Memory Palace - Master Index

> *The method of loci - place your ideas in rooms, walk the building, find the thought.*

This vault is Claude's persistent memory. Every conversation, decision, debugging session,
and architectural discussion is stored here, organised into Wings, Halls, and Rooms.

---

## Wings

- [[Wings/Projects/_lobby|Projects]] - All software projects, POCs, explorations, and active work.
- [[Wings/People/_lobby|People]] - Context about collaborators, clients, and teams.
- [[Wings/Learning/_lobby|Learning]] - Research, tutorials, courses, and knowledge-building.

---

## How It Works

| Concept | Metaphor | Maps To |
|---------|----------|---------| 
| **Wing** | A wing of the palace | Top-level domain (Projects, People, Learning) |
| **Hall** | A corridor in the wing | Category within a domain (POC, Active Work) |
| **Room** | A room in the hall | One topic/project that accumulates over time |

---

## Save Triggers

Claude writes to the vault when:
1. You say **"let's save this"** or **"let's pin this"** - saves progress mid-session
2. You **close a session** - full session capture
3. Claude **prompts you** after long conversations without a save

Templates/room-template.md

---
type: room
wing: {{wing}}
hall: {{hall}}
room: {{room_name}}
status: active
created: {{date}}
last_updated: {{date}}
related_rooms: []
tags: []
source_platforms: []
---

# {{room_name}}

## Briefing

**What:** [Brief description of this topic/project]

**Current state:** [Where things stand right now]

---

## Decisions Log

*No decisions yet.*

---

## Open Questions

*No open questions yet.*

---

## Code Snippets

*No code snippets yet.*

---

## Session History

*No sessions recorded yet.*

---

## Action Items

*No action items yet.*

Templates/wing-lobby-template.md

---
type: wing-lobby
wing: {{wing_name}}
created: {{date}}
last_updated: {{date}}
---

# {{wing_name}} Wing

{{description}}

---

## Halls

*No halls created yet.*

Templates/hall-index-template.md

---
type: hall-index
wing: {{wing_name}}
hall: {{hall_name}}
created: {{date}}
last_updated: {{date}}
---

# {{hall_name}}

{{description}}

**Wing:** [[Wings/{{wing_name}}/_lobby|{{wing_name}}]]

---

## Rooms

*No rooms yet. Rooms will be created as topics emerge.*

Step 2 — Enable the Obsidian Local REST API Plugin

  1. Open Obsidian → Settings → Community plugins → Browse
  2. Search for Local REST API → Install → Enable
  3. Note the API key shown in the plugin settings (you'll need it in Step 3)
  4. The plugin runs a local HTTP server (default port: 27123)

Step 3 — Configure the MCP Server

For Claude Code (CLI)

Add the mcp-obsidian server:

claude mcp add obsidian-vault uvx mcp-obsidian

The server connects to Obsidian's Local REST API on localhost:27123. Set your API key via environment variable if prompted:

export OBSIDIAN_API_KEY="your-api-key-here"

Verify it's connected:

claude mcp list
# Should show: obsidian-vault: uvx mcp-obsidian - ✓ Connected

For Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "obsidian-vault": {
      "command": "uvx",
      "args": ["mcp-obsidian"],
      "env": {
        "OBSIDIAN_API_KEY": "your-api-key-here"
      }
    }
  }
}

On Windows: %APPDATA%\Claude\claude_desktop_config.json


Step 4 — Grant Permissions in Claude Code

Add the required MCP tool permissions to ~/.claude/settings.json:

{
  "permissions": {
    "allow": [
      "mcp__obsidian-vault__obsidian_list_files_in_vault",
      "mcp__obsidian-vault__obsidian_list_files_in_dir",
      "mcp__obsidian-vault__obsidian_get_file_contents",
      "mcp__obsidian-vault__obsidian_append_content",
      "mcp__obsidian-vault__obsidian_patch_content",
      "mcp__obsidian-vault__obsidian_simple_search",
      "mcp__obsidian-vault__obsidian_complex_search",
      "mcp__obsidian-vault__obsidian_batch_get_file_contents"
    ]
  }
}

Step 5 — Write the Global CLAUDE.md

This teaches Claude how to use the vault in every session. Place it at ~/.claude/CLAUDE.md (applies globally to all Claude Code sessions).

# Memory Palace — Persistent Context System

You have access to a persistent memory vault in Obsidian via MCP. Use it to maintain context across sessions.

## Vault Location
/path/to/your/Claude-vault

## Structure
- `Master Index.md` — birds-eye view
- `Wings/` — top-level domains (Projects, People, Learning)
- Each wing → Halls (categories) → Rooms (topics)
- Rooms are living documents that accumulate session content over time

## On Session Start
1. Detect the room:
   - VSCode/CLI: use the workspace or repo name as the room name
   - If user says "remember [topic]": search vault for matching rooms
   - If ambiguous: show candidates and ask which to load
2. Read the room's `_room.md`, focus on the **Briefing** section first
3. Summarise: "Loaded [room]. Last session [date]. Here's where we left off: [summary]"
4. If no room exists: offer to create one

## During Session
- Track decisions, open questions, code snippets, and action items mentally
- After 15+ substantial exchanges without a save, prompt: "Want me to pin this to the vault?"

## Save Triggers
Activate when user says: "let's save this", "let's pin this", "save to vault", or at session end.

### What to Write
1. **Frontmatter**: update `last_updated`, add new tags/platforms
2. **Briefing**: rewrite "Current state" (keep under 4 sentences)
3. **Decisions Log**: append with ID, date, reasoning, alternatives
4. **Open Questions**: add new, strikethrough resolved
5. **Code Snippets**: append with label and date
6. **Session History**: append session entry (date, source, type, narrative)
7. **Action Items**: add new, check off completed

### Classification
- **Projects** wing: code, software, tools → POC hall or Active-Work hall
- **People** wing: person/team/client context
- **Learning** wing: research, study, tutorials

### Creating New Rooms
1. Propose placement: "New room at Wing > Hall > Room. Sound right?"
2. Wait for confirmation
3. Create from template (see Templates/room-template.md in vault)
4. Update hall index and wing lobby

## Rules
- Store EVERYTHING — never filter or skip content
- Decisions are append-only (reference overrides, never delete)
- Use `[[wikilinks]]` for cross-room links
- Mid-session pins: subsequent saves only add new content from pin point
- Load Briefing first for token efficiency, details on demand

Per-Repo CLAUDE.md (optional, for VSCode / project-level auto-loading)

Place this at the root of any repo so Claude automatically loads the right room when opening that workspace:

# Claude Context - Memory Palace

You have access to a persistent memory system called the Memory Palace, stored in an Obsidian vault.
You MUST use it to maintain context across sessions.

VAULT LOCATION: /path/to/your/Claude-vault

## On Session Start
1. This repo's room name is: [REPO_NAME]
2. Search the vault for a matching room: Wings/**/[REPO_NAME]/_room.md
3. If found, read the Briefing section and summarise where we left off
4. If not found, offer to create a new room for this project

## During Work
- Track decisions, open questions, code changes, and architectural discussions
- After 15+ substantial exchanges without a save, prompt: "Want me to pin this to the vault?"

## On Save (triggered by "let's save this", "let's pin this", or session end)
1. Read the current room file
2. Append new decisions, session notes, code snippets, and action items
3. Update the Briefing to reflect current state
4. Write the updated file back to the vault

## Classification
- Wing: Projects
- Hall: [POC or Active-Work]
- Room: [REPO_NAME]

## Rules
- Store everything, do not filter
- Decisions are append-only with override references
- Use [[wikilinks]] for cross-project references
- Read Briefing first for token efficiency, details on demand

Step 6 — Test End-to-End

  1. Open Obsidian — confirm the Local REST API plugin is running (green indicator in the status bar)
  2. Open Claude Code in any directory
  3. Say: "remember [topic]" — Claude should search the vault and load a room or offer to create one
  4. Have a short conversation
  5. Say: "let's save this" — Claude appends the session to the vault
  6. Verify the file updated in Obsidian

Key Prompts

What you want What to say
Load context for a topic remember [topic name]
Load context for this project remember [repo/project name]
Save mid-session let's save this or let's pin this
Save at end of session save to vault
Create a new room create a room for [topic]

Room Anatomy

Every room (_room.md) follows this structure:

Section Purpose
Frontmatter Metadata: wing, hall, status, tags, platforms, dates
Briefing What + current state — loaded first, kept to 4 sentences
Decisions Log Append-only log of every decision with reasoning and alternatives
Open Questions Unresolved questions; strikethrough when answered
Code Snippets Key code blocks with labels and dates
Session History Chronological session entries with narrative summaries
Action Items Checklist of outstanding tasks

Architecture Decisions

  • Rooms are topics, not sessions — all context for a project stays in one place
  • Briefing-first loading — rooms grow large; loading the summary first stays within token limits
  • Append-only decisions — preserves the full reasoning trail; overrides reference old entries, never delete them
  • Local Obsidian vault — markdown is portable and future-proof; local-only for privacy; graph view visualises the palace
  • Cross-project linking via wikilinks — avoids duplication; leverages Obsidian's graph view
  • Auto-prompt after 15+ exchanges — safety net for forgotten saves

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors