Skip to content

Pattern miner: Add protected-files tip to code-improvement and documentation-updater archetypes - #161

Merged
pelikhan merged 1 commit into
mainfrom
pattern-miner-protected-files-29432-ac304ede06ce5510
Aug 26, 2026
Merged

Pattern miner: Add protected-files tip to code-improvement and documentation-updater archetypes#161
pelikhan merged 1 commit into
mainfrom
pattern-miner-protected-files-29432-ac304ede06ce5510

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What was mined

Sources examined:

  • githubnext-agentics workflows (/tmp/gh-aw/data/upstream/githubnext-agentics/files/workflows/*.md), 55 files
  • github-gh-aw docs (/tmp/gh-aw/data/upstream/github-gh-aw/files/.github/aw/*.md), used only to confirm current gh-aw v0.87+ frontmatter support

Recurring pattern found

16 of the upstream githubnext-agentics workflows that use create-pull-request safe outputs set protected-files: fallback-to-issue explicitly, rather than relying on the default (request_review/blocked):

adhoc-qa.md, agentic-wiki-coder.md, ci-coach.md, code-simplifier.md, doc-updater.md, glossary-maintainer.md, link-checker.md, perf-improver.md, repo-assist.md, tech-content-editorial-board.md (via if-no-changes), test-improver.md, unbloat-docs.md, update-docs.md, plus supporting docs in github-gh-aw/files/.github/aw/safe-outputs-content.md and safe-outputs-management.md, which document protected-files as the primary guardrail for create-pull-request/push-to-pull-request-branch alongside allowed-files.

This is a genuinely recurring, cross-repo convention (13+ upstream workflows) plus explicit upstream documentation recommending it, satisfying the "at least two upstream workflows, or one plus explicit docs" bar.

Why the existing library did not cover it

patterns/archetypes/code-improvement.json and patterns/archetypes/documentation-updater.json (the two curated/measured archetypes that recommend create-pull-request) already advise scoping changes and using DO NOT constraints, but neither mentioned the protected-files safe-output setting that prevents unreviewed PRs from touching manifests, CI configs, or agent instruction files. No other archetype tip or anti-pattern entry references protected-files.

What changed

  • patterns/archetypes/code-improvement.json: added one tip recommending protected-files: fallback-to-issue on create-pull-request.
  • patterns/archetypes/documentation-updater.json: added the same tip, scoped to manifests/CI configs.

No other fields (success_rate, count, top_repos, anti_patterns, metadata, trigger_combos, research_findings) were touched. patterns/manifest.json and patterns/workflow-generation.json were left unchanged since this is a tips-only refinement, not a new archetype or a runtime-generation change.

Validation

  • npm test: 187 passed (12 test files), no failures.
  • npm run build: succeeded, produced dist/ including updated patterns/archetypes/code-improvement.json and documentation-updater.json.

Candidates deliberately left out

  • New deployment_status / workflow_run incident-triage archetype: only 2 upstream workflows (ci-doctor.md, cost-tracker.md) use workflow_run, and none use deployment_status directly (only referenced in docs). workflow_run is already flagged as high-risk (13% success) in research_findings/trigger_combos, so a new archetype built around it would contradict existing guidance rather than add value.
  • Duplicate-code / large-file "assign to copilot" pattern: only 2 upstream workflows (duplicate-code-detector.md, large-file-simplifier.md) use assignees: copilot on create-issue, below the 2-workflow-plus-docs bar for a full archetype, and the underlying shape is already close to code-health-auditor.
  • Link-checker as a distinct archetype: only 1 clear upstream example (link-checker.md); the shape (schedule + create-pull-request + docs scope) overlaps heavily with documentation-updater.

Generated by Pattern Miner · auto · 105.2 AIC · ⌖ 10.2 AIC · ⊞ 8.3K ·

… archetypes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review August 26, 2026 06:11
@pelikhan
pelikhan merged commit 90fd337 into main Aug 26, 2026
1 check passed
@pelikhan
pelikhan deleted the pattern-miner-protected-files-29432-ac304ede06ce5510 branch August 26, 2026 06:11

@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 kind: auto (no TS/JS or UI files changed — this PR only edits patterns/archetypes/*.json data files).

Reviewed the two-line tip additions to code-improvement.json and documentation-updater.json. Both are well-scoped, factually consistent with cited upstream evidence (protected-files: fallback-to-issue usage across 16 upstream workflows), and match the existing tips array style/format. No correctness, security, or structural JSON issues found. No blocking changes requested.

Generated by Specialist PR Review for #161 · auto · 11.6 AIC · ⌖ 2.39 AIC · ⊞ 7.9K

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