Whisk the buckwheat flour, cacao, baking soda and ground walnuts / pecans together in a bowl. In another bowl, whip the butter and the icing sugar with a hand-held mixer. Beat in the egg, lemon zest, rum, pinch of salt, cinnamon powder, allspice powder and ginger powder until just combined. Slowly add in the dry ingredients, mixing just until incorporated.
Wrap the cookie dough in plastic wrap and refrigerate for 30 minutes.
Preheat the oven to 165 °C / 330 °F. Shape small balls with your hands and place on the prepared baking sheets, lined with parchment paper. Place about 2 inches apart. Press a thumbprint into the center of each ball and bake for about 10 minutes. Meanwhile heat the grape jam and fill each indentation with about 1/2 teaspoon jam. Bake for another 4 minutes on 150 °C / 300 °F.
Cool the buckwheat cookies. Serve or store cookies in a tightly sealed container for up to 10 days.