Remove generateSafeOutputsPromptSection and wrap system prompts in XML tags#4719
Merged
Remove generateSafeOutputsPromptSection and wrap system prompts in XML tags#4719
Conversation
…h XML tags Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review and optimize imported system prompt files
Remove generateSafeOutputsPromptSection and wrap system prompts in XML tags
Nov 25, 2025
Contributor
|
✅ Agentic Changeset Generator completed successfully. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes redundant safe outputs prompt injection and restructures system prompts with XML tags for better agent parsing. Safe outputs tools are now discovered via MCP server tool discovery, eliminating the need to inject instructions into prompts.
- Removed ~215 LOC of safe outputs prompt generation code
- Wrapped 6 system prompt files in semantic XML structures
- Updated tests to validate XML tags instead of markdown headers
Reviewed changes
Copilot reviewed 97 out of 97 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/safe_outputs_prompt.go |
Deleted - contained redundant prompt step generation |
pkg/workflow/safe_outputs_prompt_test.go |
Deleted - tests for removed functionality |
pkg/workflow/safe_outputs.go |
Removed generateSafeOutputsPromptSection function (~215 LOC) |
pkg/workflow/compiler_yaml.go |
Removed call to generateSafeOutputsPromptStep with explanatory comment |
pkg/workflow/sh/*.md |
All 6 prompt files restructured with semantic XML tags |
pkg/workflow/*_test.go |
Updated test expectations to check for XML tags |
.github/workflows/*.lock.yml |
Regenerated workflows without safe outputs prompt steps |
.changeset/patch-optimize-prompt-files.md |
Changeset for the patch release |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
11 tasks
mnkiefer
pushed a commit
that referenced
this pull request
Nov 25, 2025
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.
Safe outputs instructions were being injected into prompts redundantly—agents now discover these tools via MCP server tool discovery. System prompt files also needed XML structure for cleaner agent parsing.
Changes
Removed safe outputs prompt injection
safe_outputs_prompt.goand its test filegenerateSafeOutputsPromptSection(~215 LOC) fromsafe_outputs.gogenerateSafeOutputsPromptStepcall fromcompiler_yaml.goWrapped system prompts in XML tags
All prompt files in
pkg/workflow/sh/*.mdnow use semantic XML structure:xpia_prompt.md<security-guidelines>temp_folder_prompt.md<temporary-files>edit_tool_prompt.md<file-editing>playwright_prompt.md<playwright-output>github_context_prompt.md<github-context>pr_context_prompt.md<branch-context>Before:
After:
Updated tests
Tests now validate XML tags instead of markdown headers.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/user/usr/bin/gh gh api user --jq .login(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.