Automation requires us to put different pieces together in such a way that the process is clear for both humans and machines. The process must be reproducible and capable of evolving as new ideas come to us or requirements change. Automating content creation can be achieved with literate programming, which comes from Donald Knuth's Literate Programming, 1992 (http://www-cs-faculty.stanford.edu/~knuth/lp.html). The basic idea is that a document is viewed as a combination of text and code. Code is divided into chunks with text surrounding the code chunks explaining what is going on. Text adapts as necessary to keep the ideas behind the code updated, clear, and accurate.
Literate programming...