ADR-0048 — The gate widens from names to variants
Status: Accepted · Date: 2026-08-22 · Project: 002-renaissance, phase 04 (first slice)
Context
check-studio-parity.mjs reconciles component existence per target and
nothing else. Phase 04's opening question was recorded twice on 2026-08-20,
in the same shape: web's Status grew a sixth tone and re-valued neutral
while Swift's StudioTone kept five cases and the old pair; web's
EmptyState grew the free-standing/compact distinction (ADR-0028) while
StudioEmptyState frames unconditionally. Both passed the gate silently —
"does Swift have this component" was the wrong question. The right one:
does it have the same variants, with the same values.
Decision
The same gate grows a second axis instead of a second script. The ledger's
new variantAxes section declares, per component, one variant axis and
where each target states it; the S-rules' contract repeats one level down
as V-rules:
- Truth is extracted, not transcribed. Web's value set is read from the
CSS modifier prefix (
lk-status--*acrossstudio/packages/core/src); Swift's from the namedpublic enum's top-level cases, or the empty set where the axis entry says"swift": null— Swift declaring no axis at all, which is itself the EmptyState drift. - V1 — every variant gap carries a disposition (
planned|not-planned, with a reason) under the axis'sgaps. Undispositioned drift fails the build, in either direction. - V2 — nothing may go stale: a gap row for a value the target now states, a value neither target knows, an enum name StudioKit no longer declares, a prefix matching no class — each fails.
- The generated
parity-ledger.mdgains a Variant axes table, under S3's existing regeneration contract.
Only enum-backed axes are declared. StudioCard states flush and the
xl radius as init parameters (flush: Bool, radius:), not an enum — a
parameter extractor is a later slice, and hand-copying its values into the
ledger would be the hand-copied token file again. Button's lk-btn--*
namespace mixes variants with a size (sm), a structural modifier
(icon) and both danger and destructive — it needs enumeration before
it can be declared honestly. Neither is in this slice.
Consequences
- Two axes land declared:
Status.tone(gap:accent, swift, planned — the archived item-22 drift) andEmptyState.variant(gap:compact, swift, planned). RaisingStudioToneor adding the Swift variant now requires deleting the gap row, and adding a seventh web tone without touching Swift failsverifyat the commit that causes it. - Value parity is still unchecked. Item 22's second half —
neutralresolving to--text-3/--surface-2in Swift but--text-2/--surface-3on web — is invisible to set comparison. The next slice compares per-value tokens (thestudioText3↔--text-3mapping is mechanical); the gap row's reason carries the pointer until then. - Card's parameter-backed axis and Button's mixed namespace are the other named leftovers; each becomes a slice with its own extraction, not a hand-maintained list.
- All six rule firings (V1 both directions; V2 stale row, unknown value, missing enum, dead prefix) were proven by deliberate lies before landing.
Source: docs/decisions/0048-the-gate-widens-from-names-to-variants.md