|
| 1 | +# GitLab Issues Mode |
| 2 | + |
| 3 | +> **🧪 Experimental.** GitLab Issues Mode is new. Commands, behavior, and integration details may change. [Feedback welcome.](https://github.com/bradygaster/squad/issues) |
| 4 | +
|
| 5 | +**Try this to connect to your backlog:** |
| 6 | +``` |
| 7 | +Show me the open issues for this GitLab repo |
| 8 | +``` |
| 9 | + |
| 10 | +**Try this to start work on a specific issue:** |
| 11 | +``` |
| 12 | +Work on issue #42 |
| 13 | +``` |
| 14 | + |
| 15 | +**Try this to handle MR review feedback:** |
| 16 | +``` |
| 17 | +There's review feedback on MR !24 |
| 18 | +``` |
| 19 | + |
| 20 | +Squad connects to your GitLab repository, fetches issues from the backlog, routes work to the right agents, creates branches, implements changes, and opens Merge Requests — all from natural language requests. |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +## Requirements |
| 25 | + |
| 26 | +- **`glab` CLI** installed and authenticated — the [official GitLab CLI](https://docs.gitlab.com/cli/issue/) (`glab auth login` to authenticate, `glab auth status` to check) |
| 27 | +- A GitLab repository with issues |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +## Connect to a Repository |
| 32 | + |
| 33 | +``` |
| 34 | +> Connect to GitLab at https://gitlab.example.com/acme/recipe-app |
| 35 | +``` |
| 36 | + |
| 37 | +Squad stores the issue source in `team.md`. You only need to do this once per project. |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +## View the Backlog |
| 42 | + |
| 43 | +``` |
| 44 | +> Show the backlog |
| 45 | +``` |
| 46 | + |
| 47 | +Squad fetches open issues via `glab issue list` and displays them in a table: |
| 48 | + |
| 49 | +``` |
| 50 | +# Title Labels Assignee |
| 51 | +12 Add user authentication backend — |
| 52 | +15 Fix responsive nav frontend — |
| 53 | +18 Write API integration tests testing — |
| 54 | +``` |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +## Work on Issues |
| 59 | + |
| 60 | +### Single issue |
| 61 | + |
| 62 | +``` |
| 63 | +> Work on #12 |
| 64 | +``` |
| 65 | + |
| 66 | +The coordinator routes the issue to the best-fit agent. That agent: |
| 67 | + |
| 68 | +1. Creates a branch (e.g., `12-add-user-authentication`) |
| 69 | +2. Implements the work |
| 70 | +3. Opens a Merge Request linked to the issue |
| 71 | + |
| 72 | +### Multiple issues |
| 73 | + |
| 74 | +``` |
| 75 | +> Work on #12 and #15 |
| 76 | +``` |
| 77 | + |
| 78 | +Agents work in parallel — each issue gets its own branch and MR. |
| 79 | + |
| 80 | +--- |
| 81 | + |
| 82 | +## Handle MR Review Feedback |
| 83 | + |
| 84 | +``` |
| 85 | +> There's review feedback on MR !24 |
| 86 | +``` |
| 87 | + |
| 88 | +The agent who opened the MR reads the review comments and addresses them. Commits are pushed to the existing branch. |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +## Merge Completed Work |
| 93 | + |
| 94 | +``` |
| 95 | +> Merge MR !24 |
| 96 | +``` |
| 97 | + |
| 98 | +Squad merges the MR, deletes the source branch, and closes the linked issue. |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## Check Remaining Work |
| 103 | + |
| 104 | +``` |
| 105 | +> What's left? |
| 106 | +``` |
| 107 | + |
| 108 | +Squad refreshes the backlog and shows remaining open issues. |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## Workflow Summary |
| 113 | + |
| 114 | +| You say | What happens | |
| 115 | +|---------|-------------| |
| 116 | +| `"Connect to GitLab at https://gitlab.example.com/acme/recipe-app"` | Stores issue source | |
| 117 | +| `"Show the backlog"` | Lists open issues | |
| 118 | +| `"Work on #12"` | Agent branches, implements, opens MR | |
| 119 | +| `"Work on #12 and #15"` | Parallel agent work on both issues | |
| 120 | +| `"There's review feedback on MR !24"` | Agent addresses review comments | |
| 121 | +| `"Merge MR !24"` | Merges MR, deletes branch, closes issue | |
| 122 | +| `"What's left?"` | Refreshes and shows remaining issues | |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +## GitLab CLI Quick Reference |
| 127 | + |
| 128 | +These are the `glab` commands Squad uses behind the scenes: |
| 129 | + |
| 130 | +| Operation | Command | |
| 131 | +|-----------|---------| |
| 132 | +| Authenticate | `glab auth login` | |
| 133 | +| Check auth | `glab auth status` | |
| 134 | +| List open issues | `glab issue list` | |
| 135 | +| List all issues | `glab issue list --all` | |
| 136 | +| View issue | `glab issue view 12` | |
| 137 | +| Create MR | `glab mr create -t "Fix pagination" -d "Closes #15"` | |
| 138 | +| Create MR (auto-fill from commits) | `glab mr create --fill` | |
| 139 | +| List open MRs | `glab mr list` | |
| 140 | +| List all MRs | `glab mr list --all` | |
| 141 | +| Merge MR | `glab mr merge 24` | |
| 142 | + |
| 143 | +For the full command reference, see the [official GitLab CLI documentation](https://docs.gitlab.com/cli/). |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +## Differences from GitHub Issues Mode |
| 148 | + |
| 149 | +| Aspect | GitHub | GitLab | |
| 150 | +|--------|--------|--------| |
| 151 | +| CLI tool | `gh` | `glab` | |
| 152 | +| Pull/Merge Requests | PR (`#24`) | MR (`!24`) | |
| 153 | +| Auth command | `gh auth login` | `glab auth login` | |
| 154 | +| Default branch convention | `main` | `main` (configurable) | |
| 155 | +| Issue linking in MR body | `Closes #N` | `Closes #N` | |
| 156 | +| Labels & milestones | Supported | Supported | |
| 157 | + |
| 158 | +--- |
| 159 | + |
| 160 | +## Tips |
| 161 | + |
| 162 | +- You don't need to assign issues to specific agents — Squad routes based on domain expertise. |
| 163 | +- If `glab` isn't authenticated, Squad will tell you. Run `glab auth login` first. |
| 164 | +- MR descriptions include `Closes #N` so merging automatically closes the linked issue, just like on GitHub. |
| 165 | +- See [GitLab Issues Walkthrough](../tour-gitlab-issues.md) for a step-by-step tour. |
| 166 | + |
| 167 | +## Sample Prompts |
| 168 | + |
| 169 | +``` |
| 170 | +connect to GitLab at https://gitlab.example.com/acme/recipe-app |
| 171 | +``` |
| 172 | + |
| 173 | +Links Squad to a GitLab repository for issue-driven development. |
| 174 | + |
| 175 | +``` |
| 176 | +show the backlog |
| 177 | +``` |
| 178 | + |
| 179 | +Fetches and displays all open issues from the connected GitLab repository. |
| 180 | + |
| 181 | +``` |
| 182 | +work on issue #23 |
| 183 | +``` |
| 184 | + |
| 185 | +Routes the issue to the appropriate agent who creates a branch, implements, and opens an MR. |
| 186 | + |
| 187 | +``` |
| 188 | +work on all issues labeled "bug" |
| 189 | +``` |
| 190 | + |
| 191 | +Processes multiple issues in parallel based on label filtering. |
| 192 | + |
| 193 | +``` |
| 194 | +what's left in the backlog? |
| 195 | +``` |
| 196 | + |
| 197 | +Refreshes the issue list and shows remaining open work items. |
0 commit comments