Start with the filling. Boil the potatoes until completely tender, then drain and mash while still hot. You want them smooth — no lumps.
Dice the onions finely and cook them slowly in the butter over a low heat. Stir now and then, and give them a good 15-20 minutes until they turn golden and sweet. Set half aside for the topping.
Crumble the twaróg into the mashed potato. Add the remaining caramelised onions, season well with salt and pepper, and mix it all together. Taste it — the filling should be well-seasoned on its own.
For the dough, tip the flour into a bowl and rub in the soft butter with your fingertips until it looks like coarse breadcrumbs.
Pour in the hot water a little at a time, stirring with a fork, until the mixture comes together into a rough ball. Turn it out and knead gently for a couple of minutes — just enough to make it smooth. Don't overwork it.
Wrap the dough in cling film and leave it to rest for half an hour at room temperature. This makes it much easier to roll.
Roll the dough out on a lightly floured surface until it's about 2-3mm thick. Cut circles using a round cutter or the rim of a glass — roughly 8cm across works well.
Place a tablespoon of filling on each circle, fold in half, and press the edges firmly to seal. Leave about a 1cm border and make sure there are no air pockets — they'll burst when you boil them.
Bring a big pot of salted water to a rolling boil. Drop the pierogi in a few at a time — don't crowd the pan. They're ready about 2-3 minutes after they float to the surface.
Lift them out with a slotted spoon, pile them onto a warm plate, and spoon over the reserved caramelised onions and a generous amount of melted sage butter. Eat immediately.