Dear Zeke,
Thank you for your quick response on this point. It looks like a start… but you clearly have in mind a markup language which LaTeX is not. We are never going to be able to just mark things up and wait for compilation to make them beautiful.
In LaTeX I need to define a macro such as \client which outputs the client's name (user defined, of course). So, the difficult part for me is: how to I name the various people we have to name (client, other guy, various other guys). We should probably opt for a user-defined macro name. I assume the best possible way of implementing it would be something like \party{Company 1} or \party{Dude} where the word between braces is user defined with full name (Company X Y Z), short name (The Company) and personal key for it (Company 1).
So, what we need is a list of all of the things that need such macros and an example use of them. When and how should we expand the raw data.
The same goes with all of the placeholders, which need specific macros for defining them. I can output the date, and I can convert numbers into various date formats, but I need to create a macro called \date{2016-08-19} that does it.
What do we need to include in the outline, index and closing checklist? What is the format of a schedule (if not text)? What about the exhibit?
I don't understand what you are saying about tables. What are they and what are the tags in them? What is the class-thing?
About the glossaries, if I understand correctly, you suggest having a glossary printed at some point in the main document, and referring to it in any sub-contract that may or may not be read separately. This sounds fine.
Cross references are possible too with LaTeX, so no problem there although we need to specify a labelling (tagging, for you) policy. I would suggest something like: \ref{article:1.2.4} unless the person has specifically assigned a label to that article such as \ref{LiabilityWaiver}. This way, there is automatic labelling, but you can always override it with a more robust system by adding you own labels. And we may want to also automate it within the clause library.
Once we have that, we can create a template like the one you suggest, in which we will fill a .tex document with dummy metadata and predefined sections for the stuff most contracts will require. But as you can see, this is the final and easiest step in the process.
Thanks again for your input. Will look more into it when I have time and try to provide you with the sample I have already coded (I need to translate it from French though).
Best wishes,