Regarding the rules: the implementation is open source in Archie. It outputs things such as 'set the value at this path to this', and 'this part of the data must exist (is mandatory)'.If anyone would like to try, there's an imementation running at archetype-editor.nedap.healthcare. sign up and login, create a repository. Using the basic editor you can only define sums and averages. If you click 'advanced editor' at the bottom, you can see and edit the rules to achieve quite a lot more, and there's a form implementation that executes them as well. Note that this form only does compositions, observations and evaluations. (edited)
Oh it also outputs a copy of the object provided as input, modified by the rule evaluation, plus whatever assertions failed and succeeded, of course
For editing the rules by hand, I would recommend the visual studio code extension, but it cannot execute them on data