Skip to content
Founders’ price Launch pricing for your first twelve months. 40 Playbooks, 40% discount for Founders. View the playbooks →

Specification by Example

TTool · Specification by Example

By , Editor · · Playbooks for Leaders

Concept and planning by Will Rowan. Researched and drafted with AI. Edited and checked by Will Rowan.

“Gojko Adzic's approach, where concrete examples become automated tests.”

The requirement looked clear. Development built what they understood. Testing found it wasn't what the stakeholder meant. Everyone's pointing at the same sentence and reading it differently.

Specification by Example is Gojko Adzic's approach where concrete examples serve triple duty as requirements, documentation, and automated tests. You write Given-When-Then scenarios collaboratively — business and technical people together — forcing the precision that natural language lets everyone avoid.

A five-step horizontal flow headed "Could you write three concrete examples?" with numbered stages 01 DEMAND (Given X, when Y, then Z), 02 REFUSE, 03 RUN, 04 BUILD, and 05 REJECT, above the line "Vague ideas die at the spec stage. Concrete or no."
Method visual: Specification by Example

The unique strength is closing the gap between what stakeholders want, what developers build, and what testers verify. The examples become living documentation that stays accurate because it's executable — it can't go stale the way a specification document does.

Reach for it when ambiguity in requirements is causing rework. It falls apart without automation capability to keep the examples running, and it's wrong for exploratory work where the team is still discovering what the feature should do.

Your next move: Could your team write three concrete examples of the next feature working correctly before they start building it — and if not, is the requirement actually clear, or just clear enough to misinterpret in different ways?

What it looked like for them

Mark Barwald, mass-customised jeans, 2005. In August 2005 Mark Barwald and a university friend launched a website where customers could design their own jeans. It offered 12 million variations, from the cut and the denim to the rivets, the thread and any length.

Too late, they found that 90% of orders were for ordinary jeans from unusually tall women. Barwald later wrote that they had never tested whether people wanted custom-made jeans at all. Specification by example starts from concrete cases, and the founders had specified every pair they could make and no pair a customer was likely to order.

- returns a SafeString and get.js throws on it }}
A move inside a Playbook

“We've been told to do more with less and I have to decide what stops.”

Open the Playbook →

Share the Playbooks