Add AI-powered issue triage system with correction tracking#951
Open
MackinnonBuck wants to merge 5 commits intomainfrom
Open
Add AI-powered issue triage system with correction tracking#951MackinnonBuck wants to merge 5 commits intomainfrom
MackinnonBuck wants to merge 5 commits intomainfrom
Conversation
Implements a delegator-based triage agent using GitHub Agentic Workflows, a slash-command-driven correction feedback loop, and automated correction collection with CCA integration. Key changes: - Re-initialize gh-aw to latest version - Add issue classification workflow with 4 type-specific handlers - Add /triage_feedback slash command and correction collection pipeline - Add corrections test suite (vitest, 28 tests) - Add verify-compiled CI check for gh-aw frontmatter changes - Add corrections-tests CI workflow - Update justfile with install/test recipes for corrections - Fix existing workflows for new gh-aw syntax (roles: under on:)
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an end-to-end AI-driven GitHub Issue triage + human feedback/correction loop using GitHub Agentic Workflows, plus a small Node-based correction-collector script with tests and CI to keep the pipeline reliable.
Changes:
- Added an issue classifier workflow and per-type handler workflows (bug/enhancement/question/documentation) using gh-aw compiled lockfiles.
- Added a
/triage_feedbackslash command and arepository_dispatch-triggered correction collection workflow backed byscripts/corrections/collect-corrections.js(with Vitest tests). - Updated repo automation/tooling:
justrecipes for installing/testing corrections, and a workflow to verify.lock.ymlfiles are up-to-date.
Reviewed changes
Copilot reviewed 31 out of 35 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/corrections/collect-corrections.js |
Implements correction tracking issue discovery/creation, table row appending, and Copilot auto-assignment threshold logic. |
scripts/corrections/test/collect-corrections.test.ts |
Adds unit tests for correction collector helpers and Octokit interactions. |
scripts/corrections/package.json / scripts/corrections/tsconfig.json / .gitignore |
Sets up the corrections script package/tooling for tests and typechecking. |
.github/workflows/collect-corrections.yml |
Runs the correction collector on repository_dispatch events from the slash command. |
.github/commands/triage_feedback.yml |
Defines the /triage_feedback command (modal form) that dispatches correction events. |
.github/workflows/issue-classification.md + handler workflows/lockfiles |
Adds the classifier + handler workflow set for automated issue triage. |
.github/workflows/verify-compiled.yml |
Adds a CI check to ensure gh-aw compilation outputs are committed. |
.github/workflows/corrections-tests.yml |
Adds CI coverage for the corrections script tests. |
justfile |
Integrates corrections install/test into top-level just install and just test. |
.github/aw/actions-lock.json and .github/agents/* |
Updates gh-aw configuration/agent files to the newer gh-aw structure. |
Files not reviewed (1)
- scripts/corrections/package-lock.json: Language not supported
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an end-to-end AI-powered issue triage pipeline using GitHub Agentic Workflows. When an issue is created, an AI classifier routes it to a type-specific handler agent that investigates the issue, applies a label, and leaves a comment. Humans can submit corrections via a slash command, which are collected into tracking issues and eventually fed back to improve the agents — creating a continuous improvement loop.
How the flow works
1. Automated triage (on issue create)
A classifier agent reads newly opened issues and routes them to one of four handler workflows based on the issue type:
handle-bug,handle-enhancement,handle-question, orhandle-documentation.Each handler is an independent agentic workflow with its own instructions and scope. Some are simple (e.g., the enhancement handler just adds a label), while others do deeper investigation. For example, the bug handler reads the issue, analyzes the relevant source code, attempts to determine whether the behavior is actually a bug or working as designed, and may reclassify the issue if appropriate. Some handlers leave a comment explaining their reasoning.
Handlers run in per-issue concurrency groups so multiple issues can be triaged in parallel without blocking each other.
2. Human correction (on demand)
If the agent's classification was wrong, a human can run the
/triage_feedbackslash command on the issue. This opens a modal dialog where the user can describe what the agent got wrong and what the correct action should have been. Submitting the form dispatches arepository_dispatchevent that triggers the correction collection pipeline.3. Correction collection (automated)
The
collect-correctionsworkflow:triage-agent-tracking4. Addressing corrections (Copilot)
When Copilot is assigned to the tracking issue, it:
This creates a flywheel: triage → corrections → improvements → better triage.
What changed
Agentic Workflows
gh-awto the latest version (new agent file, updated lock format)issue-classification.md(classifier) + 4 handlers (handle-bug,handle-enhancement,handle-question,handle-documentation)issue-triage.md,sdk-consistency-review.md) for newgh-awsyntax (roles:moved underon:)job-discriminator: ${{ inputs.issue_number }}for per-issue concurrencyCorrection pipeline
/triage_feedbackslash command (.github/commands/triage_feedback.yml)collect-correctionsworkflow triggered byrepository_dispatchscripts/corrections/collect-corrections.js— the core collection logic with full JSDoc type annotations (@actions/githubtypes, zerotscerrors)CI & tooling
corrections-tests.yml— runs tests on push/PR toscripts/corrections/verify-compiled.yml— ensuresgh aw compileis run when agentic workflow frontmatter changesinstall-correctionsandtest-correctionsrecipes to the justfile, wired into top-levelinstallandtest