I'd split the degraded gauge into width and speed, because they usually fail for different reasons. A link that trained at x8 instead of x16 is almost always physical, the badly seated card or damaged riser you describe. A lower speed is often deliberate, for the reasons your note already gives (power management, the kernel's bandwidth controller). If both feed one boolean, a few harmless speed drops teach people to silence the metric, and the lane loss you built it for gets silenced with them.
So agentxdp_pcie_link_width_degraded could alert on its own, and the speed flag only when it holds under load for a few minutes, for example joined with the throughput counters from part 20. One caveat for newer cards: PCIe 6.0 adds the L0p state, which can narrow a link on purpose to save power, so the width rule will need the same treatment there. A fake /sys case with low speed and full width would pin that the two flags stay independent.