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):

TableWhat it stores
project_metaLanguage, framework, project name
filesAll files with path, type, line count, purpose
sessionsLLM sessions with progress, optional source_tool / source_path / source_id for imported chats
conversation_turnsRaw per-turn chat history for each session
conversation_turns_ftsFull-text search index over raw chat turns
handoff_dropsTranscript files already ingested from .reza/handoffs/
changesReal-time change log linked to sessions
file_locksActive file locks — which session owns which file
conflictsConflict history — when two agents touched the same locked file
dependenciesFile import relationships

Four sync mechanisms:

  1. reza init — full scan on first use
  2. reza watch — file watcher (Python watchdog) for real-time updates
  3. git pre-commit hook — updates staged files on every commit
  4. Claude Code Stop hook — reza install-claude-hook fires after every Claude response; reads Claude's .jsonl file and saves new turns to reza automatically, even when context limit is hit