Skip to main content

State Model

Overdeck keeps almost no irreplaceable state of its own. The durable record of your work lives in systems that already exist for their own reasons (GitHub and git), and the local database is a derived cache: a fast view over those sources that holds almost nothing which can’t be rebuilt from them. If you remember one thing from this page: the database is a cache, not a source of truth.

The sources of truth

Everything Overdeck needs, to show you a board, run the pipeline, or recover after a crash, is a function of four things that live outside its database:

The local database is a cache

Overdeck uses a local SQLite database (~/.overdeck/overdeck.db) for two jobs:
  1. A uniform read/write API for the dashboard, the deacon, and the CLI, so every component talks to state the same way instead of each parsing files.
  2. A materialized view of the pipeline, so the board renders instantly instead of re-scanning every workspace on each page load.
Both are performance conveniences. Apart from the few rows marked database only in What lives where, the database stores nothing that cannot be recomputed from the sources of truth above.
The design principle: the database holds no pipeline state that isn’t derivable from GitHub + your workspaces. It is a cache in front of those sources, not a system of record, which is what keeps recovery and cross-machine work straightforward. The durable record of your work lives in git, not in a local file you have to back up.

The pipeline is derived, not stored

An issue’s pipeline phase is a function of GitHub + its workspace, not a value the database owns: Overdeck computes this view by walking the workspaces and reading GitHub, then caches the result. The cache is for speed; the derivation is the truth.

What lives where

Most of what a database loss wipes out are ephemeral counters: retry counts, queue positions. They gate loop-prevention, not your work; on a rebuild they reset, and the worst case is an agent gets a fresh set of attempts. The database only rows are the exception: pinned document selections, a workspace’s recorded origin (pipeline, operator, vault or agent), conversation bookmarks and schedules, conversation triage state (settled and snoozed status, per-conversation auto-settle overrides and idle-reset markers), and the dashboard switches kept in app_settings have no other copy to rebuild from, so a database loss drops them for good.

Planning artifacts under .pan/

Overdeck commits planning files to your project repo under .pan/. For a polyrepo project the files live in the plan home, the repo named by pan_records.repo in projects.yaml. A workspace also keeps runtime files under .overdeck/, such as continue.json and the pipeline journal pipeline.jsonl. These are runtime files, not plan state, so don’t commit them. Overdeck adds .overdeck/ to a polyrepo workspace’s .gitignore, but not to a single repo’s.

The retired overdeck-state branch

Before v0.60.0, Overdeck kept pipeline state on a separate overdeck-state branch, checked out in a state worktree under ~/.overdeck/state/. Overdeck no longer reads or writes that branch. pan admin migrate-plan-home <project-key> copies open issues’ plans from the state worktree into .pan/. Keep the branch: it is the history of closed issues’ plans.

Search indexes are the exception

Overdeck also keeps search indexes in SQLite: full-text and semantic search over conversations and docs. Unlike pipeline state, a search index is legitimately a database’s job and persists as one. These indexes are rebuildable from the transcripts on disk, but they are a search feature, not part of the “pipeline is a cache” model.

The rules that keep this true

  • No stored pipeline status. Where an issue stands is read live from git, the tracker, the pull request and the terminal backend. npm run lint:no-state-layer fails CI if code brings back the deleted record store.
  • Derived state is recomputed. pan admin db rebuild walks every workspace and GitHub, then recomputes in-flight issue and agent state in memory and prints the counts. It does not write rebuilt state back to the database; the dashboard derives that state from the same sources when it reads it.
  • Review verdicts live on the pull request as PR reviews, so they travel with the PR and survive a database loss.

Why it matters

  • Recovery is trivial. Lost database, corrupted file, fresh machine: git clone, start Overdeck, and the board rebuilds. No event logs to replay; a lost database drops only the database only rows above.
  • Work is portable. Because the durable record travels in git, another machine, or another engineer, can pull a branch and continue exactly where the last agent left off.
  • The system is simple to reason about. Every piece of state has a clear home: if it isn’t derivable from GitHub + the workspaces, it lives in git under .pan/, on the pull request, or in one of the database only rows listed above.