  Gamma-ray bursts (GRBs) are powered by ultra-relativistic jets. The launching
sites of these jets are surrounded by dense media, which the jets must cross
before they can accelerate and release the high energy emission. Interaction
with the medium leads to the formation of a mildly relativistic sheath around
the jet resulting in an angular structures in the jet's asymptotic Lorentz
factor and energy per solid angle, which modifies the afterglow emission. We
build a semi-analytical tool to analyze the afterglow light curve and
polarization signatures of jets observed from a wide range of viewing angles,
and focus on ones with slowly declining energy profiles known as shallow jets.
We find overall lower polarization compared to the classical top-hat jet model.
We provide an analytical expression for the peak polarization degree as a
function of the energy profile power-law index, magnetic field configuration
and viewing angle, and show that it occurs near the light curve break time for
all viewers. When applying our tool to GRB 221009A, suspected to originate from
a shallow jet, we find that the suggested jet structures for this event agree
with the upper limits placed on the afterglow polarization in the optical and
X-ray bands. We also find that at early times the polarization levels may be
significantly higher, allowing for a potential distinction between different
jet structure models and possibly constraining the magnetization in both
forward and reverse shocks at that stage.
