feat(ghost-drift): support token references in role palette fields#48
Merged
nahiyankhan merged 1 commit intomainfrom Apr 22, 2026
Merged
feat(ghost-drift): support token references in role palette fields#48nahiyankhan merged 1 commit intomainfrom
nahiyankhan merged 1 commit intomainfrom
Conversation
Role palette fields (background, foreground, border) now accept
`{palette.dominant.<role>}` and `{palette.semantic.<role>}` references
in addition to raw hex values. Renames in the palette cascade into
every role that cites them, and `ghost-drift lint` flags unresolved
references as `broken-role-reference` — unknown role, unsupported
namespace, or malformed syntax each surface as distinct messages.
Positional inventories (palette.neutrals, typography, spacing,
surfaces) stay raw — they have no named slots to point at. The
"What's deliberately excluded" section in docs/fingerprint-format.md
spells this out, so the narrow surface is on the record.
No schema version bump, no breaking change. Raw hexes work untouched.
Co-Authored-By: Claude Opus 4.7 (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.
Summary
roles[].tokens.palette.{background,foreground,border}now accept{palette.dominant.<role>}and{palette.semantic.<role>}references, so renames in the palette cascade into every role that cites them.ghost-drift lintflags unresolved references asbroken-role-reference(error). Three failure kinds surface as distinct messages: unknown role, unsupported namespace (with the supported list), malformed syntax.palette.neutrals,typography,spacing,surfaces) stay raw — they have no named slots to point at. Called out explicitly under "What's deliberately excluded" in the format docs, so the narrow surface is on the record.Frame for reviewers: this is the first of two potential moves inspired by Google Labs' design.md. It adds the reference surface where naming already exists; the harder question — whether typography/spacing should grow a named layer — is deferred until a profile recipe has a real reason to emit one.
No schema version bump, no new required fields, no breaking change. Raw hexes continue to work untouched.
Test plan
pnpm test— 175/175 green (12 new resolver tests + 4 new lint tests)pnpm check— biome + typecheck + file-size + docs-frontmatter + cli-manifest all passschemas/fingerprint.schema.jsonstays byte-identical afterpnpm --filter ghost-drift build && node scripts/emit-fingerprint-schema.mjs && pnpm fmtdocs/fingerprint-format.mdonce deployed🤖 Generated with Claude Code