From 521a78664cca6bd8e9a4777a47825fb7f3aa6558 Mon Sep 17 00:00:00 2001 From: Nathan Curtis <1165904+nathanacurtis@users.noreply.github.com> Date: Fri, 4 Sep 2026 15:11:06 -0400 Subject: [PATCH 1/2] refactor(conventions): move spec-side conventions out of the platform block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `platforms.` holds facts about one implementation, and two members filed under `figma` were not. `states` names a prop and an enum value that exist in api.yaml — a transform reading only the spec applies it, and the CSS transform does exactly that without touching a Figma file. The prop conventions naming which prop carries an accessible name or a value are the same shape of fact. Compare the members that genuinely are Figma facts: `glyphs.match` names a layer pattern, `codeOnlyProps.match` a frame, `subcomponents.scope` a page. Adds `Conventions.specs`, a sibling of `platforms` and `primitives` rather than a member of `platforms`. `primitives` is the precedent — it already sits outside for the same reason — and the spec is the hub, so making `specs` a platform key would name the hub as one of its own spokes. conventions/specs.yaml props: states: { disabled: { prop: isDisabled } } accessibility: { label: { prop: a11yLabel } } value: { prop: progress } Prop conventions are objects, not bare names, so one can gain fields without a break — the same argument that made `actions` an array of objects. That also retires `propRoles`, a name that borrowed a word meaning something specific and unrelated on anatomy elements. `roleValidation` moves to `Settings.spec`, beside `roles`. It describes how strict a run should be, which is a fact about neither the design tool nor the target, and its on-switch was already in settings — one feature's two knobs were split across two files. ADRs 067 and 073 are amended in place rather than superseded, since neither has shipped. Schema and types only; no transform or CLI code changes, so the loader still reads the old paths until the follow-up lands. Co-Authored-By: Claude Opus 5 (1M context) --- adr/067-anatomy-element-roles.md | 119 ++++++++++-------- adr/073-platform-conventions-namespace.md | 90 ++++++++++++- .../schema/schema/conventions.schema.json | 98 ++++++++++----- packages/schema/schema/settings.schema.json | 8 ++ packages/schema/tests/Conventions.test-d.ts | 49 ++++---- packages/schema/tests/Metadata.test-d.ts | 1 + packages/schema/types/Conventions.ts | 97 +++++++++----- packages/schema/types/Settings.ts | 16 +++ packages/schema/types/index.ts | 3 +- 9 files changed, 341 insertions(+), 140 deletions(-) diff --git a/adr/067-anatomy-element-roles.md b/adr/067-anatomy-element-roles.md index e95c0fa..7ed8c5f 100644 --- a/adr/067-anatomy-element-roles.md +++ b/adr/067-anatomy-element-roles.md @@ -10,7 +10,7 @@ ## Context -ADR 055 (`processing.states`) lets a library deterministically classify variant props as semantic state concepts (`disabled`, `checked`, `expanded`). Downstream transforms consume that classification — but only at the *prop* level. Nothing in the spec identifies *which element carries the platform behavior*, so the `react` transform has no basis for emitting a `