Skip to content
Bahman Shadmehr Independent AI Systems & Automation Engineer

Legal operations · Reference design

Contract review across linked clauses

The cap matched the playbook. The definition three documents away didn't.

Follow the package's own references (cross-references, defined terms, amendments) to assemble a reviewer packet per playbook topic, and leave interpretation to the lawyer.

Company Halden is a hypothetical company. Every figure is illustrative.

A contract bundle with coloured tabs marking a cap clause, its exclusions and a definition in another document.

About Company Halden

Company Halden is a hypothetical company, written for this reference design; the details below are its constraints. Every figure is illustrative, computed from stated assumptions. No client work or measured result is claimed.

Industry
Logistics group: warehousing and freight forwarding
Size
About 2,000 people; four in-house lawyers, three contract managers, one legal-operations analyst
Systems
A contract lifecycle tool, shared drives of scanned agreements, a review playbook owned by the general counsel
Volume
About 120 agreement packages a month
Constraints
Legal interpretation stays with qualified reviewers; privilege; EU hosting; the playbook changes quarterly

In brief

ProblemClause-by-clause retrieval misses linked exclusions, definitions and amendments, and nobody checks whether the package is complete.
SystemPackage inventory with missing-document detection, a reference graph built in code, topic packets assembled along explicit links, and quote-verified playbook comparison.
People decideQualified reviewers interpret every clause and record positions; the general counsel owns the playbook.

How the work ran before

Company Halden is a logistics group with about 2,000 employees. Its legal team has four in-house lawyers, three contract managers and one legal-operations analyst. Around 120 agreement packages arrive each month from suppliers and customers. A typical package is a master services agreement, an order form, up to three amendments, a data processing agreement and, now and then, a side letter.

A contract manager reads the whole package, compares it with the review playbook (a long document the general counsel owns and updates each quarter) and escalates anything non-standard to a lawyer. Standard packages move in days. Non-standard ones wait two to three weeks.

Where it broke

A supplier agreement comes through with what looks like a standard liability cap in the master agreement: the supplier's liability is capped at twelve months of fees. The contract manager checks it against the playbook. It matches.

Four pages later, the exclusions clause says the cap does not apply to breaches of confidentiality. That is normal too. But "Confidential Information" is defined in the data processing agreement, and an amendment signed a year later widened that definition to include operational data the supplier handles every day. Read together, the three documents mean that most realistic claims fall outside the cap. Nobody read them together. It came to light during a claim.

Earlier, Halden's legal team had tested an AI assistant that answered questions about a contract by searching for the most relevant passages. Asked "what is the liability cap?", it quoted the cap clause perfectly. It did not follow the reference to the exclusions, the defined term, or the amendment. The answer was accurate and incomplete, which in contract review is the dangerous kind of wrong.

What I would build

A reviewer's packet, assembled by following the package's own references, with interpretation left to the reviewer.

  1. Inventory the package. List every document, its type, date and version, and check the package against what the documents themselves reference. If an amendment refers to "Amendment 1" and there's no Amendment 1, the package is marked incomplete before anyone reviews anything.
  2. Build the reference graph. Code extracts explicit links: clause cross-references ("subject to §14.4"), defined terms and where they're defined, and amendments that modify named clauses. These links are mechanical; no model is needed to find "§14.4".
  3. Assemble the packet for each playbook topic. For "liability cap", the packet starts at the cap clause and follows its links: the exclusions, the defined terms those use, and any amendment that changes any of them. Each excerpt keeps its document, page and clause number.
  4. Compare with the playbook. A model compares the assembled language with the approved position and describes the deviation in plain words, quoting the text it relies on.
  5. Leave the reading to the lawyer. Where two readings are plausible, the packet shows both. It never decides which document takes precedence when the documents disagree about that.

Following one package through

Sample package CT-PKG-07 has five files: MSA v4, an order form, Amendment 2, DPA v2 and a side letter. All content is constructed.

Excerpt Location Why it's in the packet
MSA v4 §14.2, liability cap page 41 Starting clause for the topic
MSA v4 §14.4, exclusions from the cap page 45 §14.2 says "subject to §14.4"
DPA v2 §3.1, "Confidential Information" page 6 Term used in §14.4, defined in the DPA
Amendment 2, clause 3 page 2 Amends the DPA §3.1 definition
Order form, precedence clause page 1 Claims to override the MSA "in case of conflict"

Constructed sample.

The packet's summary reads: "The cap in §14.2 matches the playbook position. §14.4 excludes confidentiality breaches from the cap. Amendment 2 widens Confidential Information to include operational data. Playbook position 7.3 requires exclusions to be limited to data defined in Schedule B. Deviation: likely. Unresolved: whether the order form's precedence clause affects the DPA."

The lawyer reads four short excerpts in order, instead of 90 pages, and decides.

Company Halden · CT-PKG-07 · liability cap packet Constructed sample 5 excerpts · 1 open question

Assembled by following explicit links

MSA v4 §14.2 · page 41. Cap: twelve months of fees, "subject to §14.4".

MSA v4 §14.4 · page 45. Excludes breaches of confidentiality from the cap.

DPA v2 §3.1 · page 6. Defines "Confidential Information".

Amendment 2, clause 3 · page 2. Widens that definition to operational data.

Deviation: likely Playbook position 7.3

Exclusions should cover only data defined in Schedule B.

Unresolved For the reviewer

Does the order form's precedence clause affect the DPA?

Search alone found: §14.2 Packet adds: §14.4, DPA §3.1, Amendment 2, order-form precedence

Constructed sample. A reviewer packet for Company Halden, a hypothetical company. Annotations are labels, not legal advice.

When things go wrong

A referenced document is missing. "Amendment 1" is mentioned but not in the package. The packet is marked incomplete with the missing reference. Reviewing an incomplete package as if it were complete is how the original problem happened.

A reference is implicit. Contracts sometimes change things without naming the clause ("the supplier's obligations regarding data are extended to…"). Code won't find that link. The model is asked, for each amendment, which existing clauses it might affect, and those suggestions are shown as suggested links, visually distinct from explicit ones.

Documents disagree about precedence. The order form says it wins; the MSA says it wins. The system shows both clauses and stops there. Which one governs is a legal question.

The scan is poor. Clause numbers misread by OCR break the graph. Low-confidence pages are flagged, and the packet lists the clauses it couldn't locate.

What changes for the team

Step Before After
Check the package is complete Rarely done explicitly Automatic, before review
Find related clauses Read everything, remember links Packet follows the references
Compare with playbook From memory of the playbook Side by side, per topic
Record the decision Email or notes Decision stored against the packet

Illustrative figures from assumptions in the technical design. Not measured.

Illustrative month (120 packages) Read end to end Packet-first review
Packages flagged incomplete before review not checked about 10
Reviewer hours on standard packages about 180 about 90
Linked-clause deviations surfaced for review depends on reader every explicit link followed

The time saving depends on reviewers trusting that the packet has everything. That trust has to be earned in the pilot, not assumed.

What this does not solve

It doesn't interpret law or give legal advice. It depends on the playbook being current and specific; a vague playbook produces vague comparisons. Implicit references stay a weak point. And someone has to own the playbook topics and their starting clauses, which is real ongoing work.

How I would prove it

Take 30 past packages that a lawyer already reviewed, including the one with the widened definition. For each playbook topic, compare the packet with the lawyer's notes: did the packet include every clause the lawyer relied on? Count misses separately for explicit and implicit references. Then time five reviewers on packet-first review of ten new packages, with a second lawyer checking their conclusions.

The technical design

The same system for engineers: architecture, records, failure handling, evaluation, the options I rejected, and the stack. About 4 minutes.

  1. Scope and assumptions
  2. Architecture
  3. Clause segmentation and the graph
  4. Topic assembly
  5. Comparison output
  6. Failure handling
  7. Evaluation
  8. Trade-offs I considered
  9. Stack
  10. Security and operations

Read the technical design

Clauses that only matter together?

Bring one sample package and your playbook.

A redacted agreement package and the playbook it's reviewed against are enough to test whether the references can be followed mechanically.