Inject agentic-workflows MCP usage guide as a compiler-level builtin prompt#21117
Inject agentic-workflows MCP usage guide as a compiler-level builtin prompt#21117
Conversation
) - Add actions/setup/md/agentic_workflows_guide.md with MCP usage guidance - Add agenticWorkflowsGuideFile constant in prompt_constants.go - Add hasAgenticWorkflowsTool helper in prompts.go - Inject guide in collectPromptSections when agentic-workflows tool is configured - Update smoke-copilot golden file - Add tests for inclusion/exclusion of the guide - Recompile all 173 lock files Co-authored-by: pelikhan <[email protected]>
There was a problem hiding this comment.
Pull request overview
Injects a canonical agentic-workflows MCP usage guide into the unified runtime prompt at compile time whenever the agentic-workflows tool is enabled, eliminating duplicated prompt text across workflows.
Changes:
- Added a new runtime prompt file (
agentic_workflows_guide.md) and wired it into prompt generation via a new constant and tool-detection helper. - Updated unified prompt section collection to inject the guide when
agentic-workflowsis enabled. - Updated golden output and regenerated affected
.lock.ymlworkflows; added unit tests to verify inclusion/exclusion.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/md/agentic_workflows_guide.md | Adds the canonical agentic-workflows MCP usage guide prompt content. |
| pkg/workflow/prompt_constants.go | Adds a constant for the new guide prompt filename. |
| pkg/workflow/prompts.go | Adds hasAgenticWorkflowsTool() helper for detecting tool enablement. |
| pkg/workflow/unified_prompt_step.go | Injects the guide as a new prompt section when agentic-workflows is enabled. |
| pkg/workflow/prompts_test.go | Adds tests verifying the guide is included/excluded based on tool configuration. |
| pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/smoke-copilot.golden | Updates golden output to include the new prompt file concatenation. |
| .github/workflows/workflow-normalizer.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/static-analysis-report.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/smoke-copilot.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/smoke-copilot-arm.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/smoke-claude.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/security-review.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/safe-output-health.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/q.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/python-data-charts.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/prompt-clustering-analysis.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/portfolio-analyst.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/metrics-collector.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/mcp-inspector.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/example-workflow-analyzer.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/dev-hawk.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/deep-report.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/daily-safe-output-optimizer.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/daily-rendering-scripts-verifier.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/daily-observability-report.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/daily-firewall-report.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/cloclo.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/audit-workflows.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/agent-persona-explorer.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
| .github/workflows/agent-performance-analyzer.lock.yml | Regenerated to include concatenation of the new guide prompt file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| **⚠️ CRITICAL**: The `status`, `logs`, `audit`, `list`, and `compile` operations are MCP server tools, | ||
| NOT shell commands. Do NOT run `gh aw` directly — it is not authenticated in this context. | ||
| Do not attempt to download or build the `gh aw` extension. If the MCP server fails, give up. | ||
| Call all operations as MCP tools with JSON parameters. | ||
|
|
||
| - Run the `status` tool to verify configuration and list all workflows | ||
| - Use the `logs` tool to download run logs (saves to `/tmp/gh-aw/aw-mcp/logs/`) | ||
| - Use the `audit` tool with a `run_id` to investigate specific runs | ||
| - Use the `list` tool to enumerate workflows in the repository | ||
|
|
| - `count`: number of runs (default 30, max 5000) | ||
| - `start_date`: relative date, e.g. `-1d`, `-7d`, `-30d` | ||
| - `engine`: filter by AI engine (`copilot`, `claude`, `codex`) |
| #### `audit` — Inspect a specific run | ||
| - `run_id`: GitHub Actions run ID (numeric) |
|
@copilot review comments, optimize prompt |
…logs/audit params) Co-authored-by: pelikhan <[email protected]>
Fixed in f5cd100:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Hey This PR is well-structured, clearly described, focused on a single concern, and comes with both positive and negative test coverage ( Checklist summary:
This PR looks ready for maintainer review. 🟢
|
26 workflows using
agentic-workflows:duplicate the same MCP usage warnings verbatim in their prompt bodies. Rather than a shared workflow component, this injects the guide automatically at compile time — zero workflow changes required.Changes
actions/setup/md/agentic_workflows_guide.md— New runtime prompt file with the canonical MCP usage guide: criticalgh awdirect-use warning, and parameter docs forstatus,logs, andaudittoolspkg/workflow/prompt_constants.go— AddedagenticWorkflowsGuideFileconstantpkg/workflow/prompts.go— AddedhasAgenticWorkflowsTool()helper, mirroringhasPlaywrightTool()pkg/workflow/unified_prompt_step.go— New section 4 incollectPromptSections()injects the guide wheneveragentic-workflows:is present in the tools configThe guide is injected automatically — no workflow edits needed. Updates to the guide propagate to all 26+ affected workflows on next recompile.