12  BDD Step Reference

Built-in Gherkin steps are designed to assert orchestration behavior (tools, stages, state, stop reasons, iterations).

12.1 Tool Steps

Then the search tool should be called
Then the search tool should not be called
Then the search tool should be called at least 3 times
Then the search tool should be called exactly 2 times
Then the search tool should be called with query=test

12.2 Stage Steps

Given the procedure has started
Then the stage should be processing
Then the stage should transition from planning to executing
Given we are in stage complete

12.3 State Steps

Then the state count should be 5
Then the state error should exist
Then the state should contain results

12.4 Completion Steps

Then the procedure should complete successfully
Then the procedure should fail
Then the stop reason should be done
Then the stop reason should contain timeout

12.5 Iteration Steps

Then the total iterations should be less than 10
Then the total iterations should be between 5 and 15
Then the agent should take at least 3 turns

12.6 Parameter Steps

Given the topic parameter is quantum computing
Then the agent's context should include quantum computing

12.7 Agent Steps

When the worker agent takes turns
When the procedure runs

12.8 Custom Steps

step("the research quality is high", function()
    local results = state.results or {}
    assert(#results > 5, "Not enough results")
end)

step("the user {name} is greeted", function(name)
    local greeting = state.greeting or ""
    assert(string.find(greeting, name), "Name not in greeting")
end)