Add the template for stages and implement the "stage select" stage.