Skip to main content

Architecture

Deep dive into Overdeck’s technical architecture and design decisions.

System Overview

Overdeck consists of three main components:
The dashboard uses React + Vite for the frontend and Express for the API server. There is no SSR layer — the frontend is a standard SPA served by the Express API. Because the projects.yaml registry (see Directory Structure) lets one Overdeck instance manage many repositories at once, the dashboard’s God View aggregates every project’s agents and conversations into a single cross-project surface — one place to see what every agent is doing, regardless of which repo it belongs to.

Conversation subagents

When a Claude Code conversation starts subagents through the Agent tool, the conversation panel opens a Subagents rail on the right. Each row shows the subagent type, description, live status, and nesting depth. Select a row—or choose Open subagent transcript from its expanded tool row—to read the subagent’s full transcript without leaving the parent conversation. The selected subagent is stored in the ?subagent=<id> URL parameter, so a direct link reopens the same transcript. The rail stays hidden when a conversation has no subagents. Pi and Codex conversations are unchanged because they do not use Claude Code’s subagent file layout.

Directory Structure

Overdeck stores all runtime state in ~/.overdeck/:

Agent State Management

Each agent’s state is tracked in ~/.overdeck/agents/{agent-id}/state.json:
State Cleanup: When an agent is killed or aborted (pan work kill), Overdeck automatically cleans up its state files to prevent stale data from affecting future runs.

Remote Workspaces

Overdeck supports remote workspace execution via Fly.io Machines. Remote workspaces provide:
  • Cloud-hosted agent environments — run agents on remote machines without local resource constraints
  • On-demand provisioning — Fly.io Machines spin up per workspace and shut down after merge
  • Same workflowpan remote commands mirror local workspace operations
Remote workspace management:

Deep Wipe

For issues that get into a stuck or inconsistent state, use pan work wipe to completely reset:
Deep wipe cleans up:
  • Tmux sessions (planning-min-123, agent-min-123)
  • Agent state directories (~/.overdeck/agents/planning-*, agent-*)
  • Legacy planning directories (project/.planning/min-123/)
  • Workspace (if -w flag is used)
  • Issue tracker status (reset to Backlog/Open)
Dashboard UI: When aborting planning, click “Deep Wipe” for a complete reset.

Health Monitoring (Deacon Pattern)

Overdeck implements the Deacon pattern for stuck agent detection:
  • Ping timeout: 30 seconds
  • Consecutive failures: 3 before recovery
  • Cooldown: 5 minutes between force-kills
When an agent is stuck (no activity for 30+ minutes), Overdeck will:
  1. Force kill the tmux session
  2. Record the kill in health.json
  3. Respawn with crash recovery context
The runtime data captured here — persisted to runtime-metrics.json in the state directory — feeds the dashboard’s Metrics page, where per-model runtime comparisons and performance analytics let you see how different models perform across your workflow.

FPP (Fixed Point Principle)

“Any runnable action is a fixed point and must resolve before the system can rest.”
Inspired by Doctor Who: a fixed point in time must occur — it cannot be avoided. Fixed Point Principle (FPP): Any runnable bead, hook, or agent action represents a fixed point in execution and must be resolved immediately. Overdeck continues executing until no fixed points remain. FPP ensures agents are self-propelling:
  1. Work items are pushed to the agent’s hook
  2. On spawn/recovery, the hook is checked
  3. Pending work is injected into the agent’s prompt
  4. Completed work is popped from the hook

Development

Dev vs Production Strategy

Overdeck uses a shared config, switchable CLI approach:
Both dev and production versions read/write the same config, so you can switch between them freely.

Running in Development Mode

Switching Between Dev and Prod

Dashboard Modes

Note: Use pan up for normal usage. Only use dev mode when actively working on Overdeck’s codebase.

Working on Overdeck While Using It

If you’re both developing Overdeck AND using it for your own projects:
  1. Use npm link so CLI changes take effect immediately
  2. Run dashboard from source for hot reload on UI changes
  3. Config is shared - workspaces/agents work the same either way
  4. Test in a real project - your own usage is the best test

PRD Architecture

PRD Types

Feature PRDs Live in Workspaces

When you start planning an issue, Overdeck creates:
  1. A git worktree (workspace) for the feature branch
  2. A planning session that generates a feature PRD
The feature PRD lives in the workspace (feature branch) because:
  • It gets merged with the PR (documentation travels with code)
  • If you abort planning and delete the workspace, you don’t want orphaned PRDs
  • Clean separation - each feature is self-contained

PRD Naming Convention

Developer Skills

Overdeck has two types of skills: Dev mode is automatically detected when running from the Overdeck source repo (npm link). Skills in dev-skills/ are:
  • Checked into the repo and version-controlled
  • Only synced to developers’ machines, not end users
  • Shown with [dev] label in pan sync --dry-run