Pattern miner: Add repo-qa-assistant curated pattern: slash-command Q&A agent - #270
Conversation
Interactive slash-command Q&A agent that investigates the repository and answers with a single comment. Mined from upstream githubnext/agentics repo-ask.md, q.md, and archie.md, which share slash_command + reaction triggers, read-only permissions, and a single add-comment safe output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Reviewer kind: matt-pocock (data-only JSON pattern addition, TS/generation-logic focused).
Found two correctness gaps between the new repo-qa-assistant archetype data and how src/js/workflow.js actually renders workflows:
capabilities.web_fetchinworkflow-generation.jsonisn't a recognized key ininferCapabilities()— it silently has no effect, so the generated tools block won't include web-fetch despite the prompt instructing the agent to use it.- The archetype's tips describe setting
min-integrity: none, but the correspondingmin_integrityfield is missing from theworkflow-generation.jsonentry, so the generated frontmatter won't include it.
Both are inline comments above. No blocking issues beyond that — the rest of the archetype/manifest wiring looks consistent with existing patterns.
Generated by Specialist PR Review for #270 · copilot · auto · 37.5 AIC · ⌖ 5.74 AIC · ⊞ 8.1K
| "icon": "comment-discussion", | ||
| "capabilities": { | ||
| "bash": true, | ||
| "web_fetch": true, |
There was a problem hiding this comment.
matt-pocock: capabilities.web_fetch isn't read anywhere in src/js/workflow.js — inferCapabilities() only maps pre_steps, bash, github_toolsets, browser, network (see lines 48-57). This key is silently dropped, so generated workflows will never emit a web-fetch tool despite step 2 of the prompt body explicitly instructing the agent to "Investigate the repository... using bash and web-fetch as needed". Either rename to browser/an existing recognized capability, or add web_fetch handling to inferCapabilities/generateWorkflowFile so the tool actually gets included.
| "Use a reaction (e.g. eyes) alongside slash_command so requesters get immediate acknowledgement while the agent works", | ||
| "Grant read-only permissions and rely on bash/web-fetch tools for investigation instead of write access", | ||
| "Set tools.github.min-integrity: none so the assistant can read any issue or pull request context regardless of author trust, since it only answers questions", | ||
| "Cap add-comment at max: 1 so a single consolidated answer is posted instead of a running commentary", |
There was a problem hiding this comment.
matt-pocock: This tip says "Set tools.github.min-integrity: none", but there's no corresponding "min_integrity": "none" field added to the repo-qa-assistant entry in patterns/workflow-generation.json (compare status-report, which does set min_integrity). Without it, generateWorkflowFile won't emit min-integrity: none in the frontmatter, so the generated workflow won't actually match this tip's stated behavior.
Mined pattern
Repositories/files mined:
githubnext-agentics/files/workflows/repo-ask.mdgithubnext-agentics/files/workflows/q.mdgithubnext-agentics/files/workflows/archie.mdgithub-gh-aw/files/.github/aw/workflow-patterns.md("Preferslash_commandwhen the action is conversational... the user may pass arguments in the comment body") andgithub-gh-aw/files/.github/aw/patterns.md(ChatOps: "slash-command driven, human-in-the-loop automation in issues or pull requests").Recurring shape (3 upstream workflows):
All three (
repo-ask,q,archie) are conversational, on-demand assistants that:slash_command(optionally paired with areactionfor immediate acknowledgement)permissions: read-allor explicitcontents/issues/pull-requests: read)tools.github.min-integrity: noneso they can read any issue/PR regardless of author trust, since they only answer questions and never act on untrusted contentadd-comment(capped atmax: 1), nevercreate-pull-requestor other write outputsThis satisfies the "at least two upstream workflows demonstrating the same shape" bar, and is additionally corroborated by explicit upstream documentation recommending the
slash_command-driven ChatOps pattern for conversational actions.Why the existing library did not cover this:
pr-iteration-loopis PR-focused, long-running iteration on a draft PR — not read-only Q&A.repo-maintaineris a broad, proactive scheduled maintenance role with write outputs (issues + PRs) — not a read-only, on-demand answer-and-comment assistant.current-library.jsondocuments themin-integrity: none+ read-only + singleadd-commentcombination for this use case.What changed in
patterns/:patterns/archetypes/repo-qa-assistant.json— new curated archetype (success_rate: null,count: 0,top_repos: []) withslash_commandtrigger,add-commentsafe output/tool,role-stepsprompt style, and tips capturing the reaction-ack, read-only-permissions,min-integrity: none,add-comment max: 1, and scoped-answer patterns observed upstream.repo-qa-assistanttoarchetypesinpatterns/manifest.json.repo-qa-assistantruntime rendering definition (icon, capabilities, permissions, github_toolsets, prompt body) topatterns/workflow-generation.json.No other files were touched; no scan/generation scripts were run.
Validation:
npm test— 320 tests passed (18 test files), includingtest/patterns.test.jsandtest/generate-patterns.test.js. One unrelatedENOENTwarning from vitest's GitHub Actions summary reporter trying to write to a runner temp path that doesn't exist in this sandbox; it does not affect test results.npm run build— succeeded, producingdist/patterns/archetypes/repo-qa-assistant.jsonand the updateddist/patterns/manifest.json/dist/patterns/workflow-generation.json.Candidates deliberately left out:
plan.md(Agentic Planner) — only one upstream example with no corroborating "planning discussion" pattern doc; would need a second example.dictation-prompt.md— a narrow, single-purpose voice-dictation prompt generator with no second upstream example or documented pattern.sub-issue-closer.md/issue-arborist.md— both overlap with the existingissue-hierarchy-managerarchetype (parent/sub-issue linking and closing), so no new archetype was warranted; left the existing archetype'slink-sub-issue/update-issuetips untouched since upstream evidence did not add anything new.duplicate-code-detector.md/large-file-simplifier.md/code-simplifier.md— already covered by the existingcode-health-auditorandperformance-nutarchetypes.