  The design of desired behaviors in mechanical metamaterials has produced
remarkable advances but has generally neglected two aspects - the inevitable
presence of undesired behaviors and the role of dynamics in avoiding such
behaviors. Inspired by similar hurdles in molecular self-assembly and protein
folding, we derive design principles to shape dynamical folding and misfolding
pathways in disordered mechanical systems. We show that such pathways, i.e.,
sequences of states traversed at a finite rate, are determined by the
bifurcation structure of configuration space which, in turn, can be tuned using
imperfections such as stiff joints. We apply these ideas to completely
eliminate the exponentially many ways of misfolding a self-folding sheet by
making some creases stiffer than others. Our approach also shows how folding at
different rates can controllably target different desired behaviors.
