Inspiration

I kept thinking about one simple injustice. Law schools teach legal reasoning through moot court — adversarial simulation where students learn to think like lawyers. Only law students get that.

Five million Americans represent themselves in court every year. They walk in blind. They lose cases they could have won — not from lack of rights, but from lack of legal reasoning skills. TrialMind closes that gap.

What it does

TrialMind deploys three simultaneous AI legal minds against your case — an Advocate, Opposing Counsel, and a Judge. Each has a distinct role and voice. You respond. Your reasoning improves. Round by round.

After every round you get a learning recap, a knowledge check with immediate feedback, and mastery scores across four dimensions — Burden of Proof, Evidence Reasoning, Argument Structure, and Legal Concept Mastery. The platform is jurisdiction-aware across 8 US states with real statutes and case law. Evidence you mention gets auto-checked on your checklist. No manual input.

When you're ready, TrialMind generates a court-ready opening statement, a preview of opposing counsel's closing argument, a day-of-court checklist, and a full PDF report.

No account required. Guest mode lets anyone test it immediately.

TrialMind does not provide legal advice. It teaches legal reasoning.

How I built it

Built entirely in Codex using GPT-5.6. Every route, component, prompt, and database schema — written in a single Codex session.

The hardest part was the three-persona architecture. Early versions had all three personas sounding identical. The fix was explicit prohibition language in each system prompt — not just what each persona does, but what it is forbidden from doing. Opposing Counsel cannot be constructive. The Judge cannot make rulings. That single decision made everything work.

State-specific law is injected into every prompt so the model reasons about actual statutes, not generic legal principles. A dedicated /learning endpoint generates structured education output after every round. A /auto-check endpoint detects mentioned evidence at temperature 0.2 for consistency.

Frontend is React + Vite. Database is Supabase with Row Level Security. Deployed on Render and Vercel.

Challenges I ran into

Keeping three AI personas from bleeding into the same voice took more iterations than anything else in the project. The prohibition-based prompt architecture was the breakthrough.

Switching tracks from Apps for Your Life to Education two days before the deadline was a real decision. The features were already there — learning objectives, knowledge checks, mastery tracking. The reframe just made the product's actual value visible.

Accomplishments that I'm proud of

Three AI personas with genuinely distinct voices across multiple adversarial rounds. A complete education framework built on top of a working legal tool. Jurisdiction-aware analysis across 8 US states. Auto-checking evidence detection. A fully deployed product with auth, database, PDF export, and guest mode — built in under 72 hours with Codex.

What I learned

Prompt architecture matters more than model capability. The difference between three identical personas and three genuinely distinct ones came down to prohibition language — not different models or temperatures.

The product was always an education product. I just had to see it clearly.

What's next for TrialMind

Teacher and clinic mode for legal aid organizations. Document upload so users can submit their actual lease or contract directly. All 50 US states. Real case law via CourtListener. Curriculum mode for community legal literacy programs. Spanish language support. Mobile app with voice input.

Built With

Share this project:

Updates