Metasurfaces have found broad applicability in free-space optics, while its potential to tailor guided waves remains barely explored. By synergizing the Jones matrix model with generalized Snell’s law under the phase-matching condition, we propose a universal design strategy for versatile on-chip mo