As I understand current plan: Kotlin compiler now under massive refactoring to use Internal Representation under the hood. IR than used to generate output files .class/.js/llvm. K/N already uses this approach
IR format will be stabilised and published some day as public api
So one can write compiler plugin that uses IR to read and modify existing code, so you will work not with raw sources