mix foundry.versions.check (foundry v0.1.3)

Copy Markdown

Reads mix.exs in the current project directory and emits the version of every known Foundry-ecosystem dependency as a JSON object.

The output is consumed in two ways:

  1. Prepended to every LLM prompt as the first item (INV-006 / ADR-010). Without it, the copilot cannot distinguish Ash 2.x from Ash 3.x and will hallucinate deprecated DSL syntax.

  2. Cached in ETS keyed on {:versions, mix_exs_mtime} (ADR-015 Tier 2). Re-run only when mix.exs changes.

Usage

mix foundry.versions.check
mix foundry.versions.check --json

Both forms emit JSON to stdout. The --json flag is accepted for consistency with the other mix foundry.* tasks but changes nothing — this task always emits JSON.

Output shape

Matches Foundry.Versions.VersionManifest. Every known library is present; libraries not found in mix.lock are null. The elixir_version and otp_version fields are always populated.

Error behaviour

Exits non-zero if mix.exs cannot be read or mix.lock is absent. Does not fail on unknown or absent libraries — they become null.