model-ratchet
Ranks hot files (churn × import criticality) for re-prosecution after a model or repo drift.
model-ratchet
ADLC phase: calibration (cross-phase) · Gate: none. It prints a prosecution plan, or drives a review over the highest-value files and records findings.
What it defends against
Every frontier model release is a free re-audit: newer models find what older
ones missed. model-ratchet picks the files worth re-prosecuting first. It ranks
them by SCORE = churn × (1 + inDegree), high change rate times how many source
files import it, then either prints a prosecution plan or runs your review command
over each file and appends verified findings to the shared .adlc/findings ledger.
Run it on every model release (or monthly) to ratchet quality monotonically up.
Usage
adlc model-ratchet [--top <n>] [--review-cmd <cmd>] [--churn-limit <n>] [--dry-run] [--json]| Flag | Description |
|---|---|
--top <n> | Number of hotspot files to select (default 10). |
--review-cmd <cmd> | Command to run per file; {file} is substituted. Omit it and the tool prints the plan only. |
--churn-limit <n> | Commit-history depth for the churn computation (default 1000). |
--dry-run | Print the prosecution plan even when --review-cmd is supplied. |
--json | Machine-readable output. |
Exit codes
--review-cmd exit outside 2, or bad arguments.2: not used by model-ratchet itself. Review findings route to the ledger rather than failing a gate.Example
$ adlc model-ratchet --top 3
model-ratchet — Prosecution Plan
====================================================================
FILE CHURN IN-DEGREE SCORE
-------------------------- ----- --------- -----
src/db/query.mjs 31 5 186
src/auth.mjs 42 3 168
src/utils.mjs 25 1 50
exit 0Go deeper
packages/model-ratchet. Why re-prosecution beats a one-time review pass: Prosecution, Not Code Review.