What's the source of truth?
Teach the Elm compiler about external things like schemas
Macros in other languages
Vanilla code generation can be inspected and debugged like plain handwritten code
Gitignore gen code so you know you didn't forget to generate it on the build server
Rerun code gen when the source of truth changes ideally
The Design of Everyday Things by Donald Norman