diff --git a/patterns/archetypes/status-report.json b/patterns/archetypes/status-report.json index 744393b..3745cb9 100644 --- a/patterns/archetypes/status-report.json +++ b/patterns/archetypes/status-report.json @@ -56,7 +56,8 @@ "Pre-fetch data in a steps: block \u2014 #1 predictor of workflow health", "Use schedule triggers for repeatable reporting", "Keep prompts focused on one report \u2014 multi-source reports need pre-steps", - "Use DO NOT constraints to prevent repository changes while generating reports" + "Use DO NOT constraints to prevent repository changes while generating reports", + "Use skip-if-match and expires on create-issue so scheduled reports don't accumulate as duplicate open issues" ], "anti_patterns": [ "daily-repo-status", diff --git a/test/workflow.test.js b/test/workflow.test.js index dea3c11..20a8744 100644 --- a/test/workflow.test.js +++ b/test/workflow.test.js @@ -508,9 +508,11 @@ describe('generateAgentPrompt', () => { expect(depPrompt).toContain('Prevent duplicate scheduled findings'); expect(depPrompt).toContain('skip-if-match'); - // status-report has no such tip and should not fabricate one. + // status-report also runs on a schedule and creates issues, so it needs the same + // dedup guidance to avoid reopening the same status report as a new issue every run. const reportPrompt = generateAgentPrompt(answers({ archetype: 'status-report' }), patterns); - expect(reportPrompt).not.toContain('Prevent duplicate scheduled findings'); + expect(reportPrompt).toContain('Prevent duplicate scheduled findings'); + expect(reportPrompt).toContain('skip-if-match'); }); it('surfaces protected-files guidance for archetypes that open unattended PRs', () => {