An autonomous spacecraft must balance long-term and short-term considerations. It must perform purposeful activities that ensure long-term science and engineering goals are achieved and ensure that it maintains positive resource margins. However, it must also respond in a timely fashion to a somewhat dynamic and unpredictable environment. CASPER uses iterative repair to support continuous modification and updating of a current working plan in light of changing operating context.