From 201ceb3a08f1759c5c7e28364c2cc4c0e8113c5c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 05:42:04 +0000 Subject: [PATCH 1/3] Initial plan From 4898ef5a4ca180fd80b56bdbf7c634efc0fd2120 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 05:54:23 +0000 Subject: [PATCH 2/3] fix: add skill-optimizer prerequisites and preflight validation Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f9e02e63-3681-4adc-87b1-290b8cfe43f8 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .../workflows/daily-skill-optimizer.lock.yml | 33 +++++++++------- .github/workflows/daily-skill-optimizer.md | 8 ++++ .skill-optimizer/skill-optimizer.json | 37 ++++++++++++++++++ AGENTS.md | 8 ++++ SKILL.md | 39 +++++++++++++++++++ 5 files changed, 112 insertions(+), 13 deletions(-) create mode 100644 .skill-optimizer/skill-optimizer.json create mode 100644 SKILL.md diff --git a/.github/workflows/daily-skill-optimizer.lock.yml b/.github/workflows/daily-skill-optimizer.lock.yml index b4dfe302d8e..dc7910fad6d 100644 --- a/.github/workflows/daily-skill-optimizer.lock.yml +++ b/.github/workflows/daily-skill-optimizer.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"a6ac38ab7f6d8b141afb0fff7a780b2832d8b9da71c06090e56a6ec6e3ee4fe4","strict":true,"agent_id":"copilot"} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"550699c424440a782f2664cc7c8ebf944402e57fd1229be37c90c9f9c705bd2a","strict":true,"agent_id":"copilot"} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN","OPENROUTER_API_KEY"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/setup-node","sha":"53b83947a5a98c8d113130e565377fae1a50d02f","version":"v6.3.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.28","digest":"sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.28@sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.28","digest":"sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.28@sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.28","digest":"sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.28@sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.2.30","digest":"sha256:e950e6d39f003862d33bfb8d4eb93e242d919cf6ca874b90728e5e0ea7434c6f","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.2.30@sha256:e950e6d39f003862d33bfb8d4eb93e242d919cf6ca874b90728e5e0ea7434c6f"},{"image":"ghcr.io/github/github-mcp-server:v1.0.0","digest":"sha256:d2550953f8050bc5a1c8f80d1678766f66f60bbfbcd953fdeaf661fe4269bd95","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.0@sha256:d2550953f8050bc5a1c8f80d1678766f66f60bbfbcd953fdeaf661fe4269bd95"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} # ___ _ _ # / _ \ | | (_) @@ -173,20 +173,20 @@ jobs: run: | bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" { - cat << 'GH_AW_PROMPT_c804fac298e3a4d3_EOF' + cat << 'GH_AW_PROMPT_1840c13ed866fb6d_EOF' - GH_AW_PROMPT_c804fac298e3a4d3_EOF + GH_AW_PROMPT_1840c13ed866fb6d_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_c804fac298e3a4d3_EOF' + cat << 'GH_AW_PROMPT_1840c13ed866fb6d_EOF' Tools: create_issue, missing_tool, missing_data, noop - GH_AW_PROMPT_c804fac298e3a4d3_EOF + GH_AW_PROMPT_1840c13ed866fb6d_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_c804fac298e3a4d3_EOF' + cat << 'GH_AW_PROMPT_1840c13ed866fb6d_EOF' The following GitHub context information is available for this workflow: {{#if __GH_AW_GITHUB_ACTOR__ }} @@ -215,12 +215,12 @@ jobs: {{/if}} - GH_AW_PROMPT_c804fac298e3a4d3_EOF + GH_AW_PROMPT_1840c13ed866fb6d_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" - cat << 'GH_AW_PROMPT_c804fac298e3a4d3_EOF' + cat << 'GH_AW_PROMPT_1840c13ed866fb6d_EOF' {{#runtime-import .github/workflows/daily-skill-optimizer.md}} - GH_AW_PROMPT_c804fac298e3a4d3_EOF + GH_AW_PROMPT_1840c13ed866fb6d_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 @@ -410,9 +410,9 @@ jobs: mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_9c39c3bfef47ec35_EOF' + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_6045609e54783901_EOF' {"create_issue":{"expires":168,"labels":["automation","documentation","prompt-quality"],"max":1,"title_prefix":"[skill-optimizer] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{}} - GH_AW_SAFE_OUTPUTS_CONFIG_9c39c3bfef47ec35_EOF + GH_AW_SAFE_OUTPUTS_CONFIG_6045609e54783901_EOF - name: Write Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | @@ -611,7 +611,7 @@ jobs: mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_e99c6906eac3879c_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_7c2b4fa6007aa509_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { @@ -652,7 +652,7 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_e99c6906eac3879c_EOF + GH_AW_MCP_CONFIG_7c2b4fa6007aa509_EOF - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true @@ -1302,6 +1302,13 @@ jobs: uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: node-version: "24" + - name: Validate SKILL.md exists + run: | + if [ ! -f SKILL.md ]; then + echo "::error file=SKILL.md::SKILL.md is required by skill-optimizer. See .skill-optimizer/skill-optimizer.json for setup instructions." + exit 1 + fi + shell: bash - name: Run skill-optimizer id: run_skill_optimizer run: | diff --git a/.github/workflows/daily-skill-optimizer.md b/.github/workflows/daily-skill-optimizer.md index 174f80cab6d..73cfc49abde 100644 --- a/.github/workflows/daily-skill-optimizer.md +++ b/.github/workflows/daily-skill-optimizer.md @@ -34,6 +34,14 @@ jobs: with: node-version: "24" + - name: Validate SKILL.md exists + shell: bash + run: | + if [ ! -f SKILL.md ]; then + echo "::error file=SKILL.md::SKILL.md is required by skill-optimizer. See .skill-optimizer/skill-optimizer.json for setup instructions." + exit 1 + fi + - name: Run skill-optimizer id: run_skill_optimizer shell: bash diff --git a/.skill-optimizer/skill-optimizer.json b/.skill-optimizer/skill-optimizer.json new file mode 100644 index 00000000000..33a5d14a128 --- /dev/null +++ b/.skill-optimizer/skill-optimizer.json @@ -0,0 +1,37 @@ +{ + "name": "gh-aw", + "target": { + "surface": "prompt", + "repoPath": "..", + "skill": "../SKILL.md" + }, + "benchmark": { + "format": "pi", + "timeout": 240000, + "taskGeneration": { + "enabled": true, + "maxTasks": 10, + "outputDir": "." + }, + "models": [ + { + "id": "openrouter/anthropic/claude-sonnet-4.6", + "name": "Claude Sonnet 4.6", + "tier": "flagship" + } + ], + "output": { + "dir": "../benchmark-results" + }, + "verdict": { + "perModelFloor": 0.6000000000000001, + "targetWeightedAverage": 0.8 + } + }, + "optimize": { + "model": "openrouter/anthropic/claude-sonnet-4.6", + "allowedPaths": ["SKILL.md"], + "validation": [], + "maxIterations": 1 + } +} diff --git a/AGENTS.md b/AGENTS.md index f30d53784a9..728e2746665 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -28,6 +28,14 @@ GitHub Agentic Workflows is a Go-based GitHub CLI extension for writing agentic Each skill provides focused guidance on specific topics. Reference them only as needed rather than loading everything upfront. +## Skill Optimizer Configuration + +The daily skill-optimizer workflow uses the committed config at: + +- `.skill-optimizer/skill-optimizer.json` + +When tuning optimizer behavior (models, maxTasks, maxIterations, pass-rate target), update this file directly in a PR so changes are reviewable. + ## Critical Requirements ### ⚠️ MANDATORY: Always Create a Pull Request ⚠️ diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 00000000000..6c4f09e6609 --- /dev/null +++ b/SKILL.md @@ -0,0 +1,39 @@ +# gh-aw Prompt Surface + +This repository builds **gh-aw** (GitHub Agentic Workflows), a GitHub CLI extension for writing workflows in markdown and compiling them to GitHub Actions. + +## What this surface does + +- Converts markdown workflow specs (`.md`) into compiled lock files (`.lock.yml`) +- Supports multiple AI engines (`copilot`, `claude`, `codex`, `custom`) +- Integrates tools, including GitHub MCP servers and safe-output tooling +- Provides CLI commands to compile, run, inspect, and audit workflows + +## Key concepts + +1. **Workflow compilation**: edit workflow markdown, then recompile lock files +2. **Engine selection**: set `engine` in frontmatter to control runtime agent behavior +3. **MCP tools**: configure GitHub/MCP toolsets in frontmatter for repository operations +4. **Safe outputs**: workflow-safe issue/comment output paths and constraints + +## Representative usage examples + +```bash +# Compile markdown workflows to lock files +gh aw compile + +# Run a workflow manually +gh aw run .github/workflows/daily-skill-optimizer.md + +# Inspect MCP server usage in workflows +gh aw mcp list +gh aw mcp inspect daily-skill-optimizer + +# Audit a workflow run +gh aw audit 24814681146 +``` + +## Where to learn more in this repo + +- `/AGENTS.md` for development/agent workflow conventions +- `/skills/*/SKILL.md` for focused domain guidance (GitHub MCP, docs, errors, etc.) From 729efe947156954d63c9f83d658c454a89c0b014 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 05:59:49 +0000 Subject: [PATCH 3/3] chore: normalize skill optimizer per-model floor value Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f9e02e63-3681-4adc-87b1-290b8cfe43f8 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .skill-optimizer/skill-optimizer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.skill-optimizer/skill-optimizer.json b/.skill-optimizer/skill-optimizer.json index 33a5d14a128..5f6e4c6b7cc 100644 --- a/.skill-optimizer/skill-optimizer.json +++ b/.skill-optimizer/skill-optimizer.json @@ -24,7 +24,7 @@ "dir": "../benchmark-results" }, "verdict": { - "perModelFloor": 0.6000000000000001, + "perModelFloor": 0.6, "targetWeightedAverage": 0.8 } },