Andrew Fribush
fig. 2.38.1 · the first plan had a model rewrite each comment, so a missed name came back inside the model’s new document; the shipped design asks the model only which names are left, so a miss is a string absent from a list and a failed call is an empty list and a warning.
THE REWRITER’S MISS HIDES IN A NEW DOCUMENT; THE DETECTOR’S MISS IS A STRINGABSENT FROM A SHORT LISTONE DOT IS ONE PASS. THE LINE IS THE COMMENT’S TEXT: INK WHERE CODE WROTE IT,ACCENT ONCE THE MODEL HAS.FIRST PLANmodel, then regexCOMMENTBradford … Brad … Katie … -ChrisMODEL REWRITES ITLLM anonymization, local endpointREGEX ON ROSTER NAMESlearner/evaluator name parts → [NAME]Dr. [NAME] → [NAME]STORED“preserves: locations, medicalterminology, training levels,procedures, shift types”WHERE A MISS ENDS UPA missed name comes back inside a newdocument that also carries themodel’s other edits. Nothing markswhich words it touched.SHIPPEDregex, then detector, then codeCOMMENTBradford … Brad … Katie … -ChrisREGEX ON ROSTER NAMESname parts → [NAME], longest firstDr. Mr. Ms. Mrs. Prof. [NAME] →[NAME]REGEX ON TITLES, SIGN-OFFSDr. Newton → [NAME]-Chris on its own line → [NAME]DETECTOR: WHICH NAMES ARE LEFT?temperature 0, 30 s timeout→ ["Brad", "Katie"]↳ error, timeout, bad JSON → [] and awarningCODE REPLACES EACH WORDreturned word → [NAME], every matchSTOREDwhitespace normalizedWHERE A MISS ENDS UPA missed name is a string absent froma short list. A failed call is anempty list and a log line, and thecomment keeps its regex output.

source: Client repo: docs/comment-sanitization-plan.md lines 84-92 (first plan); CLAUDE.md line 277 (shipped design); services/anonymize.py lines 20-257 (regex 20-107, detector 110-173, replacer 176-206, order 243-257) · detectorNotRewriter.data.ts

View in context: Use the LLM as a Detector, Not a Rewriter → · All figures

Andrew Fribush, software and computer engineer in Austin. I build consequential systems where software meets institutions: finance, healthcare, commerce, government data, and the mechanisms that govern AI agents. Taking new engagements: hello@andrewfribush.com.