Headline-cleaning helpers extracted from
priority-finding-highlight.ts to keep that module under the
600-line drift-guard budget enforced by
test/unit/source-file-size.test.js.
Public entry point: cleanPriorityHeadline — normalises a
raw bold-title / heading string by stripping priority decorations
(🔴 CRITICAL — ), editorial prefixes (Trigger 1: ), trailing
confidence markers (🔴 CRITICAL), and parenthesised tail metadata
((TA-10-2026-0160, 2026-04-30)).
Bounded-context rules:
Pure helpers — no I/O, no globals.
Deterministic — same input always produces same output.
Reusable — every helper accepts a plain string and returns a
plain string; suitable for property-tests.
Description
Headline-cleaning helpers extracted from
priority-finding-highlight.tsto keep that module under the 600-line drift-guard budget enforced bytest/unit/source-file-size.test.js.Public entry point: cleanPriorityHeadline — normalises a raw bold-title / heading string by stripping priority decorations (
🔴 CRITICAL —), editorial prefixes (Trigger 1:), trailing confidence markers (🔴 CRITICAL), and parenthesised tail metadata ((TA-10-2026-0160, 2026-04-30)).Bounded-context rules: