In this paper, the Non deterministic Repairable Fault Tree (NdRFT) formalism is proposed: it allows the modeling of failures of complex systems in addition to their repair processes. Its originality with respect to other Fault Tree extensions allows us to address repair strategy optimization problems: in an NdRFT model, the decision as to whether to start or not a given repair action is non deterministic, so that all the possibilities are left open. The formalism is rather powerful allowing the specification of self revealing events, components degradation, whether local repair, global repair and preventive maintenance can be applied, and the resources needed to start a repair action. The optimal repair strategy with respect to some relevant system state function, e.g. system unavailability, can then be computed by solving an optimization problem on a Markov Decision Process derived from the NdRFT. Such derivation is obtained by converting the NdRFT model into an intermediate formalism called Markov Decision Petri Net (MDPN). In the paper, the NdRFT syntax and semantics are formally described, together with the conversion rules into MDPN. The application of NdRFT is illustrated through examples.