v3.32.20

ruvnet/ruflov3.32.20Jul 27, 2026by ruvnet

AI Summary

Implements the `ruflo swarm compress-message` command, a deterministic message compressor that reduces token count while preserving code, URLs, and file paths. This is the last of five dream-cycle backlog items.

Key Highlights

  • Adds `ruflo swarm compress-message` command for reducing message size.
  • Implements a TF-IDF-ish scoring system to keep important sentences while discarding filler.
  • Preserves load-bearing spans like code fences, inline code, URLs, and file paths.
  • Advisory only in v1 (no auto-wiring to SendMessage).

New Features

  • Message compression
  • TF-IDF scoring
  • Span preservation

Full Release Notes

Fifth of the five dream-cycle backlog items — the last one I said was "not a bounded MVP" turns out to be one after all if you deliver the paper's SPIRIT rather than a trained VQ codec.

## Added

**`ruflo swarm compress-message`** — deterministic message compressor:
1. Extract must-preserve spans (code fences, inline code, URLs, file paths)
2. Score sentences by TF-IDF-ish keyword density (mode: keyword/sentence/hybrid)
3. Force-keep sentences carrying preserved spans (they're load-bearing)
4. Fill remaining budget with top-scored sentences
5. Reassemble in ORIGINAL order + restore spans

Usage:
```
ruflo swarm compress-message -m "…" --budget-tokens 100
ruflo swarm compress-message --message-file ./msg.md -b 300 --format json
```

Advisory only in v1 — no auto-wire into SendMessage / hooks. v2 will land a real VQ codec once the training pipeline exists.

## Verification

- Regression tests: **9/9** pass (all preserve invariants + budget reduction + order preservation)
- E2E: 106-token message with code + URL + file path → 57 tokens (53.1% ratio); all 3 spans intact.

## Session tally — 5 dream-cycle items shipped

| # | Item | Release |
|---|---|---|
| #2783 | Composition Inspector | v3.32.15 |
| #2783 | ChannelGuard | v3.32.16 |
| #2752 | PlanFlip + MemPoison | v3.32.17 |
| #2760 | SCM classifier | v3.32.18 |
| #2763 | OAS operator selector | v3.32.19 |
| #2727 | Message compressor | **v3.32.20** |

## Upgrade

```bash
npx ruflo@latest --version   # → 3.32.20
```

Refs: dream-cycle #2727 (2026-07-19).