One insurance loophole shows why morals can't be coded once
Brendan Rappazzo built Loophole, an open-source game where adversarial AI agents translate your stated morals into a legal code, then hunt for contradictions in it. The project reframes personal ethics as an unsolvable translation problem — one his tool now points at chatbot rules, contracts, and even a full US Senate voting simulator.
- Origin: 23andMe — Rappazzo started the project after sending his DNA to 23andMe and worrying about how forensic and cold-case uses of DNA samples might conflict with morals he'd never explicitly enumerated.
- Legal system as analogy — He frames a legal system as society's attempt to codify moral belief, arguing English common law leans on case law because stating moral nuance up front is too hard.
- How the game works — A user states morals in natural language, one agent drafts them into a formal legal code, and two adversarial agents then search for loopholes (immoral but legal) and overreach (moral but illegal).
- Judge agent — A judging agent decides whether a found contradiction is a sloppy translation it can auto-patch, or a genuine gap in the user's morals that gets escalated for a human decision.
- DNA example output — One surfaced loophole: an insurance company training a predictive model not on raw DNA but on DNA-derived artifacts, which the system flagged as immoral but legal and then auto-patched.
- Overreach example — A second case involved a researcher discovering a rare treatable disorder in submitted genetic data; the system found this moral-but-illegal case couldn't be auto-patched and escalated it to the user.
- Reception — Rappazzo says the GitHub post became his most viral share on Twitter, prompting him to explore whether the framework has uses beyond a personal 'stress test your morals' game.
- Chatbot constitutions — One branch generates codified system prompts for customer-facing chatbots, using adversarial agents to try to make the bot talk about banned topics or refuse allowed ones, which he compares to GAN-style training.
- Decentralized contracts — Another branch codifies a user's data-privacy morals into a contract that can be checked against a company's terms of service, or against another party's own codified contract, to surface disagreements before signing.
- US Senate simulator — Using Claude, Rappazzo built moral/voting profiles for current US senators from their public voting histories, then simulated votes on bills, including a Medicare bill that started as a 50-50 tie and was hill-climbed to pass with 52 votes by adjusting its language.
- State-level personas — Using Nvidia's USA personas dataset, he generated 500 personas per state, drafted each one's moral legal code, and ran proposed bills against them to measure real-world agreement and hill-climb bills toward broader public support.
In their words
this is a loophole it found where an insurance company um trained a predicted machine learning model not on your DNA but on artifacts of the DNA. And so it's saying you know this is actually immoral but currently legal given your system.6:15

this this Medicare bill I was testing, you know, it found that I think it originally started at like a 5050 vote and it found ways to hill climb the language of the bill such that it passed with um 52 votes.13:16

I'll be talking about my project loophole. And I'm actually a machine learning researcher at Morgan Stanley, but this has nothing to do with Morgan Stanley.0:12

Disclosure · Rappazzo is presenting his own open-source side project, Loophole, unrelated to his employer Morgan Stanley, and is soliciting GitHub contributors and users.
One thing to add — One thing to add — the leap from a personal morals game to simulating 500 personas per state voting on real bills is the part worth watching skeptically, since it assumes LLM-generated personas and voting-history-derived senator profiles are accurate proxies for actual human judgment. The DNA insurance example is a useful concrete illustration of why "legal but immoral" gaps are hard to spot in advance, which is the strongest part of the talk.</note> </invoke>
One thing to try tonight
Try Rappazzo's Loophole game from his GitHub tonight: write out five plain-language moral principles on a topic you care about and run it through the tool to see what loopholes or overreach cases the adversarial agents surface.