ID:WORK-116Status:ready
Update inspect and contracts tooling for structure slots features
Update refrakt inspect and refrakt contracts to surface the new SPEC-033 features: slot assignments, projection effects, and repeated elements.
Priority:mediumComplexity:moderateMilestone:v1.0.0Source:SPEC-033
Acceptance Criteria
refrakt inspectoutput shows slot assignments when a rune config declaresslotsrefrakt inspectvisualizes projection effects (shows before/after tree when projection is active)refrakt inspect --auditflags new BEM selectors created by projectiongroupentriesrefrakt contractsincludes slot ordering in structure contractsrefrakt contractsincludes projection declarations and warns on invaliddata-namereferences (targeting a data-name that doesn't exist in the rune's output)refrakt contracts --checkcatches drift from slot/projection changes- All existing CLI tests pass
Approach
- Update the inspect renderer to show slot groupings in the HTML output
- Add projection visualization — when projection is configured, show the tree before and after the projection pass
- Update the contracts generator to include slot order and projection declarations in the JSON output
- Add validation for projection
data-namereferences against the rune's known output contract - Update the audit logic to account for group-generated BEM selectors
References
- Structure Slots and Declarative Flexibility (Contracts and Tooling section)
- Implement named slots with ordering for structure entries (slots)
- Implement element projection (hide, group, relocate) (projection)