The format you pick for specs is the easy part. The hard part is knowing what is worth writing down and having a good harness around it that helps you without being in your way. A few practical principles for writing specs that an LLM can actually build from, with a small example.
Generated code does roughly what you asked, but you can't tell from reading it which decisions were deliberate and which the model just guessed. Specs are where those decisions go so they don't end up living only in the generated source.
Ossature is an open-source harness for spec-driven code generation. Write specs, validate, audit, review the build plan, and generate code with full control at every step.