Matter type enum, Dropbox folder parser, and OSS legal-tech integration roadmap scaffolded

igor-ctrl adds a `matter_type` enum, a Dropbox folder path parser built around the `Legal/{Counterparty}/{ESN}/{NN ...}/` convention, and scaffolding for four phases of an OSS legal-tech integration roadmap - including a read-only tracked-changes viewer and a deferred document parser decision between OpenDataLoader, Firecrawl, and Free Law's Doctor.

workflowintegration

The data move at the center of this PR is a canonical Dropbox folder layout parsed into database fields. The parser reads the Legal/{Counterparty}/{ESN}/{NN ...}/[NN Amend/] path case-insensitively, returns nulls for non-matching paths, and extracts counterparty, ESN (equipment serial number), subfolder stage, and amendment index. The 01 Executed Agreements stage specifically flags a document version as executed. Counterparty and ESN backfill onto the matter when blank. Schema and UI changes thread these fields through new-project intake and the matter command center. The migration is additive and idempotent but not yet applied to any database.

The GC's input shaped two early decisions: keep the matter abstraction (not "transaction"), and introduce matter_type as an enum (lease, sale, amendment, NDA, LOI, KYC, side letter, general admin, other) so that a sale transaction is a kind of matter rather than a separate entity.

Two larger pieces ride alongside the Dropbox work. A Sale Transaction Closing Tracker system workflow encodes a 26-stage process as an LLM-generated read-only snapshot - explicitly not a state machine, since Salesforce remains the system of record for deal-flow state. A DocxRedlineView component based on react-docxodus-viewer renders tracked changes with move detection; igor-ctrl flags it as viewer-only by design, since incoming amendments already carry redlines and the Python-Redlines/.NET editing path is deferred.

The PR is deliberately held back in two places: the redline viewer is exported but not wired into any existing surfaces (the likely trigger is the new amendments stage tag), and Phase 3 - a document parser - is pending a tooling decision. igor-ctrl recommends OpenDataLoader PDF on Apache-2.0, local execution, npm packaging, and bounding-box output grounds, but the decision is deferred. Phase 6 (annotation data model from OpenContracts) waits on clause-highlighting UI scoping.

So what Worth a look if you're modeling aviation or real-estate documents in Dropbox with structured folder conventions - the path parser and matter_type enum are reusable with minor adaptation. The OSS legal-tech integration roadmap is also a useful reference for evaluating document-parser options against Apache-2.0 licensing and citation requirements.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?