Prep the pan. Line an 8x8-inch baking pan with parchment, leaving overhang for easy lifting.
Lightly grease the parchment. Preheat oven to 350°F (175°C).
Melt butter and chocolate. In a heatproof bowl set over a pot of simmering water, melt the butter and chocolate, stirring until smooth. Remove from heat and cool 5 minutes.
Whisk in sugars and eggs. Whisk granulated sugar and brown sugar into the warm chocolate.
Add eggs one at a time, whisking well. Stir in vanilla. The batter should be glossy and thick.
Fold in dry ingredients. Sift in flour, cocoa, and salt.
Fold gently until just combined. Don’t overmix.
Bake the brownies. Spread batter in the pan and smooth the top. Bake 22–28 minutes, until the center is set and a toothpick shows moist crumbs (not wet batter).
Cool completely in the pan.
Heat-treat the flour. While brownies cool, spread 1 cup flour for the frosting on a baking sheet. Bake at 300°F (150°C) for 5–7 minutes, or microwave in 20–30 second bursts, stirring, until the flour reaches 165°F. Let it cool fully and sift if clumpy.
Make the cookie dough frosting. Beat softened butter, brown sugar, and powdered sugar until light and fluffy, about 2 minutes.
Mix in milk, vanilla, and salt. Add the cooled, heat-treated flour and beat until smooth. Adjust with a splash more milk if needed.
Fold in mini chips.
Frost the brownies. Once the brownie base is fully cool, spread the cookie dough frosting evenly over the top. Sprinkle extra chips or flaky salt if you like.
Chill and slice. Refrigerate at least 45–60 minutes to set. Lift out using parchment and cut into squares with a warm, sharp knife.
Wipe the blade between cuts for clean edges.