WORK-101
ID:WORK-101Status:done

Migrate moderate-complexity runes from Model to createContentModelSchema

Migrate runes that have multiple groups, context-dependent group logic, or light custom processing. These need more careful mapping but don't require the custom escape hatch.

Priority:highComplexity:moderateMilestone:v1.0.0Source:SPEC-032

Criteria completion

Criteria completion: 7 of 7 (100%) checked; history from Apr 2 to Apr 30%25%50%75%100%Apr 2Apr 3
Branches 3
History 5
  1. e900a90
    Created (done)by bjornolofandersson
  2. f262d7b
    Content editedby Claude
  3. f0a845a
    • ☑ `nav` rewritten using `createContentModelSchema` with `sections` content model
    • ☑ `pricing` rewritten using `createContentModelSchema` with `sections` content model
    • ☑ `map` rewritten using `createContentModelSchema` with `sections` content model
    • ☑ `storyboard` rewritten using `createContentModelSchema` with `custom` content model
    • ☑ `refrakt inspect <rune> --type=all` output is identical before and after for each rune
    • ☑ All existing tests pass after each migration
    • ☑ No Model class import remains in any of the migrated files
    by Claude
  4. a20f532
    statusreadydone
    by Claude
  5. 5c72bef
    Created (ready)by Claude
    Add work items WORK-099 through WORK-104 for legacy Model removal

Runes

RuneLocationChallengeContent model
navpackages/runes/src/tags/nav.tsMultiple heading-based sections with nested structuresections
pricingrunes/marketing/src/tags/pricing.tsMulti-section layout with header/features/footer splitsections
maprunes/places/src/tags/map.tsSections with location extraction from child contentsections
storyboardrunes/storytelling/src/tags/storyboard.tsImage-triggered panel accumulator with caption groupingcustom

Acceptance Criteria

  • nav rewritten using createContentModelSchema with sections content model
  • pricing rewritten using createContentModelSchema with sections content model
  • map rewritten using createContentModelSchema with sections content model
  • storyboard rewritten using createContentModelSchema with custom content model
  • refrakt inspect <rune> --type=all output is identical before and after for each rune
  • All existing tests pass after each migration
  • No Model class import remains in any of the migrated files

Approach

  • nav: Map the heading-level group splits to a sections model. Heading content becomes section names; nested content follows naturally.
  • pricing: Header/body/footer groups map to named sections. Feature list extraction stays in the transform function.
  • map: Section-based content with location metadata extraction in transform.
  • storyboard: The image-triggered panel accumulator is genuinely stateful — use custom content model with the panel grouping logic in processChildren.

Dependencies

  • WORK-099 (core simple runes migrated first)

References

  • SPEC-032 (parent spec)