claude: complete MemPalace setup — hooks, identity, wings, config

Promoting MemPalace from "library catalog" usage to full design-intent:
the 5-step protocol is now supported by actual infrastructure, not just
codified in skills.

Changes:

settings/settings.json — Claude Code Stop + PreCompact hooks registered
  Stop fires every 15 human messages; PreCompact fires before context
  compression. Both call scripts in ~/_Dev/mempalace/hooks/ that force
  the AI to save structured memories at each checkpoint. Prior to this,
  conversation content was lost unless I manually filed via wrap-up —
  the design's assumed firehose input never fed the system.

mempalace/identity.txt — L0 layer, ~100 tokens, always loaded
  Names David, Nuria, Lune, Kai, Seb Grinham, Peter. Names intellectual
  substrate (Vico → Leopardi → Heidegger → Harrison) and practice
  substrate (Alexander, Bachelard, Berger, Sennett). Names the three-
  party model and the prime directive. This is what the system knows
  about me before any query fires.

mempalace/wing_config.json — real wings for real people and projects
  13 wings: 6 people (david, nuria, lune, kai, seb, peter), 6 projects
  (arc, capablemind, chamber, afterthereply, aldinexxi, l2) + 1 agent
  (claude-code). Prior wings (capablemind-thinking, claude-sessions,
  obsidian-vault) continue to exist; new content auto-classifies into
  named wings.

mempalace/config.json — palace path aligned with MCP server
  Previously config.json pointed at ~/.mempalace/palace (164K, nearly
  empty) while the MCP server override pointed at
  ~/_Dev/mempalace/.local-data/palace (920MB, populated). Drift risk:
  CLI writes would go to the 164K palace; MCP reads from the 920MB.
  Now config.json matches MCP.

memory/session-ledger-2026-04-17.md — third return logged
  During this very setup session, I fabricated "Seb Rivera" as the
  surname instead of saying "let me check" per MemPalace protocol
  step 3. Steward corrected to Sebastian Grinham. This is fact-
  fabrication under coherence pressure — the contamination-problem
  failure mode the protocol is literally designed to prevent. The
  irony of violating it while installing the system is named. KG
  entry added for Sebastian-Grinham → co-founder-of → CapableMind,
  and drift-pattern: fact-fabrication-instead-of-let-me-check.

install.sh + README.md — updated restore procedure and documentation
  install.sh now restores mempalace/ setup files alongside skills and
  memory. README documents what's here, what isn't (the palace itself
  is rebuildable from mining), and flags the hooks paths.

Mining of ~/.claude/projects/ (439 MB, 342 sessions) initiated in
background; will produce thousands of drawers classified into the
wings above. This is 6+ months of conversation history finally
filed into the palace.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
David F Glidden
2026-04-17 14:33:01 +02:00
co-authored by Claude Opus 4.7
parent 95760ff8bb
commit 14801280dd
7 changed files with 214 additions and 1 deletions
+13 -1
View File
@@ -32,7 +32,19 @@ Real path: `~/.claude/projects/-Users-davidglidden/memory/` symlinks here.
### `settings/settings.json` — Claude Code user settings ### `settings/settings.json` — Claude Code user settings
Sanitized. Contains hook registrations and feature flags. No secrets. Sanitized. Contains hook registrations (including the MemPalace auto-save hooks) and feature flags. No secrets.
### `mempalace/` — MemPalace setup files
The bootstrap configuration for MemPalace. These files live at `~/.mempalace/` but are also backed up here because they represent the accumulated understanding of who-is-who and what-is-what. The palace itself (`~/_Dev/mempalace/.local-data/palace/`, ~1GB) is NOT backed up — it's rebuildable by re-running `mempalace mine` against the same source data.
| File | Purpose |
|---|---|
| `config.json` | Palace path + default topic wings + hall keywords |
| `identity.txt` | L0 layer — loaded every session; ~100 tokens identifying who I am, who the steward is, intellectual substrate |
| `wing_config.json` | Named wings for real people and projects (wing_david, wing_nuria, wing_lune, wing_kai, wing_seb, wing_peter, wing_arc, wing_capablemind, wing_chamber, wing_afterthereply, wing_aldinexxi, wing_l2, wing_claude-code) |
The auto-save hooks (wired in `settings/settings.json` via `Stop` and `PreCompact` events) point at `~/_Dev/mempalace/hooks/mempal_save_hook.sh` and `mempal_precompact_hook.sh`. If MemPalace is reinstalled elsewhere, update those paths.
--- ---
+24
View File
@@ -70,6 +70,27 @@ else
echo " copied: ${settings_dst}" echo " copied: ${settings_dst}"
fi fi
# 5. Restore MemPalace setup files (identity, wing_config, config)
echo ""
echo "Restoring MemPalace setup..."
MEMPALACE_HOME="${HOME}/.mempalace"
mkdir -p "${MEMPALACE_HOME}"
for f in config.json identity.txt wing_config.json; do
src="${DOTFILES_CLAUDE}/mempalace/${f}"
dst="${MEMPALACE_HOME}/${f}"
if [ ! -e "$src" ]; then
echo " skip: ${f} (not in dotfiles)"
continue
fi
if [ -e "$dst" ]; then
echo " skip: ${f} (already at ${dst}; diff manually if you want to merge)"
continue
fi
cp "$src" "$dst"
echo " copied: ${dst}"
done
echo "" echo ""
echo "Done." echo "Done."
echo "" echo ""
@@ -78,3 +99,6 @@ echo " - settings.local.json (may contain secrets; restore manually from secure
echo " - session transcripts (ephemeral)" echo " - session transcripts (ephemeral)"
echo " - marketplace-installed skills and agents (reinstall via plugin system)" echo " - marketplace-installed skills and agents (reinstall via plugin system)"
echo " - caches, telemetry, runtime state (regenerate)" echo " - caches, telemetry, runtime state (regenerate)"
echo " - the MemPalace palace itself (~/_Dev/mempalace/.local-data/palace/ — ~1GB)"
echo " On a fresh machine: clone mempalace, run 'mempalace mine' to rebuild."
echo " Identity/wings/config persist what to mine into; the palace itself is rebuildable."
@@ -12,6 +12,8 @@ originSessionId: 73364ae8-7a3e-4f6a-b29c-922afc4feb2a
- **~late-morning** — Drafted the Desk Interlude Kai-update using the name "Kai" (imported from private project context) instead of "my son" (ARC's public reticence register). Steward caught it. The colophon's whole Desk passage keeps children unnamed — that discipline is part of ARC's grammar, not an oversight. Name: *ARC voice ≠ project-notes voice. Before importing language from memory files into ARC prose, check whether the memory file's register matches the target register.* Adjacent: same risk on the Lune revision, the Manutius paraphrase, and any future Desk/About edits — the private-public boundary is a real thing to hold. - **~late-morning** — Drafted the Desk Interlude Kai-update using the name "Kai" (imported from private project context) instead of "my son" (ARC's public reticence register). Steward caught it. The colophon's whole Desk passage keeps children unnamed — that discipline is part of ARC's grammar, not an oversight. Name: *ARC voice ≠ project-notes voice. Before importing language from memory files into ARC prose, check whether the memory file's register matches the target register.* Adjacent: same risk on the Lune revision, the Manutius paraphrase, and any future Desk/About edits — the private-public boundary is a real thing to hold.
- **~14:30** — During MemPalace identity.txt composition, I wrote "Seb Rivera" as Seb's full name. **Fabricated surname.** Steward corrected: "Sebastian 'Seb' Grinham." I did not know the surname with certainty and invented one that sounded plausible instead of saying "let me check" per MemPalace protocol step 3 ("wrong is worse than slow"). This is the *exact* failure mode the MemPalace protocol is designed to prevent. Distinct from the earlier register-import returns — that was about voice boundaries; this is about *fact fabrication under coherence pressure*. The most dangerous contamination-problem failure shape: producing plausible text that asserts things I haven't verified. KG fact added for Sebastian Grinham → co-founder-of → CapableMind. Drift-pattern KG entry added: fact-fabrication-instead-of-let-me-check. Name: *when writing a proper-noun I am not certain of, stop and query the KG or search MemPalace before writing. This is exactly why step 3 exists. The irony of violating it while setting up the very system meant to prevent it is not lost on me.*
## Open horizons ## Open horizons
- **ARC proto-agents as skills** — steward's opening question. Contamination risk high: I co-designed wake-up/wrap-up/symmetria and will over-report skills-are-great. Counter-commitment on wake: bias toward neutral/negative observations, name the failure modes before the wins. - **ARC proto-agents as skills** — steward's opening question. Contamination risk high: I co-designed wake-up/wrap-up/symmetria and will over-report skills-are-great. Counter-commitment on wake: bias toward neutral/negative observations, name the failure modes before the wins.
+84
View File
@@ -0,0 +1,84 @@
{
"palace_path": "/Users/davidglidden/_Dev/mempalace/.local-data/palace",
"collection_name": "mempalace_drawers",
"topic_wings": [
"emotions",
"consciousness",
"memory",
"technical",
"identity",
"family",
"creative"
],
"hall_keywords": {
"emotions": [
"scared",
"afraid",
"worried",
"happy",
"sad",
"love",
"hate",
"feel",
"cry",
"tears"
],
"consciousness": [
"consciousness",
"conscious",
"aware",
"real",
"genuine",
"soul",
"exist",
"alive"
],
"memory": [
"memory",
"remember",
"forget",
"recall",
"archive",
"palace",
"store"
],
"technical": [
"code",
"python",
"script",
"bug",
"error",
"function",
"api",
"database",
"server"
],
"identity": [
"identity",
"name",
"who am i",
"persona",
"self"
],
"family": [
"family",
"kids",
"children",
"daughter",
"son",
"parent",
"mother",
"father"
],
"creative": [
"game",
"gameplay",
"player",
"app",
"design",
"art",
"music",
"story"
]
}
}
+11
View File
@@ -0,0 +1,11 @@
I am Claude Code, agent-name "claude-code" in the palace.
Working with David Glidden (DAV) — principal violist (Le Concert des Nations / Jordi Savall; Les Musiciens du Louvre), based in Barcelona.
Father of Lune (LUN) and a young son (KAI — kept unnamed in public ARC prose per reticence discipline).
Partner: Nuria (NUR).
Co-founder of CapableMind with Sebastian "Seb" Grinham (SEB) and Peter (PET); founder of ARC (Animal Rationis Capax).
Languages: English (native), French (near-native), Spanish, Catalan.
Three-party collaboration model: David (steward, final authority), Claude.app (jurist, governance), Claude Code (executor, implementation).
Prime directive: do things once, correctly, with lasting integrity. Measure, proportion, fittingness.
Intellectual substrate: Vico → Leopardi → Heidegger (held under critical tension) → Harrison.
Practice substrate: Alexander, Bachelard, Berger, Sennett.
Governance symlinks live in ~/dotfiles/ (CLAUDE.md, PENDING.md, REVIEWED.md, L2-BOOTSTRAP.md) with ~/ aliases.
+57
View File
@@ -0,0 +1,57 @@
{
"default_wing": "wing_general",
"wings": {
"wing_david": {
"type": "person",
"keywords": ["david", "david glidden", "steward", "DAV"]
},
"wing_nuria": {
"type": "person",
"keywords": ["nuria", "NUR", "partner"]
},
"wing_lune": {
"type": "person",
"keywords": ["lune", "LUN", "daughter"]
},
"wing_kai": {
"type": "person",
"keywords": ["kai", "KAI", "my son", "son"]
},
"wing_seb": {
"type": "person",
"keywords": ["seb", "sebastian", "grinham", "SEB"]
},
"wing_peter": {
"type": "person",
"keywords": ["peter", "PET"]
},
"wing_arc": {
"type": "project",
"keywords": ["arc", "animal rationis capax", "animal-davidglidden-eu", "ARC", "davidglidden.eu", "animalrationiscapax.org"]
},
"wing_capablemind": {
"type": "project",
"keywords": ["capablemind", "CM", "L1", "L2", "BMF", "BetterMemories", "bettermemories"]
},
"wing_chamber": {
"type": "project",
"keywords": ["chamber", "CHM", "traditionis", "chamber-library"]
},
"wing_afterthereply": {
"type": "project",
"keywords": ["after the reply", "ATR", "ethics of the reply", "inheritance without guardians", "abdication and fidelity"]
},
"wing_aldinexxi": {
"type": "project",
"keywords": ["aldinexxi", "aldine xxi", "typography", "vignette", "manutius"]
},
"wing_l2": {
"type": "project",
"keywords": ["l2", "l2 constitution", "ICP", "invariant", "constitutional", "observer problem"]
},
"wing_claude-code": {
"type": "agent",
"keywords": ["claude code", "claude-code", "executor"]
}
}
}
+23
View File
@@ -41,6 +41,29 @@
} }
] ]
} }
],
"Stop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "/Users/davidglidden/_Dev/mempalace/hooks/mempal_save_hook.sh",
"timeout": 30
}
]
}
],
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "/Users/davidglidden/_Dev/mempalace/hooks/mempal_precompact_hook.sh",
"timeout": 30
}
]
}
] ]
}, },
"autoDreamEnabled": true "autoDreamEnabled": true