Emit metadata in stitch-up

Should be sorted, and always come after the docstring.