In a medium bowl whisk together all-purpose flour, baking powder and sea salt, then set aside.
Using a stand mixer cream together softened butter and sugar for about 3 minutes, scraping down the sides of the bowl as needed, on medium low speed.
Add in the egg and vanilla and beat for about 30 seconds.
Slowly add in flour mixture just until combined.
Divide the dough in half, leaving one ball in the mixer bowl, then add cocoa powder and ground espresso and mix until fully incorporated (note: if there is any on the bottom of the mixer that is not blending add ½ teaspoon of milk or water and run again).
Shape each dough ball into a log on top of plastic wrap then wrap loosely.
Gently roll it back and forth until it is about 12 inches long, then flatten all 4 sides with a flat surface like a baking sheet to create a long rectangle (note: I like to do both at the same time, so they are the same sizes).
Tighten the plastic wrap and chill for at least 30 minutes.
Working with 1 at a time, slice each square log into three equal strips of dough, then lay each strip flat and cut into three more each, making nine total.
Repeat for the other color, then alternate dough strips to create a checkered pattern (vanilla, chocolate, vanilla) using a pastry brush, lightly coat joining edges with the egg wash and carefully press the 3 together.
Repeat once more with the same pattern, then alternate chocolate, vanilla chocolate.
Once you have those 3 done, brush them with the egg wash and stack them on top to create a square.
Repeat for the other 9 strips. Cover in plastic wrap and chill again for at least another 30 minutes.
Preheat oven to 350F degrees and line a cookie sheet with parchment paper.
Remove the dough from the fridge and cut ½ inch wide cookies with an inch or so space between; they will puff a little, but they will not spread too much.
Bake cookies for about 8 minutes, the edges should just start to be turn gold. Allow them to cool for 10 minutes on the cookie sheet and then transfer to a wire rack.