The advantage of using BDD techniques such as capturing our intent in Gherkin syntax is that we can generate Cucumber tests that then guide the coding agent to build the application.
There are two main goals in this walkthrough:
- Using a spec which is only in text or markdown to get the coding agent to build an application that is completely aligned with our intent — and call it done only when it has actually completed.
- Achieving spec as source, as described in Birgitta’s article on martinfowler.com about spec-driven development tools.
The overall guideline of the harness is to “make it easy to ‘do the right thing’ and work at the spec level, rather than the code level,” as mentioned in my InfoQ article on enterprise spec-driven development.
The Template
Code for this walkthrough is the behavior-driven-template. This is a subset of the intent-driven-template, scoped down to help us demo BDD only and focus on it.
Video Walkthrough
References
- Behavior-Driven Template — intent-driven-dev/behavior-driven-template
- Intent-Driven Template — intent-driven-dev/intent-driven-template
- Birgitta’s article on martinfowler.com — Exploring Gen AI: Spec-Driven Development Tools
- InfoQ — Enterprise Spec-Driven Development