fix(prompts): regen base-style override explicitly includes canvas + sizing#7406
Merged
Conversation
…r preserved old impl Today's fan-out (#7395-#7405 for timeseries-forecast-uncertainty) showed that 3 of 10 libraries — seaborn (#7396), altair (#7398), ggplot2 (#7403) — kept their OLD 4800×2700 / 3600×3600 canvas + old fontsize values (figsize=(16,9) dpi=300, width=1600 scale_factor=3, ggsave width=16 height=9 dpi=300) even though the library prompts had been updated to 3200×1800 sizing. Root cause: the "Default regen mindset" instruction in impl-generate-claude.md already said "base style wins over previous implementation", but listed only "palette, theme colors, chrome, etc." as examples. Claude read that as exhaustive and didn't apply the override to canvas / fontsize / marker / line-size changes, because the previous review hadn't flagged the (then-valid) old values. The fix makes the rule explicit: base style wins on EVERY axis where it has an opinion — canvas size, font sizes, marker/line sizes, palette, theme tokens, chrome — and instructs the AI to re-read the library prompt's "Sizing" section + the style guide's "Visual Sizing Defaults" table on every regen, not just rely on the previous review's strengths/weaknesses list. Re-triggering seaborn / altair / ggplot2 after this lands should produce the new 3200×1800 sizing in line with the other 7 libraries.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the regeneration guidance in the Claude implementation-generation workflow prompt so that “base style wins” is interpreted broadly (including canvas sizing and sizing-related style defaults), preventing regressions where regenerated implementations keep outdated canvas/font/mark sizes.
Changes:
- Expands the regeneration “base style wins” rule to explicitly include canvas size, font sizes, marker/line sizes, and theme/palette/chrome tokens.
- Adds an explicit instruction to re-read sizing guidance in the library prompt and the “Visual Sizing Defaults” table during regeneration.
| - Preserve the bits listed under "Strengths" unchanged. | ||
| - Address every bullet under "Weaknesses" and each ❌ item in the criteria checklist. | ||
| - If a base style rule (palette, theme colors, chrome, etc. from `prompts/default-style-guide.md` or `prompts/library/{LIBRARY}.md`) conflicts with the previous implementation, update the previous code to match — base style wins. | ||
| - **Base style ALWAYS wins.** If anything in `prompts/default-style-guide.md` or `prompts/library/{LIBRARY}.md` differs from the previous implementation, update the previous code to match. This explicitly includes — but is not limited to — **canvas size** (`figsize`/`dpi` for matplotlib/seaborn/plotnine/ggplot2, `width`/`height`/`scale_factor` for plotly/altair/letsplot, `width`/`height` for bokeh/highcharts/pygal), **font sizes** (title, axis labels, tick labels, legend), **marker and line sizes**, **palette** (Okabe-Ito positions), **theme tokens** (background, INK, INK_SOFT, ELEVATED_BG, GRID), and **chrome** (spines, gridlines, legend frame). The previous review may not have flagged the old values because they were valid at the time — that does NOT make them current. Always re-read the library prompt's "Sizing" section and the style guide's "Visual Sizing Defaults" table on every regen and align. |
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
Today's bulk-generate fan-out (#7395-#7405) revealed a regen-mindset bug: 3 of 10 libraries (seaborn #7396, altair #7398, ggplot2 #7403) kept their OLD 4800×2700 / 3600×3600 canvas + old fontsizes even though the library prompts had been updated to 3200×1800.
Root cause
`impl-generate-claude.md` already said "base style wins over previous implementation" — but listed only "palette, theme colors, chrome, etc." as the affected dimensions. Claude treated that list as exhaustive and assumed canvas / fontsize / marker / line-size changes were NOT in scope, since the previous review hadn't flagged the (then-valid) old values.
Fix
Made the override rule explicit on every axis where the base style has an opinion:
Plus: instruct the AI to re-read the library prompt's "Sizing" section + the style guide's "Visual Sizing Defaults" table on every regen, not just rely on what the previous review flagged.
Test plan
🤖 Generated with Claude Code