You will need: four round metal or disposable pie dishes, 10cm in diameter, 3cm deep.

First make the pastry. Put the flours, potato starch, xanthan gum and salt into a sieve set over a bowl. Muddle with your fingers, then push through the sieve once or twice until well mixed together. Work in the butter with your fingertips until the mixture looks like fine breadcrumbs. Mix in the beaten egg and lemon juice, then add a little water, half a tablespoonful at a time, until the dough comes together.

Tip the dough onto a floured work surface and form into a thick disc. Wrap in greaseproof paper and chill for an hour.

Separate the chard stalks from the leaves. Slice the stalks into bite-sized pieces and the leaves into ribbons. Place the stalks in the bottom of a steamer basket and top with the leaves and the spinach. Steam for three minutes, in batches if necessary, until only just tender. Remove the stalks and set aside. Put the chard and spinach leaves in a sieve and use the back of a wooden spoon to squeeze out as much moisture as possible. Squeeze with your hands as well, to extract every last drop.

Next, heat the oil and butter in a high-sided frying pan over a medium heat. Fry the shallots for two minutes until translucent, then add the chard stalks, broad beans, wild garlic, nettles, thyme and lemon zest. Season with salt and pepper and fry for another minute. Reduce the heat to medium-low, then stir in the squeezed-dry chard and spinach leaves. Fry for two minutes to heat through. Remove from the heat and leave to cool slightly.

Preheat the oven to 180°C. Lightly grease the dishes.

Mix together the ricotta cheese, Parmesan and all but one tablespoon of the beaten egg in a bowl. Stir into the vegetables.

Divide the pastry into four equal chunks. Pinch off about a quarter from each chunk for the lids. Roll out the larger pastry pieces into 17cm circles. Lift carefully and place in the pie dishes, pushing into the corner with the edge of your index finger. Trim edges with scissors, reserving the trimmings. Patch any cracks by pressing the dough together with your fingers.

Fill with the vegetable mixture, packing it in well. Paint the pastry edges with some of the saved beaten egg.

Combine the pastry trimmings from each dish with the smaller pieces of dough. Form into four small balls and roll out to 11cm circles. Place on top of the pies and seal the edges by pressing with your fingers or the back of a fork. Brush with the beaten egg and sprinkle with a few sea salt flakes. Prick the surface in several places with a fork.

Put on a baking tray and bake for 20 minutes, or until golden. Serve hot or at room temperature.

Cook’s note If you can’t get hold of wild garlic or nettle leaves, use a little more chard and spinach.