You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a repo (or individual extract) appears in a combined section like squad-frontend + squad-mobile, its ownership is ambiguous. github-issue-ops requires a single owner per item to route and assign issues without conflict.
#85 resolves this at the section level (one pick reassigns the entire section to a single team). This issue addresses the finer granularity: individually reassigning specific repos or extracts within a multi-team section to different teams.
Repos/extracts in the section belong to different teams
--pick-team is applied first (on TeamSection[], before flattenTeamSections); --dispatch is applied second (on the flat RepoGroup[], after flattenTeamSections). A section resolved by --pick-team can still have individual repos/extracts overridden by --dispatch.
Proposed design
TUI — dispatch mode
A new dispatch mode toggled with t, available only when --group-by-team-prefix is active. In dispatch mode:
Each repo/extract row in a multi-team section shows its candidate teams inline
The user presses 1, 2, … to assign the focused item to the nth candidate team
The item visually moves to that team's sub-section immediately
Format: --dispatch <team>=<refs> where <refs> is a comma-separated list of refs using the same format as --exclude-repositories and --exclude-extracts:
repo short-name: repoA
extract ref: repoA:src/foo.ts:0
= is used as the team/refs separator because it never appears in team slugs or repo/extract refs. Multiple --dispatch flags are allowed (one per team), enabling mixed repo-level and extract-level dispatch in the same command.
New types in src/types.ts
// On RepoGroup
dispatchedTeam?: string;// repo-level team override
extractDispatchedTeam?: (string|undefined)[];// per-extract override, parallel to extractSelected
Implementation order
Add dispatchedTeam / extractDispatchedTeam to RepoGroup in src/types.ts
Parses each ref list, matches repos/extracts, sets the override fields, then re-runs groupByTeamPrefix to produce updated sections.
Add dispatches?: Record<string, string[]> to ReplayOptions in src/output.ts; emit one --dispatch <team>=<refs> line per entry in buildReplayCommand
Add TUI dispatch mode in src/tui.ts (key t, 1/2/…, Escape)
Add --dispatch <spec> (repeatable) to github-code-search.ts; apply afterflattenTeamSections (i.e. after --pick-team has already been applied)
Replay
The replay command emits one --dispatch <team>=<refs> flag per team that received dispatches, with all its refs comma-joined — after any --pick-team flags.
Acceptance criteria
TUI dispatch mode (t) allows assigning any repo or extract to one of its candidate teams
--dispatch in non-interactive mode reproduces the same section layout as a TUI dispatch session
--pick-team and --dispatch can be combined in the same command; --pick-team is applied first
Dispatch overrides are reflected in both markdown and JSON output section headers
The replay command round-trips: re-running it produces bit-identical output
bun test, bun run lint, bun run knip all pass
bun run docs:build completes without errors
Documentation
Three files must be updated. Follow the conventions in .github/instructions/documentation.instructions.md.
docs/usage/team-grouping.md — add a ## Team dispatch section after ## Team pick mode (Team pick mode — p on a multi-team section header to assign it to a single team #85). Describe: the problem (ambiguous ownership at repo/extract granularity), the TUI dispatch mode (t, 1/2/…, Escape), the --dispatch <team>=<refs> flag with a worked example combining it with --pick-team, and how the replay command encodes dispatches.
docs/reference/cli-options.md — add a --dispatch <spec> row in the ## Search options table after --pick-team, noting it is repeatable, that refs follow the --exclude-repositories / --exclude-extracts format, and linking to the team grouping usage page.
Problem
When a repo (or individual extract) appears in a combined section like
squad-frontend + squad-mobile, its ownership is ambiguous. github-issue-ops requires a single owner per item to route and assign issues without conflict.#85 resolves this at the section level (one pick reassigns the entire section to a single team). This issue addresses the finer granularity: individually reassigning specific repos or extracts within a multi-team section to different teams.
Relationship to #85 — pick vs. dispatch
The two mechanisms are complementary and can be combined in the same replay command:
--pick-team(#85)--pick-team "A + B"=A--dispatch(#86)--dispatch A=repoX --dispatch B=repoY--pick-teamis applied first (onTeamSection[], beforeflattenTeamSections);--dispatchis applied second (on the flatRepoGroup[], afterflattenTeamSections). A section resolved by--pick-teamcan still have individual repos/extracts overridden by--dispatch.Proposed design
TUI — dispatch mode
A new dispatch mode toggled with
t, available only when--group-by-team-prefixis active. In dispatch mode:1,2, … to assign the focused item to the nth candidate teamEscapeortagainCLI —
--dispatch(repeatable)Format:
--dispatch <team>=<refs>where<refs>is a comma-separated list of refs using the same format as--exclude-repositoriesand--exclude-extracts:repoArepoA:src/foo.ts:0=is used as the team/refs separator because it never appears in team slugs or repo/extract refs. Multiple--dispatchflags are allowed (one per team), enabling mixed repo-level and extract-level dispatch in the same command.New types in
src/types.tsImplementation order
dispatchedTeam/extractDispatchedTeamtoRepoGroupinsrc/types.tssrc/group.ts:groupByTeamPrefixto produce updated sections.dispatches?: Record<string, string[]>toReplayOptionsinsrc/output.ts; emit one--dispatch <team>=<refs>line per entry inbuildReplayCommandsrc/tui.ts(keyt,1/2/…,Escape)--dispatch <spec>(repeatable) togithub-code-search.ts; apply afterflattenTeamSections(i.e. after--pick-teamhas already been applied)Replay
The replay command emits one
--dispatch <team>=<refs>flag per team that received dispatches, with all its refs comma-joined — after any--pick-teamflags.Acceptance criteria
t) allows assigning any repo or extract to one of its candidate teams--dispatchin non-interactive mode reproduces the same section layout as a TUI dispatch session--pick-teamand--dispatchcan be combined in the same command;--pick-teamis applied firstbun test,bun run lint,bun run knipall passbun run docs:buildcompletes without errorsDocumentation
Three files must be updated. Follow the conventions in
.github/instructions/documentation.instructions.md.docs/usage/team-grouping.md— add a## Team dispatchsection after## Team pick mode(Team pick mode — p on a multi-team section header to assign it to a single team #85). Describe: the problem (ambiguous ownership at repo/extract granularity), the TUI dispatch mode (t,1/2/…,Escape), the--dispatch <team>=<refs>flag with a worked example combining it with--pick-team, and how the replay command encodes dispatches.docs/reference/keyboard-shortcuts.md— extend the## Team ownershipsection introduced in Team pick mode — p on a multi-team section header to assign it to a single team #85 with a### Dispatch mode bindingstable documentingt(toggle dispatch mode),1/2/… (assign to nth team), andEscape(exit dispatch mode).docs/reference/cli-options.md— add a--dispatch <spec>row in the## Search optionstable after--pick-team, noting it is repeatable, that refs follow the--exclude-repositories/--exclude-extractsformat, and linking to the team grouping usage page.