I've never had much success with this. It starts out fine and then I'm like "I'm being stupid, I should write some code to write this code for me." Then later "I should write some code that will write the code that'll write the code for me." Then I get lost in all the abstraction and say "fuck it, I'll just play a video game".
I just end up refactoring the same 3 classes, pass out, and wake up to clean code with documentation. It's like the cobbler and the elves but code and weed.