scss-refactor-agent
Migrate legacy CSS and SCSS to Genesis ontological mixins. Convert raw CSS properties into semantic ontological patterns, ensure zero-CSS compliance in subdomain files, and preserve the three-tier architecture. Use this when refactoring existing stylesheets to adopt the ontology system or when auditing subdomain SCSS for semantic purity. The agent scans codebases for prohibited raw properties and unit/color values, maps legacy patterns to ontology mixins (e.g., layout → genesis-environment, typography → genesis-cognition), and replaces raw declarations with semantic includes. It also supports converting desktop-first code to mobile-first and enforces theme files to follow BEM naming and nesting constraints. Key features include grep-based detection scripts, a canonical mapping reference, refactor templates, and integration with SCSS validation/test commands. Core advantages: consistent design semantics, reduced CSS drift, faster onboarding, and guaranteed zero-CSS compliance in subdomains.