The spec starts as a text file.
Three bullet points. Maybe five. What the thing should do, written fast, before the doubt arrives.
Then the PM hat goes on.
Is this one feature or three. Does anyone need this besides you. How small before it stops being the thing. Questions nobody's asking because there's nobody else to ask them.
The backlog lives in a markdown file. Or a notes app. Fourteen items, three starred, one that's been there since the beginning and will probably stay there forever.
Prioritization is a conversation with yourself. The feature that sounded perfect at midnight looks different at 9am. But midnight-you already started building it.
The hardest part isn't writing the spec. It's arguing with the only person who can override it.
Same person wrote the requirements and the exceptions.