Fry the onion in a deep frying pan or casserole dish with the butter for around 8 mins until soft. Add the rosemary and spelt and cook for 2 mins more, then add the flour and stir until it stops looking dusty. Stir in the stock, then the redcurrant jelly and vinegar. Bring to a simmer and cook for 10 mins. Stir in the cabbage and simmer for 15 mins more, then add the beetroot and apple and continue simmering for another 10-15 mins, until the apple is softening, the spelt is tender and the sauce has thickened and reduced. Remove from the heat and season.
To make the pastry, melt the butter with 100ml water and the horseradish in a small saucepan. Combine the flours, mustard powder and ½ tsp salt in a large bowl, then make a well in the centre. Pour in the melted butter mixture and combine with a wooden spoon. Knead with your hands for a couple of minutes to bring together into a smooth dough. Butter a 23cm pie tin, then roll out two-thirds of the pastry to line its base and sides, leaving a little overhanging. Roll the remaining pastry into a circle that’s large enough to cover the top.
Spoon the filling into the pie case to form a dome, then carefully top with the pastry lid. Press the edges together to seal, then trim and crimp it with your fingers to neaten. You can use any spare pastry scraps to decorate the top, if you like. Chill the pie in the fridge for at least 30 mins.
Heat the oven to 200C/180C fan/gas 6, and brush the egg all over the pie. Season the top, then poke a steam hole into the centre and bake for 40-45 mins, until the pastry is crisp and well browned.