fix: stop filterSkillBodyForMode from swallowing rule bullets that start with a mode word (#571)
filterSkillBodyForMode is the shared filter every host adapter (Claude
hooks, Pi, OpenCode, the MCP server, Hermes) uses to trim the ponytail
skill body down to the active intensity. Its worked-example detection
matched any bullet shaped "- label: text" and treated it as a
mode-specific example whenever the label happened to normalize to a
mode name (lite/full/ultra/off) -- silently dropping it in every other
mode.
The current SKILL.md doesn't trip this today (its only such bullets are
the three real worked examples), but it's a landmine: an ordinary rule
bullet added later that happens to start with "Full:" or "Lite:" would
vanish from every other mode's instructions with no warning, in the one
code path every adapter shares. Confirmed with a real bullet:
filterSkillBodyForMode('- Full: real rule text.', 'ultra')
silently drops the line before this fix.
All three real worked examples are quoted (`- lite: "..."`); ordinary
rule bullets aren't. Required the quote so only genuine examples are
mode-filtered, and added a regression test plus fixed an existing test
whose synthetic fixture used unquoted examples that don't match the
real file's format. D
Dhruv Garg committed
0cdd11fe0c56c3cda3380276ac271b255eea296a
Parent: b6c0448
Committed by GitHub <noreply@github.com>
on 7/10/2026, 1:04:06 AM