Skip to content
Toolkit

ADR-0052 — The namespace that was three APIs

Status: Accepted · Date: 2026-08-22 · Project: 002-renaissance, phase 04 (fourth slice)

Context

ADR-0048 deferred Button because lk-btn--* "mixes variants with a size (sm), a structural modifier (icon) and both danger and destructive — it needs enumeration before it can be declared honestly." The enumeration: the CSS namespace states seven names, and React states them through three APIs — variant (primary | ghost | outline | destructive | danger, ADR-0033's two-word system), size="sm" (a prop, not a variant), and IconButton (a separate component, whose Swift counterpart StudioIconButton already has name parity). Swift's StudioButtonVariant states four cases — no danger.

The temptation was a schema extension: an exclude list on the axis, so the extractor could skip sm and icon. That is hand-copied data with a politer name — the filtered names vanish from the gate's sight, and nothing fails when the mix deepens.

Decision

A mixed namespace is declared as-is, and dispositions carry the non-variant names. No filter mechanism exists or will: Button.variant declares web: "lk-btn--" against swift: "StudioButtonVariant", and the three web-only names each get the row V1 already demands:

  • danger — planned: the quiet ghost counterpart of destructive (ADR-0033); the phase-04 drift slice raises the enum and must delete the row.
  • sm — not-planned: a size. React states it as the size prop; a size axis would be its own declaration, not a case of this one.
  • icon — not-planned: IconButton's structural emission, its own component on both targets.

Consequences

  • The mix stays visible instead of filtered: every non-variant name in the namespace is a standing row with its reason, and a new lk-btn--* class — variant or not — fails verify until someone says which it is. An exclude list would have made the next mix silent; this makes it a build failure.
  • The rows are V2-guarded both ways: deleting .lk-btn--sm from CSS, or StudioButtonVariant gaining danger, each fails until the matching row goes.
  • Nothing changed in the gate — the slice is data plus this record. Rule firings reused the proven V1 path (three undispositioned-gap failures watched before the rows were written).
  • ADR-0048's leftovers are now all declared; what remains of phase 04 is the drift slice itself: raise StudioTone (deleting the neutral value-drift row), give StudioEmptyState its variant, raise StudioCard (deleting its two rows) and StudioButtonVariant (deleting danger's).

Source: docs/decisions/0052-the-namespace-that-was-three-apis.md

Library