Persistent storage layer backed by SQLite.
Architecture
A single [rusqlite::Connection] is opened once per CLI invocation in
main::run() and passed by reference to every command that needs
persistence. There is no connection pool — this is a single-threaded CLI.
Modules
- [
db] — open the connection, apply PRAGMAs, run migrations. - [
migrations] — versioned SQL migration runner. - [
repos] — upsert/lookup repo anchor rows (shared FK for all tables). - [
workspaces] — CRUD for git worktree metadata (replacesworkspaces.toml). - [
stacks] — CRUD for stacked-PR metadata (replacesstacks.toml). - [
reviews] — private code-review notes (local-only bucket). - [
stats] — append-only event recording for command usage and activity. - [
toml_import] — one-time import of legacy TOML data on first run.
Source:
src/storage/mod.rs