Skip to content

feat(skills): document the Colors component - #6

Merged
Plopix merged 1 commit into
mainfrom
feat/color-component
Sep 15, 2026
Merged

Plopix merged 1 commit into
mainfrom
feat/color-component

Conversation

@papelipe

Copy link
Copy Markdown
Member
Q A
Branch? main
Bug fix? no
New feature? yes
BC breaks? no
Fixed tickets #...

The Colors component was in no skill at all. Worse, components.md actively pointed the other way — "color" was the headline example for when to use a Selection:

- | Predefined dropdown or multi-select (color, size, material) | **Selection** |
+ | Predefined dropdown or multi-select (size, material, fit)   | **Selection** |

So an agent modelling colour would reach for a dropdown of colour names and never learn the component exists. This adds Colors to the content model and corrects the advice around it.

The modelling point

One colour entry carries several notations of the same colour at oncehex and rgb for screen, cmyk and pantone for print, ral for paint and industrial — plus a label. And the component is a list, so one component holds a whole colourway.

That is what makes it a content-modelling concern rather than a field type. Splitting those notations across Single Line components guarantees they drift apart the first time a colour is corrected, and modelling a colourway as several components guarantees they fall out of order.

The second decision, which gets its own section because it is the one people get wrong:

You need Use
The actual colour, to render (swatch, chip, 3D configurator) Colors
A stable token to filter, facet and build URLs on Selection or a Topic
Both — the normal case for fashion, paint, furniture, packaging Both, deliberately

A hex is a poor facet: shoppers pick "Red", not #B22222, and two near-identical hexes will not collapse into one bucket. The filterable token and the renderable value are different jobs.

Where it landed

File Added
content-model/references/components.md New "I need to store a colour" scenario; "Colors vs Selection"; corrected Selection example; rows in the localization-defaults and validations tables; a flowchart branch; a Discoverability note
content-model/references/create-shape-api.md colors in the ComponentType enum; full config block (min/max, requireLabel, colorPresets, customColorSpaces)
mutation/references/core-api.md updateComponent example, including the doubled colors: { colors: [...] } key
query/references/catalogue-api.md Reading ColorsContent, and the nullability of every notation
data-creation/SKILL.md Added to the skip list — entries are structured objects, not strings
content-model/SKILL.md Trigger words in the description, so "how do I model colour" reaches this skill

Verified

Against the live Core API — ColorsComponentConfig, ColorsComponentContentInput, GraphqlInputColorEntry, the ColorSpace enum (cmyk | hex | hsl | pantone | ral | rgb) — and the Catalogue API (ColorsContent, ColorEntry). colors is also present in NestableComponentInput, so it works inside chunks, choices and pieces; that is stated.

Deliberately absent

How a discoverable colors component is indexed in Discovery. The access token available here could not read shapes on any tenant that uses the component (FORBIDDEN), so the generated field name and subfields are unverified. The guidance does not depend on the answer — filter on the name, not the value — so rather than guess at a field shape, it is left out. Worth filling in by someone who can see an indexed tenant.

One inference is flagged here rather than in the file: the multilingual default row in the localization table is given as ✗ False, matching every comparable value component. The config field exists and is settable; the platform default was not verified.

Notes

🤖 Generated with Claude Code

The Colors component was in no skill at all. Worse, components.md
actively pointed the other way: "color" was the headline example for when
to use a Selection, so an agent modelling colour would reach for a
dropdown of colour names and never learn the component exists.

Adds Colors to the content model, and corrects the advice around it.

content-model/references/components.md
  - new "I need to store a colour" scenario in the decision guide
  - a "Colors vs Selection" section, because that is the decision people
    get wrong: Colors holds the value you render, a Selection or topic
    holds the token you filter on, and most catalogues need both
  - Selection's example list no longer claims colour
  - rows in the localization-defaults and validations tables
  - a branch in the component selection flowchart
  - a note under Discoverability that a hex is a poor facet

content-model/references/create-shape-api.md
  - `colors` added to the ComponentType enum
  - full config block: min/max, requireLabel, colorPresets,
    customColorSpaces

mutation/references/core-api.md
  - updateComponent example, including the doubled `colors: { colors: [] }`
    key, which is easy to get wrong

query/references/catalogue-api.md
  - reading ColorsContent, and the nullability of every notation

data-creation/SKILL.md
  - added to the skip list: entries are structured objects, not strings

The modelling point the whole thing turns on is that one entry carries
several notations of the same colour at once — hex and rgb for screen,
cmyk and pantone for print, ral for paint. Splitting those across
Single Line components guarantees they drift apart the first time a
colour is corrected.

Verified against the live Core API (ColorsComponentConfig,
ColorsComponentContentInput, GraphqlInputColorEntry, the ColorSpace enum)
and the Catalogue API (ColorsContent, ColorEntry).

Not documented, because it could not be verified: how a discoverable
`colors` component is indexed in Discovery. The token this repo's access
allows could not read shapes on any tenant using the component. The
guidance given does not depend on the answer — filter on the name, not
the value — but the indexed field shape is deliberately absent rather
than guessed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Plopix
Plopix merged commit 7d688b7 into main Sep 15, 2026
1 check passed
@Plopix
Plopix deleted the feat/color-component branch September 15, 2026 19:44
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