Add an explicit failure path for color pairings that fail contrast - #36
Merged
Conversation
Closes the remaining gap in #8: semantic roles with attached ratios (the Color contract in style-lock-format.md) and use-time re-checking of invented pairings (SKILL.md's non-negotiable #5) already shipped in earlier work. What was missing was the third piece reviewers explicitly flagged — what happens when a pairing genuinely fails. Without a defined path, "iterate until it passes" has no way to distinguish a real fix from looping on the same failing value. - SKILL.md: non-negotiable #5 gains an ordered failure path — reuse an already-legal pairing, nudge the new color's lightness within its own hue family and re-verify with the matrix (the same approach generate_palette.py already uses at generation time, applied ad hoc to one token), fall back to a known-safe neutral if nudging would break the color's intended role, or surface a genuine conflict to the user rather than shipping the failure or silently substituting something unasked for. - references/style-lock-format.md: Color contract section points at the failure path and adds a note field for recording when a token's value was nudged mid-build for contrast, so a later session sees the final value already reflects a deliberate fix. Closes #8 Co-Authored-By: Claude Sonnet 5 <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.
What this changes
Closes the remaining gap in #8. Semantic roles with attached ratios (the Color contract in
style-lock-format.md) and use-time re-checking of invented pairings (SKILL.md's non-negotiable #5) already shipped in earlier work. Missing was the third piece reviewers explicitly flagged: what happens when a pairing genuinely fails. Without a defined path, "iterate until it passes" has no way to distinguish a real fix from looping on the same failing value.SKILL.md— non-negotiable Motion defaults assume a scroll-driven marketing page #5 gains an ordered failure path: reuse an already-legal pairing → nudge the new color's lightness within its own hue family and re-verify with the matrix (the same approachgenerate_palette.pyalready uses at generation time, applied ad hoc to one token) → fall back to a known-safe neutral if nudging would break the color's intended role → surface a genuine conflict to the user rather than shipping the failure or silently substituting something unasked for.references/style-lock-format.md— Color contract section points at the failure path and adds a note field for recording when a token's value was nudged mid-build for contrast.Closes #8
Test plan