Brown the butter in a saucepan over medium/high heat until it melts, bubbles, and foams. Remove from heat and let cool for 30 minutes.
In a large bowl, whisk together the flour, baking powder, baking soda, and salt.
In another large bowl, combine the browned butter and sugars using an electric mixer for a couple of minutes.
Add the egg yolks and whisk for 2-3 minutes until combined.
Measure in the sourdough discard and vanilla extract, mixing until smooth.
Add the flour mixture and mix on low speed until combined into a dough.
Switch to a paddle attachment and add the chocolate, mixing briefly until evenly distributed.
Press clingfilm onto the surface of the dough and refrigerate for at least 4 hours.
Preheat the oven to 180C (160C Fan) and line baking trays with parchment paper.
Roll the dough into balls (about 70g each) and place 6 per baking tray, sprinkling with flaked sea salt.
Bake for 16-18 minutes until lightly browned. Allow to cool on the tray for 10 minutes before transferring to a wire rack.