Loophole: Adversarial Agents To Stress Test Your Morality — Brendan Rappazzo, Morgan Stanley
Loophole turns a natural-language policy into rules, then uses adversarial agents to find forbidden allowances and wrongful refusals. It is a useful pattern for testing agent constitutions.
Loophole converts a user's stated morals into a codified rule set. One adversary searches for immoral-but-legal cases, another finds moral-but-illegal overreach, and a judge either patches the rules or asks the user to resolve an ambiguity.
Reuse the pattern to test an agent constitution or system prompt before deployment: generate both unsafe compliance cases and excessive-refusal cases, judge them against the original intent, and preserve unresolved conflicts for human review. The project is **open source** and terminal-based.
Loophole converts a user's stated morals into a codified rule set. One adversary searches for immoral-but-legal cases, another finds moral-but-illegal overreach, and a judge either patches the rules or asks the user to resolve an ambiguity. Reuse the pattern to test an agent constitution or system prompt before deployment: generate both unsafe compliance cases and excessive-refusal cases, judge them against the original intent, and preserve unresolved conflicts for human review. The project is **open source** and terminal-based. Its broader contract and government ideas remain exploratory. The Senate simulation and experiments using **500 synthetic personas per state** rely on model-generated values and behavior, so they should not be treated as verified representations of people or voting outcomes.
This turns constitution testing into a two-sided adversarial loop that searches for both unsafe compliance and excessive refusal, then patches rules or preserves ambiguity for human judgment. It complements trace-driven prompt evaluation with targeted counterexample generation, but model-generated adversaries and judges cannot establish that the resulting rules faithfully represent people or resolve latent multi-agent behavior.