Overview
The Legal Intelligence agent queries 7 supplier-contract tables in the ERP and provides a risk-first view of EFI's supplier agreements. AI review is opt-in — only the specific clause text is sent to Claude when an admin clicks "Review with AI", never full documents.
Pages
Dashboard
KPI cards (suppliers, contract terms, pending approvals, risk flags), auto-computed risk register (missing T&Cs, unapproved terms, empty language, FSVP gaps), recent activity, payment terms matrix, FSVP compliance summary.
Contract Library
Three sortable tables: Supplier Contract Terms (48 records), Purchase Contracts (4 with 18 line items), PO Term Sheets (33). Click any row to expand full text. "Review with AI" button per contract.
Terms Consistency
Cross-supplier coverage matrix: which suppliers have T&Cs, approval status, text on file, payment terms. PO term categories breakdown. "Compare with AI" for bulk consistency analysis.
Compliance
FSVP checklist status per supplier/product. Approved vs pending tracking, document counts, suppliers with contracts but no FSVP checklist flagged.
AI Contract Review
Select any contract or term sheet from a dropdown, Claude analyzes for: risk flags, missing clauses (force majeure, IP, dispute resolution), non-standard language, payment term assessment, compliance gaps.
ERP Tables
| Table | Rows | Key Columns |
|---|---|---|
| supplier_contract_terms | 48 | terms_title, terms_language, approval_status, operational_status |
| supplier_purchase_contracts | 4 | contract_num, contract_date, total_mton, fob_price, pdf_filename |
| supplier_purchase_contract_line_items | 18 | shipment_window, metric_tons, fob_price, payment_terms |
| po_term_sheets | 33 | category, description, verbiage, req_approval |
| ref_po_terms | 4 | terms_title, verbiage (templates) |
| supplier_payment_terms | 18 | terms_language, notes, approval_status |
| supplier_to_payment_term | 28 | Junction: supplier ↔ payment term |
| supplier_fsvp_checklists | 8 | checklist_items (JSONB), approved_date |
| supplier_fsvp_documents | 15 | file_name, file_title |
Risk Register (auto-computed)
- Missing T&Cs — suppliers with purchase orders but no contract terms on file
- Pending Approval — terms that exist but haven't been approved
- Empty Terms — term records with no language text (shell records)
- Missing Payment Terms — suppliers with no payment conditions assigned
- FSVP Pending — checklists without an approved date
AI Privacy
Only specific clause text is sent to the LLM. Full documents are never transmitted. Claude API (not claude.ai) is used — Anthropic's API terms guarantee zero data retention. All parsing, indexing, and risk computation happens locally. AI is only invoked when an admin explicitly clicks "Review with AI".