My AI Coding Assistant Misapplied the Design Principle I Gave It
Japanese version: Zenn (Japanese) Sequel to: I Wrote 82 Regex Replacements to Parse 6,933 Time Format Variations The Setup In the previous article , I had Claude Code build a parser for Japan's emergency contraception pharmacy dataset — free-text business hours, 6,933 formats, 82 regex replacements, 97% coverage. The most important thing that came out of the project wasn't code. It was a design principle that Claude established and I approved: Missing info > Wrong info. If the parser can't handle an entry, show the raw text. Don't guess. For a tool that helps people find emergency medication, a wrong answer is worse than no answer. Claude wrote this into the project's design docs. Claude followed it. And Claude used it to justify something neither of us caught at the time. What Claude Did The parser encountered data like this: 月-金:9:00-18:00(除く水曜) "Monday to Friday 9:00-18:00 (excluding Wednesday)." Claude's normalization pipeline stripped the parenthetical (除く水曜) and parsed the rest:
Continue reading on Dev.to Webdev
Opens in a new tab


