Pattern miner: Mine upstream patterns: chart digests, agent-delegation, and PR throttling tips - #304
Draft
github-actions[bot] wants to merge 1 commit into
Conversation
…ream mining Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mined upstream
githubnext/agenticsworkflow samples andgithub/gh-awreusable-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)repo-chronicle.mdandweekly-issue-activity.mdboth combineupload-assetwithcreate-discussionto publish Python-generated trend charts embedded via returned URLs;charts.mdandcharts-trending.mddocument this as the recommended pattern for chart-bearing periodic reports.community-digestarchetype already recommendedcreate-discussionfor 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).patterns/archetypes/community-digest.jsondescribing theupload-asset+ pre-step chart-generation + embed-by-URL flow.2. Scheduled backlog item handed to an implementation agent (
backlog-drip)issue-monster.mdpairs a scheduled, one-item-at-a-time trigger shape (already the shape captured bybacklog-drip) with theassign-to-agentsafe output (allowed: [copilot],ignore-if-error: true) instead of merely creating an issue for a human.safe-outputs-automation.mdanddesigner-mappings.mddocumentassign-to-agentas the general-purpose way to route work to the Copilot coding agent, corroborating this as a supported, recommended pairing rather than a one-off.backlog-driponly recommendedcreate-issue; nothing in the library described the alternative of auto-delegating the served item to an agent.patterns/archetypes/backlog-drip.jsondescribing theassign-to-agentaddition and itsignore-if-errorsafeguard.3. Pre-activation PR-count throttle for proactive maintainer workflows (
repo-maintainer)repo-assist.md,ci-coach.md,efficiency-improver.md, andglossary-maintainer.mdall gate scheduled runs behind asteps:-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 ownanti_patternslist already citesrepo-assistthree 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-maintainerwas the one proactive, PR-creating, schedule-capable archetype missing it.patterns/archetypes/repo-maintainer.json.What changed in
patterns/patterns/archetypes/community-digest.json: +1 tip (chart embedding viaupload-asset)patterns/archetypes/backlog-drip.json: +1 tip (assign-to-agentdelegation)patterns/archetypes/repo-maintainer.json: +1 tip (pre-activation PR-count throttle)No new archetype was added,
manifest.json/workflow-generation.jsonwere left untouched (the refinements only edittipsfields), andmetadata,anti_patterns,trigger_combos,research_findings,degraded_workflows,success_rate,count, andtop_reposwere not modified anywhere.Validation
npm test: 325 passed, 2 failed — the 2 failures (test/copilot-instructions.test.js) are pre-existing onmainbefore this change (verified viagit stash), caused by a stalegenerated_atdate / archetype count mismatch unrelated to this diff.npm run build: succeeded (✓ built in 154ms), all three edited archetype JSON files copied intodist/patterns/archetypes/with updated sizes.Candidates deliberately left out
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-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 inpatterns.md's pattern index; the existingcode-improvementandagent-cost-trackerarchetypes already cover adjacent ground, so a new archetype risked redundancy without stronger evidence.discussion-task-miner.md): only one upstream workflow; no second example or explicit doc recommendation found.archie.md): only one clear standalone example (lean-squad.md/agentic-wiki-writer.md/tech-content-editorial-board.mduse 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_commandas a primary trigger for an archetype: documented inworkflow-patterns.mdandtriggers.md, but no upstreamagenticsworkflow uses it as its sole/primary trigger, so there isn't a concrete workflow shape to attach a refinement to yet.