This paper presents RepairSHOP a system capable of performing plan adaptation and plan repair. RepairSHOP is built on top of the HTN planner SHOP. RepairSHOP has three properties. The first property is its design modularity, which makes it is straightforward to apply the same process discussed in this paper to build plan adaptation capabilities in other HTN planners. Second, RepairSHOP can perform plan repair. Third, RepairSHOP takes into account failed traces during plan adaptation/repair. As a result, it can result in improvements in running time performance. We performed experiments demonstrating performance gains of plan adaptation over plan generation from the scratch, measured in CPU time for problem solving.1