Skip to content

Pattern miner: Mine upstream patterns: chart digests, agent-delegation, and PR throttling tips - #304

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
pattern-miner/chart-digest-and-agent-delegation-tips-8df749dd097307ad
Draft

github-actions[bot] wants to merge 1 commit into
mainfrom
pattern-miner/chart-digest-and-agent-delegation-tips-8df749dd097307ad

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Mined upstream githubnext/agentics workflow samples and github/gh-aw reusable-guidance docs for recurring shapes not yet reflected in the curated pattern library, then added three small, evidence-backed tip refinements.

Sources mined

  • /tmp/gh-aw/data/upstream/githubnext-agentics/files/workflows/*.md (58 workflow files)
  • /tmp/gh-aw/data/upstream/github-gh-aw/files/.github/aw/*.md (68 reusable-guidance docs)

Recurring patterns found and why they weren't already covered

1. Chart-and-discussion digests (community-digest)

  • Evidence: repo-chronicle.md and weekly-issue-activity.md both combine upload-asset with create-discussion to publish Python-generated trend charts embedded via returned URLs; charts.md and charts-trending.md document this as the recommended pattern for chart-bearing periodic reports.
  • Gap: the community-digest archetype already recommended create-discussion for narrative digests but had no tip on how to add charts to that narrative — charts were only exposed as a generic "extra" capability, disconnected from the digest use case. Two upstream workflows plus two supporting docs corroborate the shape (exceeds the 2-workflow threshold).
  • Change: added one tip to patterns/archetypes/community-digest.json describing the upload-asset + pre-step chart-generation + embed-by-URL flow.

2. Scheduled backlog item handed to an implementation agent (backlog-drip)

  • Evidence: issue-monster.md pairs a scheduled, one-item-at-a-time trigger shape (already the shape captured by backlog-drip) with the assign-to-agent safe output (allowed: [copilot], ignore-if-error: true) instead of merely creating an issue for a human. safe-outputs-automation.md and designer-mappings.md document assign-to-agent as the general-purpose way to route work to the Copilot coding agent, corroborating this as a supported, recommended pairing rather than a one-off.
  • Gap: backlog-drip only recommended create-issue; nothing in the library described the alternative of auto-delegating the served item to an agent.
  • Change: added one tip to patterns/archetypes/backlog-drip.json describing the assign-to-agent addition and its ignore-if-error safeguard.

3. Pre-activation PR-count throttle for proactive maintainer workflows (repo-maintainer)

  • Evidence: repo-assist.md, ci-coach.md, efficiency-improver.md, and glossary-maintainer.md all gate scheduled runs behind a steps:-level check that counts open PRs sharing the workflow's title prefix and skips the run past a threshold (MAX_OPEN_PRS), to avoid spamming maintainers. repo-maintainer's own anti_patterns list already cites repo-assist three times as an observed failure mode, and other archetypes in the library (code-improvement, daily-test-improver, documentation-updater, link-checker, linter-applier, performance-nut) already carry this exact tip — repo-maintainer was the one proactive, PR-creating, schedule-capable archetype missing it.
  • Change: added the same standard tip (worded identically to its use elsewhere in the library) to patterns/archetypes/repo-maintainer.json.

What changed in patterns/

  • patterns/archetypes/community-digest.json: +1 tip (chart embedding via upload-asset)
  • patterns/archetypes/backlog-drip.json: +1 tip (assign-to-agent delegation)
  • patterns/archetypes/repo-maintainer.json: +1 tip (pre-activation PR-count throttle)

No new archetype was added, manifest.json/workflow-generation.json were left untouched (the refinements only edit tips fields), and metadata, anti_patterns, trigger_combos, research_findings, degraded_workflows, success_rate, count, and top_repos were not modified anywhere.

Validation

  • npm test: 325 passed, 2 failed — the 2 failures (test/copilot-instructions.test.js) are pre-existing on main before this change (verified via git stash), caused by a stale generated_at date / archetype count mismatch unrelated to this diff.
  • npm run build: succeeded (✓ built in 154ms), all three edited archetype JSON files copied into dist/patterns/archetypes/ with updated sizes.

Candidates deliberately left out

  • Multi-device/responsive docs testing (multi-device-docs-tester.md): only one upstream workflow demonstrates this shape with no corroborating doc recommending it as a named pattern — below the two-workflow threshold for a new archetype.
  • CI cost/efficiency optimization (ci-coach.md, efficiency-improver.md): two upstream workflows exist but they target different KPIs (CI runtime/cost vs. energy/computational footprint) and neither is documented as a named pattern in patterns.md's pattern index; the existing code-improvement and agent-cost-tracker archetypes already cover adjacent ground, so a new archetype risked redundancy without stronger evidence.
  • Discussion-mining into issues (discussion-task-miner.md): only one upstream workflow; no second example or explicit doc recommendation found.
  • Mermaid diagram generation on demand (archie.md): only one clear standalone example (lean-squad.md/agentic-wiki-writer.md/tech-content-editorial-board.md use mermaid incidentally within much larger, already-distinct archetypes, not as the primary shape) — did not meet the corroboration bar for a dedicated archetype or tip.
  • label_command as a primary trigger for an archetype: documented in workflow-patterns.md and triggers.md, but no upstream agentics workflow uses it as its sole/primary trigger, so there isn't a concrete workflow shape to attach a refinement to yet.

Generated by Pattern Miner · copilot · auto · 362.8 AIC · ⌖ 9.82 AIC · ⊞ 8.3K · ◷

…ream mining

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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