From nw
Guides BDD requirements discovery via Three Amigos sessions, Example Mapping with card types, conversational patterns, and Given-When-Then examples for user stories and edge cases.
npx claudepluginhub nwave-ai/nwave --plugin nwThis skill uses the workspace's default tool permissions.
"If you're not having conversations, you're not doing BDD." -- Liz Keogh
Guides BDD collaboration with Three Amigos sessions, example mapping, discovery workshops, ubiquitous language, and Gherkin living documentation for devs, testers, stakeholders.
Guides through Behavior-Driven Development (BDD) workflow using Gherkin Given-When-Then scenarios, Three Amigos discussions, and 4-phase cycle from discovery to living docs. Invoke via /bdd for features or files.
Guides requirements engineering with INVEST user stories, Given-When-Then acceptance criteria including edge cases, MoSCoW prioritization, vertical slices, story mapping, decomposition patterns, non-functional requirements, and Definition of Done. Use for writing stories, epic breakdowns, and backlog prioritization.
Share bugs, ideas, or general feedback.
"If you're not having conversations, you're not doing BDD." -- Liz Keogh
BDD discovers "what we don't know we don't know" through collaborative exploration with concrete examples, not tools or formats.
Three perspectives revealing each other's blindspots:
If unmappable in 25 min: too large (split) | too uncertain (spike) | team needs practice.
[Yellow] User Story: Transfer money between accounts
|
+-- [Blue] Rule: Amount must not exceed source balance
| +-- [Green] $500 balance, transfer $400 -> succeeds
| +-- [Green] $500 balance, transfer $500 -> succeeds (boundary)
| +-- [Green] $500 balance, transfer $501 -> fails
| +-- [Red] What happens if balance changes during transfer?
|
+-- [Blue] Rule: Both accounts belong to same customer
| +-- [Green] Transfer between checking and savings -> succeeds
| +-- [Green] Transfer to friend's account -> requires different flow
|
+-- [Blue] Rule: Transfer creates transaction records
+-- [Green] $100 transfer -> 2 transactions (debit + credit)
+-- [Red] What timezone for timestamps?
Use when: story entering sprint | multiple edge cases | team uncertain about scope | cross-functional clarification needed. Skip when: trivial well-understood story | pure technical refactoring with no behavior change | strong shared understanding already.
Template: "Is there any other context which, when this event happens, will produce a different outcome?"
Purpose: discover edge cases and alternative scenarios.
BA: "When a customer submits an order, the order is confirmed."
Tester: "Is there context that produces a different outcome?"
Developer: "What if the item is out of stock?"
BA: "Then the order goes to backorder status."
Tester: "What if payment is declined?"
BA: "Then the order is pending payment."
Result: three rules discovered from one statement.
Template: "Given this context, when this event happens, is there another outcome that's important?"
BA: "When admin deletes a user account, the account is deleted."
Tester: "Is there another important outcome?"
Developer: "Audit log entry for the deletion."
BA: "Email notification to the user."
Tester: "GDPR -- delete all personal data."
Developer: "What about resources owned by the user?"
Result: one simple statement revealed five important outcomes.
Template: "Can you give me a concrete example?"
Abstract rules hide assumptions. Concrete examples force decisions.
BA: "User can search products by category."
Developer: "Concrete example?"
BA: "User selects 'Electronics' category."
Tester: "What if Electronics has 10,000 products?"
BA: "We paginate. Show 20 per page."
Developer: "Default sort order?"
BA: "I need to ask stakeholders."
[Red card: "Default sort order for category browsing?"]
Example card: "Balance $500, transfer $300 -> succeeds"
Scenario: Successful transfer with sufficient balance
Given my checking account balance is $500.00
And my savings account balance is $100.00
When I transfer $300.00 from checking to savings
Then my checking balance is $200.00
And my savings balance is $400.00
And I receive a confirmation message
Apply Five Whys to connect stories to business value:
Story: "Add CSV export for reports"
Why? "Users can export data"
Why? "Analyze in Excel"
Why? "No pivot tables in our app"
Why? "Need to slice data by dimensions"
Why? "Identify trends for business decisions"
Real need: better analytical capabilities, not CSV export
Focus on behaviors contributing to business results. Challenge features lacking clear business value.
Traditional (implementation-focused) -- avoid:
BDD-style (outcome-focused) -- use:
Shift from "system does X" to "user achieves Y."
Assumption: "Users fill out the form correctly." Reverse: empty form | garbage data | 50,000 characters | 100 submissions in 10 seconds.
"Malicious Mike" tries SQL injection, URL manipulation, unauthorized access. "Careless Cathy" never reads instructions, clicks back mid-process, refreshes constantly.
For each rule, require examples from three categories:
Forcing diversity prevents echo chamber thinking.
Red cards are blockers. Never proceed to development with unresolved questions.
Resolution process:
Good red cards: "Character limit for product descriptions?" | "PDFs or only images?" | "What happens to orders if payment gateway is down?"
BDD hierarchy:
Business Capability (Epic)
+-- Feature (Theme)
+-- User Story
+-- Acceptance Criteria (Rules)
+-- Scenarios (Examples)
Each level includes: business value | user context | concrete examples | Given-When-Then scenarios | tracked questions with resolution status.
Same scenario, understood differently by each role:
Scenario: High-value customer receives priority support
Given I am a customer with "Platinum" membership
And I submit a support ticket with priority "urgent"
When the support team reviews new tickets
Then my ticket appears at the top of the queue
And I receive automated acknowledgment within 1 minute
Same scenario, multiple valid interpretations, zero translation loss.
Participants: 6-8 people (PO, BA as facilitator, 2-3 developers, 1-2 testers, optional SME).
Output: 2-3 stories mapped | 10-15 scenarios drafted | red cards assigned.
Decompose epics into stories by tracing the complete user workflow.
Workflow: [Discover] --> [Evaluate] --> [Purchase] --> [Receive]
| | | |
Row 1: Search by View details Add to cart Track order
keyword + price + checkout status
| | | |
Row 2: Filter by Compare Apply Delivery
category products coupon notifications
| |
Row 3: Save search Read reviews
Row 1 = MVP release. Row 2 = second release. Row 3 = future.
Story mapping complements Example Mapping: use story mapping to identify WHICH stories, then Example Mapping to explore EACH story in depth.
During Phase 1 (GATHER), verify all three requirement types. Stories covering only functional requirements produce incomplete handoffs.
For each story, ask: "Have we captured functional behavior, quality attributes (NFRs), and business constraints?" Missing any category is a completeness gap flagged during review (see review-dimensions skill, Dimension 2).
Formalize the ubiquitous language process. Domain language primacy (Core Principle 4) requires deliberate discovery.
Terms discovered here feed directly into BDD scenarios -- Given/When/Then uses the ubiquitous language, ensuring zero translation loss.