This resurrects a useful part of the removed TacticAPI theory, with a much more generic implementation.