Skip to content

Per-category Figma variable collection structure#2

Merged
jrpease merged 14 commits into
mainfrom
claude/nervous-mestorf-38e650
Jun 4, 2026
Merged

Per-category Figma variable collection structure#2
jrpease merged 14 commits into
mainfrom
claude/nervous-mestorf-38e650

Conversation

@jrpease

@jrpease jrpease commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Reworks the design-system skills so a generated token system uses per-category Figma variable collections (one collection per category per tier) instead of one Primitives + one Semantic collection — fixing the bug where non-color categories (e.g. spacing) inherited color's Light/Dark modes. Each category now owns its own mode axis.
  • Adds border-width tokens end to end: primitive width/{0,1,2,4} and semantic width/{default,focus,emphasis}, with component-builder binding component borders to them and the Foundations sheet rendering a border-width section.
  • Reverses the anti-redundancy rule in favor of a structural-consistency doctrine (every concern gets both tiers; passthrough dimensional semantics are kept to carry a future mode axis; only invented/renamed-primitive roles are flagged). Applied in both token-builder and the brainstorm-before-build import mode.
  • Establishes the multi-brand model: Brand axis on _Color/Primitive, Theme axis on Color/Semantic — two independent axes in two collections, staying under the Professional 4-mode cap.
  • Settles the naming model: Figma variables are /-grouped and omit the category prefix (gray/50, text/primary); the dotted form (color.gray.50) is the logical/code identity the sync layer derives.
  • Updates the sync layer to iterate N collections, treat single-mode collections as non-themed, emit brand themes from multi-mode primitives, and apply a collection→token-name mapping rule (+ adapter [data-brand] selector). Updates the manifest schema example.

Spec: docs/superpowers/specs/2026-06-03-figma-variable-collection-structure-design.md
Plan: docs/superpowers/plans/2026-06-03-figma-variable-collection-structure.md

Test Plan

  • No automated suite — these are markdown skill instructions. Verified via per-task grep checks plus independent spec-compliance and code-quality review subagents.
  • Confirm no surviving two-collection (["Primitives","Semantic"]) assumptions across skills/references/commands.
  • Confirm border-width tokens appear in token-builder, component-builder, and token-sheet-builder.
  • Sanity-run token-builder against a real Figma file to confirm per-category collections build with correctly scoped modes (manual, follow-up).

🤖 Generated with Claude Code

jrpease and others added 14 commits June 3, 2026 23:41
Fixes the two-tier/two-collection conflation in token-builder so each
token category owns its own mode axis, plus adds missing border-width
tokens. Skill-instructions scope only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds three missed impacts: a second anti-redundancy doctrine copy in
brainstorm-before-build import mode, border-width binding in
component-builder, and multi-mode (brand) primitive handling plus a
collection->token-name mapping rule in the sync layer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… Step 1

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cy doctrine

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rivacy, border width

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… per-axis modes

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ted logical identity

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…y doctrine

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…apping

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cing-tier rule

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…idth section

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ming consistency

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jrpease jrpease merged commit c56300f into main Jun 4, 2026
jrpease added a commit that referenced this pull request Jun 4, 2026
Two runs with Lucide picked two different mechanisms: once fetching SVGs off
lucide.dev and hand-prepping components (mechanism #3, the last resort), once
recommending a community file (#1, correct). Root causes:

- The cheapest-first list was a soft "preference order" with no gate, so runs
  could drift to #3 for a library that has a community file.
- The "name the specific resource" section was a literal placeholder ("[this
  Lucide community component file]") — it told the model to name a resource but
  gave none, so each run improvised; the concrete fallback the model could
  always do was fetch website SVGs (= #3 in disguise).

Fixes:
- Hard gate: for a known library the path is #1 (→#2), never #3. Explicitly call
  out that fetching a library's SVGs off its website is mechanism #3 wearing a
  disguise and is forbidden for Lucide/Material. Same library must yield the same
  mechanism every run.
- Provide concrete default candidates per library (official Lucide/Material
  resources + licenses), with a verify-the-current-link step, so the model stops
  improvising. If it can't confirm a resource, ask — never silently drop to SVGs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jrpease jrpease deleted the claude/nervous-mestorf-38e650 branch June 8, 2026 09:14
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