Skip to content

prompts: name the palette "Imprint" consistently in regen prompts#7892

Merged
MarkusNeusinger merged 5 commits into
mainfrom
claude/daily-regen-palette-naming-g7AFR
May 28, 2026
Merged

prompts: name the palette "Imprint" consistently in regen prompts#7892
MarkusNeusinger merged 5 commits into
mainfrom
claude/daily-regen-palette-naming-g7AFR

Conversation

@MarkusNeusinger
Copy link
Copy Markdown
Owner

Summary

Bug reported on https://anyplot.ai/debug:

Der Daily-Regen-Prozess, der die Implementationen neu macht, der nennt die Farbpalette oft Anyplot Palette und nicht Imprint. Wir sollten da einen einheitlichen Stil fahren und die Palette überall Imprint nennen.

The public docs (docs/reference/style-guide.md) and the frontend (app/src/pages/PalettePage.tsx, app/src/components/PaletteStrip.tsx) already call the categorical palette Imprint. But the LLM-driving prompts under prompts/ (which impl-generate / impl-review / impl-repair / impl-similarity / daily-regen's pre-flight all read) still called it the "anyplot palette" — and Sonnet / Haiku faithfully echoed that wording into the metadata YAMLs they wrote (e.g. plots/box-basic/metadata/python/altair.yaml:110 "anyplot palette, white median stroke…", plots/area-basic/metadata/python/pygal.yaml:18 "anyplot palette in…"). So every daily-regen run reintroduced the inconsistent naming.

This PR renames "anyplot palette" → "Imprint palette" across every prompt the regen pipeline reads, and adds explicit instructions to use Imprint (capitalised) in code comments, metadata, and review notes:

  • prompts/default-style-guide.md — the canonical source the per-library prompts reference
  • prompts/plot-generator.md, prompts/quality-criteria.md, prompts/quality-evaluator.md
  • prompts/library/*.md (all 11 libraries)
  • prompts/workflow-prompts/{impl-generate,impl-repair,impl-similarity,ai-quality-review}-claude.md
  • agentic/commands/regen.md (local-friendly regen command)

The ANYPLOT_PALETTE Python constant is left in place — it's a code-level identifier referenced from core/images.py, scripts/migrate_to_imprint.py, and the PalettePage.tsx code snippets, and renaming it would be an unrelated cross-cutting refactor. The user complaint is about the human-readable palette name in metadata/comments/reviews, which is what this PR fixes.

Existing metadata under plots/*/metadata/ still contains "anyplot palette" strings; those will get rewritten the next time daily-regen picks each spec, and the new impl-generate prompt explicitly tells the generator to normalise stale wording in the previous code's comments on regen.

Test plan

  • uv run pytest tests/unit/prompts/test_prompts.py tests/unit/agentic/regen/test_metadata.py — 92 passed
  • grep -rn -i "anyplot palette\|anyplot cmap\|anyplot continuous" prompts/ returns only the meta-instructions that explicitly tell the LLM not to use "anyplot palette"
  • Next daily-regen tick (Sonnet) writes metadata YAMLs that say "Imprint palette" rather than "anyplot palette"

https://claude.ai/code/session_01AiEP5JeqCK8bQRz4AbnvT2


Generated by Claude Code

The daily-regen pipeline reads prompts/default-style-guide.md, the
library prompts, and the workflow prompts to write implementations,
metadata, and review notes. Those prompts called the categorical palette
"anyplot palette" while the public docs and frontend already call it
"Imprint" — so regenerated metadata frequently labelled it "anyplot
palette" rather than "Imprint", as reported on /debug.

Rename "anyplot palette" → "Imprint palette" across every prompt the
generate / review / repair / similarity stages read, and add explicit
instructions to use "Imprint" (capitalised) in code comments, metadata,
and review notes. The ANYPLOT_PALETTE Python constant is left in place
since it's a code-level identifier shared with core/images.py and the
migration script. Also update the lone test fixture string for
consistency.

https://claude.ai/code/session_01AiEP5JeqCK8bQRz4AbnvT2
Copilot AI review requested due to automatic review settings May 28, 2026 17:12
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

This PR standardizes the human-readable name of the project’s categorical color palette to “Imprint” across the prompt suite that drives implementation generation/review/repair/similarity checks (and regen docs/tests), preventing daily-regen from reintroducing “anyplot palette” wording into metadata and review text.

Changes:

  • Renames “anyplot palette” → “Imprint palette” across core style-guide and workflow prompts (generate/repair/similarity/quality review).
  • Updates per-library prompt docs to consistently instruct “Imprint” wording for categorical and continuous palette guidance.
  • Adjusts regen command docs and a unit test fixture string to match the new naming.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/agentic/regen/test_metadata.py Updates test fixture text to reference “Imprint palette”.
prompts/workflow-prompts/impl-similarity-claude.md Uses “Imprint palette” terminology in similarity audit rules.
prompts/workflow-prompts/impl-repair-claude.md Updates repair prompt references to “Imprint palette” and related guidance.
prompts/workflow-prompts/impl-generate-claude.md Updates generation prompt references and adds explicit instruction to say “Imprint” in comments/metadata.
prompts/workflow-prompts/ai-quality-review.md Updates review prompt palette naming and reinforces “Imprint” wording in notes.
prompts/quality-evaluator.md Updates evaluator prompt to use “Imprint palette” terminology consistently.
prompts/quality-criteria.md Updates quality criteria rubric text to reference “Imprint palette”.
prompts/plot-generator.md Updates base generator guidance and example comments to “Imprint palette”.
prompts/library/seaborn.md Updates seaborn library prompt palette naming (categorical + continuous).
prompts/library/pygal.md Updates pygal library prompt palette naming.
prompts/library/plotnine.md Updates plotnine library prompt palette naming.
prompts/library/plotly.md Updates plotly library prompt palette naming.
prompts/library/matplotlib.md Updates matplotlib library prompt palette naming.
prompts/library/makie.md Updates makie library prompt palette naming.
prompts/library/letsplot.md Updates lets-plot library prompt palette naming.
prompts/library/highcharts.md Updates highcharts library prompt palette naming.
prompts/library/ggplot2.md Updates ggplot2 library prompt palette naming.
prompts/library/bokeh.md Updates bokeh library prompt palette naming.
prompts/library/altair.md Updates altair library prompt palette naming.
prompts/default-style-guide.md Updates the canonical style guide to call the palette “Imprint” and adds explicit naming instructions.
agentic/commands/regen.md Updates regen command documentation to reference “Imprint palette”.

Comment thread prompts/default-style-guide.md Outdated
### Categorical Palette (anyplot, canonical order)
### Categorical Palette (Imprint, canonical order)

8 hues in hybrid-v3 sort order. First 4 slots span 4 distinct perceptual hue families (green / purple / blue / yellow), then greedy max-min CVD distance for the tail. Slot 4 is the deferred semantic-red anchor.
Comment thread prompts/default-style-guide.md Outdated
### Colorblind Safety

The anyplot palette is selected via max-min ΔE optimisation across normal, deuteranopia, protanopia, and tritanopia simulations. Slot 4 (matte red `#AE3030`) is the deferred semantic-anchor — reached intentionally for bad/loss/error roles, not by ordinal position 2 of every chart. This keeps red as a free semantic resource rather than spending it on slot 2. Never override the palette with custom categorical hexes unless you have a documented reason.
The Imprint palette is selected via max-min ΔE optimisation across normal, deuteranopia, protanopia, and tritanopia simulations. Slot 4 (matte red `#AE3030`) is the deferred semantic-anchor — reached intentionally for bad/loss/error roles, not by ordinal position 2 of every chart. This keeps red as a free semantic resource rather than spending it on slot 2. Never override the palette with custom categorical hexes unless you have a documented reason.
Comment thread prompts/quality-criteria.md Outdated
| VQ-05 | Layout & Canvas | 4 | 4=perfect, 2=ok, 0=cut-off |
| VQ-06 | Axis Labels & Title | 2 | 2=with units, 1=descriptive, 0=x/y |
| VQ-07 | Palette Compliance | 2 | 2=correct anyplot palette / anyplot continuous cmap + theme-correct chrome, 1=partial, 0=non-compliant |
| VQ-07 | Palette Compliance | 2 | 2=correct Imprint palette / Imprint continuous cmap + theme-correct chrome, 1=partial, 0=non-compliant |
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

claude added 2 commits May 28, 2026 18:14
…data

Follow-up to the prompt rename: each implementation file inlines its own
copy of the palette (the scripts are self-contained, no shared import),
so the constant name lives in the file itself. Rename ANYPLOT_PALETTE →
IMPRINT_PALETTE and "anyplot palette" → "Imprint palette" across all
existing impl files and metadata YAMLs so the catalogue is consistent
with the new public naming.

- 117 Python, 11 Julia, 12 R implementation files
- 141 metadata YAMLs (review notes / image descriptions)
- Prompt examples (library + workflow prompts) updated to match so
  future regens emit IMPRINT_PALETTE directly

core/palette.py already exposes the canonical name as IMPRINT, and
core/images.py keeps a `IMPRINT as ANYPLOT_PALETTE` alias for any legacy
consumers — that backwards-compat shim is untouched.

https://claude.ai/code/session_01AiEP5JeqCK8bQRz4AbnvT2
Copilot review on PR #7892 flagged three doc-consistency issues in
prompts that drive daily-regen:

- default-style-guide.md said "Slot 4 is the deferred semantic-red
  anchor" but the canonical table has slot 4 as ochre (#BD8233);
  matte red #AE3030 is slot 5. Same off-by-one in the Colorblind
  Safety section. Both were leftovers from the pre-hybrid-v3 sort.
- quality-criteria.md VQ-07 row said "Imprint continuous cmap" which
  reads as a generic term; spell it out as imprint_seq / imprint_div
  so the LLM doesn't invent a new colormap name in reviews.

https://claude.ai/code/session_01AiEP5JeqCK8bQRz4AbnvT2
Copilot AI review requested due to automatic review settings May 28, 2026 19:25
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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

claude and others added 2 commits May 28, 2026 19:32
Now that every impl file and metadata YAML calls the palette Imprint,
people searching for "imprint palette" should land on /palette. The
title tag was just "palette | anyplot.ai" with no mention of imprint,
and the page had no OG tags (other pages like About do). The bot
SEO proxy in api/routers/seo.py served an even more generic
"Color palette reference for anyplot.ai branding." to social cards.

- PalettePage.tsx: title → "imprint palette | anyplot.ai", add
  og:title + og:description, sharpen meta description so "Imprint
  palette" leads the sentence.
- api/routers/seo.py: bot-served title + description now front-load
  "Imprint" with the same colorblind-safe / 8-hue framing.

existing test_seo_palette only asserts on the og:title string presence
and the canonical URL, both still present.

https://claude.ai/code/session_01AiEP5JeqCK8bQRz4AbnvT2
Copilot AI review requested due to automatic review settings May 28, 2026 19:43
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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@MarkusNeusinger MarkusNeusinger merged commit df6da00 into main May 28, 2026
9 checks passed
@MarkusNeusinger MarkusNeusinger deleted the claude/daily-regen-palette-naming-g7AFR branch May 28, 2026 21:42
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.

3 participants