Skip to content

Pattern miner: Add rejection-learning and cross-repo pattern tips from upstream mining - #278

Merged
pelikhan merged 1 commit into
mainfrom
pattern-mining/all-you-can-eat-and-cross-repo-tips-c5c23ffcdde99904
Sep 13, 2026
Merged

Pattern miner: Add rejection-learning and cross-repo pattern tips from upstream mining#278
pelikhan merged 1 commit into
mainfrom
pattern-mining/all-you-can-eat-and-cross-repo-tips-c5c23ffcdde99904

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What was mined

Mined githubnext/agentics (61 workflow files under workflows/) and github/gh-aw (docs under .github/aw/) for recurring shapes not yet captured by patterns/.

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-id with max: 1 and expires), 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-request with expires: 1d)
  • githubnext-agentics/files/workflows/large-file-simplifier.md (tracker-id: large-file-simplifier, skip-if-match, create-issue with expires: 2d)
  • githubnext-agentics/files/workflows/issue-monster.md (skip-if-match/skip-if-no-match gate, 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 in cache-memory).

Additionally found a smaller recurring shape: cross-repository monitoring where a workflow reads from a target-repo/TARGET_REPOSITORY variable and writes labels/comments back to that external repo via target-repo on safe outputs (githubnext-agentics/files/workflows/contribution-check.md), corroborated by github-gh-aw/files/.github/aw/workflow-patterns.md section "Cross-Repository Pattern" (lines 284-293).

Why the library did not already cover this

  • code-improvement and code-health-auditor already 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.
  • No archetype mentioned target-repo or cross-repo write configuration; contribution-guidelines-checker only 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 via target-repo on safe outputs, GitHub toolsets, and token-scope documentation.

Validation

  • npm test: 327 tests passed (19 test files).
  • npm run build: succeeded, produced dist/ including all patterns/archetypes/*.json.

Candidates deliberately left out

  • Weekly repo tree map / weekly issue activity charts (weekly-repo-map.md, weekly-issue-activity.md, repo-chronicle.md) — all three use upload-asset for charts/visuals, but this is already represented by the existing extras.charts entry in workflow-generation.json and the community-digest archetype's create-discussion guidance; not a new gap.
  • AI Moderator's skip-roles/skip-bots/lock-for-agent combo (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 in syntax-core.md), so it does not meet the two-workflow-or-documented-pattern bar.
  • assign-to-agent auto-triage (issue-monster.md, duplicate-code-detector.md, large-file-simplifier.md) — while assign-to-agent appears 3 times, it's already listed as a safe output in the existing issue-triage configuration profile in manifest.json, so it isn't a net-new capability gap.
  • New standalone archetype for repo-status/team-status/repo-chronicle "daily activity narrative issue" — this shape is already fully covered by the existing status-report and community-digest archetypes (issue vs. discussion output), so a new archetype would be a near-duplicate.

Generated by Pattern Miner · copilot · auto · 259 AIC · ⌖ 10.8 AIC · ⊞ 8.7K ·

…tream mining

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review September 13, 2026 22:26
@pelikhan
pelikhan merged commit 3a9ce9e into main Sep 13, 2026
1 check passed
@pelikhan
pelikhan deleted the pattern-mining/all-you-can-eat-and-cross-repo-tips-c5c23ffcdde99904 branch September 13, 2026 22:26

@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.

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 tip
  • contribution-guidelines-checker.json: cross-repo monitoring via target-repo tip

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

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.

1 participant