Pattern miner: Add PR Fix Assistant archetype for slash-command-driven branch pushes - #287
Merged
Merged
Conversation
Mines a recurring pattern across upstream githubnext/agentics workflows: slash-command-triggered agents that push fixes directly to an existing PR branch via push-to-pull-request-branch, rather than opening a new PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pelikhan
marked this pull request as ready for review
September 22, 2026 05:08
pelikhan
deleted the
pattern-miner/pr-fix-assistant-cc275d7691e3306e
branch
September 22, 2026 05:08
Contributor
Author
There was a problem hiding this comment.
Reviewer: matt-pocock (auto-dispatched — this PR only touches JSON pattern data and Markdown docs, no TS/JS/UI code changes)
No blocking issues found. The new pr-fix-assistant archetype is internally consistent with existing conventions:
permissions: [contents, pull-requests]matches the siblingnitpick-reviewerarchetype's slash-command/PR-comment shape.min_integrity: "none"mirrors the existingstatus-reportprecedent for maintainer-triggered flows.- The
safe-outputs-management.mdinstruction file resolves correctly againstinstruction_base_url(github/gh-aw/.github/aw/), matching the upstream doc cited as evidence. git-pull-requesticon exists in the sprite (src/index.html), so it will render.- The
test/copilot-instructions.test.jscount bump (20 → 21) and.github/copilot-instructions.mdlist/count edits are consistent with the new manifest entry.
Nothing here warrants REQUEST_CHANGES — this is a well-scoped, low-risk data-only addition.
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
github.comregistry.npmjs.org
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
network:
allowed:
- defaults
- "github.com"
- "registry.npmjs.org"See Network Configuration for more information.
Generated by Specialist PR Review for #287 · copilot · auto · 67.9 AIC · ⌖ 4.69 AIC · ⊞ 6.8K
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.
Caution
Protected files were modified in this change.
This pull request is in
request_reviewmode and requires explicit human scrutiny before merge.Protected files:
.github/copilot-instructions.mdUpstream evidence
Mined
githubnext/agenticsworkflow sources under/tmp/gh-aw/data/upstream/githubnext-agentics/files/workflows/, cross-checked againstgithub/gh-awdocs under/tmp/gh-aw/data/upstream/github-gh-aw/files/.github/aw/.Recurring pattern: a slash-command-triggered agent that fixes an existing pull request by pushing corrections directly to its branch with the
push-to-pull-request-branchsafe output, instead of opening a new pull request. Six upstream workflows demonstrate this shape:workflows/pr-fix.md—slash_command: pr-fix+reaction: eyes,safe-outputs: push-to-pull-request-branch,create-issue,add-commentworkflows/efficiency-improver.md—push-to-pull-request-branch: { target: "*", required-title-prefix: "[efficiency-improver] " }workflows/perf-improver.md— samepush-to-pull-request-branch+required-title-prefixshape, slash-command-gated follow-up pathworkflows/test-improver.md— same shapeworkflows/repo-assist.md— same shape, withprotected-files: allowedworkflows/lean-squad.md— same shape, withprotected-files: allowedThis is also documented as the canonical mapping in
github-gh-aw/files/.github/aw/designer-mappings.md("commit a fix to the PR branch" →push-to-pull-request-branch) and specced in detail ingithub-gh-aw/files/.github/aw/safe-outputs-management.md(recommendedrequired-title-prefix/required-labelsrestrictions,target: "*"warnings, checkoutfetch: ["*"]requirement).Why the existing library did not cover it
I checked
/tmp/gh-aw/data/current-library.jsonand every archetype file underpatterns/archetypes/.push-to-pull-request-branchwas defined only as a generic safe-output alias inpatterns/workflow-generation.json(outputs["push-to-pull-request-branch"]) but was never used as arecommended_tools/recommended_safe_outputsentry by any archetype, and no archetype's tips mention it. The closest existing archetypes are distinct:pr-iteration-loop— schedule-triggered, one long-running draft PR, not a slash-command on-demand fixer for an arbitrary existing PR.nitpick-reviewer— slash-command-triggered but comment-only, never pushes code.code-improvement— schedule-triggered, opens new PRs viacreate-pull-request, not push-to-existing-branch.None of these represent "push a fix straight onto the branch of the PR that invoked you," so this is additive, not a duplicate.
What changed
patterns/archetypes/pr-fix-assistant.json— new curated archetype (success_rate: null,count: 0,top_repos: []) withslash_command+reactiontriggers,pull-requestssafe outputs,push-to-pull-request-branchrecommended tool, and tips drawn directly from the upstream evidence above (required-title-prefix/required-labels scoping, verify-before-push, comment summary, min-integrity: none rationale).pr-fix-assistanttoarchetypesinpatterns/manifest.json.pr-fix-assistantentry topatterns/workflow-generation.json(icon, capabilities, permissions, github toolsets, instructions, aslash_commandtrigger override restricting events topull_request_comment, prompt body, andmin_integrity: none) so the wizard can render this archetype..github/copilot-instructions.mdto list the new curated archetype in the "no measured success rate" set and bumped the "user-facing archetypes" count from 29 to 30.test/copilot-instructions.test.js— bumped the hardcoded curated-archetype count from 20 to 21 to match the new manifest entry.Candidates deliberately left out
repo-chronicle.md,weekly-issue-activity.md,multi-device-docs-tester.mdusingmatplotlib/seaborn+upload-asset): already covered by the existing genericextras.chartscapability (upload-assetssafe output) inpatterns/workflow-generation.json, which any archetype can already opt into — not a gap.plan.md,weekly-issue-activity.md,repo-chronicle.md): already covered by the existingcommunity-digestarchetype (schedule +create-discussion).glossary-maintainer.md/duplicate-code-detector.md/weekly-repo-map.md: single-instance shapes with no second corroborating upstream workflow or explicit doc recommendation, so they don't meet the two-upstream-workflows bar.vex-generator.md: a one-offworkflow_dispatch-with-typed-inputs generator; no second upstream example or docs recommendation of this exact shape.Validation
npm test: 326/327 tests pass. The one pre-existing failure (test/copilot-instructions.test.js— "describes the committed pattern-library corpus, not stale scan data") already fails identically onmainbefore this change (verified viagit stash); it is caused by a stalegenerated_atdate inpatterns/manifest.jsonversus the date hardcoded in.github/copilot-instructions.md, unrelated to this PR.npm run build: succeeds,dist/patterns/archetypes/pr-fix-assistant.jsonis emitted.