Bring a large pot of salted water to a boil. Add the pasta and cook according to package instructions until al dente. Reserve 1 cup pasta cooking water, then drain the pasta.
Meanwhile, using the large holes of a box grater, grate the cut ends of the tomato into a large bowl. Discard or compost skins. Grate the butter into the bowl as well. Using the small holes of the box grater, grate the garlic into the bowl. Add the red-pepper flakes, and season generously with salt. Refrigerate until ready to use.
Return the drained pasta to the pot, along with the bowl of grated tomato and butter. Set over medium-high heat and cook, stirring constantly, until the mixture thickens slightly and glosses the pasta, 2 to 3 minutes (the sauce will thicken as it sits). Add pasta water as needed to emulsify the sauce. Season to taste with salt and pepper. Serve with more red-pepper flakes, black pepper, basil and Parmesan as desired.