This is a master recipe, more technique than recipe. You can mix pureed herbs into the dough, roll it into a sheet and cut into ravioli, poach the gnocchi, or poach and then brown them in butter until crispy.
Preheat the oven to 450°F. Spread a layer of kosher salt on a baking sheet and arrange the potatoes on top (see Chef's Note). Bake until a bit overcooked, about 1 hour. Let sit until cool enough to handle, cut in half, and scoop out the flesh. Reserve the potato skins, if desired, for another use.
Pass the potatoes through a potato ricer or grate them on the large holes of a box grater. You should have about 2 cups. In a large bowl, whisk together 3 of the egg yolks, the cheese, nutmeg, salt, and pepper. Add the potatoes and mix well. Sprinkle 1/2 cup of the flour over the potatoes and, using your knuckles, press it into the potatoes. Fold the mass over on itself and press down again. Sprinkle on more flour, little by little, folding and pressing the dough until it just holds together. Work any dough clinging to your fingers back into the dough. If the mixture is too dry, add another egg yolk or a little water. The dough should give under slight pressure. It will feel firm but yielding. To test if the dough is the correct consistency, take a piece and roll it with your hands on a well-floured board into a rope 1/2 inch in diameter. If the dough holds together, it is ready. If not, add more flour, fold and press the dough several more times, and test again.
Keeping your work surface and the dough lightly floured, cut the dough into 4 to 6 pieces. Roll each piece into a rope about 1/2 inch in diameter. Cut into 1/2-inch-long pieces. Lightly flour the gnocchi as you cut them. You can cook these as is or form them into the classic gnocchi shape with a gnocchi board, ridged butter paddle, or the tines of a large fork turned upside down. Rest the bottom edge of the gnocchi board on the work surface, then tilt it at about a 45-degree angle. Take each piece and squish it lightly with your thumb against the board while simultaneously pushing it away from you. It will roll away and around your thumb, taking on a cupped shape with ridges on the outer curve from the board and a smooth surface on the inner curve where your thumb was. (Shaping them takes some time and dexterity. You might make a batch just for practice.) The indentation holds the sauce and helps gnocchi cook faster.
As you shape the gnocchi, dust them lightly with flour and scatter them on baking sheets lined with parchment paper or waxed paper. Cover with a kitchen towel and set aside until ready to cook, up to several hours. If you will not cook the gnocchi until the next day or later, freeze them. Alternatively, you can poach them now, drain and toss with a little olive oil, let cool, then refrigerate several hours or overnight. (To reheat, dip in hot water for 10 to 15 seconds, then toss with browned butter until hot.)
When ready to cook, bring a large pot of water to a boil and add salt. Drop in the gnocchi and cook for about 90 seconds from the time they rise to the surface. Remove the cooked gnocchi with a skimmer, shake off the excess water, and serve as desired.
Variation for Herb Gnocchi: These are great tossed with tomato conserva (peeled, seeded, and chopped sun-dried tomatoes preserved in olive oil), ricotta, and grated Parmesan, or with Quick Tomato Sauce. Blanch 2 cups packed fresh basil or 1 cup packed fresh mint in boiling salted water for 15 seconds. Plunge into an ice bath to stop the cooking, drain well, and squeeze out as much water as you can between your hands. Roughly chop the herbs. Place in a blender with the egg yolks, cheese, nutmeg, salt, pepper, and 1/4 cup cold water. Puree until smooth. Transfer mixture to a large bowl and proceed as directed by adding the potatoes and mixing well. Because of the additional water, the gnocchi will need about 1/4 cup more flour to form a dough. Serves 4 to 6.
Chef's Note: Baking potatoes on a layer of salt allows heat to circulate 360 degrees. Scrape the salt into a jar and reuse it again and again. If you do not have time to shape the gnocchi, you can freeze the dough, defrost it in the refrigerator, and then shape it. To freeze shaped gnocchi, line baking sheets with waxed paper and dust with flour. Spread the gnocchi on the prepared sheets and freeze until hard. Remove to individual-portion-size freezer bags. Store in the freezer for up to 1 month. To cook, drop the frozen gnocchi into boiling salted water. Cook for about 2 minutes after they rise to the surface.