Skip to content

ADR-051: Platform code-syntax token profiles#107

Merged
nathanacurtis merged 4 commits into
0.21.0from
051-platform-token-syntax
May 20, 2026
Merged

ADR-051: Platform code-syntax token profiles#107
nathanacurtis merged 4 commits into
0.21.0from
051-platform-token-syntax

Conversation

@nathanacurtis
Copy link
Copy Markdown
Member

Implements ADR-051 — Platform Code-Syntax Token Profiles (ACCEPTED).

Closes #103.

What

Adds three platform profiles to Config.format.tokens (and ResolvedConfig):

  • FIGMA_SYNTAX_WEB
  • FIGMA_SYNTAX_IOS
  • FIGMA_SYNTAX_ANDROID

Each emits the token's Figma codeSyntax for that platform, falling back to the existing TOKEN output when no code syntax is defined for the platform. The default stays TOKEN; the fallback is a transformer behavior (kept out of the schema per Constitution II). This brings Specs 2 to parity with Specs Classic's CODE_SYNTAX feature.

Changes

  • types/Config.ts — enum widened on Config and ResolvedConfig
  • schema/component.schema.jsonformat.tokens enum + description
  • tests/Config.test-d.ts — valid-value + @ts-expect-error assertions
  • site/.../config/tokens.md, site/.../schema/config.md — docs
  • CHANGELOG.md — entry under unreleased 0.21.0
  • adr/051-platform-token-syntax.md, adr/INDEX.md — ADR + index

Versioning

Additive (MINOR-class). Folds into the in-progress unreleased 0.21.0 — no separate bump.

Gates

  • tsc -p tsconfig.build.json --noEmit — PASS
  • validate-schema.sh — PASS (4/4)
  • tsc --noEmit --strict tests/*.test-d.ts — PASS

🤖 Generated with Claude Code

nathanacurtis and others added 4 commits May 20, 2026 13:19
Add FIGMA_SYNTAX_WEB/IOS/ANDROID profiles to format.tokens (DRAFT).
Refs #103

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add FIGMA_SYNTAX_WEB/IOS/ANDROID to format.tokens (Config + ResolvedConfig)
and component.schema.json. Default unchanged (TOKEN); empty platform syntax
falls back to TOKEN output (transformer behavior). Folds into unreleased 0.21.0.
Update Config.test-d.ts, docs, and CHANGELOG. Refs #103

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@nathanacurtis nathanacurtis changed the base branch from main to 0.21.0 May 20, 2026 17:36
@nathanacurtis nathanacurtis merged commit d4b4a58 into 0.21.0 May 20, 2026
@nathanacurtis nathanacurtis deleted the 051-platform-token-syntax branch May 20, 2026 17:38
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.

Plugin Token Formatting based on Platform Syntax

1 participant