Pattern quality: Replace unactionable code-improvement tip with scoping guidance - #258
Merged
pelikhan merged 1 commit intoSep 5, 2026
Merged
Conversation
The code-improvement archetype tip referenced internal scan-data workflow names (pr-fix, ci-doctor) that aren't exposed anywhere in the wizard UI or generator. Downstream agents building a new workflow from this generated prompt have no way to act on 'avoid these templates' — it's noise, not guidance. Replaced with the underlying, actionable lesson: scope each code-improvement run to one narrow, well-defined fix rather than an open-ended mandate, which is what the low success rate of those degraded workflows actually reflects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pelikhan
marked this pull request as ready for review
September 5, 2026 00:47
pelikhan
deleted the
fix/code-improvement-tip-actionable-59babc9858c0a047
branch
September 5, 2026 00:48
There was a problem hiding this comment.
🟢 Approval recommended
The changes are a straightforward, consistent replacement of an unactionable tip in both the generator and generated output, with no detected functional or structural issues.
Pull request overview
This PR improves the quality of the wizard’s generated prompts by replacing an unactionable code-improvement archetype tip (referencing internal-only workflow/template names) with concrete scoping guidance that a downstream agent can actually follow.
Changes:
- Replaced the
code-improvementarchetype tip to emphasize narrowly scoped, well-defined improvements rather than “fix anything broken”. - Updated the source-of-truth generator (
scripts/generate-patterns.py) so the change persists across future pattern regenerations. - Regenerated the corresponding generated archetype data (
patterns/archetypes/code-improvement.json) to reflect the updated tip.
File summaries
| File | Description |
|---|---|
| scripts/generate-patterns.py | Updates the generated archetype configuration for code-improvement to use actionable scoping guidance in tips. |
| patterns/archetypes/code-improvement.json | Updates the generated archetype JSON tip string to match the new scoping guidance. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
Evaluated the wizard's generated pattern/prompt samples in
/tmp/gh-aw/data/generated-patterns-and-prompts.jsonacross all six archetypes (status-report, issue-triage, code-improvement, documentation-updater, dependency-monitor, pr-review) againstpatterns/manifest.json,patterns/workflow-generation.json, and the archetype files, plus the generator logic insrc/js/workflow.js.Recurring quality issue found
The
code-improvementarchetype's tips array included:generateAgentPromptinsrc/js/workflow.jssurfaces every archetype tip verbatim as a "Follow the workflow-specific guidance" bullet in the prompt sent to the downstream agent (confirmed in thecode-improvement-dailysample).pr-fixandci-doctorare internal workflow names from the underlying scan dataset (data/analysis-report.json'snew_patterns/degraded_workflows) — they aren't concepts exposed in the wizard UI, the generator code, or any other pattern file. A downstream agent asked to create a brand-new workflow from scratch has no workflow namedpr-fixorci-doctorto "avoid," so this instruction is unactionable noise rather than guidance, and risks confusing the agent into thinking it should check for/rename away from those literal names.What changed
Replaced the tip with the actionable lesson those two degraded patterns actually illustrate — that broad, unscoped "fix anything broken" code-improvement workflows have the lowest success rates — so the generated prompt gives the downstream agent something it can act on (scope each run to one narrow, well-defined improvement) instead of an opaque template name.
Files touched:
patterns/archetypes/code-improvement.json(generated pattern data)scripts/generate-patterns.py(source of truth so the fix survives the nextnpm run generate-patterns/ weekly scan regeneration)Validation
npm test— 319 passed (18 test files), no failures. The only non-test-related error is a pre-existing CI artifact-write warning (step_summary_...ENOENT) unrelated to this change.npm run build— succeeded,dist/patterns/archetypes/code-improvement.jsonrebuilt with the new tip.Follow-up ideas deliberately left out
\b[a-z]+-[a-z]+\bwith no wizard-facing referent) to catch this class of issue automatically — left out to keep this change minimal and avoid new tooling.