WORK-360
Setting up your dashboard 0 entities found · 8/31 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; history from Jun 9 to Jun 90%25%50%75%100%Jun 9Jun 9
Branches 2
History 4
  1. b6c8084
    • ☑ `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).
    by bjornolofandersson
  2. 4ece0ce
    Content editedby Claude
    plan: mark Batch 1 (SPEC-091 engine config variants) done
  3. 9c0545a
    Created (ready)by bjornolofandersson
  4. 1da59d6
    Content editedby Claude
    plan: add v0.20.0 milestone and break down SPEC-086..091 into work items

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.