basically you answers a questionnaire (with conditions betweens questions like "ask this question only if A and B are both physical person with revenue < 20000 euros a years")
and at the end these answers are used to generate a template (with things like "put this paragraph as many times as they are people involved" )
the templates and questionnaires were made once (and updated every once in a while when law changed) by a specialist.