gherkin-convert
Convert specifications to/from Gherkin/BDD format.
What this skill does
# Gherkin Format Conversion
Convert specifications between Gherkin/BDD format and other formats.
## Supported Conversions
| From | To | Description |
| --- | --- | --- |
| EARS | Gherkin | EARS requirements to scenarios |
| Gherkin | EARS | Scenarios to EARS requirements |
| Canonical | Gherkin | Full spec to feature file |
| Gherkin | Canonical | Feature file to canonical spec |
| Inline AC | Feature | Inline criteria to .feature |
| Feature | Inline AC | .feature to inline criteria |
## Workflow
1. **Load Source**
- Read source file
- Detect current format
2. **Parse Content**
- Extract requirements/scenarios
- Identify structure
3. **Convert**
- Spawn `spec-converter gherkin` agent
- Transform to target format
- Apply best practices
4. **Validate**
- Check Gherkin syntax
- Verify completeness
5. **Output**
- Write .feature file or specification
## Arguments
- `$1` - Source file path
- `--to` - Target format: gherkin, feature, canonical, ears, inline
- `--output` - Output file path (optional)
## Examples
```bash
# Canonical spec to feature file
/spec-driven-development:gherkin-convert .specs/auth/spec.md --to feature
# Feature file to canonical
/spec-driven-development:gherkin-convert tests/login.feature --to canonical
# EARS to Gherkin
/spec-driven-development:gherkin-convert ears-requirements.md --to gherkin
# Inline to feature file
/spec-driven-development:gherkin-convert spec.md --to feature --output tests/spec.feature
```
## Conversion Examples
### EARS → Gherkin
**Input (EARS):**
```markdown
## FR-1: User Login
WHEN the user submits valid credentials,
the system SHALL authenticate the user
AND redirect to the dashboard.
### Acceptance Criteria
- AC-1.1: Valid credentials grant access
- AC-1.2: Invalid password shows error
```
**Output (Gherkin):**
```gherkin
Feature: User Login
As a user
I want to log in with my credentials
So that I can access the dashboard
# FR-1: User Login
Scenario: Successful login with valid credentials
Given a registered user exists
When the user submits valid credentials
Then the user is authenticated
And the user is redirected to the dashboard
Scenario: Failed login with invalid password
Given a registered user exists
When the user submits an invalid password
Then an error message is displayed
And the user remains on the login page
```
### Canonical → Feature File
**Input (Canonical):**
```markdown
# Specification: Shopping Cart
## FR-1: Add to Cart
WHEN the user clicks "Add to Cart",
the system SHALL add the item to the user's cart.
### Acceptance Criteria
- [ ] AC-1.1: Given product page, when clicking add, then item in cart
- [ ] AC-1.2: Given item in cart, when adding again, then quantity increases
```
**Output (Feature):**
```gherkin
# Specification: Shopping Cart
# Generated from: .specs/cart/spec.md
Feature: Shopping Cart
As a shopper
I want to add items to my cart
So that I can purchase them
@FR-1
Scenario: Add item to cart from product page
Given I am viewing a product page
When I click "Add to Cart"
Then the item is added to my cart
@FR-1
Scenario: Increase quantity when adding existing item
Given I have an item in my cart
When I add the same item again
Then the item quantity increases by 1
```
## Pattern Mapping
| EARS Pattern | Gherkin Mapping |
| --- | --- |
| WHEN...SHALL | Scenario with When/Then |
| WHILE...SHALL | Given (continuous state) |
| IF...THEN...SHALL | Error/edge case scenario |
| WHERE...SHALL | @tag for feature toggle |
| Ubiquitous | Background or invariant check |
## Related Commands
- `/spec-driven-development:gherkin-author` - Create Gherkin scenarios
- `/spec-driven-development:ears-convert` - EARS conversions
- `/spec-driven-development:convert` - General format conversion
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.