| name | bdd-spec |
| description | Create BDD feature specifications in Gherkin format for the current project. |
Description
Create feature specifications using Gherkin syntax to document user-facing behavior.
Scope
- User-provided scope takes priority (e.g., specific feature or command)
- If none provided: all features discoverable from README.md
- If CLI tool: CLI commands and arguments
General rules
- Ask if anything is unclear - do not guess
- All phases are mandatory - do not skip without user approval
- Track non-trivial steps with tasks
Skill-specific rules
- Use Gherkin format: https://cucumber.io/docs/gherkin/reference
- Store each feature under
features/<snake_case_name>.spec
- Use
Background and Rule blocks where appropriate
- Focus on user impact and experience, not implementation details
Phase 1: Preparation
- Read README: Discover features and understand terminology
- CLI help: Discover available commands and arguments
- Check source code: Examine relevant files for step definitions and expected outcomes
Phase 2: Execution
Write specification files:
- One feature per file:
features/<name>.feature
- Use Gherkin elements appropriately:
Background for common preconditions
Rule for business rules across scenarios
Scenario Outline with Examples for parametrized cases
- Cover comprehensively:
- All commands, arguments, and flag combinations
- Mutually exclusive flags
- Error handling
- Optional arguments
- Force flags (
--force, --yes, etc.)
- Step definitions:
- Use
Given for preconditions
- Use
When for actions
- Use
Then for expected outcomes
- Use
And / But for readability
Phase 3: Verification
- Syntax: Validate all feature files are syntactically correct
- Coverage: Ensure all commands and argument combinations are covered
- No duplication: Avoid duplicate scenarios
- Meaningful names: Feature and scenario names clearly describe user impact