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
Runes
| Rune | File | Pattern | Content model |
|---|---|---|---|
| accordion | packages/runes/src/tags/accordion.ts | @group sections | sections |
| budget | packages/runes/src/tags/budget.ts | @group sequential | sequence |
| reveal | packages/runes/src/tags/reveal.ts | @group delimited | delimited |
| sandbox | packages/runes/src/tags/sandbox.ts | @group sequential | sequence |
Acceptance Criteria
accordionrewritten usingcreateContentModelSchemawithsectionscontent modelbudgetrewritten usingcreateContentModelSchemawithsequencecontent modelrevealrewritten usingcreateContentModelSchemawithdelimitedcontent modelsandboxrewritten usingcreateContentModelSchemawithsequencecontent 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
For each rune:
- Capture baseline output with
refrakt inspect <rune> --type=all --json - Rewrite schema using
createContentModelSchema— map@attributetoattributes,@groupto content model fields,transform()to the transform function - Compare output to baseline — must be identical
- Run
npx vitest runfor any related test files
References
- Remove Legacy Model Class and Decorators (parent spec)
Relationships
Dependency of
ID:WORK-102Status:done8/8
Migrate complex runes from Model to createContentModelSchema
Priority:highComplexity:complexMilestone:v1.0.0
ID:WORK-101Status:done7/7
Migrate moderate-complexity runes from Model to createContentModelSchema
Priority:highComplexity:moderateMilestone:v1.0.0
ID:WORK-100Status:done5/5
Migrate simple community runes from Model to createContentModelSchema
Priority:highComplexity:simpleMilestone:v1.0.0
ID:WORK-103Status:done7/7
Remove legacy Model class, decorators, and createSchema
Priority:highComplexity:moderateMilestone:v1.0.0
History
- 59ded4aContent edited
- f262d7bsource+SPEC-032
- f0a845a
- ☑ `accordion` rewritten using `createContentModelSchema` with `sections` content model
- ☑ `budget` rewritten using `createContentModelSchema` with `sequence` content model
- ☑ `reveal` rewritten using `createContentModelSchema` with `delimited` content model
- +4 more criteria
- a20f532statusready→done
- 5c72befCreated (ready, high, simple, runes, content-model, v1.0.0)