Optimize mattpocock-skills-reviewer by offloading PR triage to an inline small-model sub-agent#34229
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Optimize mattpocock-skills-reviewer workflow
Optimize mattpocock-skills-reviewer by offloading PR triage to an inline small-model sub-agent
May 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the “Matt Pocock skills reviewer” workflow prompt to offload deterministic PR triage (change-type classification + skill selection + file prioritization) into a dedicated inline sub-agent, so the main reviewer starts from structured triage output instead of re-deriving it from the full diff.
Changes:
- Replaced the Step 3 static change-type/skill mapping table with instructions to invoke a new
pr-triageinline agent and consume its JSON output. - Updated Step 4 guidance to prioritize review focus based on
pr-triage.high_impact_files. - Regenerated the compiled
.lock.ymlworkflow (introducing updated gh-aw compilation metadata and runtime pins).
Show a summary per file
| File | Description |
|---|---|
.github/workflows/mattpocock-skills-reviewer.md |
Moves change-type/skill selection into a new inline pr-triage agent with a strict JSON contract; updates reviewer instructions to consume that output. |
.github/workflows/mattpocock-skills-reviewer.lock.yml |
Regenerated compiled workflow with updated compiler metadata and updated pinned actions/images/tooling configuration. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
Comment on lines
+148
to
+150
| Invoke the `pr-triage` agent and capture its JSON response. | ||
| Use the returned `change_type`, `recommended_skills`, `high_impact_files`, and `key_signals`. | ||
| Apply the recommended skills in Step 4, prioritising the listed `high_impact_files`. |
Comment on lines
+53
to
+56
| # - ghcr.io/github/gh-aw-firewall/agent:0.25.49 | ||
| # - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 | ||
| # - ghcr.io/github/gh-aw-firewall/squid:0.25.49 | ||
| # - ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388 |
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.
This workflow was consuming ~1.97M tokens/run, with a deterministic triage phase embedded in the main prompt. This change extracts that phase into an inline
pr-triagesub-agent so the main reviewer can start from structured triage output instead of re-deriving context from the full diff.Prompt flow changes
pr-triageinvocation + JSON consumption.high_impact_files) when applying skills.New inline sub-agent (
pr-triage)## agent: \pr-triage`at the end of the workflow usingclaude-haiku-4.5`.change_type(fixed enum),recommended_skills,high_impact_files,key_signals.Contract clarity improvements
pr-triageand use its returned fields.{ "change_type": "bug_fix", "recommended_skills": ["/diagnose", "/tdd"], "high_impact_files": [ { "path": "pkg/example/file.go", "reason": "Touches core behavior used by multiple call sites." } ], "key_signals": [ "Adds regression tests for previous nil-pointer crash.", "Modifies error handling path in request processing." ] }