Valve’s FPS netcode (or at least a version of it) is published in the source engine I think.
Binary serialization and compression are widely used open source tools - there’s no need for Valve to publish anything for that. (And the serialization tools do do code generation)
But “synchronization” - which is inevitably somewhat faked in realtime games is just so super complex. You can’t actually “synchronise” the game state because synchronisation is slow. So it has to be custom to your use case.