OpenSpec icon indicating copy to clipboard operation
OpenSpec copied to clipboard

For complex requirements, how can specs be generated and maintained?

Open beston123 opened this issue 6 months ago • 2 comments

For complex requirements, how can specs be generated and maintained? Is it possible to support the use of Gherkin's Scenario Outline and Background to support the writing of complex specs?

Scenario Outline: Process single order
  Given a customer places an order
  When they pay <amount>
  Then order is confirmed

  Examples:
    | amount |
    | 100    |

or

Feature: Customer Loyalty Points
  As a customer
  I want to earn points on my purchases
  So that I can receive rewards and discounts on future orders

  Background:
    Given the loyalty program is active
    And point values are set to 1 point per dollar spent

  Scenario: Earn points on standard purchase
    Given a customer with a basic loyalty account
    And their current point balance is 0
    When they complete a purchase of $100
    Then they earn 100 loyalty points
    And their new point balance is 100

  Scenario: Silver tier earns bonus points
    Given a customer with Silver membership
    When they complete a purchase of $100
    Then they earn 150 loyalty points

  Scenario: Gold tier earns higher bonus points
    Given a customer with Gold membership
    When they complete a purchase of $100
    Then they earn 200 loyalty points

  Scenario: Redeem points for discount on purchase
    Given a customer has 500 loyalty points
    And they have items worth $80 in their cart
    When they redeem 400 points for a discount
    Then $40 is deducted from their order total
    And their final amount is $40
    And their remaining point balance is 100

  Scenario: Points expire after 12 months of inactivity
    Given a customer earned 300 points on January 1, 2025
    And they have had no account activity since then
    When the date reaches January 2, 2026
    Then their 300 points are marked as expired
    And their available point balance is 0
    And they receive an expiration notification

beston123 avatar May 10 '26 15:05 beston123

See the earlier discussion here https://github.com/Fission-AI/OpenSpec/issues/508

marcindulak avatar May 10 '26 16:05 marcindulak

Thanks for raising this, @beston123 🙏

This is about Support Gherkin Scenario Outline / Background / Examples tables for complex specs. — an open-ended feature/design idea rather than a discrete, PR-actionable bug or task. To honor it properly we've moved it to Discussions, where it can keep evolving with community input and you can re-engage anytime:

👉 https://github.com/Fission-AI/OpenSpec/discussions/1588

The original issue (and any comments) stays here for the record, so nothing is lost — please continue the conversation in the discussion above. Closing the issue in favor of that thread.

clay-good avatar Aug 06 '26 18:08 clay-good