Add documentation for template actions and non-terminal invocation