Skip to content

Pattern quality: Add protected-files guidance to dependency-monitor pattern - #251

Merged
pelikhan merged 2 commits into
mainfrom
pattern-quality-dependency-monitor-protected-files-aedf43978be228cd
Sep 2, 2026
Merged

Pattern quality: Add protected-files guidance to dependency-monitor pattern#251
pelikhan merged 2 commits into
mainfrom
pattern-quality-dependency-monitor-protected-files-aedf43978be228cd

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Evaluation

Evaluated the 6 samples in /tmp/gh-aw/data/generated-patterns-and-prompts.json against patterns/manifest.json, patterns/workflow-generation.json, patterns/archetypes/*.json, and the generator logic in src/js/workflow.js.

Recurring quality issue found

dependency-monitor recommends create-pull-request (it opens unattended pull requests bumping dependency manifests on a schedule), but its pattern tips were missing protected-files guidance. Every other archetype in the pattern library that recommends create-pull-request (code-improvement, documentation-updater, linter-applier, performance-nut) already carries this tip, and src/js/workflow.js has a dedicated protectedFilesTips() function whose purpose is specifically to surface it into the generated prompt for archetypes that open PRs unattended — but with no matching tip in the pattern data, dependency-monitor's generated prompt silently skipped this guard. Confirmed against the sample: dependency-monitor-daily's generated prompt had no protected-files/fallback-to-issue mention, unlike code-improvement-daily's and documentation-updater-push's prompts.

Without this guard, a scheduled dependency-monitor workflow could open an unreviewed PR that also touches CI configuration or agent instruction files while updating manifests.

What changed

  • patterns/archetypes/dependency-monitor.json: added a tip recommending protected-files: fallback-to-issue for CI configuration and agent instructions (deliberately scoped to exclude the dependency manifests themselves, since editing those is the intended change for this archetype).
  • scripts/generate-patterns.py: added the same tip to the generator so future pattern regeneration retains it.
  • test/workflow.test.js: extended the existing "surfaces protected-files guidance for archetypes that open unattended PRs" test to also assert this for dependency-monitor.
  • test/generate-patterns.test.js: added an assertion that regenerated dependency-monitor tips still contain protected-files.

Validation

  • npm test: 318/318 tests passed (18 test files).
  • npm run build: succeeded, dist/patterns/archetypes/dependency-monitor.json regenerated with the new tip.

Follow-ups deliberately left out

  • Other non-PR archetypes (e.g. agent-cost-tracker, pr-iteration-loop) also lack a protected-files tip despite listing pull-requests as a safe output; left out of this PR to keep the change minimal and because their triggers/paths differ enough to warrant separate review of scope (e.g. agent-cost-tracker uses workflow_run, already flagged elsewhere as a risky trigger).

Generated by Pattern Quality Eval · copilot · auto · 126.7 AIC · ⌖ 9.58 AIC · ⊞ 7.8K ·

dependency-monitor is the only archetype recommending create-pull-request
that lacked protected-files guidance in its pattern tips, even though the
wizard's protectedFilesTips() generator function exists specifically to
surface this for archetypes that open unattended pull requests. This left
generated dependency-monitor workflow prompts without a guard against an
unreviewed scheduled PR touching CI configuration or agent instructions
while bumping dependency manifests.

Adds a scoped tip (protecting CI config/agent instructions, not the
manifests being intentionally updated) to patterns/archetypes/dependency-monitor.json
and the corresponding generator in scripts/generate-patterns.py, plus test
coverage in workflow.test.js and generate-patterns.test.js.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review September 2, 2026 23:32
@pelikhan
pelikhan merged commit 8e0c9c0 into main Sep 2, 2026
@pelikhan
pelikhan deleted the pattern-quality-dependency-monitor-protected-files-aedf43978be228cd branch September 2, 2026 23:32

@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 → matt-pocock (JS/JSON pattern-data and test changes; no HTML/UI/content touched).

No blocking issues found. Change is minimal, consistent with the existing pattern (mirrors tips already present on other PR-creating archetypes), and is covered by corresponding test updates in test/generate-patterns.test.js and test/workflow.test.js. No correctness, type-safety, or test-coverage concerns.

Generated by Specialist PR Review for #251 · copilot · auto · 13.9 AIC · ⌖ 4.79 AIC · ⊞ 8.1K

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