Prompt styles
A shared vocabulary for the ways engineers direct AI when they write software. Each style has a definition, an example prompt, what it reveals about the person using it, when it fits, what to watch out for, and where the term came from.
Style map
One feature, eight ways
Every style shows a prompt for the same feature so you can compare them side by side: an image carousel for a home page that shows 5 images from the database, advances every 5 seconds, lazy-loads images and flashes twice when switching.
- 01
Declarative
Describe what the software must do and let the AI decide how.
Read more → - 02
Imperative
Dictate how the code should work: data structures, algorithm, control flow.
Read more → - 03
Vibe coding
Describe loosely, accept what comes back, barely read the code.
Read more → - 04
Spec-driven development
Write a specification first. The AI implements from it.
Read more → - 05
Test-driven prompting
Write the tests first and ask the AI to make them pass.
Read more → - 06
Example-based (few-shot)
Point to an existing pattern and ask for the same thing, adapted.
Read more → - 07
Iterative / conversational
Short cycles of ask, review and correct.
Read more → - 08
Context engineering
Engineer what the model sees (files, docs, rules, tools) more than the wording.
Read more →