---
title: "Projects & Workspaces"
description: "A project is one git repository and a workspace groups the repositories one change touches: create it, order its members, see where it lives on disk, run one task across them and review and merge per repository."
sidebar:
  order: 3
---

# Projects & Workspaces

{/* 项目是一个 git 仓库;工作区是一组仓库,可以一起做一次任务。 */}
Genesis works in two units. A **project** is one git repository. A **workspace** is a named group of one or more projects that you hand to Genesis as a single unit of work — so when a change touches a library and the app that uses it, one task can edit both and you review them together.

{/* 每个仓库都属于一个工作区,哪怕只有一个成员。 */}
Every repository you open belongs to a workspace, and a workspace always has at least one member — so the ordinary single-repository case is simply a workspace with one repository in it.

{/* 术语表 */}
## The vocabulary

| Term | What it is |
| --- | --- |
| **Project** | One git repository, registered at `vct:///projects/<name>` |
| **Workspace** | A named group at `vct:///workspaces/<slug>` with one editable display name, an optional description and an ordered member list |
| **Member** | A repository inside a workspace, addressed from an agent's working directory as `./<member-id>/…` |
| **Primary member** | The first member in the list; it backs the single-repository facts and actions — the task's commit SHA, pull requests, and project-scoped settings |
| **VCT point** | Genesis's canonical `vct:///…` address for a project or workspace |

{/* 工作区的顺序是有意义的:第一个成员就是主成员。 */}
The order of the members is not cosmetic: the first one is the **primary**, so moving a repository to the top of the list makes it the primary one.

{/* 侧边栏的 Recent workspaces 最多列出 5 个工作区。 */}
## Recent workspaces and the palette

{/* 一个工作区只有一行,哪怕它有很多成员仓库。 */}
The sidebar's **Recent workspaces** section lists at most 5 workspace shortcuts, newest first, one row per workspace — a workspace with five member repositories is still one row. Each row carries a pencil that opens **Workspace Settings**, and a right-click menu with **Workspace settings…** and **Open**. The header buttons beside the list are **Workspaces** (the ⋯ icon), **Open Existing Project** (the folder) and **Create New Project** (the plus).

{/* ⋯ 打开的页面带一个工作区面板:搜工作区,不搜仓库。 */}
**Workspaces** opens the palette over the workspace list. The search field reads **Search workspaces...** and matches the name, the slug, the description, the VCT point and the member names. Each row shows the display name with the description — or, without one, the ordered member names — underneath. The actions are **Open Project by Path** and **Create New Project**, and the footer reminds you of the keyboard: ↑↓ Navigate · ↵ Select · Esc Close. There is no empty-workspace action: a workspace is created around a repository.

{/* Forget workspace 会删除工作区本身,但不动磁盘上的仓库。 */}
**Forget workspace** on a row is not a filter — it deletes the workspace registration. The repositories on disk, their branches and their commits are untouched, but the workspace itself is gone, and opening one of its repositories again creates a fresh single-member workspace.

{/* 按路径打开一个还没登记的仓库会登记它,并为它建一个单成员工作区。 */}
Opening a repository path Genesis has not seen yet registers the repository as a project, creates a single-member workspace for it and opens that — see [Start in an Existing Repo](/usage/existing-repo) for what happens on that first pass. Add the other repositories afterwards in **Workspace Settings**.

{/* 工作区概览 */}
## The workspace overview

{/* 概览先回答“我在看什么”。 */}
The overview answers "what am I looking at?" before you ask for any work. The eyebrow reads **Workspace**, the heading is the display name, the description sits under it, and a meta line carries the node with the primary repository's branch at its short SHA and the HEAD commit subject.

Below that, a short facts list:

- **Path** — the workspace's own directory inside the VCT root (see below). It is a real directory, not a label.
- **VCT point** — `vct:///workspaces/<slug>`, the permanent address of the workspace.
- **Node** — the machine the workspace lives on (local, or a remote node).
- **Branch / HEAD** — reads **Managed per member repository**, because each member repository has its own branch and HEAD.

{/* 成员列表保留顺序,主成员带 Primary 标记;找不到的成员显示 missing。 */}
Then comes the ordered member list: a **Primary** badge on the first member and a **Member** badge on the rest, each with its name and its absolute path. A reference that no longer resolves is listed with a warning icon and the word **missing** instead of being silently dropped.

{/* 从这里出发的三个动作。 */}
Three actions lead out of the overview: **New task** opens the composer for the whole workspace, **Chat with Assistant** opens a read-only conversation scoped to it, and **Workspace Settings** opens the editor for its name, description and member list. **Recent activity** closes the page with the 5 newest tasks in the workspace — the objective, the task id, when it started and its status.

{/* 工作区没有仓库;Git 上游经由主成员解析。 */}
A workspace is not itself a checkout, so anything GitHub-shaped resolves through its members: the top bar's **Git integration** button shows the **primary member's** `owner/repo`, and appears only once an upstream is detected.

{/* 磁盘上的位置 */}
## Where a workspace lives on disk

{/* 工作区是一个真实目录,位于 VCT 根目录里。 */}
A workspace is a real directory: `<data-dir>/vct/workspaces/<slug>`, where `<data-dir>` is Genesis's data directory — `~/.local/share/genesis/vct` on Linux, `~/Library/Application Support/genesis/vct` on macOS and `%APPDATA%/genesis\vct` on Windows. `<data-dir>/vct` is the **VCT root**, and the VCT root is always a git repository of its own.

```text
<data-dir>/vct/                          # the VCT root: a git repository
  CONTEXT.md                             # the global context every agent sees
  projects/example -> ~/Source/example   # a linked project (gitignored)
  genesis-source -> ~/Source/genesis     # the running source checkout (gitignored)
  workspaces/my-app/                     # the workspace directory (a real directory)
    CONTEXT.md                           # the workspace's own context (tracked)
    example -> ~/Source/example          # one member symlink, named by member id
    shared-lib -> ~/Source/shared-lib    # the next member, in list order
  .genesis/workers/worker_T7_A1/         # a workspace agent's worktree of this root
    workspaces/my-app/                   # that agent's working directory
```

{/* VCT 根仓库只跟踪 CONTEXT.md 文件。 */}
The workspace directory holds one directory symlink per resolved member, named by the member's id, plus the workspace's own `CONTEXT.md`. The VCT root repository tracks `CONTEXT.md` files only: `projects/`, the member symlinks and `genesis-source` are gitignored, each workspace's `CONTEXT.md` is re-included, and `.genesis/` holds agent worktrees and is ignored. No member code is ever committed there.

{/* 成员链接失效时,工作区仍在,但成员显示为不可用。 */}
Each member is a host-local path. If a member's repository moves or is unlinked, its symlink goes stale and the workspace reports that member as unavailable — the other members keep working, and the row stays in the list until you remove it.

{/* 工作区自己的 CONTEXT.md */}
## The workspace CONTEXT.md

{/* 生成块只替换两个标记之间的内容,其余字节原样保留。 */}
Each workspace carries its own `CONTEXT.md`, generated when the workspace is created and refreshed whenever its name, description or member list changes. The generated part sits between two markers:

```html
<!-- genesis:workspace-context:start (generated; text outside this block is preserved) -->
<!-- genesis:workspace-context:end -->
```

Only the bytes between the markers are replaced. Anything you write outside them is preserved exactly, and a file without both markers is treated as yours and never touched again. The generated block states the display name, the VCT point, the description when there is one, and an ordered `id | role | repo path` table of the members.

{/* 工作区级别的根智能体负责写这个文件。 */}
An agent working at the workspace level is the one that edits this file: its working directory is the workspace directory, so `./CONTEXT.md` is the workspace's context and its edits are committed on that task's branch. The context tools in a member's subtree write that member's own `CONTEXT.md`, never the workspace's.

{/* 编辑工作区 */}
## Create, edit and order members

{/* 工作区设置的入口。 */}
The editor for a workspace is **Workspace Settings** — the button on its overview, the pencil on its sidebar row, or **Workspace settings…** in that row's right-click menu. It opens from any page without a task, and it is the same editor everywhere.

{/* 名称、描述、slug 与永久地址。 */}
**Workspace details** holds the editable **Display name**, an optional **Description**, and the **Slug** with the permanent `vct:///workspaces/<slug>` beside it. Renaming changes the label only. Changing the slug rewrites the point and the tasks linked to it, so treat it as a repair, not a rename.

{/* 成员的增删与排序。 */}
**Repositories** is the member list, and the first repository in it is the primary repository. Each row offers **Move up**, **Move down** and **Remove repository**; remove is disabled while only one member is left, because a workspace needs at least one repository. **Add repository** takes an absolute path or a `vct:///` point, with **Browse…** for a folder picker — a new absolute path is registered as a project automatically.

{/* 常见的拒绝理由。 */}
The form refuses the mistakes that would break the model with a plain message: "A workspace needs at least one repository." / "Add at least one repository to this workspace.", "A workspace cannot contain another workspace." and "That repository is already part of this workspace."

{/* 没有可解析成员的工作区。 */}
A workspace with no resolvable member says so — "This workspace has no repository yet. Add one in Workspace Settings before starting a task." — and offers an **Add a repository** shortcut. Nothing can run until a member resolves.

{/* 在工作区里运行任务 */}
## What a task on a workspace looks like

{/* 任务在工作区级别启动:根智能体是协调者。 */}
A task started from a workspace runs at the **workspace level**, not in one repository. Its root agent is a dedicated built-in role, the **coordinator**: it reads the workspace context and each member's `CONTEXT.md`, plans, splits the work per member, delegates, validates and reports — and it never edits code itself. It is not something you select; the workspace phase picks it, and ordinary single-repository tasks keep their usual root agent.

{/* 每个成员仓库都有自己的工作树,分支名在各成员之间相同。 */}
Underneath, the run works like this:

- The coordinator gets a worktree of the VCT root repository at `<vct-root>/.genesis/workers/worker_T<n>_A<m>`, and its working directory is `<worktree>/workspaces/<slug>` — the directory with the member symlinks.
- Every member it reaches gets its own ordinary worktree at `<member>/.genesis/workers/worker_T<n>_A<m>`, on branch `evogit-agent-T<n>-A<m>`. The name is computed once per agent, so it is identical across that agent's members.
- Its subagents are addressed by workspace-relative paths: `./<member-id>/…` scopes one to that member, while `./` reaches every member. A subagent gets its own worktree and branch names, and worktree count scales with agents × reached members, not with fan-out.
- A real repository's working tree is never written. Git runs per member (`git -C <member-id>/…`), and source changes are committed in each member repository on that one branch.

{/* 提交前的任务里能看到成员清单。 */}
The composer shows the same thing before you launch: a read-only **Repositories** roster listing every member in order with its role, its name and its resolved path, plus an "Unresolved: …" line for references that no longer resolve. The composer, its attachments and its task options are the same ones described in [Evolve your project](/usage/evolution).

{/* 工作区不会新建仓库;genesis 是项目级操作。 */}
A workspace never scaffolds a repository. Asking for a brand-new repository on a workspace settles to an ordinary evolve task on that workspace — the dashboard disables the genesis options — and the core refuses a workspace-scoped genesis request outright, so create the repository on its own path first.

{/* 交互式会话与助手。 */}
An interactive session on a workspace uses the same member worktrees. An **Assistant** conversation scoped to a workspace is read-only: it can read the workspace and its members, it writes no file at all, and it delegates every change by starting a task. A workspace with no resolvable member refuses its first message.

{/* 评审按仓库进行 */}
## Review and merge per repository

{/* 每个成员仓库各有一张评审卡。 */}
The review page gives every member repository its own card: the member's name, a **Primary** badge on the first one, its VCT point, its path, the branch, its own +adds/−dels, a **View diff** action, its own **Merge into** target and its own **Merge** / **Reject**.

{/* 没有改动的成员明确说明。 */}
A member that the task did not change says **No code changes in this repository.** and offers no merge — that is a statement about that repository, never about the task as a whole.

{/* 两个以上有改动的成员时,可以一次全部合并。 */}
When at least two unresolved change-bearing members remain, **Merge all repositories** appears and resolves them in one go; the confirmation names every repository it will merge. Merging merges the member's branch into the target you pick and deletes the branch; rejecting deletes it.

{/* 任务级动作仍然只作用于主成员:没有工作区级别的 PR。 */}
Task-level actions stay primary-scoped: PR creation, skills extraction, auto-resolve and review metadata all resolve the primary member, and there is no workspace-level pull request object.

{/* 不能暂停或恢复 */}
## No pause, no resume

{/* 工作区运行不可暂停、不可恢复,也不提供后续任务。 */}
A workspace run cannot be paused or resumed: there is no pause action on its task card, it keeps no durable agent state, and the review page offers no follow-up task for it. If you need to stop one, cancel it and start a new task — there is no checkpoint to pick up from.

{/* 回收分支与工作树 */}
## Reclaim branches and worktrees

{/* 评审结束后,分支和工作树目录会被回收。 */}
Once a review settles — merged, rejected, continued or marked as no changes — that task's branches and worker worktree directories are reclaimed. Until then the member worktrees and the shared branch stay while the task is reviewable; the workspace's own worktree of the VCT root is removed as soon as the run ends, and a task you never review is reclaimed after the retention window (14 days by default).

{/* 手动回收是演练模式,--force 才真正执行。 */}
A periodic sweep cleans up what leaked — `evogit-agent-T<n>-A<m>` branches, `worker_T<n>_A<m>` directories and stale `git worktree` registrations — and `mix vct.gc` runs the same sweep on demand:

```bash
mix vct.gc                       # dry run: print what would be reclaimed
mix vct.gc --force               # perform the reclamation
mix vct.gc --repo ~/Source/my-app --data-dir ~/.local/share/genesis
```

It sweeps the VCT root, every workspace member repository and every known project root. It never touches `refs/genesis/*` resume refs, a default branch, or a paused task's branch — and `--repo <path>` (repeatable) restricts the sweep while `--data-dir <path>` points at the directory holding `tasks.sqlite`.

{/* 命令行 */}
## Manage workspaces from the CLI

{/* 全部通过同一个核心接口,和仪表盘完全一致。 */}
From a source checkout, `mix vct.workspace` does the same job without the dashboard:

```bash
mix vct.workspace list
mix vct.workspace show <name-or-point>
mix vct.workspace create <name> --member <POINT_OR_PATH> [--member <POINT_OR_PATH> ...]
mix vct.workspace create <name> --member <PATH> --description "two repos" --slug my-app
mix vct.workspace rename <name-or-point> <new-name>
mix vct.workspace set-slug <name-or-point> <new-slug>
mix vct.workspace add-member <name-or-point> <POINT_OR_PATH>
mix vct.workspace remove-member <name-or-point> <MEMBER_ID_OR_REF>
mix vct.workspace reorder <name-or-point> <id,id,...>
mix vct.workspace delete <name-or-point>
```

{/* 名称或点都可以定位工作区;每条命令都接受 --data-dir。 */}
`<name-or-point>` is a `vct:///workspaces/<slug>` point or a bare name matched against the slug or the display name. Every command accepts `--data-dir <path>`, and `create` also takes `--description` and `--slug`. `show` prints the slug, name, description, physical path and one `id:` / `role:` / `path:` / `point:` line per member, alongside `MISSING:` lines for references that resolve to nothing — those keep their ids, so `remove-member` and `reorder` can still address them.

{/* 挂载点 */}
## Mount points

{/* 每个项目和每个工作区都有一个 VCT 点。 */}
Every project and workspace Genesis knows about has a **VCT point** — a canonical, three-slash address that names the thing independently of where its bytes live. A point is also its relative path inside the VCT root, and a workspace point is the one value a task or conversation is admitted on.

| Mount point | What it addresses |
| --- | --- |
| `vct:///` | The VCT root |
| `vct:///projects/<name>` | A project — one repository |
| `vct:///workspaces/<slug>` | A workspace — a group of projects |
| `vct:///genesis-source` | Reserved: Genesis's own source checkout |

The form is deliberately strict — `vct://host/...` is rejected, because only local addressing exists today. Duplicate and trailing slashes collapse to the canonical spelling, and a `.` or `..` segment is rejected outright.

{/* 外部仓库已退役 */}
<Aside type="note" title="Foreign repositories are gone">
{/* 现在唯一的跨仓库方式是工作区的成员列表。 */}
Cross-repository work happens only inside a workspace, through its ordered member list. There is no per-task extra-repository list any more: an older `genesis.toml` `[foreign_repos]` table is read and ignored with one deprecation warning per config file, and the way to reach a second repository is to add it as a workspace member.
</Aside>