Preheat your oven to 400°F and line a baking sheet with parchment paper.
Lightly flour a work surface and roll out the puff pastry into an 11x14-inch rectangle. Transfer the pastry to the prepared baking sheet.
Using a fork, prick the pastry all over to keep it flat. Brush the surface evenly with Dijon mustard, leaving a 1-inch border around the edges.
Sprinkle the minced garlic, minced shallot, and shredded Gruyère cheese inside the border, then arrange the asparagus spears neatly on top.
Drizzle with olive oil, then sprinkle the grated Parmesan cheese and season with salt and pepper. Bake for 20-25 minutes until the pastry is golden and puffed. Let cool slightly before slicing and serving.