Skip to content

Pattern quality: Add duplicate-prevention tip to status-report archetype - #172

Merged
pelikhan merged 1 commit into
mainfrom
fix/status-report-dedup-tip-4637c6ed64a88bc0
Aug 28, 2026
Merged

Pattern quality: Add duplicate-prevention tip to status-report archetype#172
pelikhan merged 1 commit into
mainfrom
fix/status-report-dedup-tip-4637c6ed64a88bc0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What was evaluated

I evaluated all 6 samples in /tmp/gh-aw/data/generated-patterns-and-prompts.json (status-report, issue-triage, code-improvement, documentation-updater, dependency-monitor, pr-review) against the pattern data in patterns/archetypes/*.json and the prompt-generation logic in src/js/workflow.js.

Recurring quality issue found

src/js/workflow.js already has a duplicatePreventionTips() helper that surfaces any archetype tip matching skip-if-match|tracker-id|expires into the generated prompt as an explicit "Prevent duplicate scheduled findings" requirement. dependency-monitor and security-scanner — both schedule-triggered archetypes whose safe output is create-issue — already carry this tip and it correctly reaches the downstream prompt.

status-report has the exact same shape (schedule trigger, create-issue safe output, as seen in the status-report-daily sample), but its archetype file had no dedup tip. As a result, the generated wizard prompt for status-report-daily told the downstream agent to add a pre-fetch step and DO-NOT constraints, but never mentioned deduplication. A Monday–Friday scheduled status-report workflow built from this prompt as-is would create a brand-new issue every single run with no skip-if-match/tracker-id guard, so daily reports would accumulate as separate open issues indefinitely instead of updating/replacing a rolling report issue — the same failure mode the existing duplicatePreventionTips() logic was specifically built to prevent for the sibling archetypes.

What changed

  • patterns/archetypes/status-report.json: added a tip, "Use skip-if-match and expires on create-issue so scheduled reports don't accumulate as duplicate open issues", matching the phrasing style of the existing dependency-monitor/security-scanner tips. No generator code changes were needed — the existing duplicatePreventionTips() regex already picks this up automatically.
  • test/workflow.test.js: updated the existing test surfaces duplicate-prevention guidance for scheduled findings archetypes, which previously asserted status-report should not contain this guidance, to instead assert it does (matching the new, correct behavior).

Validation

  • npm test: 199/199 passed
  • npm run build: succeeded

Follow-ups deliberately left out

  • issue-hierarchy-manager and user-simulator are also schedule + create-issue archetypes without a dedup tip, but they weren't in the evaluated sample set and their found-issue semantics differ enough (hierarchy sync vs. persona simulation) that I didn't want to guess at appropriate tip wording without more evidence. Worth a follow-up pass.
  • repo-maintainer combines reaction/slash_command/schedule triggers with issues+pull-requests outputs but also lacks a dedup tip; same reasoning — left out to keep this change minimal and evidence-based.

Generated by Pattern Quality Eval · auto · 69.9 AIC · ⌖ 6.82 AIC · ⊞ 7.6K ·

status-report is a schedule-triggered archetype with create-issue as its
safe output, identical in shape to dependency-monitor and security-scanner
(also schedule + create-issue). Those two archetypes already carry a
skip-if-match/expires tip that the generator surfaces in the wizard prompt
as 'Prevent duplicate scheduled findings'. status-report had no such tip,
so a Monday-Friday scheduled status-report workflow would create a brand
new issue on every run with no dedup guidance reaching the downstream
agent, causing duplicate/accumulating status-report issues over time.

Added a matching tip to patterns/archetypes/status-report.json so the
existing duplicatePreventionTips() surfacing logic in src/js/workflow.js
picks it up automatically, and updated the test that previously asserted
status-report should NOT contain this guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review August 28, 2026 04:01
@pelikhan
pelikhan merged commit 716be80 into main Aug 28, 2026
1 check passed
@pelikhan
pelikhan deleted the fix/status-report-dedup-tip-4637c6ed64a88bc0 branch August 28, 2026 04:01

@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: matt-pocock (auto-dispatched — change touches patterns/archetypes/status-report.json data plus a test/workflow.test.js assertion update)

No blocking issues found. The change is minimal and well-justified:

  • The added tip string matches the existing phrasing/regex convention used by duplicatePreventionTips() (skip-if-match|tracker-id|expires), so it correctly flows through to the generated prompt without any generator code changes.
  • The corresponding test was updated to assert the new (correct) behavior rather than the old absence-of-guidance behavior, and the PR description reports 199/199 tests passing plus a successful build.
  • Scope is appropriately narrow — the PR explicitly declines to touch issue-hierarchy-manager, user-simulator, and repo-maintainer pending further evidence, which is a reasonable, low-risk boundary for a data-only fix.

No further changes requested.

Generated by Specialist PR Review for #172 · auto · 13.6 AIC · ⌖ 1.66 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