Portfolio project

Contract Review

Code gates first, playbook decides, AI reads

  • 4 red flagsPlus a compound-risk finding on a $186K SaaS agreement
  • 0 AI spendOn a contract rejected at intake for a missing exhibit
  • 3 of 3Test contracts reached a logged outcome

Portfolio project, realistic test data. See all results

Contract review is slow, inconsistent and easy to get wrong in expensive ways. A busy team either waits days for legal to read every agreement line by line, or signs on the counterparty’s paper without catching the clauses that matter: an uncapped liability, an auto-renewal with a 90-day exit window, a missing data-protection clause on a contract that handles personal data.

The obvious fix, handing each contract to an AI and asking “is this risky?”, fails in the ways these systems always fail. An AI will wave through a contract with a blank fee field, miss a referenced exhibit that was never attached, miscount a liability cap against a number it half-remembers and happily flag clauses that actually match the company’s own standards. It also can’t tell you why a clause is a problem, only that it feels like one.

Stack
n8n (Google Drive Trigger, Code, IF, Switch, Merge, SplitInBatches, Schedule) · Claude (Sonnet 4, via Structured Output Parser) · Airtable (five-table base) · Google Drive · Slack
Scope
Solo build: one main workflow across four phases, three supporting workflows for the learning loop, a five-table Airtable base and a three-contract test set covering the quick-pass, full-review and rejected-at-intake paths
Context
Portfolio project for a fictional business (Northwind Labs, Inc.)

Contract Review

What I Built

Four connected workflows (built in n8n) handle the process: intake and triage, analysis, output and routing, plus a separate learning loop.

Fixed rulesStep that uses AI Hands off to the next stepReads or writes shared data
AirtableOne base with five tables: the company playbook, a library of fallback wording, the review log, the findings and the obligations.
Phase 1: Intake and triageFixed rules check the contract is complete and return it to the sender if not. The AI then sorts it by type and risk tier and picks a review path.
Phase 2: AnalysisOn the full-review path, three checks run at once: each clause against the playbook, vague wording and missing clauses. A second AI pass looks for risks that combine, and findings are scored.
Phase 3: Output and routingEach finding goes to its owner (Legal, Finance, Procurement or Business), a report is built, red flags trigger a Slack alert and everything is logged.
Phase 4: Learning loopSeparate workflows track what people do with each flag, send obligation reminders and switch obligations on once a contract is executed.
Quick-passLow risk, such as small NDAs on the company’s own template. The AI scans the five highest-exposure clauses and the report is built.
Full reviewStandard and high risk: most commercial agreements, anything over $100K and anything involving personal data. All of Phase 2 runs.
EmergencyThe document flags an urgent timeline. A quick scan runs, with an escalation flag added to every finding.
Fig. 1 · The four-phase contract review system.

Here’s a walkthrough of the system in action:

  1. Gates the contract before any AI is involved

    A fixed-rules validation step checks that parties are named, an effective date is present, referenced exhibits are actually attached and no blank placeholders remain. Anything that fails is returned to the sender with the specific problems listed, and no AI cost is incurred.

  2. Sorts the contract and assigns a risk tier

    The first Claude step reads the contract and returns its type, counterparty, estimated value, whether personal data is involved and a risk tier (Low, Standard, High or Emergency). That result decides which review path the contract takes.

  3. Loads the company playbook, then runs three checks at once

    On the full-review path: a scan of each clause against the company’s preferred, minimum and red-line terms; a check for vague wording and jurisdiction issues; a check for missing clauses. The results are merged and duplicates removed.

  4. Checks for compound risk

    A second Claude pass looks for dangerous combinations that checking one clause at a time would miss, such as no liability cap alongside broad indemnification (where one side covers the other’s losses) or an auto-renewal alongside a long notice period.

  5. Scores findings, attaches fallback wording, routes and logs

    Fixed rules sort findings by severity, match each problem to pre-approved replacement wording and assign each to an owner (Legal, Finance, Procurement or Business). Red flags trigger a Slack alert.

Contract Review

Engineering Highlights

Select a heading to read the detail. Select it again to close it.

Intake validation is plain software rules with no AI: checks that the parties are named, an effective date is present, exhibits are attached and no template placeholders like [INSERT AMOUNT] are left. An incomplete contract never reaches Claude.

The clause scan doesn’t ask Claude whether a clause is “good.” It gives the AI the company’s own preferred terms, minimum acceptable terms and red lines for each type of clause, and asks it to report only where a contract departs from them. The standard lives in Airtable, in writing, where the legal team can edit it.

How the AI assigns a risk tier to a contract excerpt: Low goes to quick-pass, Standard and High go to full review and Emergency overrides the others when an urgent timeline is flagged. If the type or value is unclear, it defaults to Standard.
Fig. 2 · The four risk tiers the AI uses to rate the risk of a contract.

The most dangerous problems in a contract often aren’t single clauses but combinations. A liability cap that’s merely low is a yellow flag. No cap at all, sitting next to a broad one-way indemnification (where only one side covers the other’s losses), is an unlimited-exposure trap.

Re-running the same contract at first produced a different number of flags each time, because the AI’s randomness setting (called temperature) was left at its default. I set it to 0 on every Claude step (which makes the AI as consistent as possible) and added clear severity guidelines to the four steps that call for judgment.

When someone overrides a flag without giving a reason, they get a nudge. If a type of flag is overridden more than 40% of the time over 30 days, the system suggests reviewing the playbook. Custom replacement wording is surfaced as a candidate for the library.

Contract Review

Results

This is a portfolio project on a fictional business: the results below are illustrative of how the system behaves on realistic test data, not measurements from live usage.

What each claim rests on

Each row matches a claim from What I Built or Engineering Highlights with the test behind it. Tested on three contracts: a mutual NDA, a SaaS (software subscription) agreement and a professional services agreement (PSA), with the other tiers checked while building. Rows run from the strongest evidence to the weakest.

  • A strict fixed-rules check before any AI is used

    Test 3, a services agreement with a blank date, two blank fee placeholders and a missing exhibit, was returned to the sender with the specific problems listed: no classification, no analysis and no AI cost.

    Shown in one test
  • The playbook decides, not the AI

    In Test 2 every finding traced back to a playbook rule or to a combination of clauses, and each red flag was matched with pre-approved fallback wording from the library.

    Shown in one test
  • Compound risk is its own pass

    Test 2 flagged a one-sided liability cap (one month of fees against uncapped customer liability) combined with one-way indemnification as a compound risk.

    Shown in one test
  • Findings reach the right owner

    Test 2 findings were routed to Legal and Finance, and the red-flag Slack alert fired.

    Shown in one test
  • Four risk tiers route to quick-pass, full review or emergency

    Quick-pass (Test 1) and full review (Test 2) are shown in the tests below. The Standard and Emergency tiers were also tested while building and worked as designed.

    Tested during the build
  • Built to give consistent results on re-runs

    On early re-runs the same contract produced a different number of flags. I addressed this by setting the AI’s randomness setting (temperature) to 0 and adding severity guidelines. I haven’t re-run contracts since the change, so consistency isn’t demonstrated here.

    Designed, not tested
  • The playbook learns from people’s decisions, not from the AI’s output

    The learning loop was not exercised in testing.

    Designed, not tested

Limits: Three contracts is a small set, one for each path shown. It shows how each path behaves, not an error rate.

The numbers

Test 1 · Mutual NDA, $4.2K:
Clean
Low tier, quick-pass, clean report
Test 2 · SaaS agreement, $186K:
4 red flags
High tier, plus a compound-risk finding
Test 3 · PSA:
0 AI spend
Rejected at intake for a missing exhibit

Test 2 in detail: a $186K software subscription (SaaS) agreement on the other side’s paper. The full review flagged a one-sided liability cap (one month of fees against uncapped customer liability), one-way indemnification, the compound risk of those two together, a missing data-protection clause, an auto-renewal with a 90-day notice window and a clause letting one side change the terms alone. Each red flag was matched with pre-approved fallback wording from the library; findings went to Legal and Finance; the red-flag Slack alert fired.

Test 3: a services agreement with a blank date, two blank fee placeholders and an exhibit that was referenced but never attached. It failed the intake check and was returned to the sender with the specific problems listed: no classification, no analysis and no AI cost.

Across the set: every contract reached a logged outcome; the two heavy AI analyses ran only on the one contract that needed them; every finding traced back to the playbook rule or combination of clauses that produced it.

How this helps your business

What you get from a system like this.

  • Zero spend on broken contracts

    Incomplete contracts are rejected at intake, before a single AI call is made, so no AI spend is wasted reviewing a document that isn’t ready to be reviewed.

  • A written standard anyone can read

    Preferred terms, minimum acceptable terms and red lines live in Airtable, where the legal team can edit them, so the standard the AI checks against is visible and can be audited.

  • Catches dangerous combinations

    A separate compound-risk check catches combinations like an uncapped liability sitting next to broad indemnification, which a clause-by-clause review would miss.

  • Built for consistent severity

    Setting the AI’s randomness (temperature) to 0, plus clear severity guidelines, is meant to produce the same flags every time the same contract is reviewed.

  • Every finding is traceable

    Each flag traces back to the specific playbook rule or combination of clauses that produced it, rather than an unexplained AI judgment.

  • Fallback language on tap

    Each red flag automatically comes with matching, pre-approved wording from the library instead of legal drafting it from scratch each time.

  • Clear ownership, automatically

    Findings are routed to the right owner (Legal, Finance, Procurement or Business) based on the type of issue, not left for someone to sort by hand.

  • A playbook built to improve

    When people override a flag or write their own wording, the system is designed to learn from it and point out gaps in the playbook, instead of the same correction happening quietly over and over.

Let’s find what your process is letting slip.

Book a free 30-minute call. We’ll look at one process that’s costing you time, leads or money and where it breaks down today.

Book a call