The confidence-code gloss and the Riksdag-document-id contextualization are first-use only โ they must be emitted at most once per rendered article, not once per artifact body. The aggregator calls normalizeNarrativeTerminology separately for every artifact (see aggregate.ts), so the flags cannot live as function-local state: they would reset for each file and re-emit the annotation in every artifact that matches. The caller therefore owns one state object for the whole article and threads it through every call.
First-use annotation state for normalizeNarrativeTerminology.
The confidence-code gloss and the Riksdag-document-id contextualization are first-use only โ they must be emitted at most once per rendered article, not once per artifact body. The aggregator calls normalizeNarrativeTerminology separately for every artifact (see
aggregate.ts), so the flags cannot live as function-local state: they would reset for each file and re-emit the annotation in every artifact that matches. The caller therefore owns one state object for the whole article and threads it through every call.