This is a submission for DEV's Summer Bug Smash: Clear the Lineup powered by Sentry.

Project Overview

I build GigLegal alone. It is a contracts tool for freelancers, running on Next.js 15 with Prisma, and it carries 155 Playwright end to end spec files.

One feature matters for this story. The wizard uses a model to help a freelancer assemble a contract, and the design decision that shapes everything is what the model is forbidden to do. It never writes legal text. Not one sentence. Every clause in a finished contract comes out of a finite library that a human wrote and a lawyer can review, so the model's entire job is selection and filling: pick the right template off the shelf, flip the correct toggles, propose numbers into slots that already have bounds on them.

That constraint is the whole product. It is also the reason this bug was possible, because "choose from a fixed vocabulary" turns into a structured output request carrying a very large schema, and my first version asked for the wizard's sixty odd inputs in a single call.