lint_design: flag theme copies (light/dark artboards duplicated instead of using modes) #25
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happened
While redesigning an app with a dark and a light theme, an agent built separate side-by-side artboards for each theme ("Screen / Moldura" + "Screen / Papel") with hard-coded colours, instead of one artboard bound to variables with a value per mode and
set_variable_mode. Another agent avoided switching modes because the switch is document-wide and would flip the canvas for other agents working in parallel, and rendered "light" previews by rebuilding with different hex values.The copies drift apart, double the maintenance and make the mode switch meaningless. The skills already said "Add a second mode", but nothing said don't copy, and nothing catches it.
Done already
skills/papercraft/SKILL.mdandskills/papercraft-design/SKILL.md: explicit rule "Themes are modes, never copies" + troubleshooting row (uncommitted in the working tree).Proposal
lint_designruletheme-copy(warning): flag artboards whose names differ only by a theme word (light/dark, claro/escuro, day/night, or the names of the project's variable modes) or whose layer trees match structurally while their colours differ. Message: "Use one artboard andset_variable_mode."hard-coded-coloras error (not info) on any artboard when the project has a collection with 2+ modes: a raw colour there cannot follow the theme. Include strokes, which today needupdate_stylesafter a switch.get_screenshot { mode: "Light" }(and maybe a per-page/per-artboard mode override, like Figma's). This removes the reason agents duplicate: they can screenshot each theme without flipping the canvas for others.bind_variable visibleto a boolean is the documented way to show theme-only ornaments; mention it in the lint message.Acceptance
theme-copywarning.Fixed in
75faf3eon branch debrand.