ID:WORK-103Status:donePriority:highComplexity:moderateMilestone:v1.0.0
Remove legacy Model class, decorators, and createSchema
Once all runes are migrated to createContentModelSchema, delete the legacy API surface from @refrakt-md/runes.
Files to delete
packages/runes/src/lib/model.ts— Model base classpackages/runes/src/lib/annotations/attribute.ts— @attribute decoratorpackages/runes/src/lib/annotations/group.ts— @group / @groupList decoratorspackages/runes/src/lib/annotations/id.ts— @id decoratorpackages/runes/src/lib/annotations/— entire directory if empty after above
Exports to remove
From packages/runes/src/lib/index.ts and packages/runes/src/index.ts:
Modelattributegroup,groupListidcreateSchemaNodeStream,RenderableNodeCursor(if only used by Model)
Acceptance Criteria
- All files listed above are deleted
Model,@attribute,@group,@groupList,@id,createSchemaare no longer exported from@refrakt-md/runesNodeStreamandRenderableNodeCursorare removed if no longer used outside Model- No remaining imports of deleted modules anywhere in the monorepo (
grepconfirms zero hits) npm run buildsucceeds for the full monoreponpm testpasses- CSS coverage tests pass
Approach
- Remove exports from
packages/runes/src/lib/index.tsandpackages/runes/src/index.ts - Delete the files
- Search the entire monorepo for any remaining imports of the deleted symbols
- Full build and test pass
Dependencies
- WORK-099 (simple core runes migrated)
- WORK-100 (simple community runes migrated)
- WORK-101 (moderate runes migrated)
- WORK-102 (complex runes migrated)
References
- SPEC-032 (parent spec)
Resolution
Completed: 2026-04-02
Branch: claude/implement-spec-032-2KBbw
What was done
- Deleted
model.ts, entireannotations/directory (6 files), removedNodeStreamfromnode.ts - Removed
createSchema,Model,attribute,group,groupList,id,NodeStreamexports fromlib/index.tsandindex.ts - Converted
SplitLayoutModelfrom Model subclass to plainsplitLayoutAttributesrecord - Updated
createContentModelSchemabaseoption to accept plainRecord<string, SchemaAttribute>instead ofNewable<Model> - Updated error message in
packages.ts - Removed
Groupinterface frominterfaces.ts - 696 lines deleted, 58 added
Notes
RenderableNodeCursoris still used extensively by all runes — kept as-isisFilterMatchinginnode.tsis still used byutil.ts— keptTypedNodeandTransformFunctionininterfaces.tsare unused but harmless public types — left in place- All 7 rune files using
base: SplitLayoutModelwork unchanged sinceSplitLayoutModelis now aliased to the plainsplitLayoutAttributesobject