Acceptance Criteria
- The field shape is
marks: { total, values? }; rating: { total } keeps working as an alias for one release, with a deprecation note - The marks element carries the field's
metaType as data-meta-type, like the other shapes; a field with no metaType gets none values maps an enum to a filled count ({ trivial: 1, simple: 2, moderate: 3, complex: 4 }); a value with no entry renders as plain text- The marks carry a text alternative (for example
role="img" and aria-label="3 of 4", localisable), asserted in a test metaType gains rating; testimonial declares metaType: 'rating' and renders exactly as today- Lumina draws stars for
[data-meta-type="rating"] marks and neutral dots for every other marks element work renders complexity through marks, and the five [data-complexity] ::after rules in work.css are deleted- Contracts are regenerated on both copies and the diff reviewed; the SEO baseline does not move (
rating still publishes ratingValue)
Approach
buildRatingValue becomes buildMarksValue, reads f.field.marks ?? f.field.rating, resolves the filled count through values when present, and copies f.field.metaType onto the element as buildIconValue does. ResolvedField.ratingTotal follows the rename. The metaType unions in packages/transform/src/types.ts gain 'rating'.
A composed rune declares marks through metaFields in frontmatter, as testimonial's does in SPEC-161 D1, so the composition path needs nothing beyond the rename.
References
- SPEC-161 D1: the composed
testimonial, which measured the rating shape publishing through a composition.