Custos/legalos

A full CLM layer built on top of upstream mike: counterparty index, intake triage, contract facts, tabular version history, and Grok support.

Active development across all CLM areas. Custos is building toward a full contract management product on the mike base - not patching or customizing, but adding feature tracks (intake, counterparties, contract facts, tabular provenance) that interact with each other. Meaningful dependency surface: the intake track and the counterparty track share the same `intake_counterparty` columns, so the two need to be evaluated together. Free-text counterparty storage is acknowledged tech debt with a TODO to promote to a dedicated table.

View on GitHub →

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

Direction

contract-reviewintakebranding

Activity

Themed changes and pull requests touching this fork, newest first. Themed changes that haven't been turned into a public post yet still appear — they're real work even without a published writeup.

📝 Custos wires Grok into LegalOS 2 commits 3mo ago integrationinfrastructure draft
Custos's fork bolts on xAI's Grok as a third AI engine and adds another cloud-storage option behind it.

Threads of work (detailed view)

12 threads have been distilled into posts.

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.

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.

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.

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.