In a 10-inch skillet, combine garlic and oil and cook over low heat, stirring occasionally, until garlic is pale golden brown, 6 to 9 minutes. Off heat, stir in fennel seeds and pepper flakes until fragrant, about 30 seconds. Stir in artichokes; set aside.
In a pot or large sauté pan of salted boiling water, cook spaghetti, stirring frequently, until al dente. Reserve 1 cup cooking water, then drain pasta and return it to pot.
Scrape reserved artichoke-garlic oil into pasta, then add cheese, nuts, lemon juice, and ½ cup reserved cooking water. Stir until pasta is well coated with oil and no water remains in bottom of pot, adjusting with more reserved cooking water as needed.
Season with salt and pepper to taste. Transfer to serving dishes and sprinkle with parsley and extra cheese.
