It would be great if amphora-amp supported plugins in the same way that amphora-html does. Plugins export a render function that takes ref, data, locals and allows them to filter or move refs within the tree before they are rendered. Our use case would be for those components where we would want them in the head of the page, but amp only supports them in the body (namely, analytics components that we want to run before ads).
This was already implemented for amphora-html and would ideally be a similar PR.