How It Works
reza stores your project's structure, sessions, and conversation history in a local SQLite database.
How It Works
Your project
├── .reza/
│ ├── context.db ← SQLite database (the brain)
│ └── CONTEXT.md ← Exported markdown (for tools without SQL)
├── src/
│ └── ...your code...
└── .git/
└── hooks/
└── pre-commit ← Auto-updates DB on every commit
Database schema (conversation-aware):
| Table | What it stores |
|---|---|
project_meta | Language, framework, project name |
files | All files with path, type, line count, purpose |
sessions | LLM sessions with progress, optional source_tool / source_path / source_id for imported chats |
conversation_turns | Raw per-turn chat history for each session |
conversation_turns_fts | Full-text search index over raw chat turns |
handoff_drops | Transcript files already ingested from .reza/handoffs/ |
changes | Real-time change log linked to sessions |
file_locks | Active file locks — which session owns which file |
conflicts | Conflict history — when two agents touched the same locked file |
dependencies | File import relationships |
Four sync mechanisms:
reza init— full scan on first usereza watch— file watcher (Pythonwatchdog) for real-time updates- git pre-commit hook — updates staged files on every commit
- Claude Code Stop hook —
reza install-claude-hookfires after every Claude response; reads Claude's.jsonlfile and saves new turns to reza automatically, even when context limit is hit