Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

251 linesCodeBlameRaw
1---
2title: Work items
3description: Track any work, a feature, a bug or a chore, as a work item of your workspace. Link it to the repositories it starts in and lands in, number it once for the whole workspace, close it when every repository has landed, and work on it from the site, the CLI, MCP and the API.
4---
5
6A work item is anything your team means to do: a feature, a bug, a chore.
7It belongs to the workspace, not to one repository, so work that spans a
8service, its client and its docs is one item, with one number, one
9conversation and one place that says what is done.
10
11**Work** is in the left rail, directly after **Home**, at
12`g1t.sh/<workspace>/-/work`. A work item's page is
13`g1t.sh/<workspace>/-/work/<number>`.
14
15Work items used to be issues, one repository's each. [Issues became work
16items](/about/issues-became-work-items/) says what changed for the ones you
17had.
18
19## What a work item has
20
21- a **title** and a **description** in Markdown. Whoever works on it,
22 person or agent, works from this text. Say what done means in plain
23 words, under a `## Definition of done` heading if you like: it is
24 context for whoever works on it and its reviewers, not something a merge
25 waits on;
26- its **repositories**, each with a role (see below);
27- **labels** and a **milestone**, both the workspace's;
28- **comments**, **reactions** and **assignees**;
29- what it is **blocked by**: other work items that must land first;
30- a **state**: open or closed. A closed work item records why:
31 `completed` or `not_planned`.
32
33## One number for the workspace
34
35Work items and pull requests share one sequence of numbers per workspace,
36so `#12` names exactly one thing in it. Pull requests still live in their
37repository, at `g1t.sh/<owner>/<repo>/pull/<number>`, but a new one takes
38the workspace's next number. Pull requests opened before work items keep
39the numbers they had.
40
41Wherever Markdown shows, in a description, a comment, a commit message or
42chat, a reference links to what it names:
43
44| You write | It names |
45| --- | --- |
46| `#12`, in a repository | That repository's pull request #12, else the work item that was its issue #12, else the workspace's work item #12, else pull request #12 in another of the workspace's repositories |
47| `#12`, outside a repository | The workspace's work item #12, else its pull request #12 |
48| `owner/name#12` | `#12` as it reads in repository `owner/name` |
49| `workspace#12` | Work item or pull request #12 of another workspace |
50
51So old references keep working: `#12` written about an issue before work
52items, `owner/repo#12`, and `Closes #12` in a commit, all reach the work
53item that issue became.
54
55## Repositories and their roles
56
57A work item links any number of the workspace's repositories, each in one
58role:
59
60| Role | Means |
61| --- | --- |
62| `origin` | The repository it was filed in. A work item opened from a repository has one; one opened on **Work** itself has none. |
63| `target` | A repository the work is meant to land in. |
64| `touched` | A repository where a pull request or commit for it landed or is in progress. g1t adds these itself, when a pull request is opened for the work item or a commit names it. |
65
66A work item's page lists its repositories with their roles, each with its
67pull requests for the item and whether it has **landed**. Under them,
68**Suggested** names repositories it may also need, each with why: work
69items like it landed there before, its CODEOWNERS cover what the item
70talks about, or sessions on the item touched it. Choose **Add as target**
71to link one.
72
73With the Triage role or higher, choose **Link a repository** to add one
74in a role, and the cross beside a repository to unlink it. Each is noted in
75the conversation, and is a `work_item.linked` or `work_item.unlinked`
76event.
77
78## Closing a work item
79
80A pull request that merges into its repository's default branch, or a
81commit pushed there, marks **its repository** as landed on every work item
82it names after a closing keyword (`Closes #12`, `Fixes #12`,
83`Resolves #12`; see [Closing work items](/guides/pull-requests/#closing-work-items)).
84The work item records it as a **resolution**: the repository, and the pull
85request or commit that landed it.
86
87The work item closes as `completed`:
88
89- when it has no target, at the first resolution;
90- when it has targets, once every target has landed.
91
92Until then it stays open, and its page says which targets are still
93missing. A pull request that does only part of a repository's share says
94`Part of #12` instead (or `Refs #12`): it links the pull request to the
95work item, and the repository as touched, without landing anything.
96
97A work item in another workspace is never closed by your repositories:
98`Closes other-workspace#3` does nothing.
99
100You can also close a work item yourself, as `completed` or `not_planned`,
101and reopen it. Reopening clears its resolutions.
102
103## Labels and milestones
104
105Labels and milestones belong to the workspace, and every work item and
106pull request in it uses the same ones. See [labels](/guides/labels/) and
107[milestones](/guides/milestones/). Both are under **Work**:
108**Labels** at `g1t.sh/<workspace>/-/work/labels` and **Milestones** at
109`g1t.sh/<workspace>/-/work/milestones`.
110
111## Who sees a work item
112
113- The workspace's members see every work item.
114- Anyone who can read a work item's origin repository sees it. Work items
115 filed in a public repository are public, and anyone who can take part in
116 a public repository can file one there.
117- A work item with no origin is seen only by members.
118
119What you can do with one follows your [role](/guides/access-and-roles/):
120the higher of your role in the workspace and your role in its origin
121repository. Triage labels, assigns and links repositories; the author and
122whoever asked for it can edit it.
123
124## The Work list
125
126**Work** lists the workspace's work items, open first, newest first.
127Filter it by state, label, milestone, assignee, repository and role (for
128example the items a repository is a target of). The address keeps the
129filters, so a filtered list can be shared.
130
131Work's sidebar has **Open**, **Assigned to you** and **Closed**, then
132**New work item**, **Labels** and **Milestones**. On a phone, the bar
133along the bottom is **Home**, **Work**, **Chat**, **Notifications** and
134**More**, with **Work** there for every member, Code access or not, and
135**Code** first in **More**. Tapping **Work** again opens that sidebar.
136
137A repository's **Work** tab is the same list, filtered to the work items
138linked to that repository: `g1t.sh/<workspace>/-/work?repo=<name>`.
139
140## Open a work item
141
142On **Work**, choose **New work item**. Give it a title and a description,
143and pick the repositories it should land in, as targets: none, one or
144several. Opened from a repository's **Work** tab, that repository is its
145origin.
146
147From the CLI, `g1t work new` opens one in the current repository's
148workspace, with the repository as its origin:
149
150```sh
151g1t work new --title "Sign-in times out on slow networks" --body "…"
152g1t work new --title "Rename the flag" --target acme/api --target acme/docs
153```
154
155`--target` names a repository it should land in; repeat it for more.
156`--workspace`, outside a repository of that workspace, opens one with no
157repository as its origin.
158
159## Work on one
160
161Claims, hand-offs, dependencies and sessions are how people and coding
162agents work on a work item at once without getting in each other's way;
163see [sessions, claims and dependencies](/guides/sessions/). A session is
164recorded in the repository it is checked out in, and the work item it
165works on is the workspace's.
166
167To open a pull request for a work item, use `g1t pr create --item 12`, or
168the `pull_request` tool's `create` with `item: 12`. The pull request's
169repository becomes touched on the work item, and the pull request lands it
170there when it merges.
171
172## The CLI
173
174`g1t work` works on the current repository's workspace, or the one in
175`--workspace` (or the `G1T_WORKSPACE` environment variable). `-R` (or
176`--repo`) `owner/name` names a repository instead of the current one:
177it filters `g1t work list`, and is the repository `g1t work link` and
178`g1t work unlink` act on. Every command takes `--json`.
179
180| Command | Does |
181| --- | --- |
182| `g1t work list` | Lists open work items. `-R`, `--state`, `--label`, `--milestone`, `--assignee` and `--author` narrow it; with `-R`, `--role` keeps those linked to the repository in one role. |
183| `g1t work view N` | Shows the work item with everything about its work: its repositories and what landed, claims, sessions, pull requests, what blocks it, decisions. |
184| `g1t work new` | Opens a work item; `--target` for each repository it should land in. `--attach FILE` adds an image to its description: uploaded to the repository it is filed from, or, filed in the workspace alone, to the work item once it is open. |
185| `g1t work comment N` | Comments on it. `--attach FILE` uploads an image to the work item and adds it to the comment. |
186| `g1t work edit N` | Changes its title, description, labels, assignees or milestone. |
187| `g1t work close N` | Closes it, as completed, or `--reason not_planned`. `--commit SHA` names a commit on the default branch that did it, which lands it there. |
188| `g1t work reopen N` | Opens it again. |
189| `g1t work link N` | Links a repository in a role: `--role target` (the default) or `touched`, the current repository or `-R owner/name`. |
190| `g1t work unlink N` | Unlinks a repository, never its origin. |
191| `g1t work claim N` | Says you are working on it. With `--title` instead of a number, opens a work item and claims it. |
192| `g1t work release N` | Lets go of your claim. |
193| `g1t work handoff N` | Hands it to someone else, or to anyone, with a note. |
194| `g1t work status` | The repository's active claims and sessions. |
195| `g1t work block N --by M` | Says it waits on work item M; `g1t work unblock N --by M` takes that back. |
196| `g1t work events` | The repository's events; `--follow` keeps printing them, `--item N` for one work item. |
197| `g1t work dispatch N` | Starts work on it in a session on your own Claude, or prints the Claude Code command for it. |
198
199[CLI commands](/reference/cli/#g1t-work) lists every flag.
200
201## MCP and the API
202
203The MCP server's `work_item` tool takes an `action`: `list`, `get`,
204`create`, `update`, `close`, `reopen`, `links`, `link`, `unlink`, the
205label actions, `comment`, `react`, `attach`, `decisions`, `resolve`, `claim`,
206`release`, `handoff`, `work` and `import`, among others. A workspace's
207labels and milestones are on the `workspace` tool, and a repository's
208work list is the `repository` tool's `work`. It takes
209`workspace` and `number`; `repo` is optional, as the origin of a new work
210item, a filter, or to find the workspace. See [MCP tools](/reference/mcp/).
211
212The REST API has the same under `/workspaces/{workspace}/work`:
213
214| To | REST |
215| --- | --- |
216| List work items | `GET /workspaces/{workspace}/work` |
217| Open one | `POST /workspaces/{workspace}/work` |
218| Get one | `GET /workspaces/{workspace}/work/{number}` |
219| Change one | `PATCH /workspaces/{workspace}/work/{number}` |
220| Close or reopen it | `POST /workspaces/{workspace}/work/{number}/close`, `…/reopen` |
221| Its repositories | `GET /workspaces/{workspace}/work/{number}/links` |
222| Link or unlink a repository | `POST` or `DELETE /workspaces/{workspace}/work/{number}/links` |
223| Its labels | `GET`, `POST`, `PUT` or `DELETE /workspaces/{workspace}/work/{number}/labels` |
224| Comment | `POST /workspaces/{workspace}/work/{number}/comments`; `PATCH` or `DELETE /workspaces/{workspace}/work/comments/{id}` |
225| React | `POST /workspaces/{workspace}/work/{number}/reactions` |
226| Upload an image for it | [`POST /workspaces/{workspace}/work/{number}/attachments`](/reference/api/work-items/upload-work-item-attachment/), with `work:write`; anyone who may comment on it may |
227| Its decisions, with its pull requests' | `GET /workspaces/{workspace}/work/{number}/decisions` |
228| Watch it | `GET`, `PUT` or `DELETE /workspaces/{workspace}/work/{number}/subscription` |
229| Its work context | `GET /workspaces/{workspace}/work/{number}/work` |
230| Claim, release, hand off | `POST /workspaces/{workspace}/work/{number}/claim`, `…/release`, `…/handoff` |
231| A repository's work items | `GET /repos/{owner}/{name}/work` |
232| What `#N` names | `GET /repos/{owner}/{name}/refs/{number}`, or `GET /workspaces/{workspace}/refs/{number}` |
233| The workspace's labels and milestones | `/workspaces/{workspace}/labels`, `/workspaces/{workspace}/milestones` |
234
235```sh
236curl -X POST https://api.g1t.sh/workspaces/acme/work \
237 -H "Authorization: Bearer $G1T_TOKEN" \
238 -H "Content-Type: application/json" \
239 -d '{"title": "Sign-in times out", "repo": "acme/web", "targets": ["acme/web", "acme/api"]}'
240```
241
242A work item has `workspace`, `number`, `title`, `body`, `state`, `reason`,
243`labels`, `milestone`, `assignees`, `blocked_by`, `repos` (each with
244`path`, `role`, `landed` and, for one that was an issue, its
245`legacy_number`) and `resolutions` (each with `repo` and the `pull` or
246`commit` that landed it). Changing work items needs a token with
247`work:write`.
248
249Every change is an event, `work_item.opened`, `work_item.closed` and so
250on, sent to [webhooks](/guides/webhooks/): a repository's webhooks for the
251work items linked to it, a workspace's for all of them.