Inspiration
In the high-stakes world of private credit, legal documents have evolved into "legal code"—complex, nested logic systems where a single missing word in a 500-page document can lead to billions in losses. We were inspired by the rise of "Adversarial Legalism," where sophisticated borrowers exploit the interaction between disparate clauses (like the J.Crew "Trap Door" or Serta "Uptiering") to strip collateral from lenders. We built ADS.SIM to give lenders the same adversarial tools that borrowers use, turning manual legal review into a unit-testable engineering process.
What it does
ADS.SIM is a deterministic intelligence engine that scans credit agreements for structural "bugs." It doesn't provide speculative advice; instead, it identifies what the contract explicitly allows. Pattern Matching: Scans for J.Crew, Serta, Chewy, and Incora-style loopholes. Adversarial Projections: Simulates a step-by-step "attack narrative" based on the specific language found. Evidence-Linked Highlighting: Every risk is mapped to verbatim text in the agreement, with adversarial highlights on the exact words that create the vulnerability.
How we built it
We utilized a dual-model architecture to handle the massive context of legal documents: Gemini 3 Flash acts as the indexer, performing high-speed verbatim extraction of specific sections (Investments, Baskets, Definitions). Gemini 3 Pro acts as the reasoning engine, performing "cross-clause dependency analysis" to see how a definition in Article I might neutralize a covenant in Article VI. The frontend is a high-fidelity dashboard built with React 19 and Tailwind CSS, designed to mirror institutional financial terminals like Bloomberg or Eikon.
Challenges we ran into
The biggest hurdle was the "Variable Reference" problem. In legal text, a covenant is often governed by a list of definitions located 400 pages earlier. Standard RAG (Retrieval-Augmented Generation) often loses the nuance of these connections. We solved this by using a multi-pass analysis where the model "compiles" the definitions section into a logic framework before scanning the negative covenants, ensuring the reasoning is grounded in the document’s specific internal logic.
Accomplishments that we're proud of
100% Determinism: We achieved a system that avoids "hallucinations" by strictly enforcing a JSON-schema response format that requires verbatim evidence for every claim. The "Adversarial Highlight" Feature: Our engine doesn't just point to a paragraph; it identifies the specific 3-4 words that create the loophole. Zero-Placeholder UI: The app is fully functional, supporting custom API key injection (BYOK) for enterprise-grade security.
What we learned
We learned that the gap between "Legal Logic" and "Computer Science" is smaller than people think. Credit agreements are essentially poorly compiled code. By treating law as a logic problem rather than a prose problem, we can find vulnerabilities that even senior legal teams might miss during a 24-hour closing window.
What's next for ADS.SIM // Adversarial Deal Simulator
The next phase is Automated Remediation. We want the system to not only find the "bug" but also suggest the "patch"—generating specific redline language to close the loophole. We are also looking into multi-document analysis, scanning the interaction between a Credit Agreement and an Intercreditor Agreement simultaneously.
Built With
- gemini-3-flash-(extraction)
- google-gemini-3-pro-(reasoning)
- google-genai-sdk
- jetbrains
- mono
- react-19
- tailwind-css
- typescript

Log in or sign up for Devpost to join the conversation.