Custos/legalos
A full CLM layer built on top of upstream mike: counterparty index, intake triage, contract facts, tabular version history, and Grok support.
Custos has taken the upstream tabular-review tool and methodically extended it toward contract lifecycle management. The work spans six topic areas, all shipping within the same development window.
The core addition is a counterparty system: projects gain template and role columns (buyer/seller/mutual), counterparty and parent_counterparty free-text fields, LLM-driven auto-extraction on upload, a merge endpoint for deduplicating case variants, and a per-counterparty timeline page. The final structural move derives counterparty membership from document-level intake data rather than project fields - a project containing contracts from multiple customers surfaces under all of them.
Alongside that, an intake triage queue handles bulk-uploaded documents before they're assigned to projects. Each upload gets one background LLM call that classifies role, status, lifecycle position, and counterparty. The intake UI polls for results and lets users route documents to existing projects or create new ones with pre-filled metadata.
Structured contract facts (effective_date, term_months, total_value_minor, auto_renew, notice_days, governing_law) are extracted per document version into a contract_facts table. The Key Terms panel shows version-over-version value deltas. Two cross-cutting extraction quality fixes land independently: an org-aware self-reference guard so the LLM doesn't return the user's own company as the counterparty, and entity name case normalization so "ADOBE INC." becomes "Adobe Inc."
On the tabular side, cells now record provenance (model, system prompt, column prompt) and archive prior state before each overwrite. A history modal lets reviewers compare outputs across prior runs and trigger new runs against different models without leaving the cell.
The fork base adds an xAI Grok provider (OpenAI-compatible, registered as grok-4.3), a Supabase-S3 forcePathStyle fix, a JSONB containment bug in project listing, and per-user xAI API keys.
What's in it
- Counterparties + customer index Reframes the workspace around vendors, customers, and internal parties - the backbone of the CLM repositioning.
- Bulk intake triage queue Drop a pile of contracts in; each gets auto-classified, assigned a role, and routed to a project in one click.
- Structured contract facts with version deltas A "Key Terms" panel extracts effective dates, terms, and other facts from each upload and tracks how they change across re-uploads.
- Versioned tabular review with model comparison Review cells are no longer overwrite-only - every rewrite is archived alongside the model and prompt that produced it, so answers can be compared across models.
- Org-aware extraction prompts Extraction now knows which side of an agreement is "us", fixing a class of embarrassing mislabelling on uploaded contracts.
- Grok provider and Supabase storage Adds xAI's Grok as a first-class model option with per-user keys, and moves file storage onto Supabase.
Direction
contract-reviewintakebranding
Activity
Threads of work (detailed view)
Custos gives legalos a memory for who you're dealing with
Six commits turn a document tool into a contract lifecycle system organised around the counterparty, not the file.
Custos pivots upstream to a CLM - counterparties, customer index, and document-derived membership
Six commits rewire the project model around counterparties: free-text on upload, LLM-extracted from docs, merged in the UI, and eventually derived from document-level intake rather than a field on the project itself. The shift from "project has one counterparty" to "project surfaces under every counterparty found in its documents" is the structural move worth understanding before pulling any piece of this.
Custos turns the bulk-upload pile into a triage desk
Drop a stack of contracts in and the fork reads each one before you've filed anything.
Intake triage queue: bulk upload, auto-classify, and one-click project assignment
Four commits add a `/intake` queue where documents land before being assigned to projects. Each upload triggers an LLM classification in the background; the UI polls for results and lets users route each document to an existing project or spin up a new one. This is the "front door" that feeds the counterparty index.
Custos teaches the intake AI to stop naming your own firm as the counterparty
Two fixes to party extraction: the model now knows which side you're on, and it stops shouting client names in ALL CAPS.
Self-reference guard and entity casing fixes across both extraction paths
Two small commits fix a real production bug and a display annoyance in the counterparty and intake extraction paths. If you're pulling either extraction feature, pull both of these with it.
Custos turns contract renewals into a before-and-after
Custos's fork now pulls the money terms out of every contract and shows you what changed when a new version lands.
Structured contract facts extracted per document version, with value deltas
Three commits add a "Key Terms" panel that extracts structured economic data from each contract - effective date, term, value, renewal terms, governing law - and tracks how those values change each time a document is re-uploaded. The schema is built to chart across versions; nothing charts yet.
Custos wires Grok into LegalOS
Custos's fork bolts on xAI's Grok as a third AI engine and adds another cloud-storage option behind it.
Fork base: Grok provider, Supabase S3 path fix, JSONB bug, and per-user xAI keys
Custos's initial fork commit bundles four changes under a single "legalos" rebrand: a new xAI Grok provider, a Supabase-S3 compatibility fix, a JSONB query bug, and a per-user key extension. Unrelated changes, clean isolation, easy to split.
Custos builds a model bake-off into the review grid
You can now re-run any cell of a document review on a different AI model and keep both answers side by side.
Tabular review cells get version history and a multi-model comparison panel
Three commits turn tabular-review cells from overwrite-only into a versioned artefact that records which model and prompt produced each result. A history modal lets you compare prior outputs side by side - and run the same cell against a different model without leaving the UI.