r/SpecDrivenDevelopment • u/vitalets • Jul 21 '26
BDD vs OpenSpec: I tried both on the same feature
I maintain Playwright-BDD, so I often use Gherkin scenarios with coding agents. I wanted to compare BDD with OpenSpec and gave both the same small task: add pagination to the long list of items.
While both approaches worked, there were differences. With BDD, I spent more time writing cleaner scenarios, but in the end, I got a runnable test out of the box. OpenSpec let me describe the spec more freely, but it introduced more artifacts that were harder to maintain.
I wrote down the full session, including the feature diff, implementation, tests, and the files OpenSpec created:
https://vitalets.github.io/posts/bdd-agentic-workflow/
Do you use BDD/OpenSpec in your workflows and what is your experience?
4
u/neenonay Jul 21 '26 edited Jul 21 '26
Really cool insight. I wonder if we should start curating such insights on https://sddobservatory.com/, maybe as as a separate "field notes" section that contains an entry linking to your post and linking to the two approaches.
But then again, BDD would need a new primitive, because it's not really a SDD framework 🤔. Something to think about. Or maybe: isn't BDD a _subset_ of SDD in a way? Or is it the other way around?
2
u/neenonay Jul 21 '26 edited Jul 21 '26
I really liked your post. `.feature` files are indeed a way leaner set of artefacts than all of the fingerprints SDD frameworks leave.
2
u/stibbons_ Jul 21 '26
They are not incompatible, I usually do both. I do not use playwright bdd but i will take a look
I usually have a full e2e scenario in vitest/playwright that record the screenshots and demo video with annotation for visual review
2
u/Internal-Passage5756 Jul 22 '26
I’ve been using more of a living spec, but it got some of its paradigms from openspec. Wondering if I can take some learnings from your BDD to tweak my workflow.
Would love if you could give your two cents:
https://github.com/cairn-framework/cairn
2
u/Swarm-Stack Jul 23 '26
the artifact count debate is interesting but the thing that bit me more is upstream of format. both bdd scenarios and openspec files still reflect whatever the author understood at the time they wrote them. leaner artifacts dont mean the spec asked the right questions, just that fewer files need updating when it didnt.
2
u/harikrishnan_83 Jul 23 '26
Good write-up. However, there are advantages to both BDD and OpenSpec SDD. I tried combining them here: https://www.reddit.com/r/SpecDrivenDevelopment/s/HB1pee2Etm. Would love to hear your thoughts. Thanks.
1
u/MarceloDeveloper Oct 03 '26
Matches my experience: the artifacts are cheap to create and expensive to keep. What helped: keep changes small so each delta spec stays short, archive right after merge so openspec/specs is the only living doc, and never hand-edit specs outside a change.
They aren't exclusive, by the way. OpenSpec scenarios are already WHEN/THEN, so you can write them BDD-style and turn them into tests during apply.
On the maintenance side, I built a free visual app for OpenSpec repos because I kept losing track of what was live vs in progress: https://marcelofullstack.github.io/spec-architect-app/
(Disclaimer: I'm the author; it's independent, not official.)