Preheat the oven to 375°F (190°C).
Bring a large pot of salted water to a boil and cook the broken spaghetti according to package directions until al dente; drain and set aside.
Slice each garlic knot horizontally to create a top and bottom half.
Arrange the bottom halves of the garlic knots in a single layer in a 9x13-inch baking dish.
Spoon about 1/3 cup of basil pesto across the bottoms of the garlic knots, spreading evenly.
Spread the cooked spaghetti over the pesto-layered knots, then pour the roasted garlic pasta sauce evenly over the pasta.
Sprinkle the shredded mozzarella and parmesan cheese evenly over the sauce.
Place the top halves of the garlic knots over the cheese in an even layer.
Bake in the preheated oven for 12–15 minutes, until the knots are lightly browned and the cheese is melted.
Whisk together the melted butter, garlic powder and chopped parsley, then brush the mixture over the hot garlic knot tops.
Serve hot.