Skip to content

Commit 85f100b

Browse files
bartvenemanclaude
andcommitted
docs: update migration plan with rule metrics progress
Document Wallace now handles rule metrics (ruleSizes, selectorsPerRule, declarationsPerRule). Add AST structure learnings about Rule/SelectorList/Block hierarchy. πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent db7115d commit 85f100b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

β€ŽMIGRATION-PLAN.mdβ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ This approach:
118118
- `2ff3cf3` - Important declarations counting
119119
- `1e53dcc` - Use Wallace is_empty property
120120
- `b517953` - Nesting depth tracking
121+
- `db7115d` - Rule metrics (ruleSizes, selectorsPerRule, declarationsPerRule)
121122

122123
**Implemented:**
123124
- Wallace parse+walk inside `analyzeInternal()`
@@ -131,12 +132,19 @@ This approach:
131132
- βœ… Empty rules counting (`node.block.is_empty`)
132133
- βœ… Important declarations counting (`node.is_important`)
133134
- βœ… Nesting depth tracking (atruleNesting, ruleNesting, selectorNesting, declarationNesting)
135+
- βœ… Rule metrics (ruleSizes, selectorsPerRule, declarationsPerRule)
136+
137+
**AST Structure Learning:**
138+
- Rule has children: `[SelectorList, Block]`
139+
- SelectorList contains Selector nodes (count these for selectorsPerRule)
140+
- Block contains Declaration nodes (count these for declarationsPerRule)
134141

135142
**Remaining with css-tree:**
136143
- Selectors (blocked by parser bug)
137144
- Collections requiring locations (properties, values, etc.)
138145
- Context-dependent metrics (importantsInKeyframes, etc.)
139146
- Unique nesting collections (need location format unification)
147+
- Complexity calculations (need algorithm porting or context)
140148

141149
---
142150

0 commit comments

Comments
Β (0)