Preheat oven to 350°F.
Combine the melted margarine, sugar, eggs, and vanilla, and stir until smooth. Add cocoa, flour, salt, and baking powder. Mix by hand until completely combined, and there are no lumps. Do not overmix.
Pour into a greased 8 x 8 inch pan. Bake for 25 minutes. (It’s okay if it is slightly undercooked, since the brownies are going back into the oven inside the cookies.) Once brownies are done, allow to cool completely.
Gently mix the flour, baking powder, baking soda, and salt with a fork in a bowl. In the bowl of a stand mixer, beat the margarine and sugars until smooth. Add the eggs one at a time, allowing each egg to blend into the sugar mixture before adding the next. Beat in the vanilla with the last egg. Mix in the flour mixture until just incorporated. Fold in the chocolate chips, mixing just enough to evenly combine.
Lower the oven to 325°F.
Using a teaspoon, scoop a ball of brownies out of the pan. Gently roll it into a 1 inch ball. Working with damp hands, flatten a ball of chocolate chip cookie dough around the brownie ball. Place on greased cookie sheet. Repeat until done.
Bake for 17-20 minutes, or until golden brown. Allow to cool for 5 minutes before removing from pan.