Preheat oven to 350°F (175°C). Line baking sheets with parchment paper or silicone mats.
In a medium bowl, whisk together flour, baking soda, baking powder, cinnamon, nutmeg, and salt.
Beat softened butter, brown sugar, and granulated sugar on medium-high until light and fluffy (3-4 minutes). Scrape bowl often.
Mix in eggs one at a time, then vanilla. Add sourdough discard and mix until uniform.
Gradually add dry ingredients on low speed just until no flour streaks remain.
Fold rolled oats and raisins (or chosen mix-in) into the dough with a spatula until evenly distributed.
Scoop rounded tablespoons of dough (2-tablespoon cookie scoop) onto prepared sheets, spacing 2 inches apart.
Bake one sheet at a time on center rack for 11-13 minutes, until edges are golden and centers appear slightly underdone.
Let cookies rest on the baking sheet for 5-10 minutes before transferring to a wire rack to cool completely.