Minimum safe architecture
- 1Versioned source vault
Original files, hashes, editions, sensitivity, ownership and retention.
- 2Typed case database
People, roles, categories, facts, history, decisions, gaps and approvals.
- 3Claim and evidence graph
Every material answer joins applicant evidence to an applicable requirement.
- 4Deterministic workers
Extraction, document transformation, PDF population and validation run pinned jobs and emit receipts.
- 5Human gates and event log
Every transition records actor, reason, inputs, validator results and approved revision.
Case lifecycle
A client answer resumes the same case. It never starts a new chat with a new implicit truth.
Claim contract
| Field | Meaning |
|---|---|
| question key | Exact form version, category, section and question. |
| answer + status | Proposed, verified, approved or rejected. |
| fact sources | Current-case evidence IDs only. |
| requirement sources | Applicable official/form authority with effective version. |
| scope + confidence | Selected categories, certainty and unresolved inputs. |
| review | Reviewer, approval timestamp and superseding revision. |
Every gap has a route
Missing fact or document
Question or upload request with owner and deadline.
Source contradiction
Review the evidence, propose a ruling, then request confirmation.
Drafting or category defect
Reject, repair and rerun deterministic validation.
Regulatory drift
Block the stage until the mapping is updated against the current source.
How the repositories wrap together
The first proof runs an owned PostgreSQL + pgvector database and MinIO or encrypted file storage on the VPS. Legalise provides the whole-case governance blueprint; Pydantic, python-docx, openpyxl and pypdf remain bounded contract and document workers.
LangGraph enters only when real branching and resume logic outgrows direct state transitions. Temporal enters only when multi-day execution reliability cannot be achieved with the simpler stack. OPA, OpenFGA, Langfuse and Docling each have explicit measured triggers on the architecture page.
Delivery sequence
- 0Evidence and schema spike
Prove one successful and one incomplete case without chat memory.
- 1Consultant copilot
Intake, org chart, evidence matrix, gap queue, cited drafts and versioned export.
- 2Workflow consolidation
Durable client waits, portal, full document stages and cross-artifact checks.
- 3Controlled optimisation
Evaluation traces, measured model routing, retrieval tuning and prompt release gates.