Pattern quality: Add duplicate-prevention tip to status-report archetype - #172
Merged
Merged
Conversation
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>
Contributor
Author
There was a problem hiding this comment.
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, andrepo-maintainerpending 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
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.
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 inpatterns/archetypes/*.jsonand the prompt-generation logic insrc/js/workflow.js.Recurring quality issue found
src/js/workflow.jsalready has aduplicatePreventionTips()helper that surfaces any archetype tip matchingskip-if-match|tracker-id|expiresinto the generated prompt as an explicit "Prevent duplicate scheduled findings" requirement.dependency-monitorandsecurity-scanner— both schedule-triggered archetypes whose safe output iscreate-issue— already carry this tip and it correctly reaches the downstream prompt.status-reporthas the exact same shape (schedule trigger,create-issuesafe output, as seen in thestatus-report-dailysample), but its archetype file had no dedup tip. As a result, the generated wizard prompt forstatus-report-dailytold 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 existingduplicatePreventionTips()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 existingduplicatePreventionTips()regex already picks this up automatically.test/workflow.test.js: updated the existing testsurfaces 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 passednpm run build: succeededFollow-ups deliberately left out
issue-hierarchy-manageranduser-simulatorare 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-maintainercombinesreaction/slash_command/scheduletriggers withissues+pull-requestsoutputs but also lacks a dedup tip; same reasoning — left out to keep this change minimal and evidence-based.