Arsh Shah

Day 4: Cite check, every case citation in a brief, one click from checked

Lab · · Demo

Today's essay is about fake case citations, and the fix I keep pointing at is dumb: look up every case before you file. So I built the thing that makes that less annoying.

Cite check takes whatever you paste, a brief, a motion, an email from opposing counsel, and pulls out every US case citation. You get a table: case name, volume, reporter, page, court and year. Each row has a CourtListener link so you can go see if the case is real.

Up front, because this matters: it does not know whether a case exists. Nothing in your browser can. What it does is make sure you don't skip one.

It also flags stuff that's off on its face:

The whole thing is one regex, a small table of about 40 reporters with their rough date ranges, and some checks. Runs in your browser. Nothing gets sent anywhere.

if (year < a - 1) f.push(`${r} started around ${a}, so a ${year} case shouldn't be in it.`);
if (firstPin < Number(c.page)) f.push(`Pin cite ${firstPin} comes before the first page, ${c.page}.`);

87 lines of JS for the logic, 39 for the page. About 10 KB total.

Thing that broke: parallel cites. "347 U.S. 483, 74 S. Ct. 686 (1954)" is how you cite Brown. My pin cite pattern ate the ", 74" as a page number, so the Supreme Court Reporter cite just vanished from the table and the U.S. one got flagged for a pin cite before its first page. Had to teach it that a number followed by a reporter is a new cite.

Thing that surprised me, though not really: hit "Example: the Kentucky fake" and Bargo v. Bargo, 616 S.W.3d 389 (Ky. App. 2020), comes back clean. Real reporter, right court abbreviation, plausible year. Zero flags.