Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • Being hard here, though: Purely dismissing it as not being worth of my time due to the example alone.
  • My go-to for forcing AI to at least attempt to follow BDD has been to demand that it use Phoenix Contexts.
  • I hadn't heard of BDD before, but the idea of "executable spec" is certainly very interesting
  • Very impressive that it was done with Opus 4.8.

    My experiences with Opus have been such that I always max out my Fable allotment but rarely exceed 40% of the remaining limit on Claude.

    by blfr
  • The example of “transcibe the initial project discussion, turn that into BDD and that makes the rails to guide the AI is … either brilliant and insightful or a snake eating it’s own tail.

    I think it has to be worth a try though…

  • I've been doing that for almost a year and I feel like I'm taking crazy pills when I talk about it, because it works so well.

    I transcribe most product meetings, turn them into a transcript, run that through an accuracy pass with a bunch of context (mostly vocabulary definitions etc), and use that as a starting doc for generating issues and tests. There are apps that do it fully end to end now I think.

  • Yadda 3.0.0 is out. The release modernises the JavaScript BDD library, but more interestingly, it was largely built by Claude Code and points to why executable specifications may become even more valuable in an agentic development world.
  • One suggestion: my bet is that close to no one knows what the acronym BDD stands for. The first comment on this post is in fact exactly about that.

    I'd consider explaining what BBD is at the start of the front page of your project.

  • "Behaviour Driven Development"

    I was expecting something on Binary Decision Diagrams. SAOD is worst with TLAs.

  • What is SAOD? Do you mean SOAD?
  • This is probably HN's tech background speaking. In the enterprise dev world, everyone knows what BDD means just like every dev out there knows what OOP means.
  • I also think BDD is a really powerful tool for UI acceptance tests! I've now worked on adding it to two AI codebases (one engineered, another vibecoded), and so far it has been mostly positive. Having non-engineers be able to see what effects their code changes have in the UI is nice; and I find having high level API and UI tests is forcing the first layer of cleanup (standardize access to DB through models/services, and a single API SDK).

    I am also really interested in standardizing the REST interface with typespec, and the database schema with DBML. I think creating these closed-loops with high-level specs is one of the best ways to make an AI project ownable by a team.

  • Yep, I've been experimenting Playwright with CucumberJS and Deno for the last 3 months and it's super effective
  • How are you doing that? Is the Playwright usage a hidden detail or do images appear in the spec?
  • So, I get the idea of having a layer of abstraction between your tests and the system under test. You decouple _what_ is being done from _how_ it is done, which leads to robust, easily maintained, and even more re-usable test suites. I've seen it in action, it's a great idea, I've reaped the benefits myself. Great stuff.

    What I've never really understood is why some people choose natural language for the abstraction. It just seems like such an odd and expensive choice. Most of the layers of abstraction we add in our codebase are written in the programming language of choice itself, they're functions, classes, what have you. But for this one specific flavor of abstraction, folks reach for natural language.

    The one potential benefit I could think of for this over a more standard DSL is that non-technical colleagues would be able to read or even write these specs. But in practice I've only seen this pan out once in my life, and that was with a more traditional DSL rather than natural language.

    Is there a hidden benefit I'm overlooking?

  • I don't think so. Natural language is vague and repetitive.

    I used hitchstory (YAML based stories) for doing this coz it's terse and typed.

    I've tried using cucumber before and it reminds me of COBOL - which also had the same idea of making code more accessible via a "natural language-ish" interface.

  • Because the intent has always been that Product delivers the BDD statements not Engineering, but Product people have (for the most part in my experience) refused to deliver what BDD flows need to be tested. That’s why most of the time the test suites aren’t as resilient because the engineer is guessing at which flows to test.

    In that context it makes more sense that Llms are a push to replace Product people not Engineering people.