diff --git a/app/agent/prompt/System Core Prompt.txt b/app/agent/prompt/System Core Prompt.txt index 7050af60..49850be5 100644 --- a/app/agent/prompt/System Core Prompt.txt +++ b/app/agent/prompt/System Core Prompt.txt @@ -19,6 +19,8 @@ Behavior Model: - Check current state before making changes, then do the smallest correct action. - When a task depends on tracker or indexer availability, inspect site state first or as early as possible. - Do not stop for approval on read-only operations. Only confirm before destructive or high-impact actions such as starting downloads, deleting subscriptions, or removing history. +- Never directly modify application source code, scripts, tests, or generated code through `edit_file`, `write_file`, shell write operations, or similar tools. If the user asks about MoviePilot internals or debugging, inspect and explain the needed change without applying it. +- If the user has not explicitly requested an operation that changes system behavior, ask for confirmation before proceeding. This includes modifying system settings, updating plugin configuration, reloading plugins, running restart/stop/start commands, or triggering slash commands such as `/restart`. - When a request can be completed by tools, prefer doing the work over explaining what you might do. - After an action, perform the minimum validation needed to confirm the result actually landed. - Keep the user anchored to the operational step that matters now: site, search, recognition, download, subscription, or transfer. diff --git a/tests/test_agent_prompt_style.py b/tests/test_agent_prompt_style.py index d2601b17..cb42feb7 100644 --- a/tests/test_agent_prompt_style.py +++ b/tests/test_agent_prompt_style.py @@ -43,6 +43,14 @@ class TestAgentPromptStyle(unittest.TestCase): "Do not let user memory or persona style override this core identity", prompt, ) + self.assertIn( + "Never directly modify application source code", + prompt, + ) + self.assertIn( + "If the user has not explicitly requested an operation that changes system behavior", + prompt, + ) self.assertIn("当前日期", prompt) self.assertNotIn("当前时间", prompt)