# Mythic Memory design notes

Mythic Memory started from Fable 5's memory structure as described in its
Claude Code system prompt. It keeps the useful behavior, drops the overzealous
memory creation, and improves the rest. No Fable product code, prompt, or
schema is included or redistributed; the tool names and contracts here are
Mythic Memory's own.

## Behavior kept from Fable 5's design

- Global cross-session filesystem
- `/profile.md`, `/preferences.md`, `/topics/`, `/areas/`, `/people/`
- Frontmatter `name`, `description`, `sources`, and area/person `aliases`
- Unique names, `[[links]]`, and `[stated]` provenance
- Metadata listing plus directly injected profile/preferences
- Proactive same-turn filing policy
- Read-before-write discipline
- 12-character versions and `if_version: new`
- Exact unique-match edits
- Append and whole-file deletion semantics
- Conflicts return current content/version for immediate retry
- Privacy omissions, behavioral preference guardrails, silent application, and relevance gating
- External-change notices between turns

## Mythic Memory decisions and improvements

- Tools use Mythic Memory's own names: `memory_index`, `memory_recall`,
  `memory_inscribe`, `memory_revise`, `memory_extend`, and `memory_forget`.
- `memory_revise` performs an exact, unique-match edit; an empty replacement deletes the match.
- Privacy-conscious focus: guardrails omit sensitive personal categories and coding-irrelevant trivia, so memory stays useful for a coding agent instead of accumulating a personal dossier.
- `sources: [pi]` records the writing surface for Pi.
- Detailed policy lives in the progressively loaded `mythic-memory` skill instead of permanently bloating the system prompt.
- Storage is local under `~/.pi/agent/mythic-memory/`; no cloud service is involved.
- Writes add filesystem locks, atomic publication, race detection, path/symlink protections, and high-confidence secret/injection scanning adapted from Pi Hermes Memory.
- The scanner is defense in depth, not a semantic privacy classifier. The skill remains authoritative for protected and sensitive categories.
- No automatic transcript ingestion, background model calls, inferred-memory extraction, SQLite, vector database, or procedural-skill generation is included.
- Sub-agents should receive selected context but not own durable mutations; the parent validates and writes memory.
