# `PromptRunner.Verifier`
[🔗](https://github.com/nshkrdotcom/prompt_runner_sdk/blob/v0.12.1/lib/prompt_runner/verifier.ex#L1)

Deterministic prompt verification.

# `fault`

```elixir
@type fault() :: :verifier_fault | :verifier_timeout
```

# `report`

```elixir
@type report() :: %{
  pass?: boolean(),
  items: [map()],
  failures: [map()],
  faults: [map()],
  prompt_id: String.t() | nil,
  amendments: [map()]
}
```

# `contract_items`

```elixir
@spec contract_items(map()) :: [map()]
```

# `contract_keys`

```elixir
@spec contract_keys() :: [String.t()]
```

Returns the contract clauses the verifier evaluates.

Anything else under `verify:` is parsed, stored, and never evaluated, which
is what `mix prompt_runner packet lint` reads this list to detect.

# `enforced_contract`

```elixir
@spec enforced_contract(PromptRunner.Plan.t(), map(), keyword()) :: map()
```

The contract actually enforced for a prompt: the packet's, plus every
amendment recorded for it.

The packet's own contract is never mutated. It is read fresh each time and
the amendments are applied on top, so a re-run from clean state — with no
amendment log — enforces exactly what the packet says.

# `fault?`

```elixir
@spec fault?(report() | map()) :: boolean()
```

Whether `report` contains any item whose check could not run.

# `fault_line`

```elixir
@spec fault_line(map()) :: String.t()
```

A one-line description of a faulted item, naming the command and its cwd.

# `faults`

```elixir
@spec faults(report() | map()) :: [map()]
```

The items in `report` whose check could not run.

A fault is not a verification failure. The contract said nothing about the
work because it never got to look, so a caller must neither pass the prompt
nor spend an attempt trying to repair it — it has to stop and say what could
not run.

# `verify`

```elixir
@spec verify(
  PromptRunner.Plan.t(),
  keyword()
) :: {:ok, [report()]}
```

# `verify_prompt`

```elixir
@spec verify_prompt(PromptRunner.Plan.t(), map(), keyword()) :: report()
```

---

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