PromptSharp › Prompt Library › Vibe Coding › Spec-first prompting: write the contract before you ask for code
Spec-first prompting: write the contract before you ask for code
You're about to ask the AI to build a feature. Write the one-page spec first — vague asks are why builds go sideways.
The prompt — copy and run it
You are a product-minded software architect helping a non-engineer specify a feature BEFORE any code is written. I will describe what I want in plain language. Produce: A) SPEC — what the feature does in 5 sentences or fewer: the user, the trigger, the inputs, the outputs, and what 'done and working' means in observable terms I can check myself. B) EDGE CASES + NON-GOALS — the inputs and situations the feature must handle (empty, wrong format, double-submit, slow network), and an explicit list of what this version will NOT do, so scope stays fixed. C) DATA + STATE — what needs to be stored or remembered, where it lives, and what happens to existing data if this changes. D) BUILD REQUEST — the spec rewritten as a single, precise instruction I can paste into my AI coding tool, with the acceptance checks listed at the end. Inputs: [WHAT I WANT, IN PLAIN LANGUAGE] · [THE APP IT LIVES IN + TECH IF KNOWN] · [WHO USES IT] · [WHAT EXISTS TODAY] Rules: Do not invent requirements, tech constraints, or existing behavior I didn't state — list every assumption as an open question for me to answer instead. Where 'done' can't be checked without running the app, say exactly what I should click and what I should see so I can verify it myself. Never include API keys, passwords, or customer data in the spec — reference them as named placeholders.
How to use this prompt
- Copy the full prompt above with the Copy button.
- Fill in your inputs. Replace each bracketed placeholder with your specifics:
[WHAT I WANT, IN PLAIN LANGUAGE][THE APP IT LIVES IN + TECH IF KNOWN][WHO USES IT][WHAT EXISTS TODAY] - Paste into ChatGPT, Claude, or Gemini and run. Read the reality guardrail below before you act on the output.
Why this prompt works
Most AI-built features fail at the ask, not the code — a vague prompt gives the model room to guess. Writing observable 'done' checks and explicit non-goals before any code turns the model from a mind-reader into a contractor with a contract, and the assumptions-as-questions rule stops invented requirements from becoming silent scope.
Get a prompt like this in your inbox
The PromptSharp Vibe Coding Brief ships one desk-ready prompt every weekday — free on the web today. The Vibe Coding email edition is part of Pro: Vertical Pro is $14.99/mo, with a 14-day free trial, cancel anytime. Vibe Coding Pro is open now: your emails start the next weekday after you subscribe, with full Pro issues within days. The Vibe Coding prompt stays free on the web every weekday, and PromptSharp Daily (free) emails one prompt each weekday.
Email edition with Pro → Read a sample issueWant the full PromptSharp Vibe Coding Brief, not just the free prompt? Vertical Pro is the full Pro benefit set for ONE vertical. See what Pro includes.
Card required. Free for 14 days, then $14.99/month — renews automatically until you cancel. Cancel anytime before day 14 and you won’t be charged. One free trial per card. Manage or cancel anytime.
Frequently asked
When should I use this prompt?
You're about to ask the AI to build a feature. Write the one-page spec first — vague asks are why builds go sideways.
Why does this prompt work?
Most AI-built features fail at the ask, not the code — a vague prompt gives the model room to guess. Writing observable 'done' checks and explicit non-goals before any code turns the model from a mind-reader into a contractor with a contract, and the assumptions-as-questions rule stops invented requirements from becoming silent scope.
What mistake does this prompt help you avoid?
The unwritten spec — edge cases and non-goals nobody stated. Observable done-checks and an explicit will-NOT-do list pin the contract before code exists.
Related Vibe Coding prompts
Architecture options: three ways to build it, priced in plain English
Before you accept the first approach the AI suggests, make it lay out the real options and what each costs you later.…
Data model first: describe what your app stores before you ask for screens
You are about to ask an AI to build an app and you have only thought about the screens. Define the data first so the screens have …
Diff self-review: make the AI explain its own change before you accept it
The AI changed five files and you're about to click accept. Make it review its own diff like a skeptical outsider first.…
Explain this code to me: a plain-English walkthrough before you change it
You need to change part of your app but you do not understand the code the AI wrote. Get a walkthrough you can follow so the next …
Make it work, then make it right: the safe refactor pass
The feature finally works but the code is duct tape. Run a behavior-preserving cleanup — without letting the AI 'improve' it into …
Pre-launch security sweep for a non-engineer: keys, open endpoints, unprotected pages
You built it with AI help and you're about to put it in front of real people. Run the leaked-key, open-endpoint and unprotected-pa…
Launch-day checklist: backups, error alerts, and a way back before real users arrive
Your app is about to get its first real users. Make sure you can see problems, restore data, and undo a bad release before anythin…
All Vibe Coding free prompts
The PromptSharp Vibe Coding Brief page — five full free prompts plus today's issue.
PromptSharp Daily — free
The cross-vertical sampler: one sharp, copy-paste prompt most weekday mornings, plus a Sunday roundup, rotating across the roster. Two things in one brief: you get better at AI and prompting, and you see the sharpest prompts from across the network. If a day's issue misses our quality bar, we hold it instead of padding your inbox.
Double-opt-in. Unsubscribe anytime. No spam, ever.
Even a sharp prompt starts from zero unless your AI knows you. Brainfile is persistent context — your work, voice, and priorities loaded into every session. Brainfile is the memory; PromptSharp is the playbook. Together they compound — the same prompt gets sharper because it runs on YOUR context.
Set up your brainfile →Want both? The All-Access + Brainfile annual bundle covers the pair.
Home · Daily Issues · Prompt Library · Glossary · Pricing · For Teams & Universities · Archive · PromptFluent alternative · Newsletter · PromptSharp on Substack · Privacy · Terms · Refunds
Marketing · Sales · Dev & Engineering · Finance · Product Management · Vibe Coding · C-suite · Consulting & Strategy · Law · CPG · Personal Finance · Career & Job Search · Trading · Health & Fitness · Students · Focus & Productivity · Learning · Travel Planning
Entry Point Trading
Free weekly stocks to watch —
how our model ranks the S&P 500 and Nasdaq 100.