Preheat the oven to 350 degrees F.
Grease a 13-inch by 9-inch pan with butter, line with parchment paper and grease again with butter. Start by making the cookie dough. In a medium bowl, combine the flour, baking powder, baking soda and salt. In a large bowl, use an electric mixer to cream the butter and both sugars until light and fluffy, about 3-4 minutes. Beat in the egg and vanilla extract. On low speed, mix the dry ingredients into the wet ingredients until just combined. Fold in the chocolate. Cover the bowl and chill in the refrigerator.
For the brownies, place the butter and chocolate in a heatproof bowl over a saucepan with 1 inch of simmering water. Stir occasionally as the chocolate and butter melt. Remove from the heat and transfer to a large bowl. Stir in the sugar and cocoa powder. Beat in the eggs one at a time and fold in the flour and salt.
Spread the brownie batter in an even layer in the bottom of the pan. Sprinkle about half the cookie dough crumbles across the top. (Reserve the remaining dough to bake cookies.) Cover the pan with parchment-lined foil and bake for 20 minutes, until just set. Bake an additional 27-30 minutes until the cookies are golden brown and a toothpick inserted in the center comes out with a few crumbs. Cool completely in the pan on a wire rack. Cut into 24 squares to serve.
For the leftover cookie dough, bake scant 1/4-cup-sized balls at 350 degrees F for 12-14 minutes.