refactor: remove footgun prompting (file-based system prompt override) #11387
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
Completely removes the "footgun prompting" feature — the ability to override the entire system prompt for any mode via
.roo/system-prompt-{mode}files. This feature bypassed safeguards and was flagged for removal.Changes
src/core/prompts/sections/custom-system-prompt.ts— core module (loadSystemPromptFile,getSystemPromptFilePath,PromptVariables, interpolation)src/core/prompts/sections/__tests__/custom-system-prompt.spec.ts— unit tests for the modulesrc/core/prompts/__tests__/custom-system-prompt.spec.ts— integration tests for SYSTEM_PROMPT with file overridewebview-ui/src/components/chat/SystemPromptWarning.tsx— warning banner componentsrc/core/prompts/system.ts— removed file-based prompt loading and early-return bypasssrc/core/webview/ClineProvider.ts— removedhasFileBasedSystemPromptOverride()method,hasSystemPromptOverridestate plumbing, and Omit type referencepackages/types/src/vscode-extension-host.ts— removedhasSystemPromptOverridefrom 2 type definitionswebview-ui/src/components/chat/ChatView.tsx— removed SystemPromptWarning import and conditional renderwebview-ui/src/context/ExtensionStateContext.tsx— removedhasSystemPromptOverridefrom state interfacewebview-ui/src/components/modes/ModesView.tsx— removed "Advanced: Override System Prompt" disclosure section andisSystemPromptDisclosureOpenstateprompts.jsonfiles — removedadvancedandadvancedSystemPrompti18n keyschat.jsonfiles — removedsystemPromptWarningi18n keypackages/evals/README.md— replaced "a footgun prompt" with "custom instructions"47 files changed, 4 insertions, 720 deletions
Important
This pull request removes the file-based system prompt override feature, cleans up related code and tests, updates UI components, and adjusts localization and documentation accordingly.
.roo/system-prompt-{mode}files.custom-system-prompt.tsand related tests insrc/core/prompts/sectionsandsrc/core/prompts/__tests__.SystemPromptWarningcomponent fromwebview-ui/src/components/chat.system.tsto remove file-based prompt loading logic.hasFileBasedSystemPromptOverride()fromClineProvider.ts.hasSystemPromptOverridefromvscode-extension-host.tsandExtensionStateContext.tsx.ModesView.tsx.prompts.jsonandchat.jsonfiles.packages/evals/README.mdto replace "footgun prompt" with "custom instructions".This description was created by
for 3b40754. You can customize this summary. It will automatically update as commits are pushed.