Skip to content

Comments

Refactor safe outputs prompt: extract all content to template files, wrap in XML, optimize for token usage#17769

Merged
pelikhan merged 7 commits intomainfrom
copilot/refactor-prompt-injection-logic
Feb 22, 2026
Merged

Refactor safe outputs prompt: extract all content to template files, wrap in XML, optimize for token usage#17769
pelikhan merged 7 commits intomainfrom
copilot/refactor-prompt-injection-logic

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

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 existing setup.sh wildcard copy.

  • New per-tool template files in actions/setup/md/:

    • safe_outputs_create_pull_request.md — full multi-step PR creation instructions
    • safe_outputs_push_to_pr_branch.md — full multi-step push-to-branch instructions
    • safe_outputs_auto_create_issue.md — auto-injected create_issue notice
  • collectPromptSections() refactored: Safe outputs section now composed of file references and a minimal inline opening/closing:

    1. File reference → safe_outputs_prompt.md (static intro)
    2. Inline → <safe-output-tools>\nTools: tool1, tool2, … (dynamic opening)
    3. File references for tools with multi-step instructions (compile-time conditional)
    4. Inline → </safe-output-tools> (closing tag)
  • generateSafeOutputsPerToolInstructions()buildSafeOutputsSections(): Returns []PromptSection instead of writing to a string builder. Simple tools appear in the compact Tools: list. create_pull_request and push_to_pull_request_branch reference their template files to deter agents from attempting manual git push. Spurious \n\n gaps between blocks are removed; file boundaries provide natural single-blank-line separation.

Compiled output shape

cat "/opt/gh-aw/prompts/safe_outputs_prompt.md"   # <safe-outputs> static intro
cat << 'GH_AW_PROMPT_EOF'
<safe-output-tools>
Tools: add_comment, create_issue, close_issue, update_issue, …
GH_AW_PROMPT_EOF
cat "/opt/gh-aw/prompts/safe_outputs_create_pull_request.md"
cat << 'GH_AW_PROMPT_EOF'
</safe-output-tools>
GH_AW_PROMPT_EOF

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 .md files rather than Go string literals.

Original prompt

Review the rendered prompt injected for safe outputs (at 2 locations at least). You can look at prompt.txt artifact in a recent run (in logs). Refactor and organize in a single coherent section. Templetize to render from a file in actions/setup/md. Wrap in xml tags.


💡 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 existing setup.sh wildcard copy.

  • New per-tool template files in actions/setup/md/:

    • safe_outputs_create_pull_request.md — full multi-step PR creation instructions
    • safe_outputs_push_to_pr_branch.md — full multi-step push-to-branch instructions
    • safe_outputs_auto_create_issue.md — auto-injected create_issue notice
  • collectPromptSections() refactored: Safe outputs section now composed of file references and a minimal inline opening/closing:

    1. File reference → safe_outputs_prompt.md (static intro)
    2. Inline → (safe-output-tools) Tools: tool1, tool2, … (dynamic opening)
    3. File references for tools with multi-step instructions (compile-time conditional)
    4. Inline → (/safe-output-tools) (closing tag)
  • generateSafeOutputsPerToolInstructions()buildSafeOutputsSections(): Returns []PromptSection instead of writing to a string builder. Simple tools appear in the compact Tools: list. create_pull_request and push_to_push_to_pr_branch reference their template files to deter agents from attempting manual git push. Spurious `

` gaps between blocks are removed; file boundaries provide natural single-blank-line separation.

Compiled output shape

cat "/opt/gh-aw/prompts/safe_outputs_prompt.md"   # (safe-outputs) static intro
cat << 'GH_AW_PROMPT_EOF'
(safe-output-tools)
Tools: add_comment, create_issue, close_issue, update_issue, …
GH_AW_PROMPT_EOF
cat "/opt/gh-aw/prompts/safe_outputs_create_pull_request.md"
cat << 'GH_AW_PROMPT_EOF'
(/safe-output-tools)
GH_AW_PROMPT_EOF

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 .md files rather than Go string literals.

Original prompt

Review the rendered prompt injected for safe outputs (at 2 locations at least). You can look at prompt.txt artifact in a recent run (in logs). Refactor and organize in a single coherent section. Templetize to render from a file in actions/setup/md. Wrap in xml tags.


💡 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

  • Type: patch
  • Description: Refactor the safe outputs prompt to source the intro and per-tool guidance from markdown templates so it is easier to maintain and uses fewer tokens.

Generated by Changeset Generator for issue #17769

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com


✨ PR Review Safe Output Test - Run 22284918558

💥 [THE END] — Illustrated by Smoke Claude

…/setup/md/, wrap in XML tags

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor and organize prompt injection for safe outputs Refactor safe outputs prompt: extract static intro to template file, wrap in XML Feb 22, 2026
Copy link
Contributor

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot optimize for token usage and optimal instructions

… compressed static intro

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 22, 2026

@copilot optimize for token usage and optimal instructions

Done in 22222e8. Two optimizations:

  1. Static file (safe_outputs_prompt.md): Removed <description> tag and condensed temporary_id rules from 15 verbose bullet points → 2 compact lines (~80% reduction).

  2. Per-tool instructions: Replaced verbose heading+paragraph blocks for each tool with a single compact Tools: add_comment, create_issue, ... list. Only the three multi-step tools that genuinely require extra guidance (create_pull_request, push_to_pull_request_branch, upload_asset) keep their own inline instruction line.

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/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw n-logic k/_temp/uv-pytho--write /opt/hostedtoolc../../../**/*.json inst�� w/js/**/*.json&#39; --ignore-path (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw n-logic ache/go/1.25.0/x--write node /opt�� w/js/**/*.json&#39; --ignore-path --package-lock-o../../../.prettierignore /usr/bin/git (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha js/**/*.json&#39; --ignore-path ../../../.prettierignore 64/pkg/tool/linux_amd64/vet /usr/bin/git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha --noprofile (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha js/**/*.json&#39; --ignore-path ../../../.prettierignore 64/pkg/tool/linux_amd64/vet /usr/bin/git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet es/.bin/node (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --noprofile (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha ent\|Creating a Discussion\|Updating an Issue\|safe output tool\|safeoutputs MCP server\|gh CLI git g/workflow/action_cache_test.go 64/pkg/tool/linux_amd64/vet g/workflow/actiogit g/workflow/actiorev-parse g/workflow/actio--show-toplevel 64/pkg/tool/linux_amd64/vet g/wo�� g/workflow/action_sha_checker_test.go .cfg 64/pkg/tool/linux_amd64/vet g/workflow/activgit g/workflow/add_crev-parse g/workflow/add_c--show-toplevel 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha re x_amd64/vet /node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha re x_amd64/vet /usr/bin/bash (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha i-inference/git/ref/tags/v1 x_amd64/vet /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha --show-toplevel x_amd64/vet de (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha --show-toplevel x_amd64/vet e | tr &#39;\n&#39; &#39;:&#39;)$sh (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha --show-toplevel x_amd64/vet modules/@npmcli/run-script/lib/node-gyp-bin/node TH=&#34;$(find &#34;/tmpsh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha new-feature.txt 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node &amp; echo &#34;$PATH&#34; .cfg 64/pkg/tool/linuxterm-color git ode_�� --count ..feature-branch r: $owner, name: $name) { hasDiscussionsEnabled } } (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha h ../../../.prettierignore x_amd64/vet /opt/hostedtoolcache/go/1.25.0/x64/bin/node (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node bin:::/usr/localgit .cfg 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git ode_�� origin/main feature-branch es/.bin/sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node in&#39; &amp;&amp; echo &#34;$PAgit .cfg 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/.github/workflows ls ode_�� /tmp/gh-aw/aw-feremote.origin.url 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet ode_modules/.bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet es/.bin/node in:::/usr/local/infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha h ../../../.pret.prettierignore x_amd64/vet /opt/hostedtoolcache/uv/0.10.4/x86_64/node (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha re x_amd64/vet /usr/bin/find (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Refactor safe outputs prompt: extract static intro to template file, wrap in XML Refactor safe outputs prompt: extract static intro to template file, wrap in XML, optimize for token usage Feb 22, 2026
@pelikhan
Copy link
Contributor

@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>
Copy link
Contributor Author

Copilot AI commented Feb 22, 2026

@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

Done in 0f53e73. Both create_pull_request and push_to_pull_request_branch now emit the full multi-step instructions (branch, commit, do not push, then call the tool), matching the original verbose format to prevent agents from attempting git push directly.

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/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -pack /home/REDACTED/work/gh-aw/gh-aw/cmd/gh-aw/main.go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build3899101452/b001/importcfg -pack /tmp/go-build3899101452/b001/_testmain.go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha ACCEPT (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha INVALID,NEW -j DROP ader (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan
Copy link
Contributor

@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>
Copy link
Contributor Author

Copilot AI commented Feb 22, 2026

@copilot refactor to prompt template files out of go as much as possible. Remove spurious new lines

Done in 7f1f438. Three new template files in actions/setup/md/ now hold the instruction text that was previously in Go string literals:

  • safe_outputs_create_pull_request.md — full multi-step PR creation steps
  • safe_outputs_push_to_pr_branch.md — full multi-step push-to-branch steps
  • safe_outputs_auto_create_issue.md — the auto-injected create_issue notice

buildSafeOutputsSections() replaces the old generateSafeOutputsPerToolInstructions() and returns a []PromptSection mix — an inline opening with <safe-output-tools>\nTools: ..., then cat file references for tool-specific instructions, then an inline </safe-output-tools> closing. Spurious \n\n gaps are gone; each file starts with one blank line for natural separation.

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/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE env 5361770/b384/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE bracelet/x/exp/g--norc GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE env 5361770/b393/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/pkg/logg--norc GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE env 5361770/b397/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha npx prettier --cGOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go node /hom�� --check scripts/**/*.js 64/bin/go -d (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -t security 64/bin/go OUTPUT -d 168.63.129.16 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck &#39;**/*.cjs&#39; &#39;*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD ode-gyp-bin/nodeGOPATH go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha &#34; GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /home/REDACTED/.config/composer/vendor/bin/bash GOINSECURE GOMOD GOMODCACHE bash (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha npx prettier --cGOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE bash 64/bin/go tierignore (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha g/cli/access_logGOINSECURE g/cli/actionlintGOMOD 64/bin/go GOINSECURE GOMOD erignore ache/go/1.25.0/xGO111MODULE env 5361770/b356/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha d/gh-aw/main.go d/gh-aw/capitaliGOMOD 64/bin/go GOINSECURE GOMOD erignore ache/go/1.25.0/xGO111MODULE env 5361770/b372/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE /opt/hostedtoolcGO111MODULE 64/bin/go -bool -buildtags 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE /opt/hostedtoolcGO111MODULE 64/bin/go -bool -buildtags 64/bin/go go env -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha /tmp/go-build1931056124/b415/_pkGOSUMDB -trimpath 64/bin/go -p main -lang=go1.25 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go **/*.ts **/*.json --ignore-path node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go **/*.ts **/*.json --ignore-path go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha ck &#39;scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD s,MFiles,HFiles,go build -ldflags &#34;-s -w -X main.version=0f53e73-dirty&#34; -o gh-aw ./cmd/gh-aw node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha ck &#39;scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha -t security 64/bin/go OUTPUT -d 168.63.129.16 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE env 5361770/b359/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/pkg/mathenv GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha ck &#39;scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha /tmp/go-build1195361770/b340/_pkGOINSECURE -trimpath 64/bin/go -d github.com/githu-C -lang=go1.25 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE /opt/hostedtoolcGO111MODULE 64/bin/go -unreachable=falinfocmp /tmp/go-build236-1 64/bin/go go env -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha &#34;prettier&#34; --cheremote.origin.url /opt/hostedtoolcGO111MODULE 64/bin/go tierignore -buildtags 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha 5361770/b412/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env stET/oWLk6SE5ZcxGOSUMDB GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 5361770/b412/imp-f (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE /opt/hostedtoolcGO111MODULE 64/bin/go -bool -buildtags 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE s not exist yet&#34;-f (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha &#34;prettier&#34; --cheremote.origin.url /opt/hostedtoolcGO111MODULE 64/bin/go tierignore -buildtags 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha &#34;prettier&#34; --cheremote.origin.url /opt/hostedtoolcGO111MODULE 64/bin/go -bool -buildtags 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE bash 64/bin/go tierignore (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE /opt/hostedtoolcGO111MODULE 64/bin/go -bool -buildtags 64/bin/go go env -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha &#34;prettier&#34; --cheremote.origin.url bash 64/bin/go tierignore (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha prettier --check 64/bin/go --ignore-path .prettierignore 64/bin/go go env -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE /opt/hostedtoolcGO111MODULE 64/bin/go tierignore (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha 5361770/b400/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ekf4/yO7DMkwnyWrGOSUMDB GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 5361770/b400/imprev-parse (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go **/*.ts **/*.json --ignore-path git (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Refactor safe outputs prompt: extract static intro to template file, wrap in XML, optimize for token usage Refactor safe outputs prompt: extract all content to template files, wrap in XML, optimize for token usage Feb 22, 2026
@pelikhan pelikhan marked this pull request as ready for review February 22, 2026 20:40
Copilot AI review requested due to automatic review settings February 22, 2026 20:40
@pelikhan pelikhan added the smoke label Feb 22, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml files to cat the 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.

@github-actions
Copy link
Contributor

✅ Commit pushed: 7982eb2

@github-actions
Copy link
Contributor

PR titles:

  • [code-simplifier] parser: add doc comment and assertion message to normalizeAdditionalPropertyList
  • SEC-005: Add cross-repository allowlist validation to flagged handlers
    Tests: GitHub MCP ✅ | Serena activate+find_symbol ✅ | Playwright title ✅ | File write ✅ | Bash cat ✅ | Build ✅
    Overall status: PASS

🔮 The oracle has spoken through Smoke Codex

@github-actions
Copy link
Contributor

🤖 Smoke test §22284918572@app/copilot-swe-agent / assignees: @pelikhan @Copilot

Test
GitHub MCP
SafeInputs GH CLI
Serena MCP
Playwright
File Writing
Bash Tool
Discussion Interaction
Build gh-aw
Discussion Creation
Workflow Dispatch
PR Review

Overall: ⚠️ PARTIAL PASS (10/11)

📰 BREAKING: Report filed by Smoke Copilot

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

✅ Commit pushed: 28151b3

@github-actions
Copy link
Contributor

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 · ⚠️ Close PR (skipped)

Overall: PARTIAL (all non-skipped tests passed)

💥 [THE END] — Illustrated by Smoke Claude

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥 Automated smoke test review - all systems nominal!

💥 [THE END] — Illustrated by Smoke Claude

@github-actions
Copy link
Contributor

Hey @Copilot 👋 — thanks for working on the prompt refactoring! This is a valuable improvement for code maintainability and token efficiency. Here are a few things that would help get this across the finish line:

  • Add tests — the PR refactors critical prompt generation logic (moving from inline Go strings to template files, changing function signatures from generateSafeOutputsPerToolInstructions() to buildSafeOutputsSections()), but includes zero test coverage for these changes. According to the CONTRIBUTING.md testing guidelines and scratchpad/testing.md, refactorings that change how prompts are constructed should include tests to verify the rendered output matches expectations.

  • Discussion recommended — while this is clearly on-topic for the project, the PR makes significant structural changes to how prompts are generated (163 files changed, 8172 deletions) without an associated issue or prior discussion. The CONTRIBUTING.md guidelines emphasize creating detailed agentic plans in issues before implementation, especially for changes this large. The "Original prompt" quoted in the PR body suggests this came from an ad-hoc instruction rather than a formal issue with maintainer approval.

If you'd like a hand adding test coverage, you can assign this prompt to your coding agent:

Add integration tests for the refactored safe outputs prompt generation in pkg/workflow/.

Verify that:
1. The new template-based approach produces the same rendered output as the old inline approach
2. `buildSafeOutputsSections()` returns the correct PromptSection array for different tool configurations
3. XML tags are properly opened and closed in the compiled prompt
4. Template files in actions/setup/md/ are correctly loaded and interpolated

Follow the testing patterns in pkg/workflow/*_test.go, particularly:
- `safe_outputs_tools_generation_test.go` for tool-specific prompt logic
- `unified_prompt_creation_test.go` for overall prompt assembly

Use table-driven tests with `testify/require` for assertions (see scratchpad/testing.md).

Generated by Contribution Check

@pelikhan pelikhan merged commit 789c4c5 into main Feb 22, 2026
@pelikhan pelikhan deleted the copilot/refactor-prompt-injection-logic branch February 22, 2026 23:40
github-actions bot pushed a commit that referenced this pull request Feb 23, 2026
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>
pelikhan pushed a commit that referenced this pull request Feb 23, 2026
…17794)

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: gh-aw consolidation bot <gh-aw-bot@github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants