Pan workspace

From eltmon/overdeck · View interactive version

Pan workspace is an AI agent skill from the GitHub repository eltmon/overdeck. pan workspace new/main/get/activate/archive/relocate — the PAN-1990 projects/workspaces domain: kinds, doors, memory homes

How to use this skill

Skill file

Pan Workspace (PAN-1990 domain)

pan workspace is overloaded — it also carries the older PAN-428 issue/git-worktree

lifecycle (create, migrate, ssh, destroy, …), which this skill does not

cover. This skill wraps only the newer projects/workspaces domain: every registered

project has exactly one main workspace plus any number of issue (one per tracked

issue) and scratch (ad-hoc, unattached to an issue) workspaces, all rows in the

workspaces table read through src/lib/workspaces/resolver.ts and written through

src/lib/workspaces/writer.ts — see docs/WORKSPACES-AND-PROJECTS.md for the full

model.

Commands

pan workspace new <name> [--project <key>] [--isolated] [--parent-branch <branch>] [--target-path <dir>] [--origin operator|agent] [--dry-run]
pan workspace main [--project <key>]
pan workspace get <ws>
pan workspace activate <ws>
pan workspace archive <ws>
pan workspace relocate <ws> --path <dir> [--force]
pan workspace list [--kind <main|issue|scratch>] [--archived] [--json] [--all]

Notes

primary directory (same worktree, no new branch); pass --isolated to create a

separate git worktree instead, with --parent-branch overriding the inferred

parent (defaults to the project's current branch).

instead of the project's primary path — this is how a workspace becomes a

long-lived lens onto an arbitrary repo, independent of --isolated's

worktree-per-branch model. Mutually exclusive with --isolated; the path must

already exist. is_git_repository is detected from <dir>/.git. If the

resolved directory isn't the project's primary path or a path registered via

pan project add-target, the command still creates the row but prints an

informational note suggesting pan project add-target.

workspace; otherwise it is stamped agent and stays out of the sidebar.

branchName, parentBranch, parentBranchGuessed, isGitRepository,

wouldCreateWorktree) as JSON and returns before any worktree is created or

workspace row is written — no DB row, no worktree, no memory home.

it if it doesn't exist yet. There is exactly one main workspace per project —

archive refuses to touch it.

one resolved from the current working directory, when omitted.

favorite, lastAccess) plus memoryHome — the workspace's memory-home directory

(resolveWorkspaceMemoryRoot), keyed by workspace id and stable across relocation.

Sidebar and Cmd-K switcher) and prints a hint to restore layoutConfig if the

workspace has a saved dashboard pane arrangement.

an existing workspace at a new path: updates the path column, re-detects

is_git_repository from <dir>/.git, touches lastAccessedAt, and re-writes the

memory-home metadata.json recovery hint — the memory home itself never moves,

since it's keyed by workspace id, not path. <ws> accepts an id or a name

(ambiguous names across projects error out asking for the id). Refuses

kind=issue (pipeline-owned) and archived workspaces; kind=main requires

--force since it diverges the row from projects.yaml's primary path.

New Workspace dialog (sidebar WORKSPACES +, the New workspace… palette

action, or a project overview's button) and new/main both call

src/lib/workspaces/create.ts, so a workspace created either way is

identical. The dialog's live preview is a server-side dry run of that same

resolution — the UI equivalent of --dry-run. WorkspaceView's header

offers Favorite/Relocate/Archive for main and scratch, matching

relocate/archive and their refusals; destroying a workspace and purging

memory stay CLI-only.

add --archived to include archived rows (only meaningful together with --kind).

The workspace quick-action band (PAN-3331)

The dashboard's workspace view carries a band of three cards above its panels.

It has no CLI verb — these are dashboard-only affordances — but two of them are

worth knowing when you are reasoning about workspace state:

the branch's own upstream (@{u}) and falls back to origin/HEAD only when

the branch tracks nothing. ?fetch=1 performs a real git fetch, throttled

to once per 30 s per checkout. Pull is git pull --ff-only and refuses —

with the specific reason — on a dirty tree, an in-flight merge or rebase, a

diverged branch, no upstream, or a detached HEAD. kind=issue workspaces are

refused there entirely; they still sync through pan sync-main.

(the list) never includes run_command; the detail read and the git read both

require dashboard auth. A run_command you set from the CLI or the dashboard

is not visible to an unauthenticated caller.

ws-run-<sha256 prefix of the workspace id> (visible under `tmux -L overdeck

list-sessions`). The hash keeps the name unique per workspace — a truncated id

prefix collided, letting one workspace stop another's process. The command is the run_command column when set, otherwise

the project's first workspace.services[].start_command. One live session per

workspace: a second Run re-focuses rather than spawning a duplicate, while

Restart kills the session and starts a fresh one under the same name.

ui.open_in_editor_command is set in ~/.overdeck/config.yaml

(e.g. cursor {path}).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.