If you are feeding Gherkin feature files into coding agents or automated test suites, you need to stop using subjective language immediately. A new analysis highlights that agents and test runners only see what is explicitly written on the page. When a Then step claims a payment "should work properly," there is no concrete assertion for the machine to verify. The agent is forced to invent a meaning, leading to brittle implementations that fail silently or behave unexpectedly. This gap between human intent and machine-executable logic is a primary source of friction in AI-assisted development workflows.

The Problem with "Should" and "Properly"

The core issue is that terms like "properly," "gracefully," or "correctly" are wishes, not specifications. A rule-based linter called acceptpack-lint, version 0.2.0, flags these patterns by checking for observable outcomes. In a real-world example, a scenario with the Then step "it should work properly" triggered four distinct warnings. The linter identified the lack of concrete values, the absence of a negative path scenario, and the use of modal verbs that do not define a pass/fail state. Without a specific status code, message, or stored record, the test cannot technically exist.

Concrete Values Make Tests Real

To fix this, you must name every input and expected output with precision. Instead of saying a user pays, specify the card number "4242 4242 4242 4242" and the cart contents, such as "1 book priced at 19 USD." The Then step must describe exactly what a reviewer can see or measure, such as "the page shows 'Payment received'" or "an order with status 'paid' is stored." This shift transforms vague requirements into self-contained scenarios. The linter confirmed that rewriting the scenario with these concrete details reduced the warning count from four to zero, proving that specificity is not just best practice but a technical requirement for automation.

Enforce One Action Per Scenario

Another common failure mode is combining multiple actions into a single When step. The linter flags scenarios with multiple When steps or ambiguous And steps that imply sequential actions without clear boundaries. For example, typing a search term and clicking a button are two distinct actions. If combined, the test cannot isolate which step caused a failure. The recommended approach is to split these into separate scenarios or define a single composite action, such as "When the user submits a search for 'acceptpack'." This ensures that each scenario maps directly to a specific unit of behavior, making debugging significantly easier for both humans and agents.

Key Takeaways

  • Every Then step must name an observable outcome: a message, status code, stored record, or redirect.
  • Avoid modal verbs like "should" or "may" unless followed by concrete evidence.
  • Include at least one failure scenario, such as a declined card or invalid input, to cover edge cases.
  • Use tools like acceptpack-lint or gherkin-lint to automatically catch vague terms before they reach production.
  • Keep inputs and expected values specific; use exact strings, numbers with units, and example data.

The Bottom Line

Stop treating feature files as documentation. They are code. If your Gherkin steps cannot be asserted by a script, they cannot be built by an agent. Write for the machine, not just the human reader.