The PR adds a settings row with a 40-line inline SVG, or it installs lucide-react because the model knows those names. The repo already has <Icon name="settings"> (or a folder of icon components, or a sprite). The new artwork is a slightly different stroke, a different viewport, and a new dependency for one glyph.
I’ve started treating a new icon pack or a pasted SVG as a fork when an icon set already exists. The shared component is where currentColor, size, and aria-hidden already got decided.
Why the extra icons show up
Icon libraries are well represented in training data. A design-system icon folder is not. If the prompt says “add a settings icon,” the model will import a popular pack or inline the first SVG it can write. Reviewers then have to notice a 1px stroke mismatch.
You also risk shipping two visual languages: filled icons in the nav, outline icons in the new row, and a third size that the Icon component already forbids.
A simple icon policy
- Use the existing Icon component or icon folder
- Do not install a second icon library in a feature PR
- Do not paste a long inline SVG when a named icon already exists
- A new glyph is an icon-set change, with a name, not a one-off in a leaf file
If the set is missing the glyph, ask for the new icon to be added next to the others. Do not start a parallel pack.
What to put in the prompt
Use the existing Icon component / icons in src/components/icons. Do not install lucide-react, react-icons, font-awesome, or another pack. Do not inline a large SVG when a named icon exists. If the glyph is missing, add it to the icon set and use the same size and currentColor contract; do not paste a one-off in this file. Paste the Icon API and the list of names. In review, search the diff for a new icon dependency, for raw <svg in feature files, and for strokeWidth values that do not match the set.
Reject / send back
Reject
- A new icon library added for one glyph
- A pasted SVG that duplicates an existing named icon
- Stroke, size, or color that drifts from the Icon contract
- Decorative icons missing
aria-hiddenwhen the set already handles it
Accept
- A usage of the existing named icon
- A new glyph added to the set and referenced by name
- A documented exception for a one-off illustration that is not a UI icon