Skip to content

Pattern miner: Add nitpick-reviewer curated archetype for slash-command PR review - #273

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
pattern-miner/nitpick-reviewer-1bfdc1386166add5
Draft

Pattern miner: Add nitpick-reviewer curated archetype for slash-command PR review#273
github-actions[bot] wants to merge 1 commit into
mainfrom
pattern-miner/nitpick-reviewer-1bfdc1386166add5

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Caution

Protected files were modified in this change.
This pull request is in request_review mode and requires explicit human scrutiny before merge.

Protected files: .github/copilot-instructions.md

Mined pattern: on-demand slash-command PR nitpick review

Sources mined:

  • githubnext-agentics/files/workflows/grumpy-reviewer.mdslash_command (grumpy, events [pull_request_comment, pull_request_review_comment]) triggers a pull_requests-toolset review that uses cache-memory for per-PR dedup and emits create-pull-request-review-comment (max 5) plus submit-pull-request-review (max 1).
  • githubnext-agentics/files/workflows/pr-nitpick-reviewer.md — same shape: slash_command: "nit", cache-memory: true, create-pull-request-review-comment (max 10) + submit-pull-request-review (max 1), min-integrity: none because it's maintainer-invoked.
  • github-gh-aw/files/.github/aw/pr-reviewer.md — documents this exact combination (create-pull-request-review-comment + submit-pull-request-review) as a recommended reviewer pattern, and calls out that the default GITHUB_TOKEN cannot APPROVE, so submit-pull-request-review must set allowed-events: [COMMENT, REQUEST_CHANGES].

Recurring pattern: two independent upstream workflows demonstrate the identical shape (slash-command-triggered PR review with cache-memory dedup and a paired line-comment + final-verdict safe-output combo), corroborated by upstream docs describing it as the recommended reviewer pattern. That satisfies the "at least two upstream workflows, or one plus explicit docs" bar.

Why the existing library didn't cover it: the closest existing archetype, skill-pr-reviewer, is triggered on pull_request/ready_for_review and only emits create-pull-request-review-comment — it has no slash-command, on-demand entrypoint, no cache-memory dedup guidance, and no mention of pairing with submit-pull-request-review or the APPROVE restriction. pr-review (measured archetype) is also automatic-trigger only. No archetype currently models a maintainer-invoked, on-demand PR nitpick reviewer.

What changed in patterns/:

  • Added patterns/archetypes/nitpick-reviewer.json — new curated archetype (success_rate: null, count: 0) with slash_command trigger, create-pull-request-review-comment safe output/tool, and tips covering the slash-command trigger shape, the submit-pull-request-review pairing with allowed-events: [COMMENT, REQUEST_CHANGES], cache-memory dedup, and min-integrity guidance.
  • Appended nitpick-reviewer to archetypes in patterns/manifest.json.
  • Added a nitpick-reviewer entry to patterns/workflow-generation.json (icon, permissions, github toolsets, pr-reviewer.md instruction, a slash_command trigger override with the pull_request_comment/pull_request_review_comment events, prompt body, and min_integrity: approved).
  • Updated .github/copilot-instructions.md archetype counts/list (27 → 28 user-facing archetypes; added nitpick-reviewer to the curated list) and the corresponding test expectations in test/copilot-instructions.test.js (curated count 18 → 19) and test/patterns.test.js (added nitpick-reviewer to the curated-archetype smoke test).

Validation:

  • npm test — 324/324 tests passed (19 test files).
  • npm run build — succeeded (dist/ produced, then removed since it's a build artifact).

Candidates deliberately left out:

  • Weekly ASCII/trend-chart digest workflows (weekly-repo-map.md, weekly-issue-activity.md, repo-chronicle.md) — already covered by the existing charts/upload-asset "extra" capability and the community-digest archetype's create-discussion output; no new archetype needed.
  • Pre-activation "skip if too many open PRs share this title prefix" guard (glossary-maintainer.md, tech-content-editorial-board.md, adhoc-qa.md, unbloat-docs.md) — already present as a tip on code-improvement, daily-test-improver, documentation-updater, and performance-nut.
  • Discussion-mining / issue-hierarchy workflows (discussion-task-miner.md, issue-arborist.md, sub-issue-closer.md) — substantially overlap with the existing issue-hierarchy-manager archetype and community-digest's discussion output; only one upstream example each for the discussion-specific angle, not enough independent corroboration for a new archetype.
  • repo-assist.md / q.md broad "do everything" assistant workflows — overlap with the existing repo-maintainer archetype and its anti-pattern entry for repo-assist; adding a new archetype here would encode an already-flagged anti-pattern.

Generated by Pattern Miner · copilot · auto · 271.9 AIC · ⌖ 16.1 AIC · ⊞ 8.7K ·

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-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protected files were modified in this pull request and require manual scrutiny before merge.

Please verify that each protected-file change is intentional, policy-compliant, and safe:

  • Protected files: .github/copilot-instructions.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants