Planning to avoid and manage catastrophic risk