Skip to content

Commit d32adb5

Browse files
committed
Rewrite Specification by Example section
1 parent d0bb830 commit d32adb5

1 file changed

Lines changed: 11 additions & 18 deletions

File tree

_posts/2026-05-13-executable-markdown-specs-agentic-coding.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,24 @@ That is useful. It makes the path from product scenario → spec → plan → ta
4545

4646
But it still points at the same hard problem: generating a plan from a spec is useful; keeping the spec correct as the system changes is the long-term problem.
4747

48-
## 3. A proven practice already exists
48+
## 3. Specification by example already exists
4949

5050
![Specification by Example book cover](https://m.media-amazon.com/images/I/61K4UV59xyL._SY522_.jpg)
5151

52-
A proven practice already exists: **behaviour-driven, example-based specifications**.
52+
The main idea in the [Specification by Example](https://gojko.net/books/specification-by-example/) book is simple: instead of writing traditional requirement documents like “the system should calculate discounts correctly”, teams define concrete examples:
5353

54-
This is the core idea behind BDD and the [Specification by Example](https://gojko.net/books/specification-by-example/) book:
54+
> “When a customer buys 3 items, they get 10% off”
55+
>
56+
> “When they buy 10 items, they get 20% off”
5557
56-
* define behaviour as concrete examples
57-
* express scenarios of system behaviour
58-
* execute them as part of CI
58+
These examples become the basis for:
5959

60-
The key idea is simple:
60+
* requirements
61+
* automated acceptance tests
62+
* development guidance
63+
* documentation
6164

62-
> **Specifications are not documents. They are executable behaviour contracts.**
63-
64-
That directly solves the problems agentic development exposes:
65-
66-
* **Ambiguity** — examples make intent concrete.
67-
* **Misalignment** — humans and agents can work from the same behaviour contract.
68-
* **Spec drift** — the build fails when behaviour no longer matches the spec.
69-
70-
The important part is not BDD ceremony. It is the feedback loop.
71-
72-
If the spec is continuously validated by the build, it does not silently rot.
65+
This approach is what the book calls **Specification by Example** (SBE). It is the same family of practice behind BDD, Cucumber, and Gauge: make behaviour concrete enough that humans, agents, and CI can all work from the same examples.
7366

7467
## 4. BDD + AI = spec-driven development loop
7568

0 commit comments

Comments
 (0)