I do not have experience with online collaborative programming, so I just opened a github account and created an issue regarding this, along with source code and a few more examples:
Suggestion: adding external scripting support to troff: https://github.com/n-t-roff/heirloom-doctools/issues/82 Would be happy to participate more if needed...