Expand description
Cross-entry skill-template + content-hash collapse.
Detects repeated message bodies (e.g. /loop fire’ing the same skill
template, repeated tool outputs, fixture reposts) and collapses every
occurrence after the first into a stub reference. Operates message-level
across an entry sequence, complementing line-level crate::noise.
Originating signal: extracting a /loop-driven session yielded ~16k
lines, ~60% of which were verbatim re-pastes of the same skill prompt
(vc-ownership ~290 lines per fire × 6 fires). The line-level noise
filter could not catch this — the lines themselves are semantic prose,
they’re just identical across messages. Collapse acts at message level
across the sequence: keep the first full body, replace later identical
bodies with a one-line stub pointing at the first occurrence.
Structs§
- Collapse
Stats - Aggregate statistics from a single
collapse_repeatspass.
Constants§
- DEFAULT_
THRESHOLD_ LINES - Minimum line count for a message to be eligible for collapse.
Functions§
- collapse_
repeats - Collapse repeated message bodies in-place across an entry sequence.
- detect_
skill_ marker - Detect a skill-template marker in the first ~8 lines of a message body.