Pattern quality: Show concrete YAML schema for skip-if-match/expires in generated prompts - #180
Merged
pelikhan merged 1 commit intoAug 29, 2026
Conversation
The generated prompt only told downstream agents to 'Use skip-if-match and expires on create-issue' in prose, with no example of where these fields belong in the YAML frontmatter. The suggested starter workflow in the same prompt also omitted them entirely from its safe-outputs block, so a downstream agent had no concrete model to follow and could easily misplace skip-if-match under safe-outputs instead of on:, or omit the feature altogether. This adds a short YAML snippet (based on gh-aw's workflow-patterns.md and report.md) showing skip-if-match as a sibling of schedule: under on:, and expires/max nested under the specific safe-output key. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pelikhan
approved these changes
Aug 29, 2026
pelikhan
marked this pull request as ready for review
August 29, 2026 01:43
pelikhan
deleted the
fix/skip-if-match-schema-guidance-9ae881c7133b1aaa
branch
August 29, 2026 01:43
Contributor
Author
There was a problem hiding this comment.
Reviewer kind: matt-pocock (JS-only change to prompt-generation logic).
Reviewed the diff in src/js/workflow.js and the added test in test/workflow.test.js. The change adds a concrete YAML schema example clarifying skip-if-match (sibling of schedule: under on:) vs expires/max (nested under the safe-output key). This is a template-string addition with no control-flow changes, guarded behind the existing duplicateTips.length check, and is covered by a new targeted test that asserts the exact string shape. No correctness, type-safety, or test-coverage issues found — no blocking feedback.
Generated by Specialist PR Review for #180 · auto · 15.2 AIC · ⌖ 1.94 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
Read
/tmp/gh-aw/data/generated-patterns-and-prompts.json(6 archetype samples),patterns/manifest.json,patterns/workflow-generation.json,patterns/archetypes/*.json, and the generator (src/js/workflow.js,src/js/patterns.js). Cross-checked the generatedstatus-report-dailyanddependency-monitor-dailyprompts against gh-aw's actual reference docs (workflow-patterns.md,report.md,triggers.md) fetched live fromgithub/gh-aw.Recurring quality issue found
Four archetypes (
status-report,security-scanner,code-improvement,dependency-monitor,documentation-updater,code-health-auditor) carry a tip telling the downstream agent to addskip-if-matchandexpiresto prevent duplicate scheduled findings. That tip already reaches the generated prompt (doNotConstraints/duplicatePreventionTipsinworkflow.js), but only as prose:The prompt's own "Suggested workflow file" starter YAML never demonstrates this — its
safe-outputs:block is a barecreate-issue:with noskip-if-match/expiresanywhere. Per gh-aw's actual syntax,skip-if-matchis a sibling key ofschedule:underon:, whileexpires/maxnest under the specific safe-output key (e.g.create-issue:) insidesafe-outputs:. With prose-only guidance and no example, a downstream agent generating the real workflow has no concrete model and is likely to misplace these fields (e.g. putskip-if-matchundersafe-outputs:) or drop the feature entirely — silently reintroducing the exact duplicate-issue-spam problem the tip exists to prevent.What changed
In
src/js/workflow.js, immediately after the existing "Prevent duplicate scheduled findings" bullet, the generated prompt now includes a concrete YAML snippet showing the correct schema:This only appears for archetypes whose pattern tips already mention
skip-if-match/expires/tracker-id, so it doesn't add noise to prompts that don't need it.Added a targeted test in
test/workflow.test.jsasserting the schema snippet appears with the correct key nesting for thestatus-reportarchetype.Validation
npm test— 205/205 passed (added 1 new test)npm run build— succeededFollow-ups deliberately left out
tracker-id,close-older-issues) — scoping this fix to the specific ambiguity found in the sampled prompts.patterns/from scan data, per task constraints.