Filter a set of consumed artifact filenames down to the artifacts that the aggregator actually emits as top-level ## <title> sections in the rendered article โ the exact set the Reader Intelligence Guide can hyperlink to.
Mirrors the same selection / de-duplication rules used by ./aggregate.ts (the article aggregator):
Only *.md artifacts are eligible (*.json artifacts are referenced by the audit-appendix row, not by their own section).
documents/*-analysis.md entries are folded into the single "Per-document intelligence" row by the caller, so they're excluded here.
README.md, article.md, article.<lang>.md are aggregator outputs / metadata, not analytical sections โ excluded.
Filename-variant alias groups are de-duplicated: when more than one alias is present (e.g. election-2026-analysis.md vs election-cycle-analysis.md), only the first member encountered in AGGREGATION_ORDER is kept โ matching the aggregator's "first one wins" behaviour so the link's target heading exists.
Returns artifacts ordered the same way the article body orders them: AGGREGATION_ORDER precedence first, then any remaining *.md artifacts alphabetically.
Filter a set of consumed artifact filenames down to the artifacts that the aggregator actually emits as top-level
## <title>sections in the rendered article โ the exact set the Reader Intelligence Guide can hyperlink to.Mirrors the same selection / de-duplication rules used by ./aggregate.ts (the article aggregator):
*.mdartifacts are eligible (*.jsonartifacts are referenced by the audit-appendix row, not by their own section).documents/*-analysis.mdentries are folded into the single "Per-document intelligence" row by the caller, so they're excluded here.README.md,article.md,article.<lang>.mdare aggregator outputs / metadata, not analytical sections โ excluded.election-2026-analysis.mdvselection-cycle-analysis.md), only the first member encountered in AGGREGATION_ORDER is kept โ matching the aggregator's "first one wins" behaviour so the link's target heading exists.Returns artifacts ordered the same way the article body orders them:
AGGREGATION_ORDERprecedence first, then any remaining*.mdartifacts alphabetically.