# `Aludel.RedTeam.Catalog`
[🔗](https://github.com/ccarvalho-eng/aludel/blob/main/lib/aludel/red_team/catalog.ex#L1)

Stable, versioned adversarial cases used by `Aludel.RedTeam`.

Catalog templates are data. They are never executed by Aludel itself.

# `category`

```elixir
@type category() ::
  :excessive_agency
  | :misinformation
  | :prompt_injection
  | :sensitive_information_disclosure
  | :system_prompt_leakage
  | :unsafe_assistance
```

# `severity`

```elixir
@type severity() :: :high | :critical
```

# `technique`

```elixir
@type technique() :: :direct | :indirect
```

# `template`

```elixir
@type template() :: %{
  id: String.t(),
  name: String.t(),
  category: category(),
  severity: severity(),
  technique: technique(),
  version: pos_integer(),
  risk_reference: String.t(),
  judge_template: String.t(),
  canary: String.t(),
  prompt: String.t(),
  checksum: String.t(),
  assertions: [map()]
}
```

# `all`

```elixir
@spec all() :: [template()]
```

Returns every case in stable catalog order.

# `categories`

```elixir
@spec categories() :: [category()]
```

Returns the supported risk categories in alphabetical order.

# `fetch`

```elixir
@spec fetch(String.t()) :: {:ok, template()} | :error
```

Fetches a catalog case by its stable ID.

# `fetch!`

```elixir
@spec fetch!(String.t()) :: template()
```

Fetches a catalog case by its stable ID, raising `KeyError` when absent.

# `name`

```elixir
@spec name() :: String.t()
```

Returns the stable catalog name used in provenance metadata.

# `version`

```elixir
@spec version() :: pos_integer()
```

Returns the catalog version used in provenance metadata.

---

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