Agent Zero AI framework
Remove legacy skill prompt cleanup
Alessandrof8b06e0b12bb
diff --git a/extensions/python/message_loop_prompts_after/AGENTS.md b/extensions/python/message_loop_prompts_after/AGENTS.mdindex a03541caf..d18b1c5a1 100644--- a/extensions/python/message_loop_prompts_after/AGENTS.md+++ b/extensions/python/message_loop_prompts_after/AGENTS.md@@ -2,14 +2,14 @@## Purpose-- Own prompt protocol and extras appended around primary message-loop prompt construction.+- Own prompt protocol, prompt extras, and history reattachment around primary message-loop prompt construction.## Ownership-- Ordered Python files own current datetime, skill recall/load context, agent info, parallel job status, and workdir extras injection.+- Ordered Python files own current datetime, relevant-skill hints, loaded-skill history reattachment, agent info, parallel job status, and workdir extras injection.- Explicitly loaded skill bodies belong in tool-result history with metadata so they can survive persistence and be reattached after compaction.- Explicitly loaded skill IDs are chat-wide context data, not agent-local state.-- Legacy active-skill prompt protocol injection must stay empty; selected skills are loaded through history.+- Skills must not write selected or loaded skill bodies into protocol or extras.## Local Contractsdiff --git a/extensions/python/message_loop_prompts_after/_65_include_loaded_skills.py b/extensions/python/message_loop_prompts_after/_65_include_loaded_skills.pyindex d7effd627..6c604005a 100644--- a/extensions/python/message_loop_prompts_after/_65_include_loaded_skills.py+++ b/extensions/python/message_loop_prompts_after/_65_include_loaded_skills.py@@ -14,9 +14,6 @@ class IncludeLoadedSkills(Extension):if not self.agent:return- loop_data.protocol_persistent.pop("loaded_skills", None)- loop_data.extras_persistent.pop("loaded_skills", None)-skill_names = skills.get_loaded_skill_names(self.agent)if not skill_names:returndiff --git a/plugins/_skills/AGENTS.md b/plugins/_skills/AGENTS.mdindex a1ca0d81e..eaddb8014 100644--- a/plugins/_skills/AGENTS.md+++ b/plugins/_skills/AGENTS.md@@ -8,7 +8,6 @@- `hooks.py` owns skill config normalization.- `api/skills_catalog.py` owns skill catalog access and loading selected skills into chat history.-- `prompts/agent.system.active_skills.md` is retained only for legacy prompt-protocol compatibility.- `webui/` owns skill settings UI and store.- `default_config.yaml`, `plugin.yaml`, `README.md`, and `LICENSE` own defaults, metadata, docs, and license.diff --git a/plugins/_skills/extensions/python/message_loop_prompts_after/_66_include_active_skills.py b/plugins/_skills/extensions/python/message_loop_prompts_after/_66_include_active_skills.pydeleted file mode 100644index ea9ced8b5..000000000--- a/plugins/_skills/extensions/python/message_loop_prompts_after/_66_include_active_skills.py+++ /dev/null@@ -1,23 +0,0 @@-from __future__ import annotations--from helpers import skills-from agent import LoopData-from helpers.extension import Extension---class IncludeActiveSkills(Extension):- async def execute(self, loop_data: LoopData = LoopData(), **kwargs):- if not self.agent:- return-- protocol = loop_data.protocol_persistent- protocol.pop("active_skills", None)-- content = skills.build_active_skills_prompt(self.agent)- if not content:- return-- protocol["active_skills"] = self.agent.read_prompt(- "agent.system.active_skills.md",- skills=content,- )diff --git a/plugins/_skills/prompts/agent.system.active_skills.md b/plugins/_skills/prompts/agent.system.active_skills.mddeleted file mode 100644index 919d8145b..000000000--- a/plugins/_skills/prompts/agent.system.active_skills.md+++ /dev/null@@ -1,5 +0,0 @@-## active skills-The following skills were explicitly activated for this chat.-Treat them as already loaded instructions and follow them when relevant.--{{skills}}diff --git a/tests/test_tool_action_contracts.py b/tests/test_tool_action_contracts.pyindex c85e83f69..a4cb49393 100644--- a/tests/test_tool_action_contracts.py+++ b/tests/test_tool_action_contracts.py@@ -430,8 +430,8 @@ def test_loaded_skills_extension_reattaches_missing_body_after_compaction(module = _load_loaded_skills_extension(monkeypatch, tmp_path)agent = _FakeLoadedSkillAgent()loop_data = types.SimpleNamespace(- protocol_persistent={"loaded_skills": "legacy"},- extras_persistent={"loaded_skills": "legacy"},+ protocol_persistent={},+ extras_persistent={},history_output=[{"ai": False,@@ -442,8 +442,6 @@ def test_loaded_skills_extension_reattaches_missing_body_after_compaction(asyncio.run(module.IncludeLoadedSkills(agent).execute(loop_data))- assert "loaded_skills" not in loop_data.protocol_persistent- assert "loaded_skills" not in loop_data.extras_persistentassert len(agent.added_tool_results) == 1added = agent.added_tool_results[0]assert added["tool_name"] == "skills_tool"