How marsrael/git-memory works
Git-Native Agent Memory provides a CLI-first way for coding agents to persist and retrieve structured memory in Git refs. The main workflow is an agent invoking the CLI, which validates and delegates note or global-state operations to the shared core; reads use the same core parser and can be inspected in the optional TUI. The core also supports event replay, compaction, and integrity verification. The README documents ref synchronization between clones. Source excerpts are partial, so the graph omits unshown internal call details and focuses on documented or directly evidenced relationships.
Main entry points: memory.py Memory CLI · memory_tui.py Memory dashboard · memory_lib.py Episodic notes · SKILL.md Usage rules
Components 11
Agent interface
- Usage rules
skills/git-memory/SKILL.md - Memory CLI
scripts/memory.py
Memory core
- Episodic notes
scripts/memory_lib.py - Global event log
scripts/memory_lib.py - Read and filter
scripts/memory_lib.py - Integrity checks
scripts/memory_lib.py - Log compaction
scripts/memory_lib.py - Git refs
Inspection
- Memory dashboard
scripts/memory_tui.py
Other components
- Coding agent
- Git remote
Connections 17
- Coding agent → Usage rules: reads rules
README.md - Coding agent → Memory CLI: uses commands
README.md - Memory CLI → Episodic notes: writes notes
scripts/memory.py - Memory CLI → Global event log: appends events
README.md - Memory CLI → Read and filter: reads memory
scripts/memory.py - Memory CLI → Integrity checks: runs checks
scripts/memory.py - Memory CLI → Log compaction: compacts log
README.md - Memory CLI → Memory dashboard: dispatches to
scripts/memory.py - Episodic notes → Git refs: stores notes
README.md - Global event log → Git refs: stores events
README.md - Read and filter → Git refs: reads refs
README.md - Memory dashboard → Read and filter: loads notes
scripts/memory_tui.py - Memory dashboard → Global event log: loads state
scripts/memory_tui.py - Memory dashboard → Episodic notes: edits notes
scripts/memory_tui.py - Memory dashboard → Git refs: refreshes data
scripts/memory_tui.py - Coding agent → Git remote: syncs refs
README.md - Git remote → Git refs: transfers refs
README.md