cozempic v1.8.28 — --protect-pattern (#122) + doctor-skill fix (#119)
--protect-pattern <regex> (community feature by @eggrollofchaos, #122)
Protect messages whose text matches a regex from pruning — the same immunity team messages get. Repeatable, on treat, reload, and guard:
cozempic treat current -rx aggressive --protect-pattern "GATE CONTRACT" --protect-pattern "R\d{3}"
cozempic guard --protect-pattern "standing obligation"
The pattern is matched against message text, tool outputs, and user content (the surfaces that actually get pruned). Extracted from @eggrollofchaos's PR and rebased clean, with hardening from a 3-agent adversarial QA pass:
- ReDoS-safe: a runaway regex can't hang the prune or the guard daemon — matching has a wall-clock budget (
COZEMPIC_PROTECT_MATCH_SECONDS, default 2s) and fails open. - Over-protection warning when a pattern would immunize most of the prunable content (so the prune isn't a silent no-op).
- Crash-safe tagging (never persists to the saved session); injection-safe daemon hand-off; dash-leading patterns handled.
#119 — doctor skill no longer shadows Claude Code's /doctor
The plugin skill was named doctor and hijacked Claude Code's built-in /doctor. Renamed to cozempic-doctor; /doctor is Claude Code's again. (The cozempic doctor CLI is unchanged.)
Full suite: 1310 passed.
brew upgrade cozempic # or: pip install -U cozempic / npm i -g cozempic / uv tool upgrade cozempic