Use gherkin to define the intent of the feature or functionality you want to implement. Gherkin is a language that allows you to write human-readable specifications for your software. This should be written to the AI rules file. For example, claude.md.
Use the Gherkin syntax to write scenarios that describe the expected behavior of the feature. Each scenario should include a title, a description, and a series of steps that outline the actions and expected outcomes. For example:
Scenario: Breaker guesses a word
Given the Maker has chosen a word
When the Breaker makes a guess
Then the Maker is asked to score
Have AI generate unit tests based on the Gherkin scenarios. The AI can use the scenarios to create test cases that validate the expected behavior of the feature. For example, it can generate unit tests in a testing framework like Jest or Mocha.