diff --git a/.github/workflows/agent-performance-analyzer.lock.yml b/.github/workflows/agent-performance-analyzer.lock.yml index 26c30626089..b8f27d36d01 100644 --- a/.github/workflows/agent-performance-analyzer.lock.yml +++ b/.github/workflows/agent-performance-analyzer.lock.yml @@ -312,8 +312,6 @@ jobs: cat << 'GH_AW_PROMPT_7241816e5fdddd36_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} diff --git a/.github/workflows/api-consumption-report.lock.yml b/.github/workflows/api-consumption-report.lock.yml index 09cd07ab02a..cd4b0bf5fba 100644 --- a/.github/workflows/api-consumption-report.lock.yml +++ b/.github/workflows/api-consumption-report.lock.yml @@ -527,8 +527,6 @@ jobs: ``` - - {{#runtime-import .github/skills/jqschema/SKILL.md}} {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/trending-charts-simple.md}} diff --git a/.github/workflows/archie.lock.yml b/.github/workflows/archie.lock.yml index ddb16017c89..c05fd6b7142 100644 --- a/.github/workflows/archie.lock.yml +++ b/.github/workflows/archie.lock.yml @@ -321,6 +321,8 @@ jobs: fi cat << 'GH_AW_PROMPT_0e58ccc8a3000979_EOF' + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -350,10 +352,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/archie.md}} GH_AW_PROMPT_0e58ccc8a3000979_EOF diff --git a/.github/workflows/aw-failure-investigator.lock.yml b/.github/workflows/aw-failure-investigator.lock.yml index 6213e598703..960dfdecbcf 100644 --- a/.github/workflows/aw-failure-investigator.lock.yml +++ b/.github/workflows/aw-failure-investigator.lock.yml @@ -320,8 +320,6 @@ jobs: cat << 'GH_AW_PROMPT_d197fae2a5d7d116_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/aw-failure-investigator.md}} diff --git a/.github/workflows/cloclo.lock.yml b/.github/workflows/cloclo.lock.yml index ab7eab32ff9..0a3e9cc876f 100644 --- a/.github/workflows/cloclo.lock.yml +++ b/.github/workflows/cloclo.lock.yml @@ -364,6 +364,10 @@ jobs: fi cat << 'GH_AW_PROMPT_ab35bd205bb8e537_EOF' + {{#runtime-import .github/skills/jqschema/SKILL.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -393,12 +397,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/skills/jqschema/SKILL.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/cloclo.md}} GH_AW_PROMPT_ab35bd205bb8e537_EOF diff --git a/.github/workflows/daily-cache-strategy-analyzer.lock.yml b/.github/workflows/daily-cache-strategy-analyzer.lock.yml index 621f9fba9cd..237e5fc2b3c 100644 --- a/.github/workflows/daily-cache-strategy-analyzer.lock.yml +++ b/.github/workflows/daily-cache-strategy-analyzer.lock.yml @@ -287,8 +287,6 @@ jobs: cat << 'GH_AW_PROMPT_9861bbc74b7d1cdd_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/shared/otlp.md}} @@ -1536,18 +1534,18 @@ jobs: DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e CODEX_HOME -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.22' - cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_MCP_CONFIG_3497835663345401_EOF + cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_MCP_CONFIG_509f2e6894124a97_EOF [history] persistence = "none" [shell_environment_policy] inherit = "core" include_only = ["^CODEX_API_KEY$", "^HOME$", "^OPENAI_API_KEY$", "^PATH$"] - GH_AW_MCP_CONFIG_3497835663345401_EOF + GH_AW_MCP_CONFIG_509f2e6894124a97_EOF # Generate JSON config for MCP gateway GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_9b9fdd0116cfa112_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_2cc28545b8fe6e5a_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { }, @@ -1558,11 +1556,11 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_9b9fdd0116cfa112_EOF + GH_AW_MCP_CONFIG_2cc28545b8fe6e5a_EOF # Sync converter output to writable CODEX_HOME for Codex mkdir -p /tmp/gh-aw/mcp-config - cat > "/tmp/gh-aw/mcp-config/config.toml" << GH_AW_CODEX_SHELL_POLICY_d1acca4a4100ece5_EOF + cat > "/tmp/gh-aw/mcp-config/config.toml" << GH_AW_CODEX_SHELL_POLICY_e268e06a81a35c71_EOF model_provider = "openai-proxy" [model_providers.openai-proxy] name = "OpenAI AWF proxy" @@ -1572,7 +1570,7 @@ jobs: [shell_environment_policy] inherit = "core" include_only = ["^CODEX_API_KEY$", "^HOME$", "^OPENAI_API_KEY$", "^PATH$"] - GH_AW_CODEX_SHELL_POLICY_d1acca4a4100ece5_EOF + GH_AW_CODEX_SHELL_POLICY_e268e06a81a35c71_EOF awk ' BEGIN { skip_openai_proxy = 0 } /^[[:space:]]*model_provider[[:space:]]*=/ { next } diff --git a/.github/workflows/daily-compiler-quality.lock.yml b/.github/workflows/daily-compiler-quality.lock.yml index 63a469b7b04..c8d41466511 100644 --- a/.github/workflows/daily-compiler-quality.lock.yml +++ b/.github/workflows/daily-compiler-quality.lock.yml @@ -314,6 +314,10 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_7eae7e63ca1563be_EOF' + {{#runtime-import .github/workflows/shared/go-source-analysis.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -343,12 +347,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/go-source-analysis.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/daily-compiler-quality.md}} GH_AW_PROMPT_7eae7e63ca1563be_EOF diff --git a/.github/workflows/daily-file-diet.lock.yml b/.github/workflows/daily-file-diet.lock.yml index 30dade55013..b65257e3630 100644 --- a/.github/workflows/daily-file-diet.lock.yml +++ b/.github/workflows/daily-file-diet.lock.yml @@ -280,6 +280,12 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_937f484483f84bc7_EOF' + {{#runtime-import .github/workflows/shared/go-source-analysis.md}} + {{#runtime-import .github/workflows/shared/safe-output-app.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/activation-app.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -309,14 +315,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/go-source-analysis.md}} - {{#runtime-import .github/workflows/shared/safe-output-app.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/activation-app.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/daily-file-diet.md}} GH_AW_PROMPT_937f484483f84bc7_EOF diff --git a/.github/workflows/daily-function-namer.lock.yml b/.github/workflows/daily-function-namer.lock.yml index d29e0eb3cdc..4168fc89c17 100644 --- a/.github/workflows/daily-function-namer.lock.yml +++ b/.github/workflows/daily-function-namer.lock.yml @@ -283,6 +283,9 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_10bb37f17f8ab2fe_EOF' + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -312,11 +315,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/daily-function-namer.md}} GH_AW_PROMPT_10bb37f17f8ab2fe_EOF } > "$GH_AW_PROMPT" diff --git a/.github/workflows/daily-mcp-concurrency-analysis.lock.yml b/.github/workflows/daily-mcp-concurrency-analysis.lock.yml index cd671f73213..0e119e08e7d 100644 --- a/.github/workflows/daily-mcp-concurrency-analysis.lock.yml +++ b/.github/workflows/daily-mcp-concurrency-analysis.lock.yml @@ -277,6 +277,7 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_fa4c9b3830bb80e7_EOF' + {{#runtime-import .github/workflows/shared/safe-output-app.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go","typescript"]** analysis in this workspace: @@ -306,9 +307,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/safe-output-app.md}} {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/daily-mcp-concurrency-analysis.md}} diff --git a/.github/workflows/daily-observability-report.lock.yml b/.github/workflows/daily-observability-report.lock.yml index fd4a96a08ee..92d08190fad 100644 --- a/.github/workflows/daily-observability-report.lock.yml +++ b/.github/workflows/daily-observability-report.lock.yml @@ -281,8 +281,6 @@ jobs: cat << 'GH_AW_PROMPT_e03cec235d7538c4_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} @@ -1448,18 +1446,18 @@ jobs: DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e CODEX_HOME -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.22' - cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_MCP_CONFIG_4c0c725343a84593_EOF + cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_MCP_CONFIG_552fe3e2ec24df0d_EOF [history] persistence = "none" [shell_environment_policy] inherit = "core" include_only = ["^CODEX_API_KEY$", "^HOME$", "^OPENAI_API_KEY$", "^PATH$"] - GH_AW_MCP_CONFIG_4c0c725343a84593_EOF + GH_AW_MCP_CONFIG_552fe3e2ec24df0d_EOF # Generate JSON config for MCP gateway GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_3e5f665fc9131ec3_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_5a1ea36591ab0932_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { }, @@ -1470,11 +1468,11 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_3e5f665fc9131ec3_EOF + GH_AW_MCP_CONFIG_5a1ea36591ab0932_EOF # Sync converter output to writable CODEX_HOME for Codex mkdir -p /tmp/gh-aw/mcp-config - cat > "/tmp/gh-aw/mcp-config/config.toml" << GH_AW_CODEX_SHELL_POLICY_cf9ff71341de1e22_EOF + cat > "/tmp/gh-aw/mcp-config/config.toml" << GH_AW_CODEX_SHELL_POLICY_eaad2094eb4b5439_EOF model_provider = "openai-proxy" [model_providers.openai-proxy] name = "OpenAI AWF proxy" @@ -1484,7 +1482,7 @@ jobs: [shell_environment_policy] inherit = "core" include_only = ["^CODEX_API_KEY$", "^HOME$", "^OPENAI_API_KEY$", "^PATH$"] - GH_AW_CODEX_SHELL_POLICY_cf9ff71341de1e22_EOF + GH_AW_CODEX_SHELL_POLICY_eaad2094eb4b5439_EOF awk ' BEGIN { skip_openai_proxy = 0 } /^[[:space:]]*model_provider[[:space:]]*=/ { next } diff --git a/.github/workflows/daily-rendering-scripts-verifier.lock.yml b/.github/workflows/daily-rendering-scripts-verifier.lock.yml index 7254cda2efe..860baee748d 100644 --- a/.github/workflows/daily-rendering-scripts-verifier.lock.yml +++ b/.github/workflows/daily-rendering-scripts-verifier.lock.yml @@ -293,8 +293,6 @@ jobs: cat << 'GH_AW_PROMPT_6fa1bb5b2c6bccca_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/activation-app.md}} {{#runtime-import .github/workflows/shared/reporting.md}} diff --git a/.github/workflows/daily-security-observability.lock.yml b/.github/workflows/daily-security-observability.lock.yml index 5b366bb9831..e76ec974f57 100644 --- a/.github/workflows/daily-security-observability.lock.yml +++ b/.github/workflows/daily-security-observability.lock.yml @@ -292,8 +292,6 @@ jobs: cat << 'GH_AW_PROMPT_90d5e81135a07f25_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/workflows/shared/python-dataviz.md}} {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/trending-charts-simple.md}} diff --git a/.github/workflows/daily-testify-uber-super-expert.lock.yml b/.github/workflows/daily-testify-uber-super-expert.lock.yml index fc3fa309ab7..719a989aa14 100644 --- a/.github/workflows/daily-testify-uber-super-expert.lock.yml +++ b/.github/workflows/daily-testify-uber-super-expert.lock.yml @@ -279,6 +279,12 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_98e0ec40cd2dd798_EOF' + {{#runtime-import .github/workflows/shared/go-source-analysis.md}} + {{#runtime-import .github/workflows/shared/safe-output-app.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/activation-app.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -308,14 +314,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/go-source-analysis.md}} - {{#runtime-import .github/workflows/shared/safe-output-app.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/activation-app.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/daily-testify-uber-super-expert.md}} GH_AW_PROMPT_98e0ec40cd2dd798_EOF diff --git a/.github/workflows/deep-report.lock.yml b/.github/workflows/deep-report.lock.yml index aeff53372c2..57ff7665832 100644 --- a/.github/workflows/deep-report.lock.yml +++ b/.github/workflows/deep-report.lock.yml @@ -323,8 +323,6 @@ jobs: cat << 'GH_AW_PROMPT_a0fa61bf17202a6a_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/skills/jqschema/SKILL.md}} {{#runtime-import .github/workflows/shared/discussions-data-fetch.md}} {{#runtime-import .github/workflows/shared/mcp/agentdb.md}} diff --git a/.github/workflows/dev-hawk.lock.yml b/.github/workflows/dev-hawk.lock.yml index 406f0966dfa..6dfb9e2a362 100644 --- a/.github/workflows/dev-hawk.lock.yml +++ b/.github/workflows/dev-hawk.lock.yml @@ -282,8 +282,6 @@ jobs: cat << 'GH_AW_PROMPT_605168d27f185e56_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} diff --git a/.github/workflows/developer-docs-consolidator.lock.yml b/.github/workflows/developer-docs-consolidator.lock.yml index e072f4e6101..1d3df9b9b3e 100644 --- a/.github/workflows/developer-docs-consolidator.lock.yml +++ b/.github/workflows/developer-docs-consolidator.lock.yml @@ -285,6 +285,9 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_d5fa5c99cbb130c2_EOF' + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -314,11 +317,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/developer-docs-consolidator.md}} GH_AW_PROMPT_d5fa5c99cbb130c2_EOF diff --git a/.github/workflows/duplicate-code-detector.lock.yml b/.github/workflows/duplicate-code-detector.lock.yml index 0c08677ddcf..709b3ee0f4a 100644 --- a/.github/workflows/duplicate-code-detector.lock.yml +++ b/.github/workflows/duplicate-code-detector.lock.yml @@ -279,6 +279,10 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_fc2950c8d86467ef_EOF' + {{#runtime-import .github/workflows/shared/go-source-analysis.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -308,12 +312,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/go-source-analysis.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/duplicate-code-detector.md}} GH_AW_PROMPT_fc2950c8d86467ef_EOF } > "$GH_AW_PROMPT" @@ -1442,18 +1440,18 @@ jobs: DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e CODEX_HOME -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.22' - cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_MCP_CONFIG_742aad59e51557f0_EOF + cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_MCP_CONFIG_fa93c3b4bfbf6b69_EOF [history] persistence = "none" [shell_environment_policy] inherit = "core" include_only = ["^CODEX_API_KEY$", "^HOME$", "^OPENAI_API_KEY$", "^PATH$"] - GH_AW_MCP_CONFIG_742aad59e51557f0_EOF + GH_AW_MCP_CONFIG_fa93c3b4bfbf6b69_EOF # Generate JSON config for MCP gateway GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_83536fca53e463ff_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_6a51cb6186d95c91_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { }, @@ -1464,11 +1462,11 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_83536fca53e463ff_EOF + GH_AW_MCP_CONFIG_6a51cb6186d95c91_EOF # Sync converter output to writable CODEX_HOME for Codex mkdir -p /tmp/gh-aw/mcp-config - cat > "/tmp/gh-aw/mcp-config/config.toml" << GH_AW_CODEX_SHELL_POLICY_8ad48d77a02aae11_EOF + cat > "/tmp/gh-aw/mcp-config/config.toml" << GH_AW_CODEX_SHELL_POLICY_6de9e3d7b8a889f1_EOF model_provider = "openai-proxy" [model_providers.openai-proxy] name = "OpenAI AWF proxy" @@ -1478,7 +1476,7 @@ jobs: [shell_environment_policy] inherit = "core" include_only = ["^CODEX_API_KEY$", "^HOME$", "^OPENAI_API_KEY$", "^PATH$"] - GH_AW_CODEX_SHELL_POLICY_8ad48d77a02aae11_EOF + GH_AW_CODEX_SHELL_POLICY_6de9e3d7b8a889f1_EOF awk ' BEGIN { skip_openai_proxy = 0 } /^[[:space:]]*model_provider[[:space:]]*=/ { next } diff --git a/.github/workflows/example-workflow-analyzer.lock.yml b/.github/workflows/example-workflow-analyzer.lock.yml index bd753228ebd..8810ef0a864 100644 --- a/.github/workflows/example-workflow-analyzer.lock.yml +++ b/.github/workflows/example-workflow-analyzer.lock.yml @@ -279,8 +279,6 @@ jobs: cat << 'GH_AW_PROMPT_db5d9243be63179f_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index b4d2ce8c910..fb944414347 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -297,6 +297,10 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_034cea281da335c3_EOF' + {{#runtime-import .github/skills/documentation/SKILL.md}} + {{#runtime-import .github/agents/technical-doc-writer.agent.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -326,12 +330,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/skills/documentation/SKILL.md}} - {{#runtime-import .github/agents/technical-doc-writer.agent.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/glossary-maintainer.md}} GH_AW_PROMPT_034cea281da335c3_EOF diff --git a/.github/workflows/go-fan.lock.yml b/.github/workflows/go-fan.lock.yml index b66c764b56c..1b5d570a638 100644 --- a/.github/workflows/go-fan.lock.yml +++ b/.github/workflows/go-fan.lock.yml @@ -281,6 +281,11 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_0d8fcb4a84a93704_EOF' + {{#runtime-import .github/workflows/shared/go-source-analysis.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/activation-app.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -310,13 +315,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/go-source-analysis.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/activation-app.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/go-fan.md}} GH_AW_PROMPT_0d8fcb4a84a93704_EOF diff --git a/.github/workflows/jsweep.lock.yml b/.github/workflows/jsweep.lock.yml index 502e654a25e..a275ce250ca 100644 --- a/.github/workflows/jsweep.lock.yml +++ b/.github/workflows/jsweep.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"562663e376f18c386db0dac4e5251c29c88dda52e7a99e577ad75da50b8d3026","body_hash":"1e53d338f3b2adf523fa5a74b67bea6cf3ccd6534aabe12f2af99ccded239a7a","strict":true,"agent_id":"copilot"} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"562663e376f18c386db0dac4e5251c29c88dda52e7a99e577ad75da50b8d3026","body_hash":"65977a136028214d4d7b9535a9dbe4e923bbfd9cf6b915a2286fcd221283b62c","strict":true,"agent_id":"copilot"} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_GRAFANA_AUTHORIZATION","GH_AW_OTEL_GRAFANA_ENDPOINT","GH_AW_OTEL_SENTRY_AUTHORIZATION","GH_AW_OTEL_SENTRY_ENDPOINT","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"27d5ce7f107fe9357f9df03efb73ab90386fccae","version":"v5.0.5"},{"repo":"actions/cache/save","sha":"27d5ce7f107fe9357f9df03efb73ab90386fccae","version":"v5.0.5"},{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.58"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.58"},{"image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.25.58"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.58"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.22","digest":"sha256:ce5c6f5461b077af0d8e8eb1763436e85153f8e9531117d58a7bdb23de71f00a","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.22@sha256:ce5c6f5461b077af0d8e8eb1763436e85153f8e9531117d58a7bdb23de71f00a"},{"image":"ghcr.io/github/github-mcp-server:v1.1.2","digest":"sha256:30197479d8036c7811892bc07e06f9a05c9ef3cdd79bc59f256d50647f95788c","pinned_image":"ghcr.io/github/github-mcp-server:v1.1.2@sha256:30197479d8036c7811892bc07e06f9a05c9ef3cdd79bc59f256d50647f95788c"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) diff --git a/.github/workflows/linter-miner.lock.yml b/.github/workflows/linter-miner.lock.yml index 162b041c004..67473d94a4f 100644 --- a/.github/workflows/linter-miner.lock.yml +++ b/.github/workflows/linter-miner.lock.yml @@ -274,6 +274,8 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_1084932ca7f19edb_EOF' + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -303,10 +305,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/linter-miner.md}} GH_AW_PROMPT_1084932ca7f19edb_EOF } > "$GH_AW_PROMPT" diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index 87d1880ca4e..44291ca81df 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -320,6 +320,23 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_206d7ac82f0ea1ed_EOF' + {{#runtime-import .github/workflows/shared/mcp/arxiv.md}} + {{#runtime-import .github/workflows/shared/mcp/ast-grep.md}} + {{#runtime-import .github/workflows/shared/mcp/brave.md}} + {{#runtime-import .github/workflows/shared/mcp/context7.md}} + {{#runtime-import .github/workflows/shared/mcp/datadog.md}} + {{#runtime-import .github/workflows/shared/mcp/deepwiki.md}} + {{#runtime-import .github/workflows/shared/mcp/fabric-rti.md}} + {{#runtime-import .github/workflows/shared/mcp/markitdown.md}} + {{#runtime-import .github/workflows/shared/mcp/microsoft-docs.md}} + {{#runtime-import .github/workflows/shared/mcp/notion.md}} + {{#runtime-import .github/workflows/shared/mcp/sentry.md}} + {{#runtime-import .github/workflows/shared/mcp/server-memory.md}} + {{#runtime-import .github/workflows/shared/mcp/slack.md}} + {{#runtime-import .github/workflows/shared/mcp/tavily.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -349,25 +366,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/mcp/arxiv.md}} - {{#runtime-import .github/workflows/shared/mcp/ast-grep.md}} - {{#runtime-import .github/workflows/shared/mcp/brave.md}} - {{#runtime-import .github/workflows/shared/mcp/context7.md}} - {{#runtime-import .github/workflows/shared/mcp/datadog.md}} - {{#runtime-import .github/workflows/shared/mcp/deepwiki.md}} - {{#runtime-import .github/workflows/shared/mcp/fabric-rti.md}} - {{#runtime-import .github/workflows/shared/mcp/markitdown.md}} - {{#runtime-import .github/workflows/shared/mcp/microsoft-docs.md}} - {{#runtime-import .github/workflows/shared/mcp/notion.md}} - {{#runtime-import .github/workflows/shared/mcp/sentry.md}} - {{#runtime-import .github/workflows/shared/mcp/server-memory.md}} - {{#runtime-import .github/workflows/shared/mcp/slack.md}} - {{#runtime-import .github/workflows/shared/mcp/tavily.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/mcp-inspector.md}} GH_AW_PROMPT_206d7ac82f0ea1ed_EOF diff --git a/.github/workflows/metrics-collector.lock.yml b/.github/workflows/metrics-collector.lock.yml index 919cc299aa8..867bad43ebb 100644 --- a/.github/workflows/metrics-collector.lock.yml +++ b/.github/workflows/metrics-collector.lock.yml @@ -281,8 +281,6 @@ jobs: cat << 'GH_AW_PROMPT_2e667d5a113f20d7_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/metrics-collector.md}} diff --git a/.github/workflows/prompt-clustering-analysis.lock.yml b/.github/workflows/prompt-clustering-analysis.lock.yml index 5b55f6eb739..1b19c94167c 100644 --- a/.github/workflows/prompt-clustering-analysis.lock.yml +++ b/.github/workflows/prompt-clustering-analysis.lock.yml @@ -293,8 +293,6 @@ jobs: cat << 'GH_AW_PROMPT_042e57fb4a56230f_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/skills/jqschema/SKILL.md}} {{#runtime-import .github/workflows/shared/copilot-pr-data-fetch.md}} {{#runtime-import .github/workflows/shared/python-nlp.md}} diff --git a/.github/workflows/semantic-function-refactor.lock.yml b/.github/workflows/semantic-function-refactor.lock.yml index 331419c8e23..42b48b3dfac 100644 --- a/.github/workflows/semantic-function-refactor.lock.yml +++ b/.github/workflows/semantic-function-refactor.lock.yml @@ -276,6 +276,10 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_6d0cd0a2e1747309_EOF' + {{#runtime-import .github/workflows/shared/go-source-analysis.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -305,12 +309,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/go-source-analysis.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/semantic-function-refactor.md}} GH_AW_PROMPT_6d0cd0a2e1747309_EOF diff --git a/.github/workflows/sergo.lock.yml b/.github/workflows/sergo.lock.yml index 421f8ad1949..4361279bf0b 100644 --- a/.github/workflows/sergo.lock.yml +++ b/.github/workflows/sergo.lock.yml @@ -279,6 +279,9 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_17fa62a3d958a42a_EOF' + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -308,11 +311,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/sergo.md}} GH_AW_PROMPT_17fa62a3d958a42a_EOF diff --git a/.github/workflows/smoke-codex.lock.yml b/.github/workflows/smoke-codex.lock.yml index 3a211ca77e9..c27debabbbb 100644 --- a/.github/workflows/smoke-codex.lock.yml +++ b/.github/workflows/smoke-codex.lock.yml @@ -361,6 +361,12 @@ jobs: fi cat << 'GH_AW_PROMPT_479fc79ff32e5a25_EOF' + {{#runtime-import .github/workflows/shared/gh.md}} + {{#runtime-import .github/workflows/shared/reporting-otlp.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/trufflehog.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -390,14 +396,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/gh.md}} - {{#runtime-import .github/workflows/shared/reporting-otlp.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/trufflehog.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/smoke-codex.md}} GH_AW_PROMPT_479fc79ff32e5a25_EOF @@ -1832,18 +1830,18 @@ jobs: DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e CODEX_HOME -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.22' - cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_MCP_CONFIG_8f5736782e20f8ae_EOF + cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_MCP_CONFIG_cd6ebfec93095260_EOF [history] persistence = "none" [shell_environment_policy] inherit = "core" include_only = ["^CODEX_API_KEY$", "^HOME$", "^OPENAI_API_KEY$", "^PATH$"] - GH_AW_MCP_CONFIG_8f5736782e20f8ae_EOF + GH_AW_MCP_CONFIG_cd6ebfec93095260_EOF # Generate JSON config for MCP gateway GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_d559300266291563_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_b874af94f201ff0c_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { }, @@ -1854,11 +1852,11 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_d559300266291563_EOF + GH_AW_MCP_CONFIG_b874af94f201ff0c_EOF # Sync converter output to writable CODEX_HOME for Codex mkdir -p /tmp/gh-aw/mcp-config - cat > "/tmp/gh-aw/mcp-config/config.toml" << GH_AW_CODEX_SHELL_POLICY_fce8fa0b96c34f62_EOF + cat > "/tmp/gh-aw/mcp-config/config.toml" << GH_AW_CODEX_SHELL_POLICY_39020c61de70a8d8_EOF model_provider = "openai-proxy" [model_providers.openai-proxy] name = "OpenAI AWF proxy" @@ -1868,7 +1866,7 @@ jobs: [shell_environment_policy] inherit = "core" include_only = ["^CODEX_API_KEY$", "^HOME$", "^OPENAI_API_KEY$", "^PATH$"] - GH_AW_CODEX_SHELL_POLICY_fce8fa0b96c34f62_EOF + GH_AW_CODEX_SHELL_POLICY_39020c61de70a8d8_EOF awk ' BEGIN { skip_openai_proxy = 0 } /^[[:space:]]*model_provider[[:space:]]*=/ { next } diff --git a/.github/workflows/smoke-copilot-arm.lock.yml b/.github/workflows/smoke-copilot-arm.lock.yml index 144b4a49a14..072ed54769b 100644 --- a/.github/workflows/smoke-copilot-arm.lock.yml +++ b/.github/workflows/smoke-copilot-arm.lock.yml @@ -341,6 +341,12 @@ jobs: fi cat << 'GH_AW_PROMPT_d73e602c49237f7e_EOF' + {{#runtime-import .github/workflows/shared/gh.md}} + {{#runtime-import .github/workflows/shared/reporting-otlp.md}} + {{#runtime-import .github/workflows/shared/github-queries-mcp-script.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -370,14 +376,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/gh.md}} - {{#runtime-import .github/workflows/shared/reporting-otlp.md}} - {{#runtime-import .github/workflows/shared/github-queries-mcp-script.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/smoke-copilot-arm.md}} GH_AW_PROMPT_d73e602c49237f7e_EOF diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 851eaeac423..1eac71ae725 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -396,6 +396,12 @@ jobs: fi cat << 'GH_AW_PROMPT_0615b82f3f878597_EOF' + {{#runtime-import .github/workflows/shared/github-guard-policy.md}} + {{#runtime-import .github/workflows/shared/gh.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} + {{#runtime-import .github/workflows/shared/github-queries-mcp-script.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -425,14 +431,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/github-guard-policy.md}} - {{#runtime-import .github/workflows/shared/gh.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} - {{#runtime-import .github/workflows/shared/github-queries-mcp-script.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/smoke-copilot.md}} GH_AW_PROMPT_0615b82f3f878597_EOF diff --git a/.github/workflows/spec-extractor.lock.yml b/.github/workflows/spec-extractor.lock.yml index b8b43b7c86d..a5795a34f62 100644 --- a/.github/workflows/spec-extractor.lock.yml +++ b/.github/workflows/spec-extractor.lock.yml @@ -276,6 +276,10 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_458c291fa83543e9_EOF' + {{#runtime-import .github/workflows/shared/reporting.md}} + {{#runtime-import .github/workflows/shared/go-source-analysis.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -305,12 +309,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/reporting.md}} - {{#runtime-import .github/workflows/shared/go-source-analysis.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/spec-extractor.md}} GH_AW_PROMPT_458c291fa83543e9_EOF diff --git a/.github/workflows/spec-librarian.lock.yml b/.github/workflows/spec-librarian.lock.yml index bf69dbb38c5..d654f8239b9 100644 --- a/.github/workflows/spec-librarian.lock.yml +++ b/.github/workflows/spec-librarian.lock.yml @@ -277,6 +277,11 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_c659d7e9509624e8_EOF' + {{#runtime-import .github/workflows/shared/go-source-analysis.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/activation-app.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -306,13 +311,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/go-source-analysis.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/activation-app.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/spec-librarian.md}} GH_AW_PROMPT_c659d7e9509624e8_EOF diff --git a/.github/workflows/static-analysis-report.lock.yml b/.github/workflows/static-analysis-report.lock.yml index e87a32ce4f7..b2f52d3f53b 100644 --- a/.github/workflows/static-analysis-report.lock.yml +++ b/.github/workflows/static-analysis-report.lock.yml @@ -281,8 +281,6 @@ jobs: cat << 'GH_AW_PROMPT_60632fbb838b88ae_EOF' **IMPORTANT**: When analyzing agentic workflows, use the `agentic-workflows` tool to read workflow files. - - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/otlp.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} diff --git a/.github/workflows/terminal-stylist.lock.yml b/.github/workflows/terminal-stylist.lock.yml index 885ec8c92d6..0bdd1eb3d55 100644 --- a/.github/workflows/terminal-stylist.lock.yml +++ b/.github/workflows/terminal-stylist.lock.yml @@ -277,6 +277,9 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_26941f1d29419a55_EOF' + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -306,11 +309,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/terminal-stylist.md}} GH_AW_PROMPT_26941f1d29419a55_EOF diff --git a/.github/workflows/typist.lock.yml b/.github/workflows/typist.lock.yml index f162363e8ed..3a85d12597f 100644 --- a/.github/workflows/typist.lock.yml +++ b/.github/workflows/typist.lock.yml @@ -314,6 +314,9 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md" cat << 'GH_AW_PROMPT_4255cddbcf4906ed_EOF' + {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} + {{#runtime-import .github/workflows/shared/otlp.md}} + {{#runtime-import .github/workflows/shared/reporting.md}} ## Serena Code Analysis The Serena MCP server is configured for **["go"]** analysis in this workspace: @@ -343,11 +346,6 @@ jobs: 2. **Activate project first** — always call `activate_project` before other tools 3. **Cross-reference findings** — validate with multiple tools for accuracy 4. **Focus on the relevant language files** — ignore unrelated file types - - - {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} - {{#runtime-import .github/workflows/shared/otlp.md}} - {{#runtime-import .github/workflows/shared/reporting.md}} {{#runtime-import .github/workflows/shared/noop-reminder.md}} {{#runtime-import .github/workflows/typist.md}} GH_AW_PROMPT_4255cddbcf4906ed_EOF diff --git a/pkg/parser/import_bfs.go b/pkg/parser/import_bfs.go index 50badae8d49..77f1c720c54 100644 --- a/pkg/parser/import_bfs.go +++ b/pkg/parser/import_bfs.go @@ -248,6 +248,7 @@ func handleAgentImportItem(item importQueueItem, state *importBFSState) (bool, e importRelPath := assignAgentFilePath(state.acc, fullPathSlash, item.importPath, item.fullPath) if len(item.inputs) == 0 { state.acc.importPaths = append(state.acc.importPaths, importRelPath) + state.acc.promptImports = append(state.acc.promptImports, PromptImportEntry{ImportPath: importRelPath}) parserLog.Printf("Added agent import path for runtime-import: %s", importRelPath) return true, nil } @@ -257,6 +258,7 @@ func handleAgentImportItem(item importQueueItem, state *importBFSState) (bool, e return true, fmt.Errorf("failed to process markdown from agent file '%s': %w", item.fullPath, err) } appendMarkdownWithSeparator(&state.acc.markdownBuilder, markdownContent) + state.acc.promptImports = append(state.acc.promptImports, PromptImportEntry{Markdown: markdownContent}) return true, nil } diff --git a/pkg/parser/import_field_extractor.go b/pkg/parser/import_field_extractor.go index 9e778a293a0..ae6a8edbad7 100644 --- a/pkg/parser/import_field_extractor.go +++ b/pkg/parser/import_field_extractor.go @@ -23,6 +23,7 @@ type importAccumulator struct { mcpServersBuilder strings.Builder markdownBuilder strings.Builder // imports with substituted inputs or schema defaults (compile-time substitution) importPaths []string // Import paths for runtime-import macro generation + promptImports []PromptImportEntry stepsBuilder strings.Builder copilotSetupStepsBuilder strings.Builder // Steps from copilot-setup-steps.yml (inserted at start) preStepsBuilder strings.Builder @@ -235,6 +236,7 @@ func (acc *importAccumulator) extractToolsContent(rawContent string, item import func (acc *importAccumulator) trackRuntimeOrInlineImport(fullPath, importRelPath, rawContent string, wasSubstituted bool) error { if !wasSubstituted && !strings.HasPrefix(importRelPath, BuiltinPathPrefix) { acc.importPaths = append(acc.importPaths, importRelPath) + acc.promptImports = append(acc.promptImports, PromptImportEntry{ImportPath: importRelPath}) parserLog.Printf("Added import path for runtime-import: %s", importRelPath) return nil } @@ -247,6 +249,7 @@ func (acc *importAccumulator) trackRuntimeOrInlineImport(fullPath, importRelPath return fmt.Errorf("failed to extract markdown from imported file '%s': %w", fullPath, err) } appendMarkdownWithSeparator(&acc.markdownBuilder, markdownContent) + acc.promptImports = append(acc.promptImports, PromptImportEntry{Markdown: markdownContent}) return nil } @@ -694,6 +697,7 @@ func (acc *importAccumulator) toImportsResult(topologicalOrder []string) *Import MergedMCPScripts: acc.mcpScripts, MergedMarkdown: acc.markdownBuilder.String(), ImportPaths: acc.importPaths, + PromptImports: acc.promptImports, MergedSteps: acc.stepsBuilder.String(), CopilotSetupSteps: acc.copilotSetupStepsBuilder.String(), MergedPreSteps: acc.preStepsBuilder.String(), diff --git a/pkg/parser/import_processor.go b/pkg/parser/import_processor.go index 8b5f4be02ff..bb3dad84957 100644 --- a/pkg/parser/import_processor.go +++ b/pkg/parser/import_processor.go @@ -15,6 +15,13 @@ import ( var importLog = logger.New("parser:import_processor") +// PromptImportEntry describes one import contribution to prompt assembly, preserving +// import declaration order across runtime-import and compile-time inlined markdown. +type PromptImportEntry struct { + ImportPath string // Non-empty when this import should be emitted as {{#runtime-import ...}} + Markdown string // Non-empty when this import should be inlined into the prompt at compile time +} + // ImportsResult holds the result of processing imports from frontmatter type ImportsResult struct { MergedTools string // Merged tools configuration from all imports @@ -24,6 +31,7 @@ type ImportsResult struct { MergedMCPScripts []string // Merged mcp-scripts configurations from all imports MergedMarkdown string // Only contains imports WITH inputs (for compile-time substitution) ImportPaths []string // List of import file paths for runtime-import macro generation (replaces MergedMarkdown) + PromptImports []PromptImportEntry // Ordered import prompt contributions (runtime-import and inlined markdown interleaved) MergedSteps string // Merged steps configuration from all imports (excluding copilot-setup-steps) CopilotSetupSteps string // Steps from copilot-setup-steps.yml (inserted at start) MergedPreSteps string // Merged pre-steps configuration from all imports (prepended in order) diff --git a/pkg/workflow/compiler_orchestrator_tools.go b/pkg/workflow/compiler_orchestrator_tools.go index 63b27787675..1927154cd88 100644 --- a/pkg/workflow/compiler_orchestrator_tools.go +++ b/pkg/workflow/compiler_orchestrator_tools.go @@ -24,8 +24,9 @@ type toolsProcessingResult struct { markdownContent string importedMarkdown string // Only imports WITH inputs (for compile-time substitution) importPaths []string // Import paths for runtime-import macro generation (imports without inputs) - mainWorkflowMarkdown string // main workflow markdown without imports (for runtime-import) - rawMainMarkdown string // raw main markdown before include expansion, without inline sub-agent sections + promptImports []parser.PromptImportEntry + mainWorkflowMarkdown string // main workflow markdown without imports (for runtime-import) + rawMainMarkdown string // raw main markdown before include expansion, without inline sub-agent sections allIncludedFiles []string workflowName string frontmatterName string @@ -89,6 +90,7 @@ func (c *Compiler) processToolsAndMarkdown(result *parser.FrontmatterResult, cle markdownContent: markdownData.markdownContent, importedMarkdown: markdownData.importedMarkdown, importPaths: markdownData.importPaths, + promptImports: markdownData.promptImports, mainWorkflowMarkdown: markdownData.mainWorkflowMarkdown, rawMainMarkdown: effectiveMarkdown, allIncludedFiles: markdownData.allIncludedFiles, @@ -124,6 +126,7 @@ type markdownArtifacts struct { markdownContent string importedMarkdown string importPaths []string + promptImports []parser.PromptImportEntry mainWorkflowMarkdown string allIncludedFiles []string workflowName string @@ -331,6 +334,7 @@ func (c *Compiler) resolveMarkdownArtifacts( mainWorkflowMarkdown := markdownContent orchestratorToolsLog.Printf("Main workflow markdown: %d bytes", len(mainWorkflowMarkdown)) importPaths := append([]string{}, importsResult.ImportPaths...) + promptImports := append([]parser.PromptImportEntry(nil), importsResult.PromptImports...) if len(importPaths) > 0 { orchestratorToolsLog.Printf("Found %d import paths for runtime-import macros", len(importPaths)) } @@ -339,6 +343,7 @@ func (c *Compiler) resolveMarkdownArtifacts( orchestratorToolsLog.Printf("Found %d body-level {{#runtime-import}} directive(s) to promote to lock-file macros", len(bodyImports)) for _, bodyImport := range bodyImports { importPaths = append(importPaths, bodyImport.Path) + promptImports = append(promptImports, parser.PromptImportEntry{ImportPath: bodyImport.Path}) } } importedMarkdown := "" @@ -364,6 +369,7 @@ func (c *Compiler) resolveMarkdownArtifacts( markdownContent: markdownContent, importedMarkdown: importedMarkdown, importPaths: importPaths, + promptImports: promptImports, mainWorkflowMarkdown: mainWorkflowMarkdown, allIncludedFiles: mergeAndSortIncludedFiles(includedToolFiles, includedMarkdownFiles), workflowName: workflowName, diff --git a/pkg/workflow/compiler_types.go b/pkg/workflow/compiler_types.go index 67393ff935d..3f01388d3d2 100644 --- a/pkg/workflow/compiler_types.go +++ b/pkg/workflow/compiler_types.go @@ -460,6 +460,7 @@ type WorkflowData struct { ImportedFiles []string // list of files imported via imports field (rendered as comment in lock file) ImportedMarkdown string // Only imports WITH inputs (for compile-time substitution) ImportPaths []string // Import file paths for runtime-import macro generation (imports without inputs) + PromptImports []parser.PromptImportEntry MainWorkflowMarkdown string // main workflow markdown without imports (for runtime-import) IncludedFiles []string // list of files included via @include directives (rendered as comment in lock file) ImportInputs map[string]any // input values from imports with inputs (for github.aw.inputs.* substitution) diff --git a/pkg/workflow/compiler_yaml.go b/pkg/workflow/compiler_yaml.go index 5de876aa11c..f4c1559989f 100644 --- a/pkg/workflow/compiler_yaml.go +++ b/pkg/workflow/compiler_yaml.go @@ -483,36 +483,35 @@ func (c *Compiler) generatePrompt(yaml *strings.Builder, data *WorkflowData, pre var userPromptChunks []string var expressionMappings []*ExpressionMapping - // Step 1a: Process and inline imported markdown with inputs (if any) - // Imports with inputs MUST be inlined because substitution happens at compile time - if data.ImportedMarkdown != "" { - compilerYamlLog.Printf("Processing imported markdown (%d bytes)", len(data.ImportedMarkdown)) - - // Clean, substitute, and post-process imported markdown - cleaned := removeXMLComments(data.ImportedMarkdown) - if len(data.ImportInputs) > 0 { - compilerYamlLog.Printf("Substituting %d import input values", len(data.ImportInputs)) - cleaned = SubstituteImportInputs(cleaned, data.ImportInputs) - } - chunks, exprMaps := extractPromptChunksFromMarkdown(cleaned) - userPromptChunks = append(userPromptChunks, chunks...) - expressionMappings = exprMaps - compilerYamlLog.Printf("Inlined imported markdown with inputs in %d chunks", len(chunks)) - } - - // Step 1b: For imports without inputs: - // - inlinedImports mode (inlined-imports: true frontmatter): read and inline content at compile time - // - normal mode: generate runtime-import macros (loaded at runtime) - if len(data.ImportPaths) > 0 { + // Step 1a/1b: Process imports in declaration order, interleaving: + // - compile-time inlined markdown (imports with inputs) + // - runtime-import macros (imports without inputs) + // In older workflow data (without PromptImports), fall back to legacy grouped handling. + if len(data.PromptImports) > 0 { + compilerYamlLog.Printf("Processing %d ordered prompt import entries", len(data.PromptImports)) + workspaceRoot := "" + hasImportInputs := len(data.ImportInputs) > 0 if data.InlinedImports && c.markdownPath != "" { - // inlinedImports mode: read import file content from disk and embed directly - compilerYamlLog.Printf("Inlining %d imports without inputs at compile time", len(data.ImportPaths)) - workspaceRoot := resolveWorkspaceRoot(c.markdownPath) - for _, importPath := range data.ImportPaths { - importPath = filepath.ToSlash(importPath) + workspaceRoot = resolveWorkspaceRoot(c.markdownPath) + } + for _, entry := range data.PromptImports { + if entry.Markdown != "" { + cleaned := removeXMLComments(entry.Markdown) + if hasImportInputs { + cleaned = SubstituteImportInputs(cleaned, data.ImportInputs) + } + chunks, exprMaps := extractPromptChunksFromMarkdown(cleaned) + userPromptChunks = append(userPromptChunks, chunks...) + expressionMappings = append(expressionMappings, exprMaps...) + continue + } + if entry.ImportPath == "" { + continue + } + importPath := filepath.ToSlash(entry.ImportPath) + if workspaceRoot != "" { rawContent, err := os.ReadFile(filepath.Join(workspaceRoot, importPath)) if err != nil { - // Fall back to runtime-import macro if file cannot be read compilerYamlLog.Printf("Warning: failed to read import file %s (%v), falling back to runtime-import", importPath, err) userPromptChunks = append(userPromptChunks, fmt.Sprintf("{{#runtime-import %s}}", importPath)) continue @@ -524,15 +523,62 @@ func (c *Compiler) generatePrompt(yaml *strings.Builder, data *WorkflowData, pre chunks, exprMaps := extractPromptChunksFromMarkdown(importedBody) userPromptChunks = append(userPromptChunks, chunks...) expressionMappings = append(expressionMappings, exprMaps...) - compilerYamlLog.Printf("Inlined import without inputs: %s", importPath) + continue } - } else { - // Normal mode: generate runtime-import macros (loaded at workflow runtime) - compilerYamlLog.Printf("Generating runtime-import macros for %d imports without inputs", len(data.ImportPaths)) - for _, importPath := range data.ImportPaths { - importPath = filepath.ToSlash(importPath) - userPromptChunks = append(userPromptChunks, fmt.Sprintf("{{#runtime-import %s}}", importPath)) - compilerYamlLog.Printf("Added runtime-import macro for: %s", importPath) + userPromptChunks = append(userPromptChunks, fmt.Sprintf("{{#runtime-import %s}}", importPath)) + } + } else { + // Step 1a: Process and inline imported markdown with inputs (if any) + // Imports with inputs MUST be inlined because substitution happens at compile time + if data.ImportedMarkdown != "" { + compilerYamlLog.Printf("Processing imported markdown (%d bytes)", len(data.ImportedMarkdown)) + + // Clean, substitute, and post-process imported markdown + cleaned := removeXMLComments(data.ImportedMarkdown) + if len(data.ImportInputs) > 0 { + compilerYamlLog.Printf("Substituting %d import input values", len(data.ImportInputs)) + cleaned = SubstituteImportInputs(cleaned, data.ImportInputs) + } + chunks, exprMaps := extractPromptChunksFromMarkdown(cleaned) + userPromptChunks = append(userPromptChunks, chunks...) + expressionMappings = append(expressionMappings, exprMaps...) + compilerYamlLog.Printf("Inlined imported markdown with inputs in %d chunks", len(chunks)) + } + + // Step 1b: For imports without inputs: + // - inlinedImports mode (inlined-imports: true frontmatter): read and inline content at compile time + // - normal mode: generate runtime-import macros (loaded at runtime) + if len(data.ImportPaths) > 0 { + if data.InlinedImports && c.markdownPath != "" { + // inlinedImports mode: read import file content from disk and embed directly + compilerYamlLog.Printf("Inlining %d imports without inputs at compile time", len(data.ImportPaths)) + workspaceRoot := resolveWorkspaceRoot(c.markdownPath) + for _, importPath := range data.ImportPaths { + importPath = filepath.ToSlash(importPath) + rawContent, err := os.ReadFile(filepath.Join(workspaceRoot, importPath)) + if err != nil { + // Fall back to runtime-import macro if file cannot be read + compilerYamlLog.Printf("Warning: failed to read import file %s (%v), falling back to runtime-import", importPath, err) + userPromptChunks = append(userPromptChunks, fmt.Sprintf("{{#runtime-import %s}}", importPath)) + continue + } + importedBody, extractErr := parser.ExtractMarkdownContent(string(rawContent)) + if extractErr != nil { + importedBody = string(rawContent) + } + chunks, exprMaps := extractPromptChunksFromMarkdown(importedBody) + userPromptChunks = append(userPromptChunks, chunks...) + expressionMappings = append(expressionMappings, exprMaps...) + compilerYamlLog.Printf("Inlined import without inputs: %s", importPath) + } + } else { + // Normal mode: generate runtime-import macros (loaded at workflow runtime) + compilerYamlLog.Printf("Generating runtime-import macros for %d imports without inputs", len(data.ImportPaths)) + for _, importPath := range data.ImportPaths { + importPath = filepath.ToSlash(importPath) + userPromptChunks = append(userPromptChunks, fmt.Sprintf("{{#runtime-import %s}}", importPath)) + compilerYamlLog.Printf("Added runtime-import macro for: %s", importPath) + } } } } diff --git a/pkg/workflow/engine_agent_import_test.go b/pkg/workflow/engine_agent_import_test.go index 65148ff7cc4..4307037a545 100644 --- a/pkg/workflow/engine_agent_import_test.go +++ b/pkg/workflow/engine_agent_import_test.go @@ -7,6 +7,8 @@ import ( "path/filepath" "strings" "testing" + + "github.com/github/gh-aw/pkg/parser" ) // TestCopilotEngineWithAgentFromEngineConfig tests that copilot engine includes --agent flag when specified in engine.agent @@ -682,3 +684,62 @@ func TestCompilerIncludesAgentFileViaImportPaths(t *testing.T) { t.Errorf("Agent file runtime-import macro must appear before main workflow macro in prompt:\n%s", generated) } } + +func TestGeneratePromptFallsBackWhenPromptImportsIsEmpty(t *testing.T) { + tmpDir := t.TempDir() + workflowFile := filepath.Join(tmpDir, ".github", "workflows", "test.md") + if err := os.MkdirAll(filepath.Dir(workflowFile), 0o755); err != nil { + t.Fatalf("Failed to create workflow directory: %v", err) + } + if err := os.WriteFile(workflowFile, []byte("# Main workflow\n"), 0o644); err != nil { + t.Fatalf("Failed to write workflow file: %v", err) + } + + workflowData := &WorkflowData{ + Name: "test-workflow", + AI: "claude", + EngineConfig: &EngineConfig{ID: "claude"}, + ImportedMarkdown: "Legacy parameterized content.", + ImportPaths: []string{"shared/legacy.md"}, + PromptImports: []parser.PromptImportEntry{}, + } + + compiler := NewCompiler() + compiler.markdownPath = workflowFile + + var buf strings.Builder + compiler.generatePrompt(&buf, workflowData, false, nil) + generated := buf.String() + + if !strings.Contains(generated, "Legacy parameterized content.") { + t.Fatalf("Expected legacy ImportedMarkdown content to be emitted when PromptImports is empty, got:\n%s", generated) + } + if !strings.Contains(generated, "{{#runtime-import shared/legacy.md}}") { + t.Fatalf("Expected legacy ImportPaths runtime macro to be emitted when PromptImports is empty, got:\n%s", generated) + } +} + +func TestResolveMarkdownArtifactsPreservesNilPromptImports(t *testing.T) { + tmpDir := t.TempDir() + workflowPath := filepath.Join(tmpDir, "test.md") + if err := os.WriteFile(workflowPath, []byte("# Test\n"), 0o644); err != nil { + t.Fatalf("Failed to write workflow file: %v", err) + } + + compiler := NewCompiler() + artifacts, err := compiler.resolveMarkdownArtifacts( + "# Test", + tmpDir, + workflowPath, + &parser.FrontmatterResult{Frontmatter: map[string]any{}}, + &parser.ImportsResult{}, + nil, + ) + if err != nil { + t.Fatalf("resolveMarkdownArtifacts returned error: %v", err) + } + + if artifacts.promptImports != nil { + t.Fatalf("Expected promptImports to remain nil when source PromptImports is nil, got %#v", artifacts.promptImports) + } +} diff --git a/pkg/workflow/imports_inputs_test.go b/pkg/workflow/imports_inputs_test.go index b4dcfe6fe50..a0a592b5798 100644 --- a/pkg/workflow/imports_inputs_test.go +++ b/pkg/workflow/imports_inputs_test.go @@ -206,6 +206,92 @@ Consumer workflow. } } +func TestImportPromptOrderInterleavesRuntimeAndParameterizedImports(t *testing.T) { + tempDir := testutil.TempDir(t, "test-import-order-*") + + sharedDir := filepath.Join(tempDir, "shared") + if err := os.MkdirAll(sharedDir, 0755); err != nil { + t.Fatalf("Failed to create shared directory: %v", err) + } + + runtimeImportPath := filepath.Join(sharedDir, "infra.md") + runtimeImportContent := `--- +steps: + - name: Setup + run: echo setup +--- + +# Infrastructure Setup + +Ensure environment is ready.` + if err := os.WriteFile(runtimeImportPath, []byte(runtimeImportContent), 0o644); err != nil { + t.Fatalf("Failed to write runtime import file: %v", err) + } + + parameterizedImportPath := filepath.Join(sharedDir, "instructions.md") + parameterizedImportContent := `--- +import-schema: + mode: + type: string + required: true +--- + +# Mode Instructions + +Use mode: ${{ github.aw.import-inputs.mode }}.` + if err := os.WriteFile(parameterizedImportPath, []byte(parameterizedImportContent), 0o644); err != nil { + t.Fatalf("Failed to write parameterized import file: %v", err) + } + + workflowPath := filepath.Join(tempDir, "order-workflow.md") + workflowContent := `--- +on: issues +permissions: + contents: read + issues: read +engine: copilot +imports: + - shared/infra.md + - uses: shared/instructions.md + with: + mode: strict +--- + +# Main Workflow + +Handle the issue.` + if err := os.WriteFile(workflowPath, []byte(workflowContent), 0o644); err != nil { + t.Fatalf("Failed to write workflow file: %v", err) + } + + compiler := workflow.NewCompiler() + if err := compiler.CompileWorkflow(workflowPath); err != nil { + t.Fatalf("CompileWorkflow failed: %v", err) + } + + lockFilePath := stringutil.MarkdownToLockFile(workflowPath) + lockFileContent, err := os.ReadFile(lockFilePath) + if err != nil { + t.Fatalf("Failed to read lock file: %v", err) + } + lockContent := string(lockFileContent) + + runtimeMacro := "{{#runtime-import shared/infra.md}}" + parameterizedContent := "Use mode: strict." + + runtimeIdx := strings.Index(lockContent, runtimeMacro) + if runtimeIdx == -1 { + t.Fatalf("Expected lock file to contain %q", runtimeMacro) + } + parameterizedIdx := strings.Index(lockContent, parameterizedContent) + if parameterizedIdx == -1 { + t.Fatalf("Expected lock file to contain substituted parameterized import content %q", parameterizedContent) + } + if runtimeIdx > parameterizedIdx { + t.Fatalf("Expected runtime import macro to appear before parameterized import content (runtimeIdx=%d, parameterizedIdx=%d)", runtimeIdx, parameterizedIdx) + } +} + // TestImportWithInputsStringFormat tests that string import format still works func TestImportWithInputsStringFormat(t *testing.T) { // Create a temporary directory for test files diff --git a/pkg/workflow/workflow_builder.go b/pkg/workflow/workflow_builder.go index 6e56062c23c..051e339bf9c 100644 --- a/pkg/workflow/workflow_builder.go +++ b/pkg/workflow/workflow_builder.go @@ -46,6 +46,7 @@ func (c *Compiler) buildInitialWorkflowData( ImportedFiles: importsResult.ImportedFiles, ImportedMarkdown: toolsResult.importedMarkdown, // Only imports WITH inputs ImportPaths: toolsResult.importPaths, // Import paths for runtime-import macros (imports without inputs) + PromptImports: toolsResult.promptImports, // Ordered prompt contributions from imports MainWorkflowMarkdown: toolsResult.mainWorkflowMarkdown, IncludedFiles: toolsResult.allIncludedFiles, ImportInputs: importsResult.ImportInputs,