Loophole CLI (adversarial ethics / rule stress-test)
Loophole is a Python CLI that stress-tests informal principles by drafting a “legal code,” then running adversarial finders and a judge loop. Upstream: brendanhogan/loophole. A copy is vendored under tools/loophole/ in this monorepo (see tools/loophole/NOTICE.md).
This is not a Cursor skill execution path by default: you run it in a terminal. The loophole-cli Cursor skill documents when to use it and the exact commands.
Requirements
- Python 3.12+
- uv (recommended) or another way to install deps from
pyproject.toml ANTHROPIC_API_KEYin the environment (never commit). Store in 1Password or your shell profile per team practice; see 1Password CLI setup if applicable.
Install (from repo root)
cd tools/loophole
uv syncUsage
cd tools/loophole
export ANTHROPIC_API_KEY="..." # Windows: set ANTHROPIC_API_KEY=...
uv run python -m loophole.main new --domain privacy -p examples/privacy_principles.txtOther subcommands (upstream): resume, visualize, list. See tools/loophole/README.md.
Privacy / data handling
Do not run on client confidential content unless policy allows. Prefer internal or synthetic examples when experimenting.
Cursor integration
- Slash command:
/loophole-cli - Skill:
.cursor/skills/loophole-cli/SKILL.md