#!/usr/bin/env bash
# beagle-explain: structured diagnostic explanations for agents.
#
# Thin wrapper over the in-compiler registry
# (beagle-lib/private/error-explanation.rkt) — the single source of truth.
# The old bash associative-array DB was retired: it lived outside the
# compiler, carried no severity/sinceVersion, was missing E016-E018, and
# its examples used the now-rejected `:` annotation syntax.
#
# Usage:
#   beagle-explain E002              (human-readable)
#   beagle-explain --json E002       (machine-readable)
#   beagle-explain --list            (list all codes)

set -euo pipefail
source "$(dirname "$0")/_beagle-racket"

exec "$RACKET" "$BEAGLE_ROOT/beagle-lib/private/error-explanation.rkt" "$@"
