A claim that cannot reach a source is dropped
Every entry in a record chronology has to trace to a document that was actually fed to the model. Entries citing anything else do not make it into the output.
Fail-closed: the default is to discard, not to include and flag. An unsourced line never reaches a physician to be missed.
record-digest-chronology.ts · buildProvenancedEntries
A second pass tries to refute the first
After the chronology is built, an adversarial pass goes back over it and attempts to disprove each entry against the source material.
Generating and checking are separate steps with opposite objectives. A model asked to review its own work agrees with itself; a model asked to break it does not.
record-digest-verification.ts · planVerification
Page citations are verified against the page
A report that cites [Ex. 4 p.17] is checked back against exhibit 4, page 17. A citation that does not resolve does not ship.
The citation is treated as a falsifiable assertion rather than a formatting convention.
digest-citations.ts · verifyPageCitations
Legal authorities come from a closed registry
Escobedo, Brodie, Hikida, Almaraz/Guzman and the rest are drawn from a fixed list. An authority outside it is rejected rather than rendered.
Invented case citations are the single most damaging failure mode for a medical-legal document. The model cannot produce one, because it is not choosing from an open set.
justine.service.ts · VALID_AUTHORITY_KEYS
A date that cannot be read is left blank
Extracted dates are validated. Where a date is illegible or absent, the field stays empty instead of receiving a plausible guess.
A wrong date on a chronology moves causation, apportionment and every statutory clock that runs from it.
record-digest-chronology.ts · isValidIsoDate
Sources that disagree are surfaced as a dispute
Where two documents conflict, the conflict is presented as a conflict — not silently resolved in favour of the more recent or the more confident.
The disagreement between records is frequently the fact that matters. Smoothing it away is how a defensible file becomes an indefensible one.
record-digest-chronology.ts · reconcileConflicts
A truncated document says so
If a document was too long to be read in full, the output carries a per-document warning naming what was cut.
Silent truncation produces an answer that looks complete. The warning is attached to the document, not buried in a log.
record-digest.service.ts · truncationWarnings
A malformed model response fails closed
Structured output that does not parse is an error, not a best-effort salvage.
The alternative — recovering what can be recovered from a broken response — is how a partial answer gets presented as a whole one.
llm-response-parser.ts · parseStructuredLLMResponse