# `ReqLLM.Migration`
[🔗](https://github.com/agentjido/req_llm/blob/main/lib/req_llm/migration.ex#L1)

Read-only V2 migration inventory for ReqLLM applications.

`ledger/0` exposes the versioned, JSON-compatible deprecation ledger shipped
with ReqLLM. `audit/2` scans Elixir source without evaluating it and reports
only the precise patterns represented in that ledger.

The audit never rewrites source, starts ReqLLM, resolves credentials, or makes
provider requests. Its result is safe to encode directly as JSON.

# `report`

```elixir
@type report() :: %{required(String.t()) =&gt; term()}
```

# `audit`

```elixir
@spec audit(Path.t() | [Path.t()], keyword()) :: report()
```

Audits Elixir source paths for mechanical V2 migration work.

A path may be a file or directory. Directories are scanned recursively for
`.ex` and `.exs` files. Dependency, build, VCS, coverage, and generated-doc
directories are ignored by default.

## Options

  * `:exclude` - a path or list of paths to omit

# `deprecations`

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

Returns the active deprecation records in ledger order.

# `exit_status`

```elixir
@spec exit_status(report()) :: 0 | 1 | 2
```

Returns `0` for clean or advisory-only reports, `1` for migration work, and `2` for errors.

# `format_human`

```elixir
@spec format_human(report()) :: String.t()
```

Formats an audit report for terminal output.

# `ledger`

```elixir
@spec ledger() :: map()
```

Returns the complete machine-readable deprecation and migration ledger.

# `migration_checks`

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

Returns the precise V2-readiness checks in ledger order.

---

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