feat(skills): document the Colors component - #6
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Colors component was in no skill at all. Worse,
components.mdactively 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. 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 once —
hexandrgbfor screen,cmykandpantonefor print,ralfor paint and industrial — plus alabel. 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:
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
content-model/references/components.mdcontent-model/references/create-shape-api.mdcolorsin theComponentTypeenum; full config block (min/max,requireLabel,colorPresets,customColorSpaces)mutation/references/core-api.mdupdateComponentexample, including the doubledcolors: { colors: [...] }keyquery/references/catalogue-api.mdColorsContent, and the nullability of every notationdata-creation/SKILL.mdcontent-model/SKILL.mdVerified
Against the live Core API —
ColorsComponentConfig,ColorsComponentContentInput,GraphqlInputColorEntry, theColorSpaceenum (cmyk | hex | hsl | pantone | ral | rgb) — and the Catalogue API (ColorsContent,ColorEntry).colorsis also present inNestableComponentInput, so it works inside chunks, choices and pieces; that is stated.Deliberately absent
How a discoverable
colorscomponent 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
multilingualdefault 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
main, so it is independent of feat(skills): add vector-ranking skill #3, fix(skills): repair three broken reference links #4 and fix(skills): stop make codeclean from corrupting the templating reference #5 and touches no file they touch.🤖 Generated with Claude Code