Skip to content

fix(prompts): regen base-style override explicitly includes canvas + sizing#7406

Merged
MarkusNeusinger merged 1 commit into
mainfrom
style/regen-canvas-override
May 19, 2026
Merged

fix(prompts): regen base-style override explicitly includes canvas + sizing#7406
MarkusNeusinger merged 1 commit into
mainfrom
style/regen-canvas-override

Conversation

@MarkusNeusinger
Copy link
Copy Markdown
Owner

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:

  • canvas size (figsize/dpi, width/height/scale_factor, native width/height)
  • font sizes (title, axis, tick, legend)
  • marker + line sizes
  • palette + theme tokens + chrome (already covered, kept)

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

  • CI green
  • After merge: re-trigger seaborn / altair / ggplot2 for timeseries-forecast-uncertainty → all three should produce 3200×1800 canvas in line with the other 7

🤖 Generated with Claude Code

…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.
Copilot AI review requested due to automatic review settings May 19, 2026 14:14
@MarkusNeusinger MarkusNeusinger enabled auto-merge (squash) May 19, 2026 14:14
@MarkusNeusinger MarkusNeusinger merged commit 13cf813 into main May 19, 2026
8 checks passed
@MarkusNeusinger MarkusNeusinger deleted the style/regen-canvas-override branch May 19, 2026 14:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants