In the microwave or a saucepan over low heat, melt butter. Stir in the brown sugar, molasses, salt, and spices and mix well to combine. The mixture will be dark and smooth.
Remove from the heat and let cool slightly. Whisk the egg into the cooled mixture.
In the bowl of a stand mixer with paddle attachment, whisk the baking powder, soda, and flour. Slowly pour the molasses mixture into the dry ingredients. Beat at a slow speed until the batter is well combined, about thirty seconds. The dough will be very pliable and sticky. It'll firm up once it's chilled, so don’t add flour.
Divide the dough in half and form the dough into discs. Wrap in parchment or plastic and refrigerate over night or for at least two hours.
Preheat the oven to 350° and line three cookie sheets with parchment paper. It is important to place the shaped cookies onto a cool or room temperature cookie sheet. If you don’t have enough sheets to alternate, make sure to allow the pan to cool completely in between batches.
The easiest way to roll out these cookies is by placing the refrigerated disc between two silpat mats or sheets of parchment paper. The dough is incredibly sticky and the barrier prevents tearing. Roll to ⅛ or ¼ inch thick. I prefer ¼ inch for gingerbread men or gingerbread houses. This is thick enough that they can be handled without easily breaking.
Place the shapes on the lined baking sheets, leaving about an inch between the cookies. Bake for about 9-12 minutes. The cookies will have tiny little popped air bubbles in their centers and the edges will firm. After about two minutes, slide the parchment paper off of the baking sheet and onto the counter. The cookies can cool on the parchment or be transferred to cooling racks.
Store the cookies in air tight containers at room temperature for up to a week, or freeze immediately in freezer bags for up to three months. Decorate with royal icing.