In the bowl of a stand mixer fitted with the paddle attachment, beat butter and confectioners’ sugar at low speed until combined, 1 to 2 minutes. Beat in egg yolk and vanilla.
In a small bowl, whisk together flour, baking powder, and salt. Add flour mixture to butter mixture, and beat at low speed until combined and a dough starts to form.
Turn out dough, and knead dough together. Divide dough in half (about 205 grams each). Shape one half into a 7-inch log, and wrap in plastic wrap. Return remaining dough to bowl of stand mixer. Add cocoa and red pepper, and beat at low speed until combined. Shape into a 7-inch log, and wrap in plastic wrap. Refrigerate logs until firm, about 30 minutes.