I've been having a great time using haxe & reflaxe macros for code generation.
You can have some minimal haxe code and build tiny compilers that use it as a source of truth for generating a http client, http server stub, cli entrypoint, docs entry, integration test, openapi spec.... Agents are good at writing the macros for whatever language you want to compile to, and now you've enforced agreement between these things as part of a build, which makes for several fewer things that you ought to be diligent about.
Unlike using something like yaml as your source of truth, haxe has a type system. You can catch some problems upstream as build errors rather than waiting to catch them downstream in the generated code.
I've been having a great time using haxe & reflaxe macros for code generation.
You can have some minimal haxe code and build tiny compilers that use it as a source of truth for generating a http client, http server stub, cli entrypoint, docs entry, integration test, openapi spec.... Agents are good at writing the macros for whatever language you want to compile to, and now you've enforced agreement between these things as part of a build, which makes for several fewer things that you ought to be diligent about.
Unlike using something like yaml as your source of truth, haxe has a type system. You can catch some problems upstream as build errors rather than waiting to catch them downstream in the generated code.
Highly recommended.
This sounds amazing. I might give this a go!