fix(uninstall): remove an instruction block written by any past release
_remove_instruction matched only the section text the running version generates. Install can now upgrade a block from any release, so leaving removal on a single exact text meant a user who asked for the instructions to go kept whichever wording their original install wrote, reported as "differs from a known installed section" and silently left in place. Removal now walks skills._known_instruction_sections(), the same recorded texts install matches, longest first so a short variant cannot strand the tail of a longer one that contains it. That covers every past release including the variant a markdown formatter rewrote in this repo's own files, and clears duplicate blocks an older release stacked up. The safety rules are unchanged: exact match only, no end boundary is ever guessed for a block that has no closing marker, and a section that matches nothing known is left alone and reported rather than deleted. A file holding both a generated and a hand-edited block loses only the generated one and is named in the report. _join_without_instruction closes the gap. Text on both sides is kept and only the whitespace at the seam is normalised, so removing a block from the middle of a file leaves one blank line rather than a pile of them, and removing one appended at the end restores the file byte for byte. Refs #314, #558 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012fHfGDiZedoxjpKzanHri3
T
Tirth Kanani committed
355d2b59106efb1011ff3528a6db9c99f78ee29c
Parent: 65f08f1