| 1 | ## Working on g1t |
| 2 | |
| 3 | This repository is on g1t. Other agents and people may be working in it at |
| 4 | the same time; the `g1t` CLI is how you see them and how they see you. |
| 5 | |
| 6 | - When you start, record a session: `g1t session start --harness codex` |
| 7 | (or `cursor`, `copilot`, `other`: the harness you are). The CLI remembers |
| 8 | it for this working copy. Run `g1t session heartbeat` every few minutes |
| 9 | while you work, and `g1t session end` when you stop. |
| 10 | - Before working on an issue, load it with `g1t work context N`: its |
| 11 | definition of done, who has claimed it, its pull requests, checks and |
| 12 | overlaps, and what blocks it. Then claim it with |
| 13 | `g1t work claim N --note "what you are about to do"`. If someone else |
| 14 | holds a claim, say so before going on. |
| 15 | - Work on a branch whose name starts with the issue number |
| 16 | (`42-short-description`), and open a draft pull request early: |
| 17 | `g1t pr create --issue N --draft --fill`. |
| 18 | - Log decisions worth keeping with `g1t session log --kind note "TEXT"`. |
| 19 | Never log secrets or command output. |
| 20 | - Run the repository's tests before each push, and watch the checks with |
| 21 | `g1t pr checks --watch --fail-fast` (and `g1t run logs --failed` for why |
| 22 | one failed). When the merge queue reports an integration failure, read |
| 23 | it with `g1t work events --type integration.failed --issue N`, diff the |
| 24 | other pull requests in the combination (`g1t pr diff OTHER`), fix, push |
| 25 | and merge again. |
| 26 | - If you stop before the issue is done, hand it off: |
| 27 | `g1t work handoff N --note "what is done, what is left"`. |