A complete contract
Save this asrefund.feature:
Feature names the contract. A Step block describes a step’s business meaning
and registers the context fields the Engine may use. Add one Required context:
or Optional context: line for each field; repeat either line type to register
multiple fields. Required context must be present; optional context can be
absent. A field meaning after means is an optional classifier hint. Duplicate
fields or conflicting required and optional declarations fail validation. Each
Rule defines the executable checks for one matching step, and all its clauses
must hold. Only the supported vocabulary is accepted.
Parallel steps
If two or more defined steps can run in parallel, add aGroup that lists their
step names:
Rule; a Step block supplies business meaning and
context for classification. The group needs at least two distinct members; the
success and duration clauses are optional.
If a later step needs both reviews, declare both as prerequisites in its Rule:
Preview and create
In the dashboard, open Contracts and use the contract editor. Or use the CLI:Version and run:
.feature for contracts.
Common clauses
Dependencies allow intervening work. Once you use explicit
next step rules,
declare every allowed immediate transition. These are different flow policies.
See the complete rule vocabulary
for timeout, retry, and thread-wide clauses.
Content and earlier steps
Content checks read the context added to a step. Values are represented as strings. Dotted field names are literal keys, not nested paths. An unquotedapproval.reference reads the same thread’s latest validated
successful approval. A quoted "approval.reference" is literal text. A
cross-step reference also implies a dependency. Missing data or unavailable
state rejects the submission; Threadify does not silently use an older value.
Regex matching uses Go’s RE2-style syntax. Use ^ and $ for a whole-value
match. Lookaround and backreferences are unsupported. Double backslashes in
quoted Gherkin strings, or use [0-9] rather than \d. Invalid patterns are
rejected during preview and creation.