feat(plugins): add skill-enforcer plugin for periodic compliance checkpoints#18849
Closed
Cyrene963 wants to merge 1 commit into
Closed
feat(plugins): add skill-enforcer plugin for periodic compliance checkpoints#18849Cyrene963 wants to merge 1 commit into
Cyrene963 wants to merge 1 commit into
Conversation
This was referenced May 2, 2026
f5cfe5a to
7b56cc7
Compare
…kpoints Addresses the 'having rules != following rules' problem where the agent has skills and memory loaded but fails to follow their rules during execution. The plugin hooks into pre_tool_call and triggers compliance checkpoints every N action tool calls. How it works: - Tracks 'action tool' calls per session (terminal, write_file, patch, browser_*, delegate_task, cronjob, execute_code, etc.) - Every 8 action calls, blocks with a COMPLIANCE CHECKPOINT message - Agent must call skill_view/hindsight_recall/session_search to acknowledge - Counter resets after acknowledgment - Non-action tools (read_file, search_files, web_search) don't count - Per-session isolation (different sessions tracked independently) Complements PR NousResearch#18316 (hybrid skill selector): - PR NousResearch#18316 = which skills to inject into system prompt - This plugin = periodic verification that injected rules are followed Configurable via _CHECKPOINT_INTERVAL constant (default: 8). Tested scenarios: - First 7 action tools pass, 8th triggers checkpoint - Acknowledgment resets counter, next 8 pass - read_file/search_files don't increment counter - Sessions are independently tracked
7b56cc7 to
cb07bfc
Compare
Author
|
Closing this PR — the functionality has already been implemented locally in our fork's patch stack (local patch applied). The local implementation covers the same scope and has been running in production. Thanks for the contribution! If upstream merges similar functionality, we'll rebase our patches accordingly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new bundled plugin
skill-enforcerthat addresses the "having rules ≠ following rules" problem in LLM agents.The Problem
Agents with skills, memory, and rules loaded in context still fail to follow them during execution. This is a behavioral issue, not a technical one — the rules are present but not enforced.
The Solution
A
pre_tool_callhook plugin that triggers periodic COMPLIANCE CHECKPOINTS during agent execution:skill_view,hindsight_recall, orsession_searchHow It Works
Complements PR #18316 (Hybrid Skill Selector)
Configuration
_CHECKPOINT_INTERVAL = 8(configurable constant in__init__.py)Testing
All scenarios verified:
Files
plugins/skill-enforcer/plugin.yaml— manifestplugins/skill-enforcer/__init__.py— hook implementation