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
Runes
| Rune | Location | Challenge | Content model |
|---|---|---|---|
| nav | packages/runes/src/tags/nav.ts | Multiple heading-based sections with nested structure | sections |
| pricing | runes/marketing/src/tags/pricing.ts | Multi-section layout with header/features/footer split | sections |
| map | runes/places/src/tags/map.ts | Sections with location extraction from child content | sections |
| storyboard | runes/storytelling/src/tags/storyboard.ts | Image-triggered panel accumulator with caption grouping | custom |
Acceptance Criteria
navrewritten usingcreateContentModelSchemawithsectionscontent modelpricingrewritten usingcreateContentModelSchemawithsectionscontent modelmaprewritten usingcreateContentModelSchemawithsectionscontent modelstoryboardrewritten usingcreateContentModelSchemawithcustomcontent modelrefrakt inspect <rune> --type=alloutput 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 asectionsmodel. 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 — usecustomcontent model with the panel grouping logic inprocessChildren.
Dependencies
- Migrate simple core runes from Model to createContentModelSchema (core simple runes migrated first)
References
- Remove Legacy Model Class and Decorators (parent spec)
Relationships
Dependency of
History
- 59ded4aContent edited
- f262d7bsource+SPEC-032
- 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
- +4 more criteria
- a20f532statusready→done
- 5c72befCreated (ready, high, moderate, runes, content-model, v1.0.0)