Formalizing the repair process