Sift together the flour, cocoa powder, and baking soda into a bowl and set aside.
In the bowl of stand mixer fitted with a paddle attachment, beat together the butter, sugar, salt and vanilla until lightened, about 4 minutes. Add the dry ingredients and grated chocolate and mix to combine.
If the dough is soft, wrap it tightly in plastic wrap and refrigerate for 30 minutes. (The dough will keep, wrapped in plastic, for up to 1 week in the refrigerator for 1 week in the refrigerator or 3 months in the freezer). If the dough is not too soft, place it between two pieces of saran wrap, and roll the dough 1/2 inch thick on a lightly floured work surface into a 6-by-7 inch rectangle. Using a sharp knife or pizza cutter, cut the dough into 1-inch squares. Place them 2 inches apart on a parchment-lined baking sheet. Sprinkle lightly with sugar.
Preheat the oven to 350 degrees. Bake the cookies until they are firm, 10 minutes. Using a spatula, carefully transfer cookies to a wire rack. Store in airtight container for up to 2 weeks.
recipe from the Miette Cookbook and Bakery in San Francisco