| 1 | --- |
| 2 | description: Claim a g1t issue for this session and load its work context, or open one for the work in hand and claim it |
| 3 | argument-hint: "<issue number> [note] | <title of a new issue>" |
| 4 | allowed-tools: Bash(g1t:*) |
| 5 | --- |
| 6 | |
| 7 | Claim a g1t issue for this session: $ARGUMENTS |
| 8 | |
| 9 | If the first argument is an issue number: |
| 10 | |
| 11 | 1. Run `g1t work context $1` and read it: the definition of done, who else |
| 12 | has claimed it, its pull requests and what blocks it. |
| 13 | 2. Run `g1t work claim $1`, adding `--note "..."` with the rest of the |
| 14 | arguments if there are any. |
| 15 | 3. Tell me in a few lines what the issue asks for, whether anyone else holds |
| 16 | a claim on it (the claim command lists them), and anything that blocks |
| 17 | it. If someone else is on it, ask me before starting work. |
| 18 | |
| 19 | If there is no number (or no arguments), this is the work in hand, which |
| 20 | has no issue yet: |
| 21 | |
| 22 | 1. Look for an issue that already covers it: `g1t work list` and |
| 23 | `g1t issue list`. If one does, claim that one as above. |
| 24 | 2. Otherwise run `g1t work claim --title "TITLE"`, with the arguments as the |
| 25 | title (or, with none, a short title for what this session is doing), and |
| 26 | `--body "..."` saying what the change is. It opens the issue, claims it |
| 27 | for this session and attaches the session to it. |
| 28 | 3. Tell me the issue's number and title. |