Contract Clause Library: Harvesting Clauses From Scans
By Schema LawPublished Updated
To build a contract clause library from signed scans, choose agreements whose negotiation you can still explain, convert them to text, and copy out one clause at a time. Proofread each clause against its page image, record where it came from and which side wanted it, then replace party names and deal terms with placeholders before anyone reuses it.
What is a contract clause library, and why build it from signed deals?
A contract clause library is a collection of individual contract provisions, each stored as its own entry with notes on when to use it. Building it from signed deals captures wording that two sides actually agreed to, which a template cannot show. A template records your opening position; a signed contract records where the negotiation ended.
That difference is the reason to go to the scans. Your template's indemnity clause tells a junior lawyer what the firm asks for. Five signed indemnity clauses tell the same lawyer what counterparties accepted, what they struck, and what fallback wording closed the gap. When the other side says "nobody agrees to that", an entry from a signed deal is your answer.
A library differs from a template in its unit. A template is one whole agreement made reusable, and the steps for that are in the guide to turning a converted agreement into a reusable template. A library is cut finer. It holds many versions of one clause type, drawn from many agreements, side by side.
The signed copies you need exist only as scans when the final Word file was never saved, or was saved before the last round of handwritten changes. The scan is then the only complete record of the agreed words. Text recognition gets those words back into a form you can copy, and the rest of the work is selection, proofreading and labeling.
One limit to keep in view: a clause that was agreed once is evidence of what one counterparty accepted on one day. It is not a statement of what the law requires or what a court would enforce. Each entry should say that it is a precedent to be reviewed, not approved wording.
Include severability among the first clauses you copy, along with a liquidated damages formula and any sentence on good faith and fair dealing. Also take a material breach definition if the agreement prints one. For each entry, write the source agreement, the page, and the signature date you can read on the scan.
Which scanned agreements make good sources for a clause library?
Good sources are fully signed agreements where someone at the firm can still say who drafted first and what was traded. A clause with no history is only wording. Start with a small set, ten to twenty agreements of one type, so that the versions of each clause can be compared with one another.
Run each candidate through these questions and keep the ones that pass.
| Question | Why it matters | If the answer is no |
|---|---|---|
| Is the scan the fully signed version? | An unsigned draft may contain wording that was later rejected | Find the executed copy or leave it out |
| Do you know which side's form it started from? | The same sentence means something different as an opening ask and as a concession | Record "origin unknown" and rank it lower |
| Are the amendments in the file? | An amendment may have replaced the clause you are about to harvest | Harvest only after you have read the whole document family |
| Is the print clean enough to read at normal zoom? | Faint or tiny type costs more proofreading than the clause is worth | Take the clause from a cleaner agreement first |
| May the wording be reused inside the firm? | A confidentiality term or client instruction may restrict it | Ask the responsible lawyer before harvesting |
| Is the agreement of a type the firm will draft again? | A library entry nobody looks up is wasted effort | Skip it |
On amendments, the order in which later documents change a contract is set out in the post on conformed copies and the order amendments apply in. Read it before you treat any clause as the final agreed version.
Choosing which clauses to harvest first
Do not harvest whole agreements. Pick the clause types the firm negotiates hardest and takes longest to draft. A workable first list is limitation of liability, indemnity, termination for convenience, assignment and change of control, governing law and disputes, and confidentiality carve-outs. Use whatever list matches your own practice.
To find each clause type across the set, make the scans searchable and run the same terms over every file. The post on which search terms find an assignment or change of control clause shows how to build a term list that catches differently worded versions of one clause. Keep a note of the files where the search found nothing, and open those to see whether the clause is absent or the text layer is poor.
Lifting a clause out of a converted contract without its OCR errors
Lift a clause by copying it from the converted text, then reading it word by word against the page image before it enters the library. Every error you miss will be pasted into future contracts. A clause is short enough to read in full against the scan, and nothing less than a full read will catch a dropped word.
- Convert the agreement. Export the scan to Word or Markdown so that headings and numbered lists survive as structure. In Schema Law you can view the parsed pages on screen and compare them with the original before you export.
- Find the clause and its edges. Copy from the clause heading to the end of its last sub-clause. Include any proviso that begins "provided that" or "notwithstanding", even where it sits in a different numbered paragraph.
- Paste as plain text. Paste into a blank document without formatting. This drops stray fonts and broken line endings from the conversion.
- Read it against the image. Put the scan page beside the pasted text. Read the image aloud or under your breath, and follow the text with a finger or cursor.
- Rebuild the numbering. Retype the clause's internal numbering, (a), (b), (i), (ii), to match the page.
- Collect the defined terms. List every capitalized term the clause uses and copy each definition from the definitions section, proofread the same way.
- Note the page. Record the page of the scan the clause came from.
The general method for checking OCR output against the original applies in full. For a clause, six kinds of slip deserve particular attention because each changes meaning without looking wrong:
| Slip | Example | Effect |
|---|---|---|
| A dropped "not" | "shall not be liable" becomes "shall be liable" | Reverses the clause |
| "or" and "and" swapped | "fraud or wilful misconduct" becomes "fraud and wilful misconduct" | Narrows or widens an exception |
| A changed digit | "12 months" becomes "72 months" | Alters a cap or a period |
| A wrong cross-reference | "Section 8.1" becomes "Section 3.1" | Points the clause at the wrong provision |
| A lost line | A line at a page break disappears | Removes a carve-out silently |
| Merged sub-clauses | (b) and (c) run together | Hides where one condition ends |
Page breaks need a second look. Where a clause runs from the foot of one page to the top of the next, a header, footer or page number can land in the middle of a sentence. Delete it and confirm that the sentence reads straight through on the two images.
Handwritten changes are a separate case. If a party struck words or wrote in the margin and initialed it, the agreed clause is the printed text as altered by hand, and recognition may give you only the printed part. The post on handwritten changes to a contract explains how to record them. Type the clause as amended, and say in the entry's notes that the change was handwritten.
What should each clause library entry record?
Each entry should record the clause text, where it came from, when it was signed, which side it favors, and how the wording was reached. The text alone tells a drafter what was written. The other fields tell the drafter whether to use it, and against whom.
| Field | What to write | Example |
|---|---|---|
| Entry ID | A short code that never changes | LOL-014 |
| Clause type | From a fixed list | Limitation of liability |
| Clause text | The proofread wording with placeholders | See the worked entry |
| Defined terms used | Each term with its definition | "Fees", "Services" |
| Agreement type | From a fixed list | Master services agreement |
| Signing date | Year and month are enough | 2024-09 |
| Governing law | As stated in the source contract | New York |
| Our side | Which party the firm acted for | Customer |
| Favors | Our side, the other side, or balanced | Customer |
| Origin | Whose form the clause began in | Supplier's paper |
| How negotiated | Two or three sentences | Supplier opened at fees paid in 12 months; cap doubled in round two in exchange for a shorter payment term |
| Fallbacks seen | Other positions offered and refused | Customer asked for uncapped data breach liability; refused |
| Source reference | Matter number and scan page, stored where only authorized staff can follow it | Internal |
| Harvested by, checked by | Two names and dates | Initials and dates |
| Status | Precedent for review, or approved by a named partner | Precedent for review |
Fix the lists for clause type, agreement type and "favors" before you start, and do not let people invent new values. A library where one person writes "LoL", another "liability cap" and a third "limitation" cannot be filtered.
The "how negotiated" field is the one that goes stale fastest, because it lives in people's memory. Fill it in when you harvest, by asking the lawyer who ran the deal, and write "not known" when nobody remembers. A blank looks like an oversight; "not known" is information.
A worked entry
Suppose the source is a master services agreement between Brannock Analytics Inc. as supplier and Tessaly Freight Co. as customer. Both are invented. The library entry's text reads:
Except for liability arising under Section [indemnity section], [Supplier]'s total liability under this Agreement in any [period] shall not exceed [multiple] times the Fees paid or payable in that [period].
The entry notes that the firm acted for the customer, that the clause began on the supplier's paper at one times annual fees, and that the multiple moved in the second round. The names, the fee figure and the section number are gone. What remains is the structure of the bargain.
Stripping party names and deal terms from a harvested clause
Strip a harvested clause by replacing every word that could identify the client, the counterparty or the price with a bracketed placeholder. The aim is an entry that a colleague on an unrelated matter can read without learning who the deal was for or what it was worth.
This is a mechanical step with a checklist. Whether a given clause may be reused at all is a professional responsibility question for the lawyer in charge, and the post on attorney-client privilege and confidentiality duties with document tools covers the duties involved. For a longer list of the commercial terms parties want kept private, see which contract terms are usually redacted.
Work through the clause and its definitions for each of these:
- Party names and their defined labels. Replace "Tessaly" with [Customer]. Also replace a defined label that gives the party away, such as a project code name.
- Amounts, rates and percentages. Replace with [amount] or [percentage]. Keep the structure, for example "the greater of [amount] and [percentage] of Fees".
- Dates and periods tied to the deal. Replace a specific date with [date]. A period such as "30 days" can stay if it is a standard term and not a negotiated one.
- Products, sites and territories. Replace named products, plant addresses and lists of states with [Products], [Site] and [Territory].
- People. Remove named individuals, such as a key person or a notice contact.
- Cross-references. Replace "Section 14.2" with a description in brackets, such as [confidentiality section], because the number means nothing outside its source.
- Unusual phrasing. Watch for a phrase so distinctive that a reader in the industry would know the counterparty from it. Generalize it.
Then run two tests. First, search the finished entry for each party's name, each brand and the matter number; the search must find nothing. The same search is described for a whole agreement under turning a converted agreement into a reusable template. Second, give the entry to someone outside the deal team and ask whether they can tell what industry or company it came from.
Keep the link back to the source out of the shared library. The source reference field should hold a code that only authorized staff can resolve to a matter. The scan itself stays in the matter file under whatever access rules already apply to it.
Some settlement and release wording carries its own confidentiality term covering the agreement's existence or content. Before harvesting from such a document, have the responsible lawyer read that term; the post on OCR for settlement agreements explains where to find it.
Keeping a clause library in Markdown, Word or a spreadsheet
Choose the format by how the library will be used. A spreadsheet is best for filtering and comparing many entries. Word is best when drafters will paste clauses straight into contracts. Markdown is best when the library needs version history and will outlive any one program.
| Need | Spreadsheet | Word | Markdown |
|---|---|---|---|
| Filter by clause type, side or governing law | Strong: one column per field | Weak: needs a table and manual sorting | Fair: needs consistent headings and a search tool |
| Read long clause text comfortably | Weak: long text in a cell is hard to read | Strong | Strong |
| Paste into a contract with numbering intact | Weak | Strong, if styles match the firm's template | Fair: numbering has to be reapplied |
| Compare two versions of one clause | Fair: put them in adjacent rows | Strong, with the compare feature | Strong, with any text comparison tool |
| Track who changed an entry and when | Depends on where the file is stored | Depends on where the file is stored | Strong in a version-controlled folder |
| Needs a particular program to open | Yes | Yes | No: it is plain text |
You can also combine them. Keep a spreadsheet as the index, one row per entry with every field except the full text. Keep the text of each entry in its own Word or Markdown file named by entry ID. The index answers "which clauses do we have", and the files hold the words.
The format you export the source contracts in can match the format of the library. Schema Law's Markdown export gives headings, lists and tables as plain text, and its Word export gives editable text with headings, lists and tables; the export formats section of the homepage lists all eight. Every plan includes all eight formats, so the plans on the pricing page decide only how many pages you can convert.
Whichever format you pick, settle three rules on day one:
- One owner. One person approves new entries and retires old ones.
- No silent edits. A change to an entry's text creates a new entry ID, because the old wording was what was signed.
- A review date. Each entry carries the date it was last read by a lawyer, so a drafter can see how old the precedent is before relying on it.