research
From Gherkin to Green: TDD/BDD for Your Agent
Turn spec.md Gherkin into executable TDD tests with RED-GREEN-REFACTOR workflows and full traceability for your agents.
Where this fits
You maintain a spec.md that drives your agent's work, but tests keep drifting from the specification. Every change requires manual cross-checking between Gherkin scenarios and your test suite. This skill closes that gap by converting the BDD reference directly into executable TDD tests with traceability back to the spec.
Why agents benefit
- Converts Gherkin scenarios into executable tests automatically, so the agent never has to guess behavior from prose.
- Enforces a RED-GREEN-REFACTOR workflow, giving the agent a clear checkpoint order instead of ad-hoc test writing.
- Maintains bidirectional traceability between
spec.mdsections and test cases, making coverage verification straightforward. - Owns sections 11–13 only (tests, verification, evidence), leaving production code in section 14 to
specsfy-07-implement— a clean division of labor. - Announces pending work and automatic transitions, so multi-step agent pipelines run without manual handoffs.
Practical scenarios
Scenario: A feature request triggers spec update and test materialization
A user asks: "Add a retry mechanism to the API client." The agent updates spec.md sections, then this skill materializes RED tests from the new Gherkin before any production code exists.
Scenario: Verifying an existing implementation
After specsfy-07-implement finishes section 14 code, this skill reads the BDD reference, runs the full test suite, and reports which scenarios pass and which still fail — with line-level traceability to the spec.
Scenario: Automated pipeline handoff between skills
During a multi-step build, the agent detects test materialization is pending. It announces Pendência detectada and resolves it in-scope, then announces Transição automática to the implementation skill — no user prompt needed.
Add it to your agent workflow
Install it with:
npx skills add promovaweb/specsfy --skill specsfy-06-tdd-bdd
Then prompt your agent explicitly: "Run TDD on the new checkout flow: derive tests from the Gherkin in spec.md section 12, execute RED, then hand off to specsfy-07-implement for production code." The skill reads the BDD reference, generates tests, and orchestrates the handoff automatically. You can also read more about this skill and its alternatives at https://www.openagentskill.com/skills/promovaweb-specsfy-06-tdd-bdd.
Compare before adopting
Before adding this skill, evaluate three things: quality — does the generated test suite match your framework conventions and naming?; maintenance — when was the last commit, and does it track recent spec format changes?; workflow fit — do your agent pipelines already use specsfy conventions, or would you need to adapt your prompts? Alternatives include generic test-generation prompts that lack the traceability layer.
Why it is worth tracking
With 60 GitHub stars, a single focused author, and a deliberately narrow scope, this skill is a good signal for specification-driven pipelines. It only owns test materialization and verification — not production code — which keeps its surface small and its behavior predictable. Track it when you want reproducible TDD instead of ad-hoc test writing; if the spec format evolves, this skill either keeps pace or quickly shows staleness.
Featured Skill
specsfy-06-tdd-bdd
Skill by promovaweb