Scan selected pages for repeated visual rule groups, review concrete proposals, and extract accepted patterns into named shared classes/tokens without changing the rendered result.
Where: Helpers / Design System → Style Patterns, or AI/MCP → get_style_patterns
Before you start
- The document needs repeated style groups worth sharing; isolated one-off styling may produce no proposal.
Key ideas
- Scan before apply: The scan reports deterministic proposal ids, affected pages/elements, candidate declarations, and anything unsafe or below the reuse threshold.
- Choose the proposals: Extraction accepts only ids from the held scan; proposals can be renamed and individual elements excluded.
- Two-phase write: A live plan shows CSS edits, touched elements, and skips. Applying requires explicit confirmation and lands as one undo step.
Steps
- Choose the page scope and run the Style Patterns scan.
- Review each proposal and note its id, declarations, element count, and skipped reasons.
- Select proposals, give them meaningful names, and exclude intentional exceptions.
- Generate the live plan, confirm it, then visually compare the affected pages and undo if necessary.
Limitations and important notes
- Extraction can apply only proposals from the most recent held scan and only within that scan’s page scope.
- An invalid/stale proposal id or unsafe selection is refused rather than guessed.
Troubleshooting
Extraction says no pattern scan is held
Run get_style_patterns/Scan again, then apply proposal ids from that exact result.