fix(palette): add the missing §11.4.1 reference keys, and gate them - #76
Conversation
The three palettes added at v2.08 shipped without a `reference` key. §11.4.1 requires one on every palette, and both the Standard and the skills already printed reference names for all three — so the palettes looked complete everywhere a person reads and were empty in the only place a program reads. It surfaced when a script that regenerates the branding showcase from the TOML raised KeyError: 'reference'. Nine CI gates let it through, and the reason is worth recording: every one of them asks about colour values — do the ratios re-derive, does a name map to two hexes, has a hex been restated outside the source. `reference` is the one required key that is not a colour, so nothing was looking at it. check-token-names.py now fails when any palette lacks a reference. It already parsed [palettes.*] for the collision check, so the cost is one pass and the gate keeps its name: it is the file's structural check. Tested both directions — passes on the fixed file, fails with a readable diagnostic when a reference is removed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4343bb05d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # still keeps Hot Pink above 4.5:1 on it (4.72:1) — pinker fails the floor. | ||
| # ------------------------------------------------------------------------- | ||
| [palettes.steelbore-blackpinkpanther] | ||
| reference = "blackpinkpanther-color-palette" |
There was a problem hiding this comment.
Rebuild the palette bundles with the reference keys
At this commit, both steelbore-color-palette.zip and steelbore-color-palette.skill are byte-identical to their parent versions, so their bundled assets/steelbore.toml does not contain the newly added Green/Green Alt reference keys and remains substantially behind the source file. Consumers installing either bundle therefore do not receive this fix; rebuild and commit both archives alongside the asset change.
AGENTS.md reference: AGENTS.md:L98-L101
Useful? React with 👍 / 👎.
The three palettes added at #75 shipped without a
referencekey. §11.4.1 requires one on every palette.Why this was invisible
Both the Standard and the skills already printed reference names for all three —
blackpinkpanther-color-palette,green-color-palette,greenalt-color-palette— in their §11.4.1 tables. So the palettes looked complete everywhere a person reads, and were empty in the only place a program reads.It surfaced when a script regenerating the branding showcase from the TOML raised
KeyError: 'reference'.Why nine gates missed it
Worth recording, because it is a gap in the gate design rather than bad luck. Every existing palette gate asks about colour values:
.scm/.cssmatch?referenceis the one required key in[palettes.*]that is not a colour, so nothing was looking at it.The fix
check-token-names.pynow fails when any palette lacks areference. It already parsed[palettes.*]for the collision check, so this costs one pass and the gate keeps its name — it is that file's structural check rather than a colour check.Tested both ways: passes on the fixed file (126 names across 13 palettes, all carrying a reference), and fails with a readable diagnostic when a reference is removed.
🤖 Generated with Claude Code