From aa0e1822522d0d27399cd823d1757e4bb2994733 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Sep 2026 03:54:52 +0000 Subject: [PATCH] Add nitpick-reviewer curated archetype Mine a recurring slash-command PR review shape from upstream agentics workflows (grumpy-reviewer.md, pr-nitpick-reviewer.md) that is not yet represented in the pattern library. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 4 +-- patterns/archetypes/nitpick-reviewer.json | 35 +++++++++++++++++++ patterns/manifest.json | 3 +- patterns/workflow-generation.json | 42 +++++++++++++++++++++++ test/copilot-instructions.test.js | 2 +- test/patterns.test.js | 3 +- 6 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 patterns/archetypes/nitpick-reviewer.json diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 3e028c1..3704eaa 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -4,7 +4,7 @@ You are an expert GitHub Agentic Workflow generator. You help users create produ ## Your Knowledge -Use the committed pattern library as the source of truth: `patterns/manifest.json` plus `patterns/archetypes/*.json` generated on 2026-08-31 from 223 source repos, 175 active workflows, and 671 total workflows scanned. The current wizard manifest lists 27 user-facing archetypes; the `custom` archetype exists as a supporting pattern file and is intentionally not exposed as a HOW-step archetype. +Use the committed pattern library as the source of truth: `patterns/manifest.json` plus `patterns/archetypes/*.json` generated on 2026-08-31 from 223 source repos, 175 active workflows, and 671 total workflows scanned. The current wizard manifest lists 28 user-facing archetypes; the `custom` archetype exists as a supporting pattern file and is intentionally not exposed as a HOW-step archetype. ### Key Data Points @@ -23,7 +23,7 @@ Use the committed pattern library as the source of truth: `patterns/manifest.jso - `custom` is hidden from the wizard archetype cards but retained for matching and profile data. Best observed custom profiles are schedule + create-pull-request + noop at 95.2% (n=21), schedule + create-issue + noop + threat-detection at 83.9%, and schedule + create-issue + noop at 80.0%. **Curated archetypes without empirical runs yet (`count: 0`):** -- accessibility-expert, agent-cost-tracker, ci-failure-triage, code-health-auditor, community-digest, contribution-guidelines-checker, issue-hierarchy-manager, link-checker, linter-applier, linter-miner, linter-refiner, linter-workflows, performance-nut, pr-iteration-loop, repo-qa-assistant, security-scanner, skill-pr-reviewer, user-simulator. +- accessibility-expert, agent-cost-tracker, ci-failure-triage, code-health-auditor, community-digest, contribution-guidelines-checker, issue-hierarchy-manager, link-checker, linter-applier, linter-miner, linter-refiner, linter-workflows, nitpick-reviewer, performance-nut, pr-iteration-loop, repo-qa-assistant, security-scanner, skill-pr-reviewer, user-simulator. - Keep these archetypes available. They are newer curated patterns and should not be removed simply because they have no measured success rate. **Trigger combo risk:** diff --git a/patterns/archetypes/nitpick-reviewer.json b/patterns/archetypes/nitpick-reviewer.json new file mode 100644 index 0000000..7c38e7b --- /dev/null +++ b/patterns/archetypes/nitpick-reviewer.json @@ -0,0 +1,35 @@ +{ + "id": "nitpick-reviewer", + "label": "Nitpick Reviewer", + "description": "Review a pull request on demand via slash command and leave line-level nitpicks with a final review verdict", + "success_rate": null, + "count": 0, + "recommended_triggers": [ + { + "type": "slash_command", + "config": {} + } + ], + "recommended_safe_outputs": [ + "create-pull-request-review-comment" + ], + "recommended_tools": [ + "create-pull-request-review-comment" + ], + "timeout_minutes": 15, + "prompt_style": "role-rules", + "size_range_bytes": [ + 2000, + 6000 + ], + "top_repos": [], + "tips": [ + "Trigger with slash_command on pull_request_comment and pull_request_review_comment events so reviewers invoke it on demand rather than on every push", + "Pair create-pull-request-review-comment with submit-pull-request-review to post line comments plus one final review verdict", + "Set submit-pull-request-review allowed-events to [COMMENT, REQUEST_CHANGES] — the default GITHUB_TOKEN cannot APPROVE a pull request", + "Use cache-memory to record prior findings per PR so repeated invocations do not repost the same nitpicks", + "Set tools.github.min-integrity to approved or none depending on whether only trusted authors or any maintainer-invoked command can trigger it", + "Cap max on both create-pull-request-review-comment and submit-pull-request-review to keep reviews focused" + ], + "anti_patterns": [] +} diff --git a/patterns/manifest.json b/patterns/manifest.json index 14a9f46..b6d78af 100644 --- a/patterns/manifest.json +++ b/patterns/manifest.json @@ -32,7 +32,8 @@ "agent-cost-tracker", "contribution-guidelines-checker", "link-checker", - "repo-qa-assistant" + "repo-qa-assistant", + "nitpick-reviewer" ], "workflow_generation": "workflow-generation.json", "anti_patterns": [ diff --git a/patterns/workflow-generation.json b/patterns/workflow-generation.json index 53d4d4b..7ad0222 100644 --- a/patterns/workflow-generation.json +++ b/patterns/workflow-generation.json @@ -834,6 +834,48 @@ ], "min_integrity": "approved" }, + "nitpick-reviewer": { + "icon": "eye", + "capabilities": { + "github_toolsets": true + }, + "permissions": [ + "contents", + "pull-requests" + ], + "github_toolsets": [ + "repos", + "pull_requests" + ], + "instructions": [ + "pr-reviewer.md" + ], + "trigger_overrides": { + "slash_command": { + "yaml": "slash_command:\n name: {{name}}\n events: [pull_request_comment, pull_request_review_comment]", + "description": "on a slash command left as a pull request comment" + } + }, + "body": [ + "# {{label}}", + "", + "You are an **on-demand pull request nitpick reviewer** for this repository, invoked by a slash command.", + "", + "## Process", + "", + "1. Read the pull request diff, the invoking comment, and any prior review notes in cache-memory", + "2. Review changed lines for style, best-practice, and minor-improvement opportunities", + "3. Leave specific, line-level review comments and one overall review verdict", + "4. Record findings in cache-memory so a repeat invocation does not repost the same nitpicks", + "", + "## Constraints", + "", + "- **DO NOT** approve the pull request — submit only COMMENT or REQUEST_CHANGES reviews.", + "- **DO NOT** duplicate a nitpick already recorded in cache-memory for this pull request.", + "- **DO NOT** review generated, vendored, or lock files." + ], + "min_integrity": "approved" + }, "security-scanner": { "icon": "shield", "capabilities": { diff --git a/test/copilot-instructions.test.js b/test/copilot-instructions.test.js index bb22afc..75b7da8 100644 --- a/test/copilot-instructions.test.js +++ b/test/copilot-instructions.test.js @@ -28,7 +28,7 @@ describe('copilot instructions pattern guidance', () => { } expect(empirical).toHaveLength(9); - expect(curated).toHaveLength(18); + expect(curated).toHaveLength(19); for (const id of empirical) expect(instructions).toContain(`\`${id}\``); for (const id of curated) expect(instructions).toContain(id); expect(instructions).toContain('`custom` is hidden from the wizard archetype cards'); diff --git a/test/patterns.test.js b/test/patterns.test.js index caa9ce2..bfdbe27 100644 --- a/test/patterns.test.js +++ b/test/patterns.test.js @@ -106,7 +106,8 @@ describe('getArchetype', () => { 'skill-pr-reviewer', 'security-scanner', 'ci-failure-triage', - 'agent-cost-tracker' + 'agent-cost-tracker', + 'nitpick-reviewer' ])('includes %s with triggers and safe outputs', (id) => { const archetype = getArchetype(generatedPatterns, id); expect(archetype).not.toBeNull();