Conversation
…/setup/md/, wrap in XML tags Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
… compressed static intro Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 22222e8. Two optimizations:
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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot keep code push instructions (create-pull-request, push-to-pull-request-branch) to deter the agent to try to create a PR on its own |
…sh_to_pull_request_branch Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 0f53e73. Both 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot refactor to prompt template files out of go as much as possible. Remove spurious new lines |
… spurious newlines Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 7f1f438. Three new template files in
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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
There was a problem hiding this comment.
Pull request overview
Refactors the “safe outputs” prompt content to reduce duplication and improve maintainability by moving static/per-tool instructions out of Go string literals and into template files, and updating workflow lockfiles/tests accordingly.
Changes:
- Added new
actions/setup/md/template files for the safe-outputs intro and select per-tool instructions. - Updated Go prompt-generation tests to assert on file references and the new
<safe-output-tools>block. - Updated numerous workflow
*.lock.ymlfiles tocatthe new safe-outputs prompt file and emit a compact tools list.
Reviewed changes
Copilot reviewed 161 out of 161 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/unified_prompt_step_test.go | Updates assertions to check for safe_outputs_prompt.md file reference and <safe-output-tools> block. |
| pkg/workflow/unified_prompt_creation_test.go | Adjusts ordering/system-tag tests to look for safe_outputs_prompt.md reference instead of inline <safe-outputs> content. |
| pkg/workflow/sh.go | Adds constants for new safe-outputs prompt/template filenames copied into /opt/gh-aw/prompts. |
| pkg/workflow/safe_outputs_default_create_issue_test.go | Updates the auto-injected create-issue prompt test to assert the new template file reference via unified prompt generation. |
| actions/setup/md/safe_outputs_prompt.md | New static safe-outputs intro wrapped in <safe-outputs> XML. |
| actions/setup/md/safe_outputs_create_pull_request.md | New multi-step PR creation instructions (template file). |
| actions/setup/md/safe_outputs_push_to_pr_branch.md | New multi-step “push to PR branch” instructions (template file). |
| actions/setup/md/safe_outputs_auto_create_issue.md | New auto-injected create-issue “IMPORTANT” notice (template file). |
| .github/workflows/workflow-skill-extractor.lock.yml | Switches from inline safe-outputs block to cat safe_outputs_prompt.md + compact <safe-output-tools> list. |
| .github/workflows/workflow-normalizer.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/workflow-health-manager.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/workflow-generator.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/video-analyzer.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/typist.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/test-project-url-default.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/test-dispatcher.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/terminal-stylist.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/super-linter.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/sub-issue-closer.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/step-name-alignment.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/static-analysis-report.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/smoke-test-tools.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/smoke-temporary-id.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/smoke-gemini.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/smoke-agent.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/sergo.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/semantic-function-refactor.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/security-review.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/security-compliance.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/scout.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/schema-consistency-checker.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/safe-output-health.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/research.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/repository-quality-improver.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/repo-tree-map.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/repo-audit-analyzer.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/release.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/prompt-clustering-analysis.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/pr-triage-agent.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/plan.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/pdf-summary.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/notion-issue-summary.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/mcp-inspector.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/lockfile-stats.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/issue-triage-agent.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/issue-monster.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/issue-arborist.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/grumpy-reviewer.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/gpclean.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/go-pattern-detector.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/go-fan.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/firewall-escape.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/example-workflow-analyzer.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/duplicate-code-detector.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/draft-pr-cleanup.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/discussion-task-miner.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/dev.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/dev-hawk.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/dependabot-go-checker.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/dependabot-burner.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/delight.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-testify-uber-super-expert.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-team-status.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-team-evolution-insights.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-syntax-error-quality.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-semgrep-scan.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-security-red-team.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-secrets-analysis.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-safe-outputs-conformance.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-safe-output-optimizer.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-regulatory.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-observability-report.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-mcp-concurrency-analysis.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-malicious-code-scan.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-file-diet.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-fact.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-compiler-quality.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-cli-performance.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-choice-test.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/daily-assign-issue-to-user.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/copilot-pr-merged-report.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/copilot-cli-deep-research.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/copilot-agent-analysis.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/contribution-check.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/commit-changes-analyzer.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/cli-version-checker.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/cli-consistency-checker.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/claude-code-user-docs-review.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/ci-doctor.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/breaking-change-checker.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/brave.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/bot-detection.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/blog-auditor.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/auto-triage-issues.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/artifacts-summary.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/archie.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/ai-moderator.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/agent-persona-explorer.lock.yml | Same safe-outputs prompt refactor as above. |
| .github/workflows/agent-performance-analyzer.lock.yml | Same safe-outputs prompt refactor as above. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
✅ Commit pushed: |
|
PR titles:
|
|
🤖 Smoke test §22284918572 —
Overall:
|
There was a problem hiding this comment.
This PR cleanly extracts the verbose safe-outputs prompt into reusable template files, reducing token usage across all workflows. The approach is sound: DRY principle applied to prompt content, with tests updated to validate the file-reference structure rather than fragile inline strings.
📰 BREAKING: Report filed by Smoke Copilot
| } | ||
| if !strings.Contains(output, "safe output tool") { | ||
| t.Error("Expected prompt to mention safe output tools") | ||
| // Static intro is now in safe_outputs_prompt.md (referenced by file, not inline) |
There was a problem hiding this comment.
The updated test correctly verifies the file-reference approach rather than inline content. This is a good pattern - testing the structure (reference to template file) rather than the content itself, which avoids brittle string matching against prompt text that may evolve.
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Commit pushed: |
|
Smoke Test Run §22284918558 Core tests: ✅ GitHub MCP · ✅ SafeInputs GH · ✅ Serena · ✅ Make Build · ✅ Playwright · ✅ Tavily · ✅ File Write · ✅ Bash · ✅ Discussion · ✅ AW Status PR review tests: ✅ Update PR · ✅ Review Comments · ✅ Submit Review · ✅ Resolve Thread · ✅ Add Reviewer · ✅ Push Branch · Overall: PARTIAL (all non-skipped tests passed)
|
There was a problem hiding this comment.
💥 Automated smoke test review - all systems nominal!
💥 [THE END] — Illustrated by Smoke Claude
|
Hey
If you'd like a hand adding test coverage, you can assign this prompt to your coding agent:
|
Documents the following new features from PR #17769 (safe outputs refactor): - New `unassign-from-user` safe output type with blocked deny-list support - Blocked deny-list glob patterns for `assign-to-user` and `unassign-from-user` - Standardized error code registry (7 categories: ERR_VALIDATION, ERR_PERMISSION, etc.) - Templatable integer fields: `max`/`expires` accept `${{ inputs.* }}` expressions - Safe outputs prompt template system (actions/setup/md/ with XML wrapping) - XPIA (Cross-Prompt Injection Attack) defense section in Security Best Practices - MCP template expression escaping in heredocs to prevent template injection - Configuration breaking changes: status-comment decoupling and sandbox.agent migration - Agent instruction files documentation (.github/agents/) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The safe outputs prompt was split across two Go code locations—an inline static header and a separate per-tool instruction generator—making it hard to maintain and causing redundant content in the rendered
prompt.txt.Changes
New
actions/setup/md/safe_outputs_prompt.md: Static intro extracted from Go string literals into a self-contained file with<safe-outputs>XML wrapping. Content is optimized for token efficiency: gh CLI warning and temporary ID rules condensed to 2 lines (down from 15+ verbose bullet points). Deployed automatically via existingsetup.shwildcard copy.New per-tool template files in
actions/setup/md/:safe_outputs_create_pull_request.md— full multi-step PR creation instructionssafe_outputs_push_to_pr_branch.md— full multi-step push-to-branch instructionssafe_outputs_auto_create_issue.md— auto-injected create_issue noticecollectPromptSections()refactored: Safe outputs section now composed of file references and a minimal inline opening/closing:safe_outputs_prompt.md(static intro)<safe-output-tools>\nTools: tool1, tool2, …(dynamic opening)</safe-output-tools>(closing tag)generateSafeOutputsPerToolInstructions()→buildSafeOutputsSections(): Returns[]PromptSectioninstead of writing to a string builder. Simple tools appear in the compactTools:list.create_pull_requestandpush_to_pull_request_branchreference their template files to deter agents from attempting manualgit push. Spurious\n\ngaps between blocks are removed; file boundaries provide natural single-blank-line separation.Compiled output shape
Token savings vs. the previous inline approach: ~80% reduction in the static intro, significant reduction in per-tool instructions for typical workflows while preserving critical step-by-step guidance for PR creation tools. All multi-line instruction text is now in editable
.mdfiles rather than Go string literals.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Refactor safe outputs prompt: extract all content to template files, wrap in XML, optimize for token usage
The safe outputs prompt was split across two Go code locations—an inline static header and a separate per-tool instruction generator—making it hard to maintain and causing redundant content in the rendered
prompt.txt.Changes
New
actions/setup/md/safe_outputs_prompt.md: Static intro extracted from Go string literals into a self-contained file with(safe-outputs)XML wrapping. Content is optimized for token efficiency: gh CLI warning and temporary ID rules condensed to 2 lines (down from 15+ verbose bullet points). Deployed automatically via existingsetup.shwildcard copy.New per-tool template files in
actions/setup/md/:safe_outputs_create_pull_request.md— full multi-step PR creation instructionssafe_outputs_push_to_pr_branch.md— full multi-step push-to-branch instructionssafe_outputs_auto_create_issue.md— auto-injected create_issue noticecollectPromptSections()refactored: Safe outputs section now composed of file references and a minimal inline opening/closing:safe_outputs_prompt.md(static intro)(safe-output-tools) Tools: tool1, tool2, …(dynamic opening)(/safe-output-tools)(closing tag)generateSafeOutputsPerToolInstructions()→buildSafeOutputsSections(): Returns[]PromptSectioninstead of writing to a string builder. Simple tools appear in the compactTools:list.create_pull_requestandpush_to_push_to_pr_branchreference their template files to deter agents from attempting manualgit push. Spurious `` gaps between blocks are removed; file boundaries provide natural single-blank-line separation.
Compiled output shape
Token savings vs. the previous inline approach: ~80% reduction in the static intro, significant reduction in per-tool instructions for typical workflows while preserving critical step-by-step guidance for PR creation tools. All multi-line instruction text is now in editable
.mdfiles rather than Go string literals.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips]((gh.io/redacted) in the docs.
Changeset
Warning
The following domain was blocked by the firewall during workflow execution:
github.com✨ PR Review Safe Output Test - Run 22284918558