ADLC
Toolkit

rejection-mining

Mines human PR review objections into reusable prosecution lenses so recurring "no"s are caught pre-submit.

rejection-mining

ADLC phase: P7 Compound · Gate: none. It authors prosecution lens files from clustered PR objections for adversarial-review to reuse.

The ADLC lifecycle, with P7 highlighted. Read the theory for P7

What it defends against

Institutional reviewers reject the same classes of change over and over: the "nights of no" that cost days in queue. rejection-mining fetches PR review threads via the GitHub CLI, filters for negative-signal language, clusters similar objections, and authors each cluster into a lens file with a prosecution charter and anonymized example quotes. "Would security reject this?" becomes a seconds-long pre-flight check instead of a days-long round trip.

Usage

adlc rejection-mining [--limit <n>] [--min <n>] [--out-dir <path>] [--write] [--llm] [--prompt-only] [--json]
FlagDescription
--limit <n>Maximum number of PRs to fetch (default 50).
--min <n>Minimum cluster size to author a lens (default 2).
--out-dir <path>Directory to write lens files into (default .adlc/lenses).
--writeEmit lens files (default is dry-run).
--llmSharpen each lens title and charter via one mid-tier LLM call per cluster.
--tier cheap|mid|frontierModel tier for the --llm pass (default mid).
--prompt-onlyPrint the LLM prompts and exit 0 (zero API keys).
--jsonMachine-readable output.

Requires the gh CLI installed and authenticated (gh auth login).

Exit codes

0: success. Mining complete (lenses printed, or written with --write).1: operational error (gh missing, auth failure, no PRs found, or bad arguments).2: reserved for a gate-fail; not currently emitted by this tool.

Example

$ adlc rejection-mining --limit 100 --min 3 --write
rejection-mining results
═══════════════════════
  PRs scanned:   47
  Signals found: 23
  Lenses:        2
  wrote: .adlc/lenses/lens-error-expose-raw.md
  wrote: .adlc/lenses/lens-hardcode-credentials.md
exit 0

Go deeper

packages/rejection-mining. Why review objections belong in the prosecution loop: Prosecution, Not Code Review.

On this page