Refactor Mantis workflow to enforce transaction safety, support indeterminate states, and address feedback