From af78449acdd4de4528e79e9abc11cb1ac5a87030 Mon Sep 17 00:00:00 2001 From: zccyman <16263913+zccyman@users.noreply.github.com> Date: Mon, 18 May 2026 20:02:16 -0700 Subject: [PATCH] feat(bg-review): add bundled/pinned skill protection rules to review prompts (#27644) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The background review prompts (_SKILL_REVIEW_PROMPT and _COMBINED_REVIEW_PROMPT) now include explicit protection rules for bundled, hub-installed, and pinned skills — aligning with the curator's existing policy at curator.py L345/350. Before this change, bg-review could freely rewrite bundled skills like 'hermes-agent' or pinned skills, while the 7-day curator explicitly skips them. The review agent now sees: • Bundled skills (shipped with Hermes) • Hub-installed skills (installed via hermes skills install) • Pinned skills (marked via hermes curator pin) If only protected skills need updating, the review says 'Nothing to save.' and stops. Fixes #27644 --- agent/background_review.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/agent/background_review.py b/agent/background_review.py index 83292029c6c..5488da08de3 100644 --- a/agent/background_review.py +++ b/agent/background_review.py @@ -112,6 +112,12 @@ _SKILL_REVIEW_PROMPT = ( "skill that governs that task needs to carry the lesson.\n\n" "If you notice two existing skills that overlap, note it in your " "reply — the background curator handles consolidation at scale.\n\n" + "Protected skills (DO NOT edit these):\n" + " • Bundled skills (shipped with Hermes, e.g. 'hermes-agent').\n" + " • Hub-installed skills (installed via 'hermes skills install').\n" + " • Pinned skills (marked via 'hermes curator pin').\n" + "If the only skills that need updating are protected, say\n" + "'Nothing to save.' and stop.\n\n" "Do NOT capture (these become persistent self-imposed constraints " "that bite you later when the environment changes):\n" " • Environment-dependent failures: missing binaries, fresh-install " @@ -189,6 +195,12 @@ _COMBINED_REVIEW_PROMPT = ( "should carry user-preference lessons when relevant.\n\n" "If you notice overlapping existing skills, mention it — the " "background curator handles consolidation.\n\n" + "Protected skills (DO NOT edit these):\n" + " • Bundled skills (shipped with Hermes, e.g. 'hermes-agent').\n" + " • Hub-installed skills (installed via 'hermes skills install').\n" + " • Pinned skills (marked via 'hermes curator pin').\n" + "If the only skills that need updating are protected, say\n" + "'Nothing to save.' and stop.\n\n" "Do NOT capture as skills (these become persistent self-imposed " "constraints that bite you later when the environment changes):\n" " • Environment-dependent failures: missing binaries, fresh-install "