Loading...
Loading...
Generates high-quality Gherkin (BDD) scenarios from functional requirements using a two-agent iterative cycle: a generator agent that creates/modifies the Gherkin and a reviewer agent that validates it and proposes improvements. The cycle repeats automatically until the Gherkin passes review. Use this skill whenever the user mentions: "generate Gherkin", "BDD scenarios", "Gherkin test cases", "Feature/Scenario/Given/When/Then", "requirements to Gherkin", "BDD specifications", or asks to transform functional requirements into behaviour tests. Also applies when the user brings a requirements document and wants test cases, acceptance criteria, or user stories with executable examples.
npx skill4agent add ehdez73/agent-skills gherkin-generator-skillFunctional requirements
│
▼
┌─────────────────────┐
│ gherkin-generator │ ← Agent 1: generates/modifies the .feature file
│ -agent │
└────────┬────────────┘
│ Gherkin draft
▼
┌─────────────────────┐
│ gherkin-reviewer │ ← Agent 2: validates and proposes improvements
│ -agent │
└────────┬────────────┘
│
Approved?
NO ──────────────────► returns to Agent 1 with feedback
YES ─────────────────► delivers the final .feature fileagents/generator-agent.mdINPUT:
requirements: <list of requirements>
context: <business context>
previous_feedback: <empty on first iteration>
previous_gherkin: <empty on first iteration>
iteration: <current iteration number>.featureagents/reviewer-agent.mdINPUT:
gherkin: <output from the generator agent>
original_requirements: <user's original requirements>
iteration: <current iteration number>approved: true/falsescore: 0-100issues: [list of problems]suggestions: [list of concrete improvements]annotated_gherkin: <the gherkin with inline comments>iteration = 1
maximum = 5 ← prevents infinite loops
WHILE iteration <= maximum:
gherkin = generator_agent(requirements, feedback, previous_gherkin)
review = reviewer_agent(gherkin, requirements)
IF review.approved == true OR review.score >= 85:
BREAK
feedback = review.suggestions + review.issues
previous_gherkin = gherkin
iteration += 1
IF iteration > maximum:
deliver the best gherkin obtained with a warning note.feature| Criterion | Minimum requirement |
|---|---|
| Requirements coverage | 100% of functional requirements covered |
| Gherkin syntax | No errors (Feature, Scenario, Given/When/Then) |
| Scenario independence | No order dependency between scenarios |
| Step clarity | No technical ambiguities |
| Example data | Scenario Outline + Examples tables when variants exist |
| Language | Consistent throughout the file |
.feature@smoke@regression@happy-path@edge-caseagents/generator-agent.mdagents/reviewer-agent.mdreferences/gherkin-best-practices.md