Preheat the oven to 350 degrees F.
Wash the potatoes, prick them with a fork and place them on a sheet pan. Bake them until very soft, about 1 1/2 to 2 hours. (Resist roasting them at a higher temperature to speed up the process--you want the skin and flesh just inside the skin to become crusty.) Cool them slightly and scoop out the insides. Rice the scooped potato with a ricer, or mash them with a fork. Place them in a bowl and cover with a damp cloth to retain their heat. The potatoes must be used while they are still very warm.
Beat the eggs and yolk lightly together in a small bowl. Add them to the potatoes along with the flour, rosemary, salt, a few grinds of freshly ground black pepper. Mix gently with your hands until all the ingredients are well incorporated and the dough is smooth.
Turn the dough out onto a lightly floured flat surface. Lightly knead and add a little more flour if the dough is overly sticky. Let the dough rest for 10 minutes, uncovered.
Roll the dough into thin 1/2-inch thick logs and cut into 1/2-inch pieces. Using a generous amount of flour, press each piece against your thumb tip to make a dent or roll it over the back and off the tip of a floured fork tines to make the traditional ridged shape. Place the finished gnocchi on a lightly floured sheet pan. Cook them as soon as possible in boiling salted water. (For every 5 quarts of water add 2 tablespoons of kosher salt.)
Add the gnocchi to the boiling water. When they rise to the top, let them cook for a minute or two and then remove them with a slotted spoon. Drain well and toss with butter.
If the gnocchi are not to be cooked right away, they should be frozen. The gnocchi can be made up to two weeks in advance and frozen on sheet pans. Once they are frozen solid they can be transferred to a sealable bag or wrapped tightly to avoid freezer burn. Do not thaw them before cooking or they will stick together. To cook them, throw the frozen gnocchi directly into the boiling salted water without thawing. Their cooking time will be slightly longer than unfrozen but their preparation should be completed in the same manner as with fresh gnocchi.