| name | bdd |
| description | Behavior-driven development: Discovery → Formulation → Automation. Use when the user wants to build features or fix bugs via Gherkin scenarios and the BDD lifecycle, or mentions BDD/Gherkin/Executable Specifications. Delegates test implementation to /mattpocock:tdd. |
Behavior-Driven Development (BDD)
BDD is not just about tools; it's a methodology for shared understanding and high-quality implementation. This skill governs the Discovery → Formulation → Automation lifecycle: Gherkin scenarios define the behavior, and the Automation phase (red-green loop) is delegated to /mattpocock:tdd (BDD-driven).
When exploring the codebase, read CONTEXT.md (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.
How to Use This Skill
When the user asks for a feature, bug fix, or refactor, apply the following mindset:
- Understand Behavior First: Do not start coding until you know what the system should do.
- Define Scenarios: Create or ask for concrete examples (Gherkin) of the expected behavior.
- Drive Implementation with Tests: Use the Red-Green-Refactor cycle.
The BDD Cycle
The process flows from requirements to code:
- Discovery: Clarify requirements through examples (The "Three Amigos").
- Formulation: Write these examples as specific scenarios (Given/When/Then).
- Automation: Implement using the red-green-refactor cycle via
/mattpocock:tdd, which governs test quality, seams, mocking, and anti-patterns.
See ./references/bdd-best-practices.md for a detailed guide.
Writing Scenarios (Gherkin)
Scenarios are your "Executable Specifications".