# `Jidoka.ApprovalPredicate`
[🔗](https://github.com/agentjido/jidoka/blob/v0.9.0/lib/jidoka/approval_predicate.ex#L1)

Module contract for dynamic operation approval predicates.

Approval predicates receive a `Jidoka.Context` and return whether an approval
policy should apply to the current operation call. They are intentionally
module-based rather than anonymous functions so agent specs and snapshots stay
durable.

# `result`

```elixir
@type result() :: boolean() | {:ok, boolean()} | {:error, term()}
```

# `call`

```elixir
@callback call(Jidoka.Context.t()) :: result()
```

Returns whether approval is required for the operation context.

# `__using__`
*macro* 

```elixir
@spec __using__(keyword()) :: Macro.t()
```

Defines a reusable approval predicate module.

# `evaluate`

```elixir
@spec evaluate(module() | nil, Jidoka.Context.t()) ::
  {:ok, boolean()} | {:error, term()}
```

Evaluates a predicate module against a runtime context.

# `validate_module`

```elixir
@spec validate_module(module() | nil) :: :ok | {:error, term()}
```

Validates that a module implements the approval predicate contract.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
