Prep the pan and oven: Preheat the oven to 350°F (175°C). Line an 8x8-inch baking pan with parchment paper, leaving overhang for easy lifting.
Lightly grease the paper.
Make the brownie base: In a heatproof bowl, melt butter and chopped sugar-free chocolate together using short microwave bursts or a double boiler. Stir until silky.
Sweeten and emulsify: Whisk in erythritol and allulose while the mixture is warm. Add eggs and vanilla, whisking until glossy.
Dry ingredients for brownies: Sift in almond flour, cocoa, baking powder, and salt.
Fold until just combined. Stir in chocolate chips if using.
Spread brownie layer: Pour the brownie batter into the prepared pan and smooth the top evenly.
Make the cookie dough: In a separate bowl, beat softened butter with erythritol and allulose until light and creamy, about 1–2 minutes. Mix in egg and vanilla.
Dry ingredients for cookies: Whisk almond flour, coconut flour, baking soda, and salt together.
Add to the wet mixture and stir until a soft dough forms. Fold in chocolate chips.
Layer the brookie: Scoop small spoonfuls of cookie dough over the brownie layer, spacing them out. Gently press to flatten and connect, leaving a few brownie peeks for a marbled look.
Bake: Bake for 22–28 minutes, until the cookie top is golden at the edges and the center looks just set.
A toothpick should come out with a few moist crumbs but not wet batter.
Finish and cool: Sprinkle with flaky sea salt. Cool completely in the pan (about 1 hour) before lifting and slicing. For clean edges, chill 20–30 minutes before cutting.