An action theory of adaptation to climate change