QA

/bdd-gen

Generate Gherkin `.feature` files from an approved PRD. Covers happy / edge / error / security paths.

Hat Stage Upstream gate Output Unblocks
QA QA PRD approved qa/outputs/bdd/PRD-NNN-<capability>.feature /test-cases-gen, /test-spec

When to Use

PRD is approved; user wants executable behavior specs.

Prerequisites

Protocol

  1. Read approved PRD, extract ACs.
  2. Group ACs into feature files — one per cohesive capability. Name: PRD-{NNN}-{capability-slug}.feature.
  3. Write each .feature with a lifecycle metadata header comment (Gherkin has no YAML frontmatter):

     # id: BDD-{NNN}-{capability}
     # status: draft
     # epic: {EPIC_ID}
     # prd: PRD-{NNN}
     # created: {today}
     # owner: {gh-user}
     # language: en
    
     @epic-{EPIC_ID} @prd-PRD-{NNN}
     Feature: {capability title}
    
  4. Coverage rule: every AC → at least one scenario. Every file includes at minimum one @happy-path, one @edge, one @error, and one @security (when PRD touches a user-facing endpoint).
  5. Update EPIC-PIPELINE.md — comma-joined BDD IDs in BDD column.

Lifecycle Note

wb.publish / wb.approve / wb.reject detect .feature files and rewrite the # status: header comment (not YAML frontmatter). The header line must exist before first wb.publish.

Do Not

Source

skills/bdd-gen/SKILL.md