Skip to content

fix(palette): add the missing §11.4.1 reference keys, and gate them - #76

Merged
UnbreakableMJ merged 1 commit into
mainfrom
fix/palette-reference-keys
Sep 15, 2026
Merged

UnbreakableMJ merged 1 commit into
mainfrom
fix/palette-reference-keys

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

The three palettes added at #75 shipped without a reference key. §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:

  • do the ratios re-derive from the hexes?
  • does a token name map to two different hexes?
  • has a hex been restated outside the single source?
  • does the generated .scm / .css match?

reference is the one required key in [palettes.*] that is not a colour, so nothing was looking at it.

The fix

check-token-names.py now fails when any palette lacks a reference. 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

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>
@UnbreakableMJ
UnbreakableMJ merged commit 9e42067 into main Sep 15, 2026
4 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the fix/palette-reference-keys branch September 15, 2026 20:41

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

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.

1 participant