I had been asking about documentation on building compiler plugins because I feel like that might be a good way to implement this feature (similar to how they're using a compiler plugin to generate Parcelable CREATORs for Android). It's kinda difficult to reason about how to build those plugins though, and there are no public docs for them.