As far as I’m aware, extending or modifying classes/traits/etc through compile time reflection is currently unsupported in Scala 3. At least, that’s what I was told when I last inquired about it (about a month ago). I think there was a ticket on the dotty repo to add support for such though.
If I find a way, I’ll let you know, and I hope you find a way, cause it would be helpful for me.