WORK-532
ID:WORK-532Status:ready

Lint slot/role mismatches

The twelve corrections in WORK-529WORK-531 were found by an ad-hoc script comparing each rune's declared slots (from layout, structure, autoLabel, blocks, contentWrapper) against its sections map. Nothing stops the same drift returning the next time a rune gains a body slot.

Turn that comparison into a standing check.

Priority:mediumComplexity:simpleMilestone:v0.31.0Source:SPEC-125

Criteria completion

Criteria completion: 0 of 7 (0%) checked; tracking started on Sep 6, no incremental history yet0%25%50%75%100%Sep 6Sep 6

Tracking started Sep 6 — check back for trends.

Branches 1
History 2
  1. 8b65a2f
    Created (ready)by bjornolofandersson
  2. 127194f
    Content editedby Claude
    Add work items WORK-528..537 for milestones v0.31.0 and v0.32.0

Acceptance Criteria

  • A rune declaring a body slot with no body section role is flagged
  • A rune declaring a title/header slot with no header-ish role is flagged
  • The check runs over core and all nine plugins, not just baseConfig
  • Genuinely bodyless runes (the 105 with neither a body role nor a body slot) produce no noise
  • Runes deliberately left uncorrected in WORK-529WORK-531 have a recorded way to opt out, and the reason travels with the opt-out rather than living only in a work-item resolution
  • The check fails CI rather than only warning
  • npm run build, the full repo suite, and refrakt contracts --check pass

Approach

Direction only. This lints for a missing role. It must not flag a role that is present — those are correct, and the DataTable / Showcase cases are an overload of body's meaning, not a data error. Flagging them here would push someone toward the wrong fix (removing a role Lumina styles) instead of the right one (WORK-537).

Where it lives is worth a moment. refrakt validate already checks theme config and is the obvious home, but the slot inputs come from four different config fields and the existing ad-hoc script had to reconstruct them — so a shared "declared slots for a rune" helper is likely the real deliverable, with the lint as its first consumer. WORK-534 will want the same helper.

Blocked by

  • WORK-529
  • WORK-530
  • WORK-531

References

  • SPEC-125 — Phase 1, Guard against recurrence