Skip to main content
Building with AI (Vibe Coding)

⏱ About 15 min15 XP

A Prompt Is a Spec

Before a contractor pours a foundation, they need blueprints. Before a programmer writes a line of code, they need requirements. And before an AI builds something for you — a website, a script, a game — it needs a specification. That specification is your prompt. Most people treat prompts like search-engine queries: a few keywords, hit enter, hope for the best. But when you are asking an AI to build something, a prompt is doing a different job. It is a spec — a precise description of what you want made.

What Makes Something a Specification

A specification, or spec, is a document — or in our case, a piece of text — that describes a desired outcome completely enough that someone (or something) can produce it without guessing. Imagine you ask a friend to build you a birdhouse. 'Build me a birdhouse' is not a spec. Your friend now has a hundred unanswered questions: How big? What wood? One hole or two? Painted? What color? For what species of bird? A spec answers those questions before work begins. 'Build a cedar birdhouse, 10 inches tall, with a 1.5-inch circular entry hole centered 7 inches from the floor, unpainted, for Eastern bluebirds' — that is a spec. It removes guessing.

Key Definition

A specification (spec) is a description complete enough to produce a specific result without guessing. A build prompt is a spec you write for an AI. The more completely it describes the desired outcome, the less the AI has to guess — and the closer the first result will be to what you actually want.

Here is a real example. Suppose you want an AI to build a quiz app. Compare these two prompts: Weak: 'Make a quiz app.' Strong: 'Build a quiz app in HTML, CSS, and JavaScript. It shows one multiple-choice question at a time with four answer buttons. When the user clicks an answer, the correct answer turns green and the wrong ones turn red. After all 5 questions, show a score screen with the number correct out of 5 and a Restart button. Use these 5 questions: [questions here].' The strong version is a spec. The weak version is a wish. The AI can build from a spec. It can only guess from a wish — and it will guess wrong in ways you cannot predict.

The Four Components of a Build Spec

When you write a build prompt as a spec, aim to cover four things: 1. What to build — the artifact. A web page, a script, a game level, a form. 2. What it must do — the behaviors. What happens when the user clicks, types, submits. 3. What it must look like or feel like — constraints on appearance, tone, or style. 4. What it must not do or what limits apply — things to avoid, size limits, technologies to use or skip. You will not always know all four. That is fine. Write what you know. A spec does not have to be perfect — it has to be complete enough to get a useful first result that you can then refine.

Prompt Challenge

Write a build prompt (spec) for a simple countdown timer web page.

Your prompt should…

  • Name the artifact you want built (a specific type of web page or app)
  • Describe at least two behaviors — what happens when the user interacts with it
  • State one visual or style constraint
Start With the Artifact

If you are not sure where to begin your spec, start with the artifact: 'Build a ___.' Naming the thing you want — a calculator, a login form, a sorting visualizer — gives the AI a frame. Everything else you add narrows the frame.

What is a specification (spec) in the context of writing prompts?

Which of the following is the best example of a build prompt written as a spec?

Spec Autopsy

  1. Step 1: Find a prompt or request you have made to an AI before, or invent one you might make — for example, 'write me a website.'
  2. Step 2: Identify which of the four spec components it covers: artifact, behaviors, appearance/style, limits.
  3. Step 3: Write the upgraded version of that prompt, filling in at least two components that were missing.
  4. Step 4: Compare the original and upgraded versions side by side. Write one sentence describing the most important thing the upgrade adds.