This mantidfly was found "dancing" on a milkweed leaf. I've found them doing this from time to time - a forward and back rocking motion while striking out with the forelegs. Wings are held vertically above back. I suspect the purpose might be to attract a mate, or possibly some defensive activity.