WORK-099
ID:WORK-099Status:done

Migrate simple core runes from Model to createContentModelSchema

Migrate the straightforward core runes that use @group decorators with sequential or sectioned patterns. These have no custom processChildren logic — they map directly to sequence, sections, or delimited content models.

Priority:highComplexity:simpleMilestone:v1.0.0Source:SPEC-032
claude/file-naming-convention-LJdwR View source

Criteria completion

No incremental history — criteria tracking started on Apr 21.

Branches 3
claude/file-naming-convention-LJdwR current done
main donechangeset-release/main doneclaude/align-sidenav-styling-4MuxV done
History 2
  1. bbbb94c
    Created (done)by bjornolofandersson
  2. f2b3512
    Content editedby Claude
    Add {ID}-{slug}.md filename convention + migrate filenames subcommand

Runes

RuneFilePatternContent model
accordionpackages/runes/src/tags/accordion.ts@group sectionssections
budgetpackages/runes/src/tags/budget.ts@group sequentialsequence
revealpackages/runes/src/tags/reveal.ts@group delimiteddelimited
sandboxpackages/runes/src/tags/sandbox.ts@group sequentialsequence

Acceptance Criteria

  • accordion rewritten using createContentModelSchema with sections content model
  • budget rewritten using createContentModelSchema with sequence content model
  • reveal rewritten using createContentModelSchema with delimited content model
  • sandbox rewritten using createContentModelSchema with sequence 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

For each rune:

  1. Capture baseline output with refrakt inspect <rune> --type=all --json
  2. Rewrite schema using createContentModelSchema — map @attribute to attributes, @group to content model fields, transform() to the transform function
  3. Compare output to baseline — must be identical
  4. Run npx vitest run for any related test files

References

  • SPEC-032 (parent spec)