# `MingaAdversarial.Findings`
[🔗](https://github.com/jsmestad/minga-adversarial/blob/main/lib/minga_adversarial/findings.ex#L1)

Parses the model's reply into findings the diagnostics SDK can publish.

The model is asked for a strict JSON array of `{"line", "concern"}`, but
models sometimes wrap their output in prose or fenced JSON blocks. This parser is
deliberately tolerant (it extracts the outermost JSON array and drops
anything malformed) and never raises. A bad reply yields `[]`, which is
treated as "no findings" (and clears stale ones).

Line numbers arrive 1-based and are converted to the 0-based lines the
diagnostics pipeline uses.

# `finding`

```elixir
@type finding() :: %{line: non_neg_integer(), concern: String.t()}
```

# `parse`

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

---

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