Reports likely violations of any judged ADR (Mix.Statifier.AdrJudge's
registry) in the current branch's diff against its base, each one proposed
by one model call and required to survive an independent second call
prompted to refute it.
It runs as the ADR judge custom stage of mix quality, scoped to the
ADRs whose rule is a judgment call rather than a name or call-site pattern
the mechanical mix adr.check guard can match. It is local-only by design:
it makes real model calls, so it never runs in CI or --profile loop, and
it skips cleanly rather than failing when it has nothing it can check.
See Mix.Statifier.AdrJudge's moduledoc for which ADRs are in the judged
registry and why - including the ADRs deliberately left out - rather than
restating that survey here.
Usage
mix adr.judge
mix adr.judge --base upstream/trunk
mix adr.judge --format jsonOptions
--base- ref to diff against, tried beforeorigin/mainandmain--format json- print the ExQuality finding contract instead of prose
Exit status is 0 when nothing looks off, 1 when a finding survived the
refute pass, and 2 for any of three skip conditions, each with its own
reason: the claude CLI not on PATH, the diff touching none of the
registered judged-ADR scopes, or no base ref resolving. skip_exit_code: 2
turns each into a skip rather than a failure or a silent pass.
Summary
Functions
Runs the judge and reports the outcome instead of halting.
Functions
@spec execute(argv :: [String.t()], opts :: keyword()) :: {:ok, iodata()} | {:skip, String.t()} | {:error, iodata()}
Runs the judge and reports the outcome instead of halting.
opts are passed through to both Mix.Statifier.AdrJudge.collect/1 and
Mix.Statifier.AdrJudge.analyze/2, so opts[:runner], opts[:cli_available]
and opts[:caller] drive this without a real git history, a real claude
CLI on PATH, or a real network call.