We discuss a rigorous unifying framework for both planning and replanning, extending an existing logic-based approach to resource-based planning. The primitive concepts in this Action Resource Framework (ARF) are actions and resources. Actions consume and produce resources. Plans are structures composed of actions, resource facts and an explicit dependency function specifying their interrelationships. In this framework, both planning and replanning are conceived as plan transformation processes accomplished by applying sequences of operations on plans. For this, we introduce operators for plan transformation and define the concept of a plan library. Using a refinement planning template, we show how some existing (re)planning methods and heuristics can be described as special cases of this framework. The advantage of the framework is that it offers a unifying view on planning and replanning.