As for codification, criminal leniency for juveniles, which is widespread, gets you pretty close.
For chess to have its own codifications, I think, as Magnus clearly does too, that they need to generally up their game across the board. All the way from detection, investigation, protocols/procedures around suspicions, accusations and hearings/tribunals … and then the penalties can be codified.
I don’t know what’s in place now and what its history is, but Magnus is either chucking a massive rage-quit for losing or telling the chess world they need to get serious and catch up quick vc (or why not both I suppose).
For NM and above, one time caught should get you banned for life
Protecting the game is far far far more important than protecting the individuals
For NM and below, I guess one warning would be ok. But nothing more than that.