Preheat the oven to 356º F (180° C). Grease a square cake pan of about 8.60 inches (22 cm) with some butter, and line it with parchment paper. Also, in a small bowl, sift the flour and salt.
Melt the butter with the chocolate pieces, which can be done in two ways. The first is in a double boiler, placing a medium saucepan with plenty of water over medium heat. Then, add both ingredients to a large heat-resistant bowl and place it on top of the pot with water (without touching the water) so that they melt with the steam.The second is in the microwave, adding the butter with the chocolate pieces to a large microwave-safe bowl and then melting them for 30-second intervals, i.e., put the bowl in the microwave for 30 seconds and take it out after this time to mix a little with a fork. Repeat the process until the chocolate is completely melted.
To the same bowl with the melted chocolate, add the cocoa powder with the two types of sugar and mix using a hand whisk until all the ingredients are perfectly integrated.
Add in the eggs with the vanilla extract and beat for 1 more minute until smooth and a little fluffy. Add the flour mixture and chocolate chips and incorporate with a rubber spatula until you get a smooth mixture.
Pour the mixture into the cake pan and even it out with the same rubber spatula. Set aside while making the cookie layer.
For the cookie layer:
In a medium bowl sift the flour, baking soda and salt. Separately, in a large bowl, cream the butter with the two types of sugar using an electric mixer or a hand whisk for 3 minutes until light and fluffy.
Add the egg and vanilla extract and beat for another 30 seconds until the mixture is smooth.
Add in the flour mixture and integrate with a rubber spatula to form a smooth batter. Finally, add the chocolate chips (reserving some to use at the end) and mix with the same spatula until they are incorporated throughout the batter.
Add pieces of cookie dough about 2 tablespoons each on top of the brownie mixture. These pieces of dough should be flattened a bit with your hands before placing them evenly on top of the brownie batter and then pressing them lightly with your fingers so that the two layers sort of come together. It is not necessary to cover all the brownie mixture with the cookie dough because in the end it looks better if you can see the brownie mixture as well from the top.
Bake the brookies at 356º F (180° C) for 30-35 minutes until a wooden toothpick comes out almost clean, with just a few crumbs on it. If the brookies start to brown too much on top, you can cover them with aluminum foil after 20 minutes of baking.
Remove the brookies from the oven and let them cool down for at least 40 minutes before cutting them. Then, turn them out and cut them into 16 equal parts. The brookies can be stored in a tightly closed tupperware container for up to 3 days at room temperature or up to 6 days in the refrigerator.