---
name: multi-agent-issue
language: en
description: "List unassigned GitHub issues, pick one, auto-assign, and launch the multi-agent pipeline. Use when a GitHub issue should be picked up and started without knowing its number in advance."
user-invocable: true
argument-hint: "[autopilot]  -  optional: run the pipeline without confirmations"
---

# multi-agent issue  -  GitHub Issue Picker

**Input**: $ARGUMENTS

Interactively list unassigned GitHub issues, let the user pick one, and send it to the pipeline.

## Steps

1. **Detect the project**  -  determine which repo it is from the cwd:
   - `my-ui-components` → `my-org/my-ui-components`
   - `my-figma-app` → `my-org/my-figma-app`
   - Other → ask the user for the repo

2. **gh auth switch**  -  if it is a work repo, switch to the work account label in `prefs.global.accounts[]` (`gh auth switch --user {work-label}`)

3. **Fetch the issues**  -  `gh issue list --state open --assignee "" --json number,title,labels --limit 50`
   - Filter out those labeled `implemented` or `in progress`
   - List the remaining "fresh" issues

4. **Let the user pick**  -  present the 8-10 most reasonable issues as options
   - Groupings such as a scan series or the same team take priority in the suggestions

5. **Start the pipeline with the selected issue**  -  run the `/multi-agent` command:
   - Input: `https://github.com/{org}/{repo}/issues/{number}`
   - If the user passed the `autopilot` flag, start in autopilot mode

6. **gh auth restore**  -  return to `{owner}` once done
