All projects
Live

Contract Analyzer

Contract risk analysis in seconds — risk flags, plain English, negotiation leverage

Built in One overnight session
Next.jsAnthropic ClaudeStructured OutputTypeScriptLegal Tech

4-tab structured UI

9-field JSON extraction

3 severity levels

Negotiation leverage points

01The Problem

Legal documents are deliberately opaque. A standard SaaS agreement or employment contract can contain liability caps of $500 alongside unlimited client liability, 24-month non-competes, unilateral amendment rights, and mandatory arbitration waivers — all buried in dense legalese. Without a lawyer or hours of careful reading, these clauses are easy to miss. I wanted to build the AI layer that makes contracts legible to anyone.

02The Approach

The app takes any contract text (up to 80k chars) and extracts a structured JSON object via a carefully designed system prompt: parties, dates, key obligations, risk flags (with severity ratings and recommendations), plain-English summary, and negotiation points. The UI presents this across four tabs — Overview, Risks, Obligations, Negotiate — so users can navigate to exactly what they need.

03Architecture Decisions

Structured extraction via system prompt

Rather than using tool_use or structured output APIs, the system prompt defines the exact JSON schema and instructs the model to return only valid JSON. This is cheaper, faster, and equally reliable for well-defined schemas. The model receives the full contract and returns a 9-field object with nested arrays.

Risk severity classification

The prompt instructs Claude to flag genuinely risky clauses — not generic issues — at three severity levels. High flags: unlimited liability differentials, auto-renewal traps, unilateral amendment rights, extreme IP assignment clauses, arbitration waivers. The severity levels drive visual treatment in the UI (red/amber/blue).

Negotiation intelligence layer

Beyond identifying risks, the app generates specific negotiation points: what to push back on, why it matters, and what alternative language to request. This shifts the tool from diagnostic to actionable — useful to anyone about to sign.

04Key Insight

The most valuable output isn't the risk summary — it's the negotiation tab. Most people reading a contract can eventually spot a bad clause. What they can't do is immediately know what to ask for instead. Generating specific alternative language ('ask for a mutual liability cap at 12 months fees' rather than 'this liability clause is unfair') is where AI adds the most leverage.

05Why It Matters

Directly maps to the enterprise document AI problem space — the same pattern (structured extraction + risk classification + actionable recommendations) applies to legal review, compliance checking, medical records, financial documents. For Clio's Enterprise AI team, this is the core product pattern.