---
created: 2026-03-29T17:21:35.498Z
title: Psyche context files committed to local git repo
area: tooling
files:
  - live.sh
  - psyche.md
---

## Problem

Psyche context files (`~/.claude/psyche-contexts/{self_id}.md`) are overwritten each time the Psyche saves. There's no history of previous contexts -- if a Psyche's context drifts or gets corrupted, the old version is lost. No paper trail of what a Psyche knew at each point in time.

## Solution

Make Psyches responsible for committing to a local-only git repo in `~/.claude/psyche-contexts/` every time they write to their context file:
- If the repo doesn't exist yet, `git init` and run the first commit
- On each `context-save`, stage the changed file and commit with a message like `"psyche context: {self_id} gen {N}"`
- This creates a full history of all Psyche context snapshots, recoverable via `git log` / `git show`
- The repo is local-only (no remote) -- purely for audit trail
