Pattern miner: Add rejection-learning and cross-repo pattern tips from upstream mining - #278
Conversation
…tream mining Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Reviewer: ponytail (content/pattern-data change — additive JSON tips only, no code/UI/TS changes to review from a Matt Pocock angle)
Reviewed the three tip additions in patterns/archetypes/*.json:
code-health-auditor.json: rejection-learning tip (read close reason/review feedback before creating a new finding)code-improvement.json: caps to one open PR + rejection-learning tipcontribution-guidelines-checker.json: cross-repo monitoring viatarget-repotip
All three edits are valid JSON, additive only, and consistent in tone/structure with existing entries in the same arrays. No triggers, safe-outputs, success_rate, or count fields were touched, matching the PR description. The guidance is plausible and well-scoped (each tip names a concrete mechanism: skip-if-match/max/expires, target-repo, closed-item lookback).
No blocking issues found — the changes are self-contained documentation/pattern-data additions with no runtime or UI impact.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
github.com
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
Generated by Specialist PR Review for #278 · copilot · auto · 19.1 AIC · ⌖ 5.3 AIC · ⊞ 7.2K
What was mined
Mined
githubnext/agentics(61 workflow files underworkflows/) andgithub/gh-aw(docs under.github/aw/) for recurring shapes not yet captured bypatterns/.Recurring pattern found
"All You Can Eat" sequential-backlog gating with rejection learning. A scheduled workflow keeps at most one open output alive (
skip-if-match/tracker-idwithmax: 1andexpires), and before proposing new work it reads the outcome of its most recently closed item (close reason, review comments) to avoid re-proposing rejected ideas.Evidence — 3 upstream workflows demonstrate this shape:
githubnext-agentics/files/workflows/code-simplifier.md(skip-if-match: 'is:pr is:open in:title "[code-simplifier]"',create-pull-requestwithexpires: 1d)githubnext-agentics/files/workflows/large-file-simplifier.md(tracker-id: large-file-simplifier,skip-if-match,create-issuewithexpires: 2d)githubnext-agentics/files/workflows/issue-monster.md(skip-if-match/skip-if-no-matchgate, learns from prior assignment outcomes)Corroborating documentation —
github-gh-aw/files/.github/aw/workflow-patterns.md, section "All You Can Eat Pattern" (lines 88-133), explicitly names this as a recommended design with a "Learn from the closed output" sub-section describing exactly the rejection-learning step (search recently closed items, read close reason, persist accept/reject history incache-memory).Additionally found a smaller recurring shape: cross-repository monitoring where a workflow reads from a
target-repo/TARGET_REPOSITORYvariable and writes labels/comments back to that external repo viatarget-repoon safe outputs (githubnext-agentics/files/workflows/contribution-check.md), corroborated bygithub-gh-aw/files/.github/aw/workflow-patterns.mdsection "Cross-Repository Pattern" (lines 284-293).Why the library did not already cover this
code-improvementandcode-health-auditoralready had cache-memory rotation tips (avoiding repeating the same category/dimension) but nothing about learning from how a previously closed item was received — a different, complementary signal.target-repoor cross-repo write configuration;contribution-guidelines-checkeronly covered same-repo PR checks.What changed in
patterns/Small, additive tip refinements only (no new archetype, no triggers/safe-outputs/success_rate/count/top_repos/metadata changes):
patterns/archetypes/code-improvement.json: added a tip about capping to one open PR (skip-if-match/max: 1/expires) and learning from recently closed PRs' rejection signals before proposing a new fix.patterns/archetypes/code-health-auditor.json: added a tip about reading recently closed findings' close reason/review feedback before creating a new one.patterns/archetypes/contribution-guidelines-checker.json: added a tip about monitoring an external repository viatarget-repoon safe outputs, GitHub toolsets, and token-scope documentation.Validation
npm test: 327 tests passed (19 test files).npm run build: succeeded, produceddist/including allpatterns/archetypes/*.json.Candidates deliberately left out
weekly-repo-map.md,weekly-issue-activity.md,repo-chronicle.md) — all three useupload-assetfor charts/visuals, but this is already represented by the existingextras.chartsentry inworkflow-generation.jsonand thecommunity-digestarchetype'screate-discussionguidance; not a new gap.skip-roles/skip-bots/lock-for-agentcombo (ai-moderator.md) — only one upstream workflow demonstrates it and I could not find corroborating upstream documentation naming it as a distinct recommended pattern (only generic field docs insyntax-core.md), so it does not meet the two-workflow-or-documented-pattern bar.assign-to-agentauto-triage (issue-monster.md,duplicate-code-detector.md,large-file-simplifier.md) — whileassign-to-agentappears 3 times, it's already listed as a safe output in the existingissue-triageconfiguration profile inmanifest.json, so it isn't a net-new capability gap.status-reportandcommunity-digestarchetypes (issue vs. discussion output), so a new archetype would be a near-duplicate.