Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Stacks

A stack is a chain of workspaces that build on each other's branches. Use one when a change is too large for one workspace: each workspace takes a slice, merges after the one it is stacked on, and builds on that one's branch.

Relations

A workspace has two kinds of relation.
RelationMeaningConstrains
Stacked onMerge order and branch content. The workspace merges after its parent and builds on its branch.The phase rule below
Waits on (and its reverse, Blocks), Related toPlanning labels.Nothing. They never block a phase change, a stack or a merge
A stack's head is a workspace stacked on nothing that has at least one open workspace stacked on it. Every workspace stacked on the head, directly or through another member, is one of its members. Stacking a workspace on one of its own members is refused: "X can't stack on Y: Y is stacked on X".
Stack a workspace from its row menu in the sidebar: Stack on…, Remove from stack, Waits on… and Related to…. You choose the other workspace in the list itself. Each change shows a pill with Undo. A workspace you create with source Workspace is stacked on that source workspace.
Agents change relations with space_workspace method setRelations, which takes workspaceId, expectedRevision, dependsOn, relatedTo and stackedOn. A stale revision is refused; read again and retry.

The phase rule

A workspace is never in a later phase than the workspace it is stacked on (Plan, then Code, Review, Ship). GitSpace refuses, and names the workspace in the way:
  • stacking a workspace on one that is behind it: "X can't stack on Y: X is in Review and Y only in Code. Move Y forward first, or move X back.";
  • moving a member past its parent: "X can't move to Review: it is stacked on Y, which is in Code. Move Y forward first, or unstack X.";
  • moving a parent back behind a member: "Y can't move to Plan: X is in Code and stacked on it. Move X back first, or unstack it."
The rule applies to every relation change and every phase move: yours in the sidebar, on the board or in the phase menu, an agent's, plan approval moving a workspace into Code, and MCP clients. Archived workspaces don't count. A workspace in Review stays in Review while it fixes review feedback.
A stack that already broke the rule before it was enforced stays as it is. Its member shows ahead of its parent as a warning; nothing is forced.

Where each member stands

A member's row says how its branch stands against its parent's:
LabelMeaning
3 behindThe parent has commits the member doesn't.
base rewrittenThe parent rewrote the commits the member was built on.
merged — restack onto mainThe parent merged into the base branch. A parent counts as merged only when it has commits of its own and the base branch holds its tip.
ahead of its parentThe member is in a later phase than its parent (a warning).
A stacked row shows ↳ on <parent> with its position, for example on slot-holds · 2 behind. An up-to-date member shows no position. The head carries a head tag.
Restack onto main (named after your base branch) appears in the row menu once the parent has merged. It unstacks the member, so its position is measured against the base branch from then on. It never touches the branch; rebasing is a separate Git step the agent may take. base rewritten has no Restack: it is shown so the agent can decide whether to rebase.
At the start of a turn, a workspace agent gets one Base line when what its branch builds on changed, for example how many commits behind it is and which files it changed also changed there, or the git rebase --onto command to restack after its parent merged.

The sidebar and board

The sidebar nests each member one level under its head and orders siblings furthest phase first, then by name. Grouping by State or Phase keeps a stack whole under its head's group. A filter keeps a stack whole while any member matches and fades the rest. On the board, each stack is one pile in its head's column.
Collapse the stack in the head's row menu folds its members into a tray beside the head: +N and a chip per member, the ones that need you first. Selecting the tray expands it; selecting a chip opens that workspace and keeps the stack folded. Expand the stack unfolds it. Each browser remembers which stacks you folded.

A head leads its stack

A stack's head can instruct its members, as the project agent can instruct any workspace in the project:
  • space_workspace method start sends a member's agent an instruction. when: 'steer' (the default) reaches the running turn at its next tool call, or starts a turn; when: 'queue' runs it after the current turn ends. The member's report, when its turn finishes, fails or asks something, comes back to the head's conversation.
  • Method questions lists the questions a member's agents wait on.
  • Method answer proposes answers to plain questions. The proposal is an approval card in the head's own conversation, and nothing is sent until you approve it. The member's card then says the stack head answered for you. Approvals, plans and other decisions stay yours.
Instructions only flow down a stack. A member can't instruct other workspaces, and a head can reach only its own members, for example: "Refunds isn't in your stack. A stack's head reaches only the workspaces stacked on it; the project agent reaches any."
The head's turns start with a Stack board: its members in stack order, each with what it is stacked on, its stack state, phase and status. The first turn, and the first after a compaction, gets the full board; later turns get only the lines that changed.
A head brings its members up to date with their parents when a member enters Review, before it ships, or when its Base line shows overlapping files, and never mid-turn. The head syncs itself first.

Archiving reorganizes the stack

Archiving never leaves an archived workspace as the parent of an open one. GitSpace moves its members in the same change:
  • Archiving a head promotes its first open direct member to head (stacked on nothing, measured against the base branch). Its other direct members move onto the new head.
  • Archiving a member moves each of its own members onto its parent.
Deeper members stay where they are. A member further along than its new parent is put at the top level instead.
The pill reads Archiving Billing export…, then names the moves, for example "Billing export archived. Invoices is the head now; Refunds is on it." Undo restores the workspace and puts back each move whose workspace is still where the archive put it; anything moved since is listed as not put back. A plain Restore from the Archived group brings the workspace back alone, stacked on what it was stacked on; its former members stay where they went.
Agents can't archive workspaces. An MCP client's archive reorganizes the stack the same way.

Leave or disband a stack

The head's row menu has two more actions:
  • Leave the stack… asks who heads the stack next and lets you pick any open member. The member archiving would promote is tagged next in line. The member you pick becomes the head; the old head's other direct members move onto it, and every other member stays on its parent. The old head stays open at the top level. A choice that would break the phase rule is refused with the reason.
  • Disband the stack puts every open member, at any depth, at the top level at once.
Neither changes planning labels, branches or phases. Both show a pill with Undo, which puts back every move that hasn't changed since. If the stack changed after your list last read it, the action is refused: "Billing export's stack changed since; nothing was changed".
Agents can't leave or disband a stack. MCP clients can, with workspace.leaveStack, workspace.disbandStack and workspace.undoStackChange.