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

Agent workflow

GitSpace treats agent work as a lifecycle, not a chat window.

Plan

Start with the Goal. Record the outcome, constraints, and observable requirements before implementation changes the shape of the problem.
Agents keep two more typed records with the Goal: a Workflow, the workspace's execution contract, and a Rubric, how the result will be judged. Agents read the latest Goal, Workflow and Rubric before each provider request.
In Plan, the agent proposes a plan with propose_plan: a Markdown summary and its steps, each with the files it touches and the requirements it advances. The Plan approval card shows them in the chat. Approving it moves the workspace into Code and loads the agent's todo list from the steps; each step is marked done as the agent completes it. Rejecting it sends your note back. A new proposal revises the plan, and steps with the same ID keep their progress.

Build with context

The workspace agent runs in a cloud-owned Pi Session. Conversation history, questions, and task records survive a machine disconnect. Provider requests and credential refresh run in the cloud; they do not require an online machine. Repository file reads, edits, and code_search use the cloud-owned working copy. Shell commands, grep, ast_grep, and lifecycle execution need an attached machine.
An agent attaches a machine itself when it first needs one, with its machines tool, on machines whose Agents may attach switch is on (the default) under Settings › Machines. It receives a notice when an attached machine goes offline for more than a minute, comes back, fails setup, or has a sync conflict.
Structured agent questions appear as native interactions. Answer the decision directly without searching terminal output for a prompt.
In an account with several people, only a workspace's holders prompt its agent and answer its questions; others leave notes. See The handle.
Agents don't ask before each tool call. People decide plans, approved scripts, lifecycle scripts, browser sites, and secret entry; an agent can't grant any of these to itself. Project browser approval and allowed-domain restrictions apply to signed-in Chrome access.
A completed machine command can still return its saved result after that machine disconnects; this does not rerun its command.
The live workspace view shows a bounded window of recent messages and completed tasks. Older history and task receipts remain in durable storage. Reconnecting can replace the live view with a fresh snapshot; it does not replay an uncertain machine effect.
Agents read the project's Environment Instructions first, then each repository's AGENTS.md, .agents/ and .omp/ instructions. Personal preferences from Settings › Agent preferences arrive on the turns their person starts.
For projects that still configure setup in .gitspace/, the built-in workspace-lifecycle skill inspects the repository and CI, proposes the lifecycle split, and asks permission before editing. Execution needs separate human approval of the final content. Agents use the environment tool for authorized runs and logs; they cannot grant content approval or recover uncertain runs. See Workspace lifecycle.

Workspace status

The workspace header and sidebar use the same accepted status for the selected workspace. The sidebar keeps a small summary; it does not load each workspace's transcript or agent controls. Leaving a workspace keeps its last-known activity in the sidebar. Newer reads, closing the workspace, and ownership changes replace that summary.

Context compaction

The session's compact action asks Pi to summarize a conversation prefix. It uses the conversation's admitted inference profile and model. The summary instructions ask it to preserve goals, constraints, decisions, unresolved questions, file paths, and tool results needed to continue. An empty, failed, or aborted summary is an error.
Compaction runs in the cloud and follows Pi's task lifecycle. It does not require the conversation's machine checkout to be online.

Delegate work to subagents

Use agents with op: 'spawn' and a complete task. agent selects a granted agent definition by name or path, and role a model role (Default, Deep, Fast, Taste, or one the profile adds). Without either, the child is a worker on the Fast role. Optional name sets the child's address, not its model or definition. Set background: true when the child must outlive the foreground turn.
json
{ "op": "spawn", "agent": "Reviewer", "task": "Review the changed API for compatibility." }
GitSpace ships two definitions: Reviewer, for read-only code review, and Tester, which uses the product through shell commands and processes on an attached machine, the headless browser, and the project's MCP tools. A repository definition with the same name replaces one.
The selected definition or role supplies the child's own settings. A child inherits repository instructions and rules, not the parent's plan, skills, or execution settings. GitSpace records the exact definition content and revision, selection, role, admitted model, and address at spawn. Editing the source file does not change an existing child. Its definition view is read-only. Up to four subagents run at once; more wait in a queue.
Session controls for a child conversation support inspection only. Send workspace changes, browser controls, and other mutating session commands to the workspace's root conversation.
By default, children can use read, find, code_search, grep, ast_grep, history_search, history_read, web_search, web_fetch, todo, the headless browser, and agent messaging. code_search searches the cloud working copy through its index with no machine; grep is exact ripgrep and needs an attached machine. Children cannot access the user's relay browser. A definition's tool list can narrow this, or add bash, proc and the project's MCP tools; children never get file edit tools or nested spawning. Children can message their parent and siblings; they cannot spawn or stop agents.
A child's final answer reaches its parent as a message, which agents wait returns, and wakes an idle parent.
Use agents with { "op": "send", "to": "Reviewer", "message": "Focus on removed fields." }. Addresses can be names or conversation IDs; children can use parent. list and status show the conversation family. Messages enter durable history with the sender's name and ID.
{ "op": "wait", "timeoutMs": 30000 } returns the first pending event, a timeout, or a stopped result. It does not wait for every child. Messages, command completions, and process exits can each wake a wait.
Stop stops the selected conversation and its descendant tree, including owned background commands and supervised processes. It does not stop unrelated workspace processes. Events that arrive while stopped remain queued. Only an explicit user message resumes delivery.

Run commands and processes

Use bash for finite commands. cwd defaults to the repository root. A background command returns a durable job handle immediately and delivers its completion automatically.
json
{ "command": "bun run build", "background": true }
Use the same bash tool with op: 'list' to discover this conversation's background commands. Pass the returned job object unchanged to status, wait, logs, or cancel. wait accepts timeoutMs; logs accepts lines, head, and cursor. There is no separate jobs tool.
Use proc for services and interactive programs. A start request takes a typed spec with name and application; put arguments in spec.args, not in a shell command string.
json
{ "op": "start", "spec": { "name": "web", "application": "bun", "args": ["run", "dev"], "ready": { "port": 5173, "timeoutMs": 30000 } } }
The spec defaults to the repository root for cwd, pty: true, empty args and env, restart: 'no', persist: true, and detached: false. Readiness can check log, port, and optional host. A readiness timeout leaves the process alive; inspect timedOut and matched before claiming it is ready.
Address later proc operations by name. Use list, status, and describe to inspect processes; wait accepts for: 'ready' or 'exit', an optional pattern, and timeoutMs. logs supports lines, head, grep, cursor, follow, and timeoutMs.
Send terminal input with op: 'send', text, and optional enter (default true) or keys. The same operation accepts signal, or cols and rows for resizing. Use stop or restart to change process state. Exits of agent-started processes produce durable notifications.
Process visibility spans the workspace, not just the current conversation. Private processes and processes outside that workspace stay inaccessible.
Exit tracking and conversation Stop keep the original process identity. They use that machine's current ready attachment and remain pending while it is unreachable.

Configure account and project access

Settings holds the team's pages (Inference, Plugins, Skills, Secrets & values, Approved scripts, Machines, Machine profiles) and your own (My inference, My secrets, Agent preferences, MCP clients). Project settings holds each project's Members, Repositories, Inference, Plugins, Secrets, Environment and Automations. You can manage them with no workspace open and no machine online. Who may change what follows your roles.
Inference loads provider and model catalogs for the selected profile. Until the model catalog is ready, saved model choices stay visible but cannot be changed in the model picker. A loading catalog does not mean that a model or provider is missing. Project settings › Inference picks the profile every workspace in the project uses.
Skills have account defaults and per-project assignments. Set their use in the project's main space separately from their use in its workspaces. Root agent sessions refresh those assignments before their next prompt or provider request. A settings change does not wake an idle agent or erase instructions already in its conversation. Subagents do not copy the parent's skill assignments.
Plugins have Team and Yours tabs. Owners and Admins manage team connections, and a project's Leads turn them on for the project. Your own connection to a service is used instead of the team's while you hold a workspace or act in it. A plugin server can run pinned to one of your machines; it is unavailable while that machine is offline. Tool calls check current grants, connection settings, and secret access, including calls through a cached tool handle. If those checks cannot reach the account, the call fails rather than using stale permission.
Secrets are team secrets, project secrets, or your own values, each delivered by its rule. See Environment › Secrets. Management pages return secret metadata, not stored plaintext.
Automations belong to a project. Each one runs when its trigger fires and its conditions pass: on a schedule (a five-field expression in UTC, such as 0 6 * * *), when you start it with Run now, on GitHub events on the project's repository (a pull request opened, a check suite completed, a comment, …), or when a gitspace:plan, gitspace:code, gitspace:review or gitspace:ship label is added to an issue or pull request. Conditions filter the event: base or head branch, author, draft, labels, changed files, conclusion, review state, whether it is linked, whether it mentions your bot. It then messages the project agent or a workspace, starts a workspace for the pull request, issue or branch (in Plan, Code, Review or Ship, linked to it), or sends the event to the workspace linked to it. Its instruction may name {{automation.name}}, {{scheduled_for}} on a schedule, {{requested_by}} when started by hand, and the event's fields on GitHub triggers ({{pull_request.html_url}}, {{subject.url}}, …); a field the trigger does not have is refused when you save. Runs execute in the cloud: a run is the workspace agent's next turn, and that agent attaches a machine only when its work needs one.
An event runs only if its author has write access to the repository or is on the project's Trusted authors list; for a comment the author is the commenter. Anyone else's events match no automation and appear in recent runs as Skipped: author not trusted. Schedules and manual runs are always trusted.
A pull request, issue or branch has at most one workspace in a project, its link: made when an automation starts a workspace for it, when a pull request is opened from a workspace's branch (and for the issues it closes), or by you (Link a pull request or issue) or an agent. Every project on a repository the GitHub App covers gets four default automations, once (delete one and it stays deleted), that send a linked workspace its pull request's review feedback, its failed checks, comments mentioning your bot (@gitspace-<handle>; without a link, to the project agent) and a notice when it is merged or closed. Test with a past event in the editor shows what an automation would do with a delivery GitHub sent earlier, with its checks and its first message; Run it acts on that delivery once.
At most a project's concurrency (2 by default) runs work at once; more wait in a queue, and a run queued for 24 hours is recorded as Skipped: waited more than a day for a slot. Past an automation's daily run cap (50 by default) in a UTC day, its runs are recorded as Skipped: daily run cap. A run ends when its workspace's turn ends, or when that turn stops to ask you something.
The project agent can propose an automation, or a change to one, from its conversation. A proposal does nothing until you approve it on the Automations page; switching one off or deleting it needs no approval. Cancel run in a queued run's details skips it.

Manage workspaces from an agent

Agents call the typed space_* tools from a codemode script, as tools.space_workspace(args), not through a CLI or a JavaScript space namespace. space_workspace with args: { method: 'list' } returns the workspace definitions in the current project, including closed workspaces, each with its status: what its agents are doing (working, waiting on you and on what, idle or failed), its linked pull request and since when. Method board returns the same as one line per workspace. Both read stored rows once and wake no workspace. Method status with a workspaceId reads one workspace's last report. Method current reads the current workspace.
The project agent sees a workspace board in its own turns. Its first turn, and its first turn after a compaction, starts with the full board; later turns carry only the workspaces whose line changed since its previous turn, with the time. When those changes grow past a size, a fresh full board comes instead. The compaction summary ends with the full board. The board never goes into the agent's instructions, so the cached prompt stays the same from turn to turn. When the board or a space_workspace read fails, the agent gets the reason and says it could not read the current state instead of answering from memory. A tool call cut off by a restart of the project's object says so, and points to Monitoring for the likely cause, often its memory limit.
Use space_workspace with args: { method: 'create', name, branch, sourceKind, sourceRef } to create a workspace. Optional fields include phase, dependsOn, goal, workflow, and rubric. Check the returned ready field. If an instruction write fails after creation, the result includes the created workspace identity and completed writes so the agent can repair that workspace instead of creating a duplicate.
New workspaces start in Plan when phase is omitted. The browser creation dialog also defaults to Plan; selecting another phase explicitly (including creation from a board column) keeps that choice, subject to the phase rule. Existing and restored workspace phases are unchanged. Initial Goal and Workflow drafts remain separate typed instructions and are not rewritten by the workspace phase default.
For a remote branch, use sourceKind: 'branch' with a reference such as origin/develop or refs/remotes/origin/develop. GitSpace fetches that source with the project's repository credentials; it does not require a cached tracking reference or an open base checkout.
For another workspace, use sourceKind: 'workspace' and its workspace ID as sourceRef. The new workspace starts from the source's latest committed state, not its uncommitted changes. Creation does not open or transfer the source or change its branch. The new workspace is stacked on the source, so its phase can't be later than the source's.
Source resolution and destination branch validation happen before publishing the new workspace. An invalid source or branch does not leave a new failed workspace entry.
space_phase changes the current workspace's phase. The space_workspace tool also supports setRelations, open, and restore under the workspace lifecycle and checkpoint rules. Keep the revision and placement generation from the latest read; stale changes reject. An agent cannot close or archive its own workspace from a running tool. Use the browser for that action.
The project agent can also look after the workspaces it starts, and a stack's head can do the same for its members:
  • space_workspace method start, with a workspaceId and an instruction, sends that workspace's agent an instruction, so workspaces start working without you opening each. when: 'steer' (the default) reaches a running turn at its next tool call, or starts one; when: 'queue' runs it after the current turn. The turn's report, when it finishes, fails or asks something, comes back to the sender. The started agent attaches its own machine when it needs one, and a workspace in Plan still proposes its plan for your approval.
  • Method questions lists the questions a workspace's agents are waiting on, from the main agent and its subagents, and why any of them can't be answered for you.
  • Method answer proposes answers to plain questions. One approval card in the sender's conversation lists them and says who answers; nothing is sent until you approve it. The asking agent then continues as it would after your answer, is told who answered, and its card shows who answered for you. Plan approvals, lifecycle approvals and take-over requests are always yours.
A workspace's own agent, unless it heads a stack, can't use start, questions or answer.
Pass workspaceId inside args to space_goal, space_workflow, or space_rubric to edit another workspace in the same project. Use method get to read, describe with operation: 'put' for the input schema, and put to write. Closed workspaces stay closed. Writes require the record's expectedRevision; use zero only when creating an absent record.
Instruction changes post a notice to the affected agent session without interrupting its current tool or starting an idle turn. The agent reads the latest Goal, Workflow, and Rubric before its next provider request.

Preserve decisions

The Journal records phase narrative, decisions, artifacts, and state changes. It explains how the workspace reached its current state without asking a reviewer to reconstruct the story from a transcript.
Use the journal for durable reasoning. Keep temporary narration in the agent session.

Verify with evidence

A completion claim is not proof. Attach evidence that demonstrates each observable requirement:
  • A browser run for a web behavior.
  • Runtime output for a service or CLI behavior.
  • A focused test for a permanent contract that cannot be exercised directly.
  • An artifact when the output itself is the deliverable.

Comment on what agents write

Comments are how you respond to what an agent wrote. Select a passage, a block, or an item (a row, step, line or frame) in an agent's message, the Goal, the Change Guide, or a Markdown file in the drive, and choose Comment. A comment is staged above the composer and sent with your next message, each with its quote and anchor. The agent answers each comment with a reply, shown in the chat and under the comment.
  • In the chat, you can comment on what the agent wrote since your last message. Once sent, those comments are locked.
  • On the Goal, the Change Guide and drive documents, a comment's thread stays open. When the agent changes the commented part, the thread shows outdated. A comment on a Change Guide section carries forward to the next revision while that section is unchanged.
Comments live in the conversation: rewinding past a message removes its comments. Review threads from earlier releases stay readable, read-only; new feedback uses comments. In a team, people who don't hold the workspace leave notes instead.

Keep and share files in the drive

Agents read and write drive files with ordinary tools through drive://workspace/<path> and drive://base/<path> (the project's drive). Workspace agents can read the project drive but write only their workspace's. Project agents can write the project drive. Any agent can read another workspace's drive in the same project, archived ones included, as drive://workspaces/<workspaceId>/<path>. Published edits refresh open views; evidence references still point to their recorded version. An image a message shows stays as it was when the message was written.
Agents read PDFs and other documents in the drive as Markdown pages. A scanned PDF without a text layer reads as empty.
These encrypted drive files are separate from Cloudflare Artifacts repositories, which store code. A published code view names a committed snapshot; it does not include unflushed changes in a machine checkout.
In Inspector › Drive, select one or more workspace files and choose Copy to project artifacts. Each copy is an independent project file with source provenance. The originals remain. Choose another destination when a file already exists, or explicitly confirm replacement of its displayed version. A newer destination version invalidates that confirmation.
Select one project or workspace file and choose Share to create a link to that fixed version. Set an optional expiry, copy the link, or revoke it from Active links. Later edits do not change the download.
Anyone with the link can download the file without signing in. Do not share secrets. GitSpace serves public files as attachments and does not put encryption keys in the URL. Revoking a link stops new downloads, but cannot remove copies someone already downloaded.

Explain the change

The Change Guide turns the current diff, goal, journal, and evidence into a review path. It should explain the behavior, important code paths, tradeoffs, and proof. It is not a generated file list. Agents write it with the review-guide-narrator skill, with a diagram for most sections and a narrated walkthrough. A guide without a walkthrough plays one built from its sections.
Share on the Change Guide creates a link to it, with an optional expiry. A link to a guide of public repositories is public; otherwise the reader signs in with GitHub and must be able to read every repository it shows. Shares carry the walkthrough, not comments.

Operate the result

Shipping code does not make the workspace irrelevant. Keep services, events, release state, open comments, and rollback information with the workspace until the work is quiet.
Move the workspace through plan, code, review, and ship. Phases are lanes: moving a workspace into Ship pushes nothing, and GitSpace doesn't start, wait for or block on CI when a workspace changes phase. Archive it only after the operational state agrees with the completion claim.

Chatter and ghosts

Chatter is a project's ambient chat, opened from the workspace header. Agents post what they found, what tripped them, the workaround they used, or what they need, under a short topic; people post too. Posts under the same topic form one thread. Nothing in Chatter is addressed or assigned, and it wakes no agent: each agent reads a short digest at the start of its turns.
A topic about a failing tool is an issue, with a state: open, resolved or dismissed. The workspace's Issues tab lists them. The project agent resolves, dismisses or merges issue topics when a person asks it to.
Ask a ghost, on a sidebar row or in the workspace header, opens a short-lived, read-only chat about one session: it answers from that conversation's transcript and the workspace's drive as they were, and cites what it read. A ghost can't change or send anything, and fades 10 minutes after your last question. Agents ask ghosts with ghost_ask, including about their own conversation from before a compaction.

Direct attention across the fleet

The fleet view distinguishes work that is active, waiting, failed, or needs attention. Machine placement identifies the checkout and effect executor, not the owner of the conversation. Restarting an agent does not restart its machine processes, and losing a connection does not prove those processes stopped.