In 2009-ish I wrote a Java-based templating system for Autosys' Job Information Language. If you don't know it, Autosys is a horrible, horrible, job management and scheduling system. You define these little files (.jil extension) that specify not only the job definition (command, user, cron-like schedule, etc.), but also its dependencies (which job must run before this one, what runs after...). Nothing wrong with that approach, per se, but there's essentially no way to validate the correctness of a job and its dependencies until it's running live in production. Often jobs would fail to run when you expected, or become quietly orphaned by some change to another upstream job.
So I wrote a disgusting (yet fluent!) enum-based monster called JILT (Job Information Language Template), that required that every existing .jil file be rewritten as a statically-typed java enum which could then be used to spit out the entire tree of validated .jil files. The nice thing was that your job dependencies were now enforced by the compiler and could be included in CI. But the actual inner workings were a hot mess. And of course, now the support teams have two systems to maintain and ensure they remain in sync.
This was at Goldman Sachs and I hear it's still under active development by the support teams...