| 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
- PRD
status: approvedAND in.workbench-state/approved.json. - Optional:
qa/context-library/with automation-stack hints (Playwright, Cypress, Cucumber, pytest-bdd). Default is stack-agnostic Gherkin.
Protocol
- Read approved PRD, extract ACs.
- Group ACs into feature files — one per cohesive capability. Name:
PRD-{NNN}-{capability-slug}.feature. -
Write each
.featurewith 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} - 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). - 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
- Write scenarios that cannot be automated without unreasonable setup. Tag
@manualif needed. - Include PII or real account numbers in Examples tables.
- Skip
@securityfor user-facing endpoints.