It's not magic. It's thermodynamics and chemistry. Here is how to master the signature explosion of the Ghriba.
The crack happens when the inside of the cookie expands faster than the outside can set. This internal pressure forces the crust to rupture, creating those beautiful fissures.
Temperature control is the single most important factor. We want the surface to dry out and set before the center has finished rising.
Many Moroccan bakers start with top heat (broiler) only. This sets the crust immediately. When the heat penetrates the center, the rising dough has nowhere to go but to burst through the set crust. Once cracked, we switch to bottom heat to finish baking.
Cause: Oven wasn't hot enough, or too much flour/dry ingredients. The dough set too slowly or didn't have enough moisture to generate steam.
Cause: Too much sugar or butter. The structure was too weak to hold the rise, so it spread out instead of up.