WORK-360
Setting up your dashboard 0 entities found · 8/33 branches scanned
ID:WORK-360Status:done

Per-variant structure contracts and inspect variant selection

Make structure contracts and CSS-coverage per-variant, and let refrakt inspect render a variant via the selecting modifier value.

Priority:highComplexity:moderateMilestone:v0.20.0Source:SPEC-091

Criteria completion

Criteria completion: 3 of 3 (100%) checked; tracking started on Jun 9, no incremental history yet0%25%50%75%100%Jun 9Jun 15

Tracking started Jun 9 — check back for trends.

Acceptance Criteria

  • refrakt contracts / structures.json enumerate per-variant structures.
  • CSS-coverage tests cover per-variant selectors.
  • refrakt inspect <rune> --<modifier>=<value> renders the corresponding variant (no new flag needed).

Approach

inspect already takes attributes, so variant selection rides them. SPEC-091 Implications.

References

  • SPEC-091

Resolution

Completed: 2026-06-09

Branch: claude/spec-091-engine-variants

What was done

  • packages/transform/src/contracts.ts: each rune with variants enumerates a per-variant RuneContract (base merged with the delta) under variants[axis][value].
  • packages/lumina/test/css-coverage.test.ts: expectedSelectors folds in selectors introduced by variant deltas.
  • Confirmed refrakt inspect <rune> --<modifier>=<value> selects a variant via the existing flag→attribute path (no new flag).

Notes

  • Regenerated structures.json (lumina + root) so the committed contracts match.