Whisk together flour, cocoa powder, baking soda, and salt. Stir together butter, sugar, and egg. Add flour mixture to butter mixture, and stir to combine. Knead until a dough forms. Divide dough in half; roll out each half between 2 sheets of lightly floured parchment to 1/8-inch thick. Transfer to baking sheets, and refrigerate until firm, about 30 minutes.
Preheat oven to 350 degrees with racks in upper and lower thirds. Cut out 1-, 1 1/2-, and 2-inch heart shapes, making sure you have even numbers in each size for a total of thirty-four 1-inch, thirty-four 1 1/2-inch, and twenty-eight 2-inch cookies, rerolling scraps once. Place cookies 1 inch apart on parchment-lined baking sheets, and freeze until very firm, about 15 minutes.
Bake until firm and fragrant, about 8 minutes for 1-inch cookies, 10 minutes for 1 1/2-inch cookies, and 12 minutes for 2-inch cookies, rotating halfway through. Let cookies cool completely on baking sheets set on wire racks. Spread or pipe (using a pastry bag and a small plain tip), filling onto bottom side of half the cookies, and sandwich with remaining cookies, pressing gently. Cookies can be stored in an airtight container at room temperature up to 1 week.