Document automation

Automating AIA payment requisitions for a national general contractor

AI reads the paperwork, deterministic code does the math, and the contractor's finance operator reviews a finished requisition package instead of spending an afternoon on copy-paste.

requisition cycle · inputs → packageevery cycle
email thread
schedule.xlsx
invoice · scanned
AI readscode computes
requisition package✓ reconciled
lien waivers× 14
blue read by AI · green computed by code · 0 numbers guessed
0
Dollar amounts generated by AI
1
Command to build the package
CSV
Where the business rules live
100%
Of the math in plain Python
STEP 1
Collect the inputs
sub invoices, spreadsheets, last cycle's package
STEP 2
AI reads & routes
matches pages to subs and scopes, flags what's missing
STEP 3
Python does the math
retainage, totals, balance to finish — deterministic
STEP 4
Render the package
continuation sheet + waivers, their own templates
STEP 5
Operator reviews
check the flagged items, sign, send

The package nobody enjoys assembling

Every billing cycle, a national general contractor's finance team assembles an AIA-style payment-requisition package: a continuation sheet tracking each subcontractor's scheduled value, work completed, and retainage; a lien waiver per subcontractor with the right amounts carried through; and a cover set that has to reconcile to the penny. The inputs arrive as scanned PDFs, spreadsheets in a dozen personal styles, and emails.

The person doing the assembling lives in Word and Excel, not in web apps. The failure mode isn't exotic — it's a transposed digit at 4pm on a deadline day, in a document where a wrong number is genuinely unacceptable.

The rule: AI never touches a number

The workflow splits the job along the only line that matters. The AI does what AI is good at: reading a messy scanned invoice, figuring out which subcontractor and which scope a page belongs to, spotting that a document is missing. Plain Python does everything numeric: contract totals, percent complete, retainage, balance to finish. Every dollar amount in the output is computed deterministically from the source data — the model orchestrates, it never estimates.

That split isn't a style preference. It's the difference between a tool a finance operator can trust on a real requisition and a demo that falls apart the first time the model rounds something creatively.

Continuation sheet — one cycle AI reads code computes
Scope of workScheduled value% completeRetainageBalance to finish
Plumbing — common work65%
Electrical & fixtures40%
Drywall & framing85%
Flooring25%

The bars are real cells, redacted. Every green column is computed deterministically from the blue ones — the model never generates a number that lands on this sheet.

Business rules live in a spreadsheet, not in code

Real subcontractor lists are full of quirks: two scopes of work that share one purchase order but need a single combined waiver; a vendor whose retainage rate differs from everyone else's; a name that appears three different ways across documents. Hard-coding those rules would mean a developer in the loop forever.

Instead, every rule lives in CSV config files the operator edits in Excel. New subcontractor? Add a row. Odd waiver grouping? Change a cell. The code reads the config fresh every run, so the person who knows the business maintains the business rules — no ticket, no deploy.

Output that looks like it came from their office

The finished package renders through the client's own templates — their logo, their typography, their document conventions — via python-docx. The operator reviews and signs; nothing goes out that a human hasn't approved. The review step shrinks from “rebuild everything and hope” to “check the flagged items.”

Built to be handed off

The whole system runs at the operator's own desk on the AI subscription they already pay for — no new SaaS, no hosted service, no data leaving their machine. It ships with a plain-English maintenance guide and a running log of known edge cases, so the next odd invoice becomes a documented case instead of a mystery. The measure of success isn't the demo — it's whether the person who runs it every cycle still uses it six months in.