Skip to content

feat: implement issue assignment agentic workflow (go:yes trigger)#186

Merged
EMaher merged 9 commits into
mainfrom
emaher-feat-issue-assignment-workflow
Jun 24, 2026
Merged

feat: implement issue assignment agentic workflow (go:yes trigger)#186
EMaher merged 9 commits into
mainfrom
emaher-feat-issue-assignment-workflow

Conversation

@EMaher

@EMaher EMaher commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Motivation

The existing squad-issue-assign workflow triggered on squad:{member} labels and auto-triaged via a separate squad-triage workflow. This bypassed human approval -- any label application could assign work. We need a deliberate, maintainer-gated entry point for issue assignment.

Approach

Rewrote squad-issue-assign.yml as an agentic workflow triggered by the go:yes label:

  • Deterministic assignment: The issue is always assigned to the maintainer who applied go:yes (the event sender) -- the agent never picks the assignee.
  • Routing from JSON: Reads .squad/routing-table.json and .squad/issue-routing.json (new structured files) plus the prior triage comment to determine which squad areas the issue touches.
  • Safe outputs with hard limits:
    • assign-to-user: max 1 (sender only)
    • add-labels: allowed [squad, squad:*], blocked [go:*, priority:*, override:*, type:*], max 5
    • add-comment: max 1 (assignment rationale)
  • Post-check job: Verifies assignee == sender and all squad:{member} labels exist in routing data. Workflow fails on mismatch.
  • Security constraints documented inline (no mutations, no escalation, no external calls).

Other changes

  • Extracted routing tables from markdown into .squad/routing-table.json and .squad/issue-routing.json for simpler, more reliable parsing. routing.md now references these files.
  • Removed squad-triage.yml -- the go:yes label is now the only entry point, enforcing human-in-the-loop approval.
  • Upgraded actions/github-script from v7 to v8 (Node.js 24).

Files

File Change
.github/workflows/squad-issue-assign.yml Rewritten workflow
.github/workflows/squad-triage.yml Deleted
.squad/routing-table.json New -- work type routing data
.squad/issue-routing.json New -- label-to-member routing data
.squad/routing.md Updated to reference JSON files

EMaher and others added 6 commits June 23, 2026 10:21
Rewrite squad-issue-assign.yml to implement the go:yes label-triggered
assignment workflow:

- Trigger: issues labeled with go:yes (names filtering)
- Assigns issue to the maintainer who applied the label (sender)
- Reads prior triage analysis comment and .squad/routing.md
- Applies squad label + matched squad:{member} labels
- Safe outputs: assign-to-user max:1, add-labels allowed:[squad, squad:*]
  blocked:[go:*, priority:*, override:*, type:*] max:5, add-comment max:1
- Post-check job verifies assignee == sender and all squad:{member}
  labels exist in routing.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the Routing Table and Issue Routing markdown tables from
.squad/routing.md into dedicated JSON files:
- .squad/routing-table.json (workType, routeTo, examples array)
- .squad/issue-routing.json (label, action, who)

routing.md now references these JSON files. The squad-issue-assign
workflow reads JSON directly instead of parsing markdown tables,
resulting in much simpler and more reliable code.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document what the agent MUST NOT do: no assignee override, no
blocked label patterns, no issue mutations, no external calls,
no permission escalation, no skipping post-check.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Parse .squad/routing-table.json and .squad/issue-routing.json and
append structured entries to routingContent so the triage workflow
has full routing information available for analysis.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the squad-triage workflow that auto-triaged on the 'squad'
label. The issue assignment workflow now requires maintainers to
explicitly apply 'go:yes' to approve and assign issues, enforcing
human-in-the-loop approval before any routing happens.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
v8 runs on Node.js 24 with no breaking API changes to the
github/core context objects used in our scripts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the prior label-driven triage/assignment automation with a maintainer-approved issue assignment workflow triggered by the go:yes label, and moves routing data into machine-readable JSON under .squad/.

Changes:

  • Rewrites .github/workflows/squad-issue-assign.yml to deterministically assign issues to the go:yes label sender and apply up to 5 safe squad labels based on routing rules.
  • Deletes the legacy .github/workflows/squad-triage.yml workflow.
  • Introduces .squad/routing-table.json and .squad/issue-routing.json and updates .squad/routing.md to reference them.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.github/workflows/squad-issue-assign.yml New go:yes-triggered agentic assignment + routing + post-check logic (actions/github-script v8).
.github/workflows/squad-triage.yml Removes the previous automatic triage workflow.
.squad/routing-table.json Adds structured “work type → routeTo + keywords” routing data.
.squad/issue-routing.json Adds structured “label → action + who” routing data.
.squad/routing.md Switches routing docs to reference the new JSON sources.

Comment thread .github/workflows/squad-issue-assign.yml Outdated
Comment thread .github/workflows/squad-issue-assign.yml
Comment thread .github/workflows/squad-issue-assign.yml Outdated
Comment thread .github/workflows/squad-issue-assign.yml Outdated
Comment thread .github/workflows/squad-issue-assign.yml Outdated
Comment thread .github/workflows/squad-issue-assign.yml
Comment thread .squad/routing.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread .github/workflows/squad-issue-assign.yml Outdated
@EMaher

EMaher commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@copilot - have the Squad handle the comments.

@EMaher EMaher merged commit 373fabc into main Jun 24, 2026
6 checks passed
@EMaher

EMaher commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Related to #90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants