Augur docs

Language

Assertions & Error Handling

Assertions (believe)

believe asserts a condition, judged for truth natively. An optional because gives a reason that appears in the error message:

believe x > 0
believe email != "" because "an email is required"

A failed belief raises The oracle disagrees - <reason>, catchable by attempt/rescue.

Vibe-tests (is)

believe expr is "description" asks the oracle to judge whether the value matches a natural-language description — a vibe-test for fuzzy output. Inside certain it degrades to native truthiness.

believe reply is "polite and on-topic"
believe summary is "under 200 characters and mentions the price"
This is how you test LLM-driven output in CI: assert the shape and vibe of a result rather than an exact string. Pair it with --remember so the judgement is cached and the test stays deterministic.

attempt / rescue

attempt { } rescue [as e] { } runs a block and, on failure, runs the rescue block. as e binds the error as an oracle value. Control-flow signals (break/continue/give) and budget-exceeded errors are not caught — they propagate.

attempt {
  believe no because "this always fails"
} rescue as e {
  proclaim e        // <oracle: The oracle disagrees - this always fails>
}

Two distinct failure mechanisms: an oracle poison value flows through expressions silently until handled; a thrown error (a failed believe, an undefined variable, a type error) unwinds to the nearest attempt/rescue.