While gnocchi is chilling, make the pesto by puréeing parsley, oil, chili flakes, and garlic in a food processor until smooth. Stir in speck, parmesan, and salt, and set aside. To make the soup, cook rosemary, lardo, bay leaf, carrot, and onion in a saucepan until soft. Increase heat, add wine, and cook until reduced by half. Add stock, beans, parsley, and water and simmer over medium heat until beans are tender. Add gnocchi, parmesan, butter, and puréed tomato, and simmer until the gnocchi is cooked through. Garnish with pesto and more parmesan.