CitationPart
@forge/monorepo / backend/src / CitationPart
Type Alias: CitationPart
CitationPart =
PartBase<"citation"> &object
Defined in: backend/src/core/content-parts.ts:214
A cited passage — REQ-030, #137.
Self-contained on purpose. excerpt, title and retrievedAt are stored on the part rather than
looked up from the source, because AC-4 requires an answer given months ago to remain auditable after the
source is gone: a document deleted, a URL dead, a chunk re-indexed under a different id. A citation that
resolved by fetching would be a citation that stops being evidence the moment anything changes — which is
exactly when someone needs it.
The duplication is the feature. This is a snapshot of what was read, not a pointer to what is there now.
Type Declaration
charRange?
readonlyoptionalcharRange?:object
Character range within the source passage, when the producer knows it. Narrows AC-2 further.
charRange.end
readonlyend:number
charRange.start
readonlystart:number
excerpt
readonlyexcerpt:string
The exact text used. Bounded — a citation is evidence for a claim, not a copy of the source.
origin
readonlyorigin:CitationOrigin
retrievedAt
readonlyretrievedAt:string
When the passage was read. A fact from last year and a fact from this morning are different claims.
supports
readonlysupports: readonlyMessagePartId[]
The parts this citation grounds — AC-3.
Groundedness is derived from this graph rather than flagged on the text, so it cannot disagree with itself: a text part is grounded exactly when some citation names it. A boolean on the text part would be a second place for the same fact, and the two would drift the first time a citation was withheld.