Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Feb 10, 2026

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

  • Deleted src/core/prompts/sections/custom-system-prompt.ts — core module (loadSystemPromptFile, getSystemPromptFilePath, PromptVariables, interpolation)
  • Deleted src/core/prompts/sections/__tests__/custom-system-prompt.spec.ts — unit tests for the module
  • Deleted src/core/prompts/__tests__/custom-system-prompt.spec.ts — integration tests for SYSTEM_PROMPT with file override
  • Deleted webview-ui/src/components/chat/SystemPromptWarning.tsx — warning banner component
  • Modified src/core/prompts/system.ts — removed file-based prompt loading and early-return bypass
  • Modified src/core/webview/ClineProvider.ts — removed hasFileBasedSystemPromptOverride() method, hasSystemPromptOverride state plumbing, and Omit type reference
  • Modified packages/types/src/vscode-extension-host.ts — removed hasSystemPromptOverride from 2 type definitions
  • Modified webview-ui/src/components/chat/ChatView.tsx — removed SystemPromptWarning import and conditional render
  • Modified webview-ui/src/context/ExtensionStateContext.tsx — removed hasSystemPromptOverride from state interface
  • Modified webview-ui/src/components/modes/ModesView.tsx — removed "Advanced: Override System Prompt" disclosure section and isSystemPromptDisclosureOpen state
  • Cleaned 18 locale prompts.json files — removed advanced and advancedSystemPrompt i18n keys
  • Cleaned 18 locale chat.json files — removed systemPromptWarning i18n key
  • Updated packages/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.

  • Behavior:
    • Removed file-based system prompt override feature, including .roo/system-prompt-{mode} files.
    • Deleted custom-system-prompt.ts and related tests in src/core/prompts/sections and src/core/prompts/__tests__.
    • Removed SystemPromptWarning component from webview-ui/src/components/chat.
  • Code Changes:
    • Updated system.ts to remove file-based prompt loading logic.
    • Removed hasFileBasedSystemPromptOverride() from ClineProvider.ts.
    • Removed hasSystemPromptOverride from vscode-extension-host.ts and ExtensionStateContext.tsx.
    • Removed advanced system prompt section from ModesView.tsx.
  • Localization:
    • Cleaned up i18n keys related to system prompt override in 18 prompts.json and chat.json files.
  • Documentation:
    • Updated packages/evals/README.md to replace "footgun prompt" with "custom instructions".

This description was created by Ellipsis for 3b40754. You can customize this summary. It will automatically update as commits are pushed.

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Feb 10, 2026
@roomote
Copy link
Contributor

roomote bot commented Feb 10, 2026

Rooviewer Clock   See task

Clean removal of the file-based system prompt override feature. No issues found -- all references across source, types, UI components, state, and 18 locale files have been removed consistently with no dangling imports, dead state, or broken contracts.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Remove the feature that allowed overriding the entire system prompt via
.roo/system-prompt-{mode} files. This removes:

- Core module: loadSystemPromptFile, getSystemPromptFilePath, PromptVariables
- File-based prompt bypass in SYSTEM_PROMPT generation
- hasFileBasedSystemPromptOverride method and hasSystemPromptOverride state
- SystemPromptWarning banner component and ChatView integration
- Advanced: Override System Prompt disclosure section in ModesView
- All related i18n keys across 18 locales (advanced, advancedSystemPrompt, systemPromptWarning)
- Footgun reference in evals README

47 files changed, 714 deletions
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 11, 2026
@hannesrudolph hannesrudolph merged commit 4e659b4 into main Feb 11, 2026
13 checks passed
@hannesrudolph hannesrudolph deleted the bye-bye-footgun branch February 11, 2026 01:32
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants